washingtondc-emu / washingtondc

Open-source Sega Dreamcast emulator
http://www.washemu.org
GNU General Public License v3.0
240 stars 7 forks source link

Games that try to use Operand-Cache RAM without enabling it #77

Closed snickerbockers closed 4 years ago

snickerbockers commented 4 years ago

I know of two games that do this: San Francisco Rush 2049 and Zelda Return of the Hylian (homebrew).

In the case of SF Rush, the jury's still out as to whether this is WashingtonDC's fault or the game's fault.

In the case of the Zelda fangame, it's obviously the game's fault because it just cleared the ORA flag immediately before writing to the ORA area. r15 points to an address in ORA ram, and was apparently set to that by the bootstrap.

(WashDbg): x/w 0xac00e052
0xac00e052: 0xff00001c
(WashDbg): x/2 0xac00e054
0xac00e054: 0x0000090b
0xac00e058: 0xac00e05c
(WashDbg): x/w 0xac00e054
0xac00e054: 0x0000090b
(WashDbg): x/20i 0xac00e000 
0xac00e000: mov.l @(0x00000044, pc), r0 ! 0xac00e044
0xac00e002: mov.l @(0x00000040, pc), r1 ! 0xac00e042
0xac00e004: or r1, r0
0xac00e006: jmp @r0
0xac00e008: nop
0xac00e00a: mov.l @(0x00000048, pc), r0 ! 0xac00e052
0xac00e00c: mov.w @(0x00000048, pc), r1 ! 0xac00e054
0xac00e00e: mov.l r1, @r0
0xac00e010: sts.l pr, @-r15
snickerbockers commented 4 years ago

fixed as of 75717a5ca1ca947ecfeddc707afa8e1ee213b739 because apparently it works on real hardware somehow