From: notaz Date: Tue, 7 May 2024 23:18:59 +0000 (+0200) Subject: 32x, internal BIOS hack for jumping to 0x140 X-Git-Tag: v2.00~62 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=695e6de85e06d47043003664531fc491eaa91240;p=picodrive.git 32x, internal BIOS hack for jumping to 0x140 --- diff --git a/pico/32x/memory.c b/pico/32x/memory.c index e4df386f..e6c55f2e 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -2238,10 +2238,16 @@ static void get_bios(void) } else { pl = (u32 *)&Pico32xMem->sh2_rom_m; + ps = (u16 *)pl; // fill exception vector table to our trap address - for (i = 0; i < 128; i++) + for (i = 0; i < 80; i++) pl[i] = CPU_BE2(0x200); + // CD titles by Digital Pictures jump to 0x140 for resetting ... + for (i = 0x140/2; i < 0x1fc/2; i++) + ps[i] = 0x0009; // nop // ... so fill the remainder with nops + ps[i++] = 0xa002; // bra 0x204 // ... and jump over the trap + ps[i++] = 0x0009; // nop // start pl[0] = pl[2] = CPU_BE2(0x204);