Hi all!
I'm writing here in the hope someone can give me some hints to debug things further. I'm porting the game Rock'n'Diamonds (https://www.artsoft.org/) to the Wii, I got it to compile, but the program crashes shortly after start. Dolphin says:
Code: Select all
45:04:664 Core/Boot/Boot.cpp:528 N[BOOT]: Booting from executable: ./rocksndiamonds.elf
Oversized range in GetPointerForRange. 47bdf60 bytes at 0x80477aa0
Invalid range in Memset. 47bdf60 bytes at 0x80477aa0
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:322 N[PowerPC]: Last PC = 00000000 : ---
45:04:931 Core/Debugger/Debugger_SymbolMap.cpp:113 N[PowerPC]: == STACK TRACE - SP = 8047ba64 ==
45:04:931 Core/Debugger/Debugger_SymbolMap.cpp:122 N[PowerPC]: * --- [ LR = 8000407c ]
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:327 N[PowerPC]:
IntCPU: Unknown instruction 00000000 at PC = 8023c3ac last_PC = 00000000 LR = 8000407c
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r0: 0x80004030 r1: 0x8047ba64 r2: 0x803ceb8c r3: 0x84c359fc
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r4: 0x00000000 r5: 0x011ef7d8 r6: 0x00000000 r7: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r8: 0x00000000 r9: 0x80004008 r10: 0x00000000 r11: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r12: 0x00000000 r13: 0x804771a0 r14: 0x00000000 r15: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r24: 0x00000000 r25: 0x00000000 r26: 0x00000000 r27: 0x00000000
45:04:931 Core/PowerPC/Interpreter/Interpreter.cpp:333 N[PowerPC]: r28: 0x00000000 r29: 0x00000000 r30: 0x00000000 r31: 0x8000402c
An error occurred.
IntCPU: Unknown instruction 00000000 at PC = 8023c3ac last_PC = 00000000 LR = 8000407c
Condition: 0
File: /run/build/dolphin-emu/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp
Line: 337
Function: unknown_instruction
Ignore and continue?
Window 0x4600001 destroyed
I've debugged this adding exit() at different places, and found where it crashes:
Code: Select all
// read default program config, if existing
if (fileExists(config_filename)) // <-- crashes here
LoadSetupFromFilename(config_filename);
It does not get to call fileExists (I put an exit(0) right at its, start, and it still crashes). If I print the address of fileExists
, it's correct: it prints 80006a84
, and if I open that address with Dolphin, I see that it's indeed the beginning of the fileExists()
function.
Any ideas on how to debug this further?