From: gameblabla Date: Mon, 22 Jul 2019 02:39:41 +0000 (+0200) Subject: psxbios: Properly fix garbage area code. X-Git-Tag: r23~156^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=339cc5b6c622b9e4544e67239c048d39f245390b;p=pcsx_rearmed.git psxbios: Properly fix garbage area code. This should work as intended now. --- diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 93a40576..8c8093b1 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -3081,18 +3081,19 @@ void psxBiosInit() { /* Some games like R-Types, CTR, Fade to Black read from adress 0x00000000 due to uninitialized pointers. See Garbage Area at Address 00000000h in Nocash PSX Specfications for more information. - R-type will work if PsxM[0] is non-zero. (Meaning that it should not be 00000003h as he implies). - Crash Team Racing will refuse to boot if psxM[2] and psx[3] are not set to 0. - Fade to Black can crash upon memory card access if byte 5 is set to the wrong value. + Here are some examples of games not working with this fix in place : + R-type won't get past the Irem logo if not implemented. + Crash Team Racing will softlock after the Sony logo. */ - psxM[0] = SWAPu32(0x3C); - psxM[1] = SWAPu32(0x1A); - psxM[2] = SWAPu32(0x00); - psxM[3] = SWAPu32(0x00); - psxM[4] = SWAPu32(0x27); - psxM[5] = SWAPu32(0x5A); - psxM[6] = SWAPu32(0x0C); - psxM[7] = SWAPu32(0x80); + + psxMu32ref(0x0000) = SWAPu32(0x00000003); + /* + But overwritten by 00000003h after soon. + psxMu32ref(0x0000) = SWAPu32(0x00001A3C); + */ + psxMu32ref(0x0004) = SWAPu32(0x800C5A27); + psxMu32ref(0x0008) = SWAPu32(0x08000403); + psxMu32ref(0x000C) = SWAPu32(0x00000000); } void psxBiosShutdown() {