summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-11 19:23:48 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-11 19:23:48 +0000
commit74116c11a2adc1f2030970ff8143cba5fb636eb6 (patch)
tree7ff71db0538f51ed053f067673e5471e2c038a41 /libpcsxcore
parent21035377ba786f9e2d0ed06c55f4980abdf0f664 (diff)
downloadpcsxr-74116c11a2adc1f2030970ff8143cba5fb636eb6.tar.gz
R3000: Crash Bandicoot 2
- Remove GTE bit toggle hack - Don't run interrupt when GTE in pipeline git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@57066 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/r3000a.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c
index b1ffdc9a..c6efc6f9 100644
--- a/libpcsxcore/r3000a.c
+++ b/libpcsxcore/r3000a.c
@@ -26,6 +26,10 @@
#include "mdec.h"
#include "gte.h"
+
+extern u32 *Read_ICache( u32 pc, u32 isolate );
+
+
R3000Acpu *psxCpu = NULL;
psxRegisters psxRegs;
@@ -102,31 +106,30 @@ void psxException(u32 code, u32 bd) {
psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status &~0x3f) |
((psxRegs.CP0.n.Status & 0xf) << 2);
- if (!Config.HLE && (((PSXMu32(psxRegs.CP0.n.EPC) >> 24) & 0xfe) == 0x4a)) {
- // "hokuto no ken" / "Crash Bandicot 2" ... fix
- PSXMu32ref(psxRegs.CP0.n.EPC)&= SWAPu32(~0x02000000);
- }
-
if (Config.HLE) psxBiosException();
}
void psxBranchTest() {
+ // GameShark Sampler: Give VSync pin some delay before exception eats it
if (psxHu32(0x1070) & psxHu32(0x1074)) {
if ((psxRegs.CP0.n.Status & 0x401) == 0x401) {
+ u32 opcode;
+
+ // Crash Bandicoot 2: Don't run exceptions when GTE in pipeline
+ opcode = *Read_ICache( psxRegs.pc, 1 );
+ if( ((opcode >> 24) & 0xfe) != 0x4a ) {
#ifdef PSXCPU_LOG
- PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
+ PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
#endif
-// SysPrintf("Interrupt (%x): %x %x\n", psxRegs.cycle, psxHu32(0x1070), psxHu32(0x1074));
- psxException(0x400, 0);
+ psxException(0x400, 0);
+ }
}
}
- // Give Vsync ~2-15+ cycles before exception eats it
if ((psxRegs.cycle - psxNextsCounter) >= psxNextCounter)
psxRcntUpdate();
if (psxRegs.interrupt) {
- //if (1) {
if ((psxRegs.interrupt & (1 << PSXINT_SIO)) && !Config.Sio) { // sio
if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_SIO].sCycle) >= psxRegs.intCycle[PSXINT_SIO].cycle) {
psxRegs.interrupt &= ~(1 << PSXINT_SIO);