Skip to content

Commit 98dfd9c

Browse files
authored
Merge pull request #142 from nicolasnoble/faster-exceptions
Faster exceptions.
2 parents 8723ade + e10483b commit 98dfd9c

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/core/r3000a.cc

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,6 @@ void PCSX::R3000Acpu::psxException(uint32_t code, bool bd) {
9797
}
9898

9999
void PCSX::R3000Acpu::psxBranchTest() {
100-
// GameShark Sampler: Give VSync pin some delay before exception eats it
101-
if (psxHu32(0x1070) & psxHu32(0x1074)) {
102-
if ((m_psxRegs.CP0.n.Status & 0x401) == 0x401) {
103-
uint32_t opcode;
104-
105-
// Crash Bandicoot 2: Don't run exceptions when GTE in pipeline
106-
opcode = SWAP_LE32(*Read_ICache(m_psxRegs.pc, true));
107-
if (((opcode >> 24) & 0xfe) != 0x4a) {
108-
PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
109-
psxException(0x400, 0);
110-
}
111-
}
112-
}
113-
114100
#if 0
115101
if( SPU_async )
116102
{
@@ -228,6 +214,18 @@ void PCSX::R3000Acpu::psxBranchTest() {
228214
}
229215
}
230216
}
217+
if (psxHu32(0x1070) & psxHu32(0x1074)) {
218+
if ((m_psxRegs.CP0.n.Status & 0x401) == 0x401) {
219+
uint32_t opcode;
220+
221+
// Crash Bandicoot 2: Don't run exceptions when GTE in pipeline
222+
opcode = SWAP_LE32(*Read_ICache(m_psxRegs.pc, true));
223+
if (((opcode >> 24) & 0xfe) != 0x4a) {
224+
PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
225+
psxException(0x400, 0);
226+
}
227+
}
228+
}
231229
}
232230

233231
void PCSX::R3000Acpu::psxSetPGXPMode(uint32_t pgxpMode) {

0 commit comments

Comments
 (0)