diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-18 05:05:31 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-18 05:05:31 +0200 |
commit | b2baafaf8ba760ce2b975391fd04db52ad386e29 (patch) | |
tree | db16aba20508121cd0d6d7cd489d1e1963b67525 /src/core/hle | |
parent | fixed bug in Memory::GetPointer (diff) | |
download | yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar.gz yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar.bz2 yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar.lz yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar.xz yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.tar.zst yuzu-b2baafaf8ba760ce2b975391fd04db52ad386e29.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/syscall.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/core/hle/syscall.cpp b/src/core/hle/syscall.cpp index c5b887795..0cb563955 100644 --- a/src/core/hle/syscall.cpp +++ b/src/core/hle/syscall.cpp @@ -4,6 +4,10 @@ #include <map> +#include "core/mem_map.h" + +#include "core/hw/hw_lcd.h" + #include "core/hle/function_wrappers.h" #include "core/hle/syscall.h" #include "core/hle/service/service.h" @@ -13,6 +17,26 @@ namespace Syscall { +/// Map application or GSP heap memory +Result ControlMemory(void* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions) { + u32 virtual_address = 0x00000000; + + switch (operation) { + + // Map GSP heap memory? + case 0x00010003: + virtual_address = Memory::MapBlock_HeapGSP(size, operation, permissions); + break; + + // Unknown ControlMemory operation + default: + ERROR_LOG(OSHLE, "Unknown ControlMemory operation %08X", operation); + } + + Core::g_app_core->SetReg(1, Memory::MapBlock_HeapGSP(size, operation, permissions)); + return 0; +} + /// Connect to an OS service given the port name, returns the handle to the port to out Result ConnectToPort(void* out, const char* port_name) { Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); @@ -41,7 +65,7 @@ Result WaitSynchronization1(Handle handle, s64 nanoseconds) { const HLE::FunctionDef Syscall_Table[] = { {0x00, NULL, "Unknown"}, - {0x01, NULL, "ControlMemory"}, + {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, {0x02, NULL, "QueryMemory"}, {0x03, NULL, "ExitProcess"}, {0x04, NULL, "GetProcessAffinityMask"}, |