From 1764f04eb53a9ec35642cd8a09a2b72418dad9bc Mon Sep 17 00:00:00 2001 From: kipcode66 Date: Fri, 30 Jan 2026 23:54:55 -0500 Subject: [PATCH] Adding JHostID files and stubs --- CMakeLists.txt | 5 ++++ src/JSystem/JHostIO/JORServer.cpp | 9 ++++++- src/dusk/stubs.cpp | 42 +++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db0b0f6b38..437f138699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -576,6 +576,11 @@ set(JSYSTEM_FILES src/JSystem/JMath/JMath.cpp src/JSystem/JMath/random.cpp src/JSystem/JMath/JMATrigonometric.cpp + src/JSystem/JHostIO/JORHostInfo.cpp + src/JSystem/JHostIO/JORServer.cpp + src/JSystem/JHostIO/JHIhioASync.cpp + src/JSystem/JHostIO/JHIRMcc.cpp + src/JSystem/JHostIO/JHIMccBuf.cpp ) set(REL_FILES diff --git a/src/JSystem/JHostIO/JORServer.cpp b/src/JSystem/JHostIO/JORServer.cpp index 5a55a342c9..f6423ffebd 100644 --- a/src/JSystem/JHostIO/JORServer.cpp +++ b/src/JSystem/JHostIO/JORServer.cpp @@ -32,6 +32,7 @@ JOREventCallbackListNode::~JOREventCallbackListNode() { JORRemove(); } +#if DEBUG void JORReflexible::listen(u32 command, const JOREvent* event) { switch (command) { case JORServer::ECommand_GenObjInfo: @@ -110,6 +111,7 @@ void JORReflexible::listenPropertyEvent(const JORPropertyEvent* pEvent) { return; } } +#endif JORServer* JORServer::instance; @@ -195,9 +197,11 @@ void JORServer::receive(const char* pBuffer, s32 length) { JORNodeEvent* pEvent = (JORNodeEvent*)(pBuffer + stream.getPosition()); stream.skip(4); +#if DEBUG if (stream.isGood()) { reinterpret_cast(obj_addr)->listen(command, pEvent); } +#endif } break; case ECommand_PropertyEvent: { @@ -210,18 +214,21 @@ void JORServer::receive(const char* pBuffer, s32 length) { stream.skip(pEvent->field_0x14); } +#if DEBUG if (stream.isGood()) { reinterpret_cast(obj_addr)->listen(command, pEvent); } +#endif } break; case ECommand_GenObjInfo: { u32 obj_addr; stream.read(obj_addr); - +#if DEBUG if (stream.isGood()) { reinterpret_cast(obj_addr)->listen(command, NULL); } +#endif } break; case ECommand_FIO: diff --git a/src/dusk/stubs.cpp b/src/dusk/stubs.cpp index 88a9559007..ee466a699c 100644 --- a/src/dusk/stubs.cpp +++ b/src/dusk/stubs.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -1312,3 +1314,43 @@ void* __memcpy(void* a, const void* b, int c) { puts("__cntlzw is a stub"); return NULL; } + +BOOL HIO2Close(s32 handle) { + puts("HIO2Close is a stub"); + return FALSE; +} + +BOOL HIO2EnumDevices(HIO2EnumCallback callback) { + puts("HIO2EnumDevices is a stub"); + return FALSE; +} + +BOOL HIO2Init(void) { + puts("HIO2Init is a stub"); + return FALSE; +} + +s32 HIO2Open(HIO2DeviceType type, HIO2UnkCallback exiCb, HIO2DisconnectCallback disconnectCb) { + puts("HIO2Open is a stub"); + return 0; +} + +BOOL HIO2Read(s32 handle, u32 addr, void* buffer, s32 size) { + puts("HIO2Read is a stub"); + return FALSE; +} + +BOOL HIO2Write(s32 handle, u32 addr, void* buffer, s32 size) { + puts("HIO2Write is a stub"); + return FALSE; +} + +BOOL HIORead(u32 addr, void* buffer, s32 size) { + puts("HIORead is a stub"); + return FALSE; +} + +BOOL HIOWrite(u32 addr, void* buffer, s32 size) { + puts("HIOWrite is a stub"); + return FALSE; +}