From 695e6de85e06d47043003664531fc491eaa91240 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 8 May 2024 01:18:59 +0200 Subject: [PATCH] 32x, internal BIOS hack for jumping to 0x140 --- pico/32x/memory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.39.5