From 9705788a21dc36515ba498d45ba2f197f7bcd628 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 6 Jan 2013 19:59:20 +0200 Subject: [PATCH] fix irq status tested on real hardware --- libpcsxcore/new_dynarec/pcsxmem.c | 8 ++++---- libpcsxcore/psxhw.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index 4d83452d..a42852ad 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -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) diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 1f85278d..6b9125d7 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -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 -- 2.39.5