IOP: Fix IRQ edges for SIO2 and CDVD and SIO2 ISTAT usage

and silence a log
This commit is contained in:
refractionpcsx2 authored and lightningterror committed 2026-02-09 17:48:51 +01:00
1 parent 53d98a53e8
commit 2097ff232c
4 files changed
+17 -6

No files matched your search

+8 -2
View File
@@ -102,10 +102,16 @@ static void CDVD_INT(int eCycle)
// test (which will cause the exception to be handled).
static void cdvdSetIrq(uint id = (1 << Irq_CommandComplete))
{
if (!(cdvd.IntrStat & id))
{
iopIntcIrq(2);
psxSetNextBranchDelta(20);
}
else
DevCon.Warning("CDVD trying to double issue IRQ %x", id);
cdvd.IntrStat |= id;
cdvd.AbortRequested = false;
iopIntcIrq(2);
psxSetNextBranchDelta(20);
}
static int mg_BIToffset(u8* buffer)
+2 -2
View File
@@ -782,8 +782,8 @@ void psxRcntSetNewIntrMode(int index)
psxCounters[index].mode.overflowFlag = false;
psxCounters[index].mode.intrEnable = true;
if (psxCounters[index].mode.repeatIntr != psxCounters[index].currentIrqMode.repeatInterrupt || psxCounters[index].mode.toggleIntr != psxCounters[index].currentIrqMode.toggleInterrupt)
DevCon.Warning("Updating psxCounter[%d] mode old repeat %d new %d old toggle %d new %d", index, psxCounters[index].mode.repeatIntr, psxCounters[index].currentIrqMode.repeatInterrupt, psxCounters[index].mode.toggleIntr, psxCounters[index].currentIrqMode.toggleInterrupt);
//if (psxCounters[index].mode.repeatIntr != psxCounters[index].currentIrqMode.repeatInterrupt || psxCounters[index].mode.toggleIntr != psxCounters[index].currentIrqMode.toggleInterrupt)
// DevCon.Warning("Updating psxCounter[%d] mode old repeat %d new %d old toggle %d new %d", index, psxCounters[index].mode.repeatIntr, psxCounters[index].currentIrqMode.repeatInterrupt, psxCounters[index].mode.toggleIntr, psxCounters[index].currentIrqMode.toggleInterrupt);
psxCounters[index].currentIrqMode.repeatInterrupt = psxCounters[index].mode.repeatIntr;
psxCounters[index].currentIrqMode.toggleInterrupt = psxCounters[index].mode.toggleIntr;
+6 -1
View File
@@ -100,7 +100,12 @@ void Sio2::SoftReset()
void Sio2::Interrupt()
{
iopIntcIrq(17);
if (!iStat)
iopIntcIrq(17);
else
DevCon.Warning("Nearly sent double SIO2 IRQ");
iStat |= 1;
}
void Sio2::SetCtrl(u32 value)
+1 -1
View File
@@ -653,7 +653,7 @@ void iopHwWrite32_Page8( u32 addr, mem32_t val )
break;
case (HW_SIO2_INTR & 0x0fff):
Sio2Log.WriteLn("%s(%08X, %08X) SIO2 ISTAT Write", __FUNCTION__, addr, val);
g_Sio2.iStat = val;
g_Sio2.iStat &= ~val;
break;
// Other SIO2 registers are read-only, no-ops on write.
default: