summaryrefslogtreecommitdiff
path: root/libpcsxcore/r3000a.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/r3000a.c')
-rw-r--r--libpcsxcore/r3000a.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c
index acc8eb60..550a17bb 100644
--- a/libpcsxcore/r3000a.c
+++ b/libpcsxcore/r3000a.c
@@ -114,7 +114,7 @@ void psxBranchTest() {
if ((psxRegs.cycle - psxNextsCounter) >= psxNextCounter)
psxRcntUpdate();
- if (psxRegs.interrupt) {
+ if (psxRegs.interrupt) {
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);
@@ -151,12 +151,26 @@ void psxBranchTest() {
spuInterrupt();
}
}
- if (psxRegs.interrupt & (1 << PSXINT_GPUBUSY)) { // gpu busy
- if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_GPUBUSY].sCycle) >= psxRegs.intCycle[PSXINT_GPUBUSY].cycle) {
- psxRegs.interrupt &= ~(1 << PSXINT_GPUBUSY);
- GPU_idle();
- }
- }
+ if (psxRegs.interrupt & (1 << PSXINT_GPUBUSY)) { // gpu busy
+ if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_GPUBUSY].sCycle) >= psxRegs.intCycle[PSXINT_GPUBUSY].cycle) {
+ psxRegs.interrupt &= ~(1 << PSXINT_GPUBUSY);
+ GPU_idle();
+ }
+ }
+
+ if (psxRegs.interrupt & (1 << PSXINT_MDECINDMA)) { // mdec in
+ if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_MDECINDMA].sCycle) >= psxRegs.intCycle[PSXINT_MDECINDMA].cycle) {
+ psxRegs.interrupt &= ~(1 << PSXINT_MDECINDMA);
+ mdec0Interrupt();
+ }
+ }
+
+ if (psxRegs.interrupt & (1 << PSXINT_GPUOTCDMA)) { // gpu otc
+ if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_GPUOTCDMA].sCycle) >= psxRegs.intCycle[PSXINT_GPUOTCDMA].cycle) {
+ psxRegs.interrupt &= ~(1 << PSXINT_GPUOTCDMA);
+ gpuotcInterrupt();
+ }
+ }
}
if (psxHu32(0x1070) & psxHu32(0x1074)) {