X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxbios.c;h=00b5d76b6c2fc0d27a784cad861abe9f8c6fd96c;hb=825757532f4b9a30f25c491267d544e02730e2e8;hp=fdac5562f62d99bf32acd2b8e64e15825ea32343;hpb=1da9b9ae28406f3bec5b2bd5905783971b991bec;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index fdac5562..00b5d76b 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -1869,9 +1869,13 @@ void psxBios_GetRCnt() { // 03 PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x03]); #endif - a0&= 0x3; - if (a0 != 3) v0 = psxRcntRcount(a0); - else v0 = 0; + switch (a0 & 0x3) + { + case 0: v0 = psxRcntRcount0(); break; + case 1: v0 = psxRcntRcount1(); break; + case 2: v0 = psxRcntRcount2(); break; + case 3: v0 = 0; break; + } pc0 = ra; } @@ -3960,8 +3964,8 @@ void psxBiosException() { int i; // save the regs - // $at, $v0, $v1 already saved by the mips code at A_EXCEPTION - for (i = 4; i < 32; i++) { + // $at, $v0, $v1, $ra already saved by the mips code at A_EXCEPTION + for (i = 4; i < 31; i++) { if (i == 26) // $k0 continue; tcb->reg[i] = SWAP32(psxRegs.GPR.r[i]);