IOP/EE: Add SBUS interrupts

Lets the CPUs trigger an interrupt on the other.
This commit is contained in:
Ziemas 2024-10-13 21:24:51 +02:00 committed by Ty
parent 444b110411
commit 35ada362d4
2 changed files with 14 additions and 1 deletions

View File

@ -16,6 +16,8 @@
#include "CDVD/Ps1CD.h"
#include "CDVD/CDVD.h"
#include "IopDma.h" // for iopIntcIrq
using namespace R5900;
// Shift the middle 8 bits (bits 4-12) into the lower 8 bits.
@ -166,6 +168,10 @@ void _hwWrite32( u32 mem, u32 value )
return;
mcase(SBUS_F240):
if (value & (1 << 18))
{
iopIntcIrq(1);
}
if (value & (1 << 19))
{
u32 cycle = psxRegs.cycle;

View File

@ -286,6 +286,13 @@ static __fi void _HwWrite_16or32_Page1( u32 addr, T val )
{
switch( masked_addr )
{
case 0x450:
psxHu(addr) = val;
if (val & (1 << 1))
{
hwIntcIrq(INTC_SBUS);
}
break;
// ------------------------------------------------------------------------
case (HW_SIO_DATA & 0x0fff):
Console.Error("%s(%08X, %08X) Unexpected 16 or 32 bit write to SIO0 DATA!", __FUNCTION__, addr, val);