summaryrefslogtreecommitdiffstats
path: root/src/core/loader/3dsx.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-04 05:01:16 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-09 03:11:02 +0200
commit6d60acf0f1afcae873988da5218f2f1c7bc9d151 (patch)
treecec75198ab74759002dd1da78f6ac2af5e61949f /src/core/loader/3dsx.cpp
parentCommon: Add StringFromFixedZeroTerminatedBuffer (diff)
downloadyuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar.gz
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar.bz2
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar.lz
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar.xz
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.tar.zst
yuzu-6d60acf0f1afcae873988da5218f2f1c7bc9d151.zip
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r--src/core/loader/3dsx.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp
index 5d806c5d0..5aaeb53d8 100644
--- a/src/core/loader/3dsx.cpp
+++ b/src/core/loader/3dsx.cpp
@@ -8,9 +8,10 @@
#include "common/logging/log.h"
#include "core/file_sys/archive_romfs.h"
+#include "core/hle/kernel/process.h"
+#include "core/hle/service/fs/archive.h"
#include "core/loader/elf.h"
#include "core/loader/ncch.h"
-#include "core/hle/service/fs/archive.h"
#include "core/mem_map.h"
#include "3dsx.h"
@@ -229,8 +230,12 @@ ResultStatus AppLoader_THREEDSX::Load() {
if (!file->IsOpen())
return ResultStatus::Error;
- Load3DSXFile(*file, 0x00100000);
- Kernel::LoadExec(0x00100000);
+ Kernel::g_current_process = Kernel::Process::Create(filename, 0);
+ Kernel::g_current_process->static_address_mappings = default_address_mappings;
+
+ Load3DSXFile(*file, Memory::EXEFS_CODE_VADDR);
+
+ Kernel::g_current_process->Run(Memory::EXEFS_CODE_VADDR, 48, Kernel::DEFAULT_STACK_SIZE);
is_loaded = true;
return ResultStatus::Success;