diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-16 02:17:30 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-16 02:17:30 +0200 |
commit | 4fba4f36bf20c2721e2602c450eafcc1117ac643 (patch) | |
tree | ed44db9fd187dde4d1b3648ce87dace024b86a0e /src | |
parent | added memory mapped region for system mem - sdk demos load a segment here on ELF load (diff) | |
download | yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.gz yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.bz2 yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.lz yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.xz yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.zst yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/function_wrappers.h | 5 | ||||
-rw-r--r-- | src/core/hle/syscall.cpp | 16 | ||||
-rw-r--r-- | src/core/hle/syscall.h | 11 |
3 files changed, 30 insertions, 2 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 83be7648b..61790e5a3 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -734,6 +734,11 @@ template<int func(void*, u32)> void WrapI_VU(){ RETURN(retval); } +template<int func(void*, void*, u32)> void WrapI_VVU(){ + u32 retval = func(Memory::GetPointer(PARAM(0)), Memory::GetPointer(PARAM(1)), PARAM(2)); + RETURN(retval); +} + template<int func(void*, u32, void*, int)> void WrapI_VUVI(){ u32 retval = func(Memory::GetPointer(PARAM(0)), PARAM(1), Memory::GetPointer(PARAM(2)), PARAM(3)); RETURN(retval); diff --git a/src/core/hle/syscall.cpp b/src/core/hle/syscall.cpp index 0700d9e82..0765bce7a 100644 --- a/src/core/hle/syscall.cpp +++ b/src/core/hle/syscall.cpp @@ -169,10 +169,22 @@ Result ReleaseMutex(Handle handle) { return 0; } +Result GetThreadId(void* thread_id, u32 thread) { + DEBUG_LOG(SVC, "(UNIMPLEMENTED) GetThreadId called thread=0x%08X", thread); + return 0; +} + +Result QueryMemory(void *_info, void *_out, u32 addr) { + MemoryInfo* info = (MemoryInfo*) _info; + PageInfo* out = (PageInfo*) _out; + DEBUG_LOG(SVC, "(UNIMPLEMENTED) QueryMemory called addr=0x%08X", addr); + return 0; +} + const HLE::FunctionDef Syscall_Table[] = { {0x00, NULL, "Unknown"}, {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, - {0x02, NULL, "QueryMemory"}, + {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"}, {0x03, NULL, "ExitProcess"}, {0x04, NULL, "GetProcessAffinityMask"}, {0x05, NULL, "SetProcessAffinityMask"}, @@ -225,7 +237,7 @@ const HLE::FunctionDef Syscall_Table[] = { {0x34, NULL, "OpenThread"}, {0x35, NULL, "GetProcessId"}, {0x36, NULL, "GetProcessIdOfThread"}, - {0x37, NULL, "GetThreadId"}, + {0x37, WrapI_VU<GetThreadId>, "GetThreadId"}, {0x38, WrapI_VU<GetResourceLimit>, "GetResourceLimit"}, {0x39, NULL, "GetResourceLimitLimitValues"}, {0x3A, WrapI_VUVI<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, diff --git a/src/core/hle/syscall.h b/src/core/hle/syscall.h index 15af5e138..17f190266 100644 --- a/src/core/hle/syscall.h +++ b/src/core/hle/syscall.h @@ -9,6 +9,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// // SVC structures +struct MemoryInfo { + u32 base_address; + u32 size; + u32 permission; + u32 state; +}; + +struct PageInfo { + u32 flags; +}; + struct ThreadContext { u32 cpu_registers[13]; u32 sp; |