3
0
Fork 0
forked from suyu/suyu

- fixed tabs in function_wrappers.h

- fixed log message wording in hle.cpp
- added syscall stubs for CloseHandle and WaitSynchronization1
This commit is contained in:
bunnei 2014-04-16 20:41:33 -04:00
parent 32c3462047
commit de3dcd38f6
4 changed files with 413 additions and 395 deletions

View file

@ -724,3 +724,8 @@ template<int func(int, const char *, u32, void *, int, int, int)> void WrapI_ICU
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), Memory::GetPointer(PARAM(3)), PARAM(4), PARAM(5), PARAM(6)); u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), Memory::GetPointer(PARAM(3)), PARAM(4), PARAM(5), PARAM(6));
RETURN(retval); RETURN(retval);
} }
template<int func(u32, s64)> void WrapI_US64() {
int retval = func(PARAM(0), PARAM64(2));
RETURN(retval);
}

View file

@ -76,7 +76,7 @@ void CallSyscall(u32 opcode) {
if (info->func) { if (info->func) {
info->func(); info->func();
} else { } else {
ERROR_LOG(HLE, "Unimplemented HLE function %s", info->name); ERROR_LOG(HLE, "Unimplemented SysCall function %s(..)", info->name.c_str());
} }
} }

View file

@ -10,6 +10,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
#define PARAM(n) Core::g_app_core->GetReg(n) #define PARAM(n) Core::g_app_core->GetReg(n)
#define PARAM64(n) (Core::g_app_core->GetReg(n) | ((u64)Core::g_app_core->GetReg(n + 1) << 32))
#define RETURN(n) Core::g_app_core->SetReg(0, n) #define RETURN(n) Core::g_app_core->SetReg(0, n)
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -27,6 +27,18 @@ Result SendSyncRequest(Handle session) {
return 0; return 0;
} }
/// Close a handle
Result CloseHandle(Handle handle) {
// ImplementMe
return 0;
}
/// Wait for a handle to synchronize, timeout after the specified nanoseconds
Result WaitSynchronization1(Handle handle, s64 nanoseconds) {
// ImplementMe
return 0;
}
const HLE::FunctionDef Syscall_Table[] = { const HLE::FunctionDef Syscall_Table[] = {
{0x00, NULL, "Unknown"}, {0x00, NULL, "Unknown"},
{0x01, NULL, "ControlMemory"}, {0x01, NULL, "ControlMemory"},
@ -63,8 +75,8 @@ const HLE::FunctionDef Syscall_Table[] = {
{0x20, NULL, "UnmapMemoryBlock"}, {0x20, NULL, "UnmapMemoryBlock"},
{0x21, NULL, "CreateAddressArbiter"}, {0x21, NULL, "CreateAddressArbiter"},
{0x22, NULL, "ArbitrateAddress"}, {0x22, NULL, "ArbitrateAddress"},
{0x23, NULL, "CloseHandle"}, {0x23, WrapI_U<CloseHandle>, "CloseHandle"},
{0x24, NULL, "WaitSynchronization1"}, {0x24, WrapI_US64<WaitSynchronization1>, "WaitSynchronization1"},
{0x25, NULL, "WaitSynchronizationN"}, {0x25, NULL, "WaitSynchronizationN"},
{0x26, NULL, "SignalAndWait"}, {0x26, NULL, "SignalAndWait"},
{0x27, NULL, "DuplicateHandle"}, {0x27, NULL, "DuplicateHandle"},