mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
- added stub for CreateEvent
- changed some stubbed SVCs to return unique handle names for debugging purposes
This commit is contained in:
parent
6a6c7eeccb
commit
8fba88d5d5
1 changed files with 22 additions and 8 deletions
|
@ -3,6 +3,9 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "common/symbols.h"
|
||||||
|
|
||||||
#include "core/mem_map.h"
|
#include "core/mem_map.h"
|
||||||
|
|
||||||
|
@ -14,8 +17,6 @@
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#include "core/hle/kernel/thread.h"
|
#include "core/hle/kernel/thread.h"
|
||||||
|
|
||||||
#include "common/symbols.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Namespace Syscall
|
// Namespace Syscall
|
||||||
|
|
||||||
|
@ -81,7 +82,6 @@ Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherper
|
||||||
|
|
||||||
/// Connect to an OS service given the port name, returns the handle to the port to out
|
/// 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) {
|
Result ConnectToPort(void* out, const char* port_name) {
|
||||||
|
|
||||||
Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
|
Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
|
||||||
Core::g_app_core->SetReg(1, service->GetUID());
|
Core::g_app_core->SetReg(1, service->GetUID());
|
||||||
DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name);
|
DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name);
|
||||||
|
@ -116,8 +116,13 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
|
||||||
s32* out = (s32*)_out;
|
s32* out = (s32*)_out;
|
||||||
Handle* handles = (Handle*)_handles;
|
Handle* handles = (Handle*)_handles;
|
||||||
// ImplementMe
|
// ImplementMe
|
||||||
DEBUG_LOG(SVC, "(UNIMPLEMENTED) WaitSynchronizationN called handle_count=%d, wait_all=%d, nanoseconds=%d",
|
|
||||||
handle_count, wait_all, nano_seconds);
|
DEBUG_LOG(SVC, "(UNIMPLEMENTED) WaitSynchronizationN called handle_count=%d, wait_all=%s, nanoseconds=%d %s",
|
||||||
|
handle_count, (wait_all ? "true" : "false"), nano_seconds);
|
||||||
|
|
||||||
|
for (int i = 0; i < handle_count; i++) {
|
||||||
|
DEBUG_LOG(SVC, "\thandle[%d]=0x%08X", i, handles[i]);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +130,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
|
||||||
Result CreateAddressArbiter(void* arbiter) {
|
Result CreateAddressArbiter(void* arbiter) {
|
||||||
// ImplementMe
|
// ImplementMe
|
||||||
DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateAddressArbiter called");
|
DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateAddressArbiter called");
|
||||||
Core::g_app_core->SetReg(1, 0xDEADBEEF);
|
Core::g_app_core->SetReg(1, 0xFABBDADD);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,6 +175,7 @@ Result CreateThread(void* thread, u32 priority, u32 entry_point, u32 arg, u32 st
|
||||||
|
|
||||||
Handle handle = __KernelCreateThread(name.c_str(), entry_point, priority, processor_id,
|
Handle handle = __KernelCreateThread(name.c_str(), entry_point, priority, processor_id,
|
||||||
stack_top);
|
stack_top);
|
||||||
|
Core::g_app_core->SetReg(1, 0xFEEDDEAF);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -178,6 +184,7 @@ Result CreateMutex(void* _mutex, u32 initial_locked) {
|
||||||
Handle* mutex = (Handle*)_mutex;
|
Handle* mutex = (Handle*)_mutex;
|
||||||
DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateMutex called initial_locked=%s",
|
DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateMutex called initial_locked=%s",
|
||||||
initial_locked ? "true" : "false");
|
initial_locked ? "true" : "false");
|
||||||
|
Core::g_app_core->SetReg(1, 0xF00D0BAD);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +205,13 @@ Result QueryMemory(void *_info, void *_out, u32 addr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result CreateEvent(void* _event, u32 reset_type) {
|
||||||
|
Handle* event = (Handle*)_event;
|
||||||
|
DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateEvent called reset_type=0x%08X", reset_type);
|
||||||
|
Core::g_app_core->SetReg(1, 0xBADC0DE0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const HLE::FunctionDef Syscall_Table[] = {
|
const HLE::FunctionDef Syscall_Table[] = {
|
||||||
{0x00, NULL, "Unknown"},
|
{0x00, NULL, "Unknown"},
|
||||||
{0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"},
|
{0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"},
|
||||||
|
@ -222,7 +236,7 @@ const HLE::FunctionDef Syscall_Table[] = {
|
||||||
{0x14, WrapI_U<ReleaseMutex>, "ReleaseMutex"},
|
{0x14, WrapI_U<ReleaseMutex>, "ReleaseMutex"},
|
||||||
{0x15, NULL, "CreateSemaphore"},
|
{0x15, NULL, "CreateSemaphore"},
|
||||||
{0x16, NULL, "ReleaseSemaphore"},
|
{0x16, NULL, "ReleaseSemaphore"},
|
||||||
{0x17, NULL, "CreateEvent"},
|
{0x17, WrapI_VU<CreateEvent>, "CreateEvent"},
|
||||||
{0x18, NULL, "SignalEvent"},
|
{0x18, NULL, "SignalEvent"},
|
||||||
{0x19, NULL, "ClearEvent"},
|
{0x19, NULL, "ClearEvent"},
|
||||||
{0x1A, NULL, "CreateTimer"},
|
{0x1A, NULL, "CreateTimer"},
|
||||||
|
|
Loading…
Reference in a new issue