Gericom / GBARunner3

212 stars 30 forks source link

Sonic battle crashes on a white screen with the JIT #62

Open Gericom opened 11 months ago

Gericom commented 11 months ago

It crashes at 0x080205C4 where it attempts to jump to 0x7FFF. Somehow the stack got corrupted.

Patches to run without JIT:

    *(u32*)sdc_loadRomBlockForPatching(0x080000C4) = 0xE1890090;
    *(u32*)sdc_loadRomBlockForPatching(0x080000D0) = 0xE1890090;
    *(u32*)sdc_loadRomBlockForPatching(0x08000114) = 0xE1E00090;
    *(u32*)sdc_loadRomBlockForPatching(0x0800017C) = 0xE1A00093;
    *(u32*)sdc_loadRomBlockForPatching(0x08000188) = 0xE1890093;
    *(u32*)sdc_loadRomBlockForPatching(0x080001A8) = 0xE1A00093;
    *(u32*)sdc_loadRomBlockForPatching(0x080001B4) = 0xE1890093;
    *(u32*)sdc_loadRomBlockForPatching(0x080001C4) = 0xE1C90090;

Seems like the game overwrites the jitted irq handler code in iwram.

Gericom commented 11 months ago

Same issue as #54