diff options
| author | 2014-05-15 20:17:30 -0400 | |
|---|---|---|
| committer | 2014-05-15 20:17:30 -0400 | |
| commit | 4fba4f36bf20c2721e2602c450eafcc1117ac643 (patch) | |
| tree | ed44db9fd187dde4d1b3648ce87dace024b86a0e /src | |
| parent | added memory mapped region for system mem - sdk demos load a segment here on ... (diff) | |
| download | yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.gz yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.tar.xz yuzu-4fba4f36bf20c2721e2602c450eafcc1117ac643.zip | |
- added SVC stubs for QueryMemory and GetThreadId
- added SVC structs MemoryInfo and PageInfo
Diffstat (limited to 'src')
| -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(){ | |||
| 734 | RETURN(retval); | 734 | RETURN(retval); |
| 735 | } | 735 | } |
| 736 | 736 | ||
| 737 | template<int func(void*, void*, u32)> void WrapI_VVU(){ | ||
| 738 | u32 retval = func(Memory::GetPointer(PARAM(0)), Memory::GetPointer(PARAM(1)), PARAM(2)); | ||
| 739 | RETURN(retval); | ||
| 740 | } | ||
| 741 | |||
| 737 | template<int func(void*, u32, void*, int)> void WrapI_VUVI(){ | 742 | template<int func(void*, u32, void*, int)> void WrapI_VUVI(){ |
| 738 | u32 retval = func(Memory::GetPointer(PARAM(0)), PARAM(1), Memory::GetPointer(PARAM(2)), PARAM(3)); | 743 | u32 retval = func(Memory::GetPointer(PARAM(0)), PARAM(1), Memory::GetPointer(PARAM(2)), PARAM(3)); |
| 739 | RETURN(retval); | 744 | 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) { | |||
| 169 | return 0; | 169 | return 0; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | Result GetThreadId(void* thread_id, u32 thread) { | ||
| 173 | DEBUG_LOG(SVC, "(UNIMPLEMENTED) GetThreadId called thread=0x%08X", thread); | ||
| 174 | return 0; | ||
| 175 | } | ||
| 176 | |||
| 177 | Result QueryMemory(void *_info, void *_out, u32 addr) { | ||
| 178 | MemoryInfo* info = (MemoryInfo*) _info; | ||
| 179 | PageInfo* out = (PageInfo*) _out; | ||
| 180 | DEBUG_LOG(SVC, "(UNIMPLEMENTED) QueryMemory called addr=0x%08X", addr); | ||
| 181 | return 0; | ||
| 182 | } | ||
| 183 | |||
| 172 | const HLE::FunctionDef Syscall_Table[] = { | 184 | const HLE::FunctionDef Syscall_Table[] = { |
| 173 | {0x00, NULL, "Unknown"}, | 185 | {0x00, NULL, "Unknown"}, |
| 174 | {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, | 186 | {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, |
| 175 | {0x02, NULL, "QueryMemory"}, | 187 | {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"}, |
| 176 | {0x03, NULL, "ExitProcess"}, | 188 | {0x03, NULL, "ExitProcess"}, |
| 177 | {0x04, NULL, "GetProcessAffinityMask"}, | 189 | {0x04, NULL, "GetProcessAffinityMask"}, |
| 178 | {0x05, NULL, "SetProcessAffinityMask"}, | 190 | {0x05, NULL, "SetProcessAffinityMask"}, |
| @@ -225,7 +237,7 @@ const HLE::FunctionDef Syscall_Table[] = { | |||
| 225 | {0x34, NULL, "OpenThread"}, | 237 | {0x34, NULL, "OpenThread"}, |
| 226 | {0x35, NULL, "GetProcessId"}, | 238 | {0x35, NULL, "GetProcessId"}, |
| 227 | {0x36, NULL, "GetProcessIdOfThread"}, | 239 | {0x36, NULL, "GetProcessIdOfThread"}, |
| 228 | {0x37, NULL, "GetThreadId"}, | 240 | {0x37, WrapI_VU<GetThreadId>, "GetThreadId"}, |
| 229 | {0x38, WrapI_VU<GetResourceLimit>, "GetResourceLimit"}, | 241 | {0x38, WrapI_VU<GetResourceLimit>, "GetResourceLimit"}, |
| 230 | {0x39, NULL, "GetResourceLimitLimitValues"}, | 242 | {0x39, NULL, "GetResourceLimitLimitValues"}, |
| 231 | {0x3A, WrapI_VUVI<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, | 243 | {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 @@ | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 10 | // SVC structures | 10 | // SVC structures |
| 11 | 11 | ||
| 12 | struct MemoryInfo { | ||
| 13 | u32 base_address; | ||
| 14 | u32 size; | ||
| 15 | u32 permission; | ||
| 16 | u32 state; | ||
| 17 | }; | ||
| 18 | |||
| 19 | struct PageInfo { | ||
| 20 | u32 flags; | ||
| 21 | }; | ||
| 22 | |||
| 12 | struct ThreadContext { | 23 | struct ThreadContext { |
| 13 | u32 cpu_registers[13]; | 24 | u32 cpu_registers[13]; |
| 14 | u32 sp; | 25 | u32 sp; |