- removed syscall classes (will just use HLEFunction)

- added hle.cpp and module registration
- removed unused code
This commit is contained in:
bunnei 2014-04-10 21:30:00 -04:00
parent 95f237a086
commit 2a7d7ce55d
6 changed files with 54 additions and 15 deletions

View file

@ -10,13 +10,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef void (*HLEFunc)();
typedef void (*SysCallFunc)();
struct HLEFunction {
u32 id;
HLEFunc func;
const char* name;
u32 flags;
};
struct HLEModule {
@ -25,11 +23,15 @@ struct HLEModule {
const HLEFunction* func_table;
};
struct SysCall {
u8 id;
SysCallFunc func;
const char* name;
};
#define PARAM(n) Core::g_app_core->GetReg(n)
#define RETURN(n) Core::g_app_core->SetReg(0, n)
namespace HLE {
void Init();
void Shutdown();
void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table);
} // namespace

View file

@ -7,16 +7,18 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef u32 Handle;
typedef s32 Result;
Result SVC_ConnectToPort(void* out, const char* port_name) {
NOTICE_LOG(OSHLE, "SVC_ConnectToPort called, port_name: %s", port_name);
NOTICE_LOG(OSHLE, "svcConnectToPort called, port_name: %s", port_name);
return 0;
}
const SysCall SysCallTable[] = {
const HLEFunction SysCallTable[] = {
{0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"},
};
void Register_SysCalls() {
void Register_SysCall() {
HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCallTable), SysCallTable);
}

View file

@ -35,8 +35,6 @@
//};
typedef u32 Handle;
typedef s32 Result;
Result ConnectToPort(Handle* out, const char* port_name);
void Register_SysCall();