fix irq status
authornotaz <notasas@gmail.com>
Sun, 6 Jan 2013 17:59:20 +0000 (19:59 +0200)
committernotaz <notasas@gmail.com>
Sun, 6 Jan 2013 18:01:16 +0000 (20:01 +0200)
tested on real hardware

libpcsxcore/new_dynarec/pcsxmem.c
libpcsxcore/psxhw.c

index 4d83452..a42852a 100644 (file)
@@ -147,9 +147,9 @@ make_rcnt_funcs(2)
 
 static void io_write_ireg16(u32 value)
 {
-       if (Config.Sio) psxHu16ref(0x1070) |= 0x80;
+       //if (Config.Sio) psxHu16ref(0x1070) |= 0x80;
        if (Config.SpuIrq) psxHu16ref(0x1070) |= 0x200;
-       psxHu16ref(0x1070) &= psxHu16(0x1074) & value;
+       psxHu16ref(0x1070) &= value;
 }
 
 static void io_write_imask16(u32 value)
@@ -161,9 +161,9 @@ static void io_write_imask16(u32 value)
 
 static void io_write_ireg32(u32 value)
 {
-       if (Config.Sio) psxHu32ref(0x1070) |= 0x80;
+       //if (Config.Sio) psxHu32ref(0x1070) |= 0x80;
        if (Config.SpuIrq) psxHu32ref(0x1070) |= 0x200;
-       psxHu32ref(0x1070) &= psxHu32(0x1074) & value;
+       psxHu32ref(0x1070) &= value;
 }
 
 static void io_write_imask32(u32 value)
index 1f85278..6b9125d 100644 (file)
@@ -431,7 +431,7 @@ void psxHwWrite16(u32 add, u16 value) {
 #endif
                        if (Config.Sio) psxHu16ref(0x1070) |= SWAPu16(0x80);
                        if (Config.SpuIrq) psxHu16ref(0x1070) |= SWAPu16(0x200);
-                       psxHu16ref(0x1070) &= SWAPu16((psxHu16(0x1074) & value));
+                       psxHu16ref(0x1070) &= SWAPu16(value);
                        return;
 
                case 0x1f801074:
@@ -546,7 +546,7 @@ void psxHwWrite32(u32 add, u32 value) {
 #endif
                        if (Config.Sio) psxHu32ref(0x1070) |= SWAPu32(0x80);
                        if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAPu32(0x200);
-                       psxHu32ref(0x1070) &= SWAPu32((psxHu32(0x1074) & value));
+                       psxHu32ref(0x1070) &= SWAPu32(value);
                        return;
                case 0x1f801074:
 #ifdef PSXHW_LOG