Skip to content

Commit

Permalink
readd crash address for pr tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pheenoh committed Jul 31, 2024
1 parent f999f2e commit 4e956e2
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion modules/boot/src/utils/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ HOOK_DEF(void, draw, (void*));
#define PAD_READ_RETURN_OFFSET (0x2DC)
#endif

#ifdef GCN_NTSCU
#define CRASH_ADDRESS (0x80450580)
#endif
#ifdef GCN_PAL
#define CRASH_ADDRESS (0x80452540)
#endif
#ifdef GCN_NTSCJ
#define CRASH_ADDRESS (0x8044A6C0)
#endif
#ifdef WII_NTSCU_10
#define CRASH_ADDRESS (0x80537560)
#endif
#ifdef WII_NTSCU_12
#define CRASH_ADDRESS (0x8051d5e0)
#endif
#ifdef WII_NTSCJ
#define CRASH_ADDRESS (0x8051b460)
#endif
#ifdef WII_PAL
#define CRASH_ADDRESS (0x8051DEE0)
#endif

extern volatile uint32_t gzCrashReport;

HOOK_DEF(uint32_t, PADRead, (uint16_t*));
Expand Down Expand Up @@ -74,7 +96,7 @@ void drawHook(void* p1) {
#ifdef PR_TEST
void myExceptionCallbackHook(void) {
ExceptionCallbackTrampoline();
gzCrashAddr = 1;
*reinterpret_cast<uint32_t*>(CRASH_ADDRESS) = 1;
DCFlushRange((void*)(&gzCrashAddr), sizeof(gzCrashAddr));
ICInvalidateRange((void*)(&gzCrashAddr), sizeof(gzCrashAddr));
}
Expand Down

0 comments on commit 4e956e2

Please sign in to comment.