Gericom / GBARunner3

222 stars 34 forks source link

Added option to force ARM9 67MHz Clock Speed in DSi mode #157

Open Dartz150 opened 6 months ago

Dartz150 commented 6 months ago

This is based on Gericom´s previous implementation in other project.

Fixes issues in these games:

BJXE - Harry Potter and the Order of the Phoenix (USA,EUR) BWWE - WWE - Survivor Series (USA,EUR) - Fixes running too fast AH3E - Hamtaro - Ham-Ham Heartbreak (USA) - Fixes hanging in the title screen AH3P - Hamtaro - Ham-Ham Heartbreak (Europe) (En,Fr,De,Es,It) - Fixes hanging in the title screen AMVJ - Magical Vacation (JAP) - Fixes hanging in the title screen BAVE - Activision Anthology (USA) - Fixes sound issues A9ME - Moto Racer Advance (USA) - Fixes running too fast A9MP - Moto Racer Advance (EUR) - Fixes running too fast ABZE - NFL Blitz 20-02 (USA,EUR) - Fixes running too fast

This setting can be used later if more issues related to clock speeds are found.

Json setting example:

{
    "runSettings": {
        "forceDSArm9Clock": true
    }
}

Tested in both DSi and 3DS consoles, in both SD card and DSpico in DSi mode.

This fixes #120, #110, #81 and #63

cotodevel commented 5 months ago

I kinda had the same issue when porting TGDS-multimediaplayer from NTR mode to TWL mode. Turns out the bios calls in DKARM are NTR mode-only (r45), thus when the games are calling them internally through GBA mode, they don't act properly in TWL mode (they'll run twice as fast).

As a workaround I made TGDS homebrew timing consistent, thus, I could use the default BIOS @ 0xFFFF0000 and it'd magically work for both NTR/TWL modes, sounds, interrupts overall worked incredibly well.

Thus: 1) Reverse engineer what NTR bios does, and apply these fixes in custom BIOS @0x00000000 vectors 2) Reverse engineer what TWL bios does, and apply these fixes in custom BIOS @0x00000000 vectors 3) detect TWL mode and use each one accordingly. Pretty sure it'll fix plenty of timing issues.

As for M&L: SS, the issue is cache regions in DS mode in GBA IO segments where caches should be disabled.