2019-10-31 13:43:25 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Common.Components.I8048
|
|
|
|
{
|
|
|
|
public partial class I8048
|
|
|
|
{
|
2019-12-09 21:45:36 +00:00
|
|
|
private void IRQ_(ushort src)
|
2019-10-31 13:43:25 +00:00
|
|
|
{
|
2019-12-09 21:45:36 +00:00
|
|
|
if (src == 0)
|
|
|
|
{
|
|
|
|
Regs[ALU] = 0x0003;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Regs[ALU] = 0x0007;
|
|
|
|
}
|
|
|
|
|
|
|
|
PopulateCURINSTR(DM,
|
|
|
|
IDLE,
|
|
|
|
IDLE,
|
|
|
|
IDLE,
|
|
|
|
IDLE,
|
2019-10-31 13:43:25 +00:00
|
|
|
IDLE,
|
2019-12-09 21:45:36 +00:00
|
|
|
PUSH,
|
2019-10-31 13:43:25 +00:00
|
|
|
IDLE,
|
2019-12-09 21:45:36 +00:00
|
|
|
SET_ADDR, PC, ALU, 0);
|
2019-10-31 13:43:25 +00:00
|
|
|
|
2019-12-09 21:45:36 +00:00
|
|
|
IRQS = 9;
|
2019-10-31 13:43:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool IRQPending;
|
2019-11-18 22:33:55 +00:00
|
|
|
public bool TIRQPending;
|
2019-10-31 13:43:25 +00:00
|
|
|
public bool IntEn;
|
2019-11-18 22:33:55 +00:00
|
|
|
public bool TimIntEn;
|
2019-12-09 21:45:36 +00:00
|
|
|
public bool INT_MSTR;
|
2019-10-31 13:43:25 +00:00
|
|
|
|
|
|
|
public Action IRQCallback = delegate () { };
|
|
|
|
|
|
|
|
private void ResetInterrupts()
|
|
|
|
{
|
2019-11-30 14:28:53 +00:00
|
|
|
IntEn = false;
|
|
|
|
TimIntEn = false;
|
2019-12-09 21:45:36 +00:00
|
|
|
INT_MSTR = true;
|
2019-10-31 13:43:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|