From 88992615b905fbd122235bbfe420e5cd341af6a4 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Wed, 6 May 2026 21:49:41 -0400 Subject: [PATCH] m_Do_printf OK for demo --- configure.py | 2 +- src/m_Do/m_Do_printf.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.py b/configure.py index 6f35f04b2..bca3ec3f4 100755 --- a/configure.py +++ b/configure.py @@ -384,7 +384,7 @@ config.libs = [ "host": True, "objects": [ Object(Matching, "m_Do/m_Do_main.cpp"), - Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_printf.cpp"), + Object(Matching, "m_Do/m_Do_printf.cpp"), Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_audio.cpp"), Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "m_Do/m_Do_controller_pad.cpp"), Object(NonMatching, "m_Do/m_Do_graphic.cpp"), diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp index 5753ae059..9c21dc626 100644 --- a/src/m_Do/m_Do_printf.cpp +++ b/src/m_Do/m_Do_printf.cpp @@ -26,7 +26,10 @@ extern "C" void* OSGetCallerPC(int param_0) { } /* 80006640-800066B0 .text OSGetActiveThreadID */ -extern "C" int OSGetActiveThreadID(OSThread* thread) { +#if VERSION > VERSION_DEMO +extern "C" +#endif +int OSGetActiveThreadID(OSThread* thread) { OSThread* r31; int id = -1; BOOL enable = OSDisableInterrupts(); @@ -205,6 +208,7 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) { u32 i; u32* p; u32* tmp; + u32 tmp2; OSDisableInterrupts(); va_start(args, fmt); @@ -217,7 +221,8 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) { OSReport("0x%08x: 0x%08x 0x%08x\n", p, p[0], p[1]); } - tmp = (u32*)0x1234567; // ?????? - *tmp = 0x1234567; + tmp2 = 0x1234567; + tmp = (u32*)tmp2; + *tmp = tmp2; PPCHalt(); }