bsnes/higan/ws/cpu/interrupt.cpp
Tim Allen 25eaaa82f4 Update to v097r31 release.
byuu says:

Changelog:
- WS: fixed sprite window clipping (again)
- WS: don't set IRQ status bits of IRQ enable bits are clear
- SFC: signed/unsigned -> int/uint for DSP core
- SFC: removed eBoot
- SFC: added 21fx (not the same as the old precursor to MSU1; just
  reusing the name)

Note: XI Little doesn't seem to be fixed after all ... but the other
three are. So I guess we're at 13 bugs :( And holy shit that music when
you choose a menu option is one of the worst sounds I've ever heard in
my life >_<
2016-03-29 20:15:01 +11:00

21 lines
485 B
C++

auto CPU::poll() -> void {
if(!state.poll) return;
for(int n = 7; n >= 0; n--) {
if(!r.interruptEnable.bit(n)) continue;
if(!r.interruptStatus.bit(n)) continue;
state.halt = false;
if(V30MZ::r.f.i) interrupt(r.interruptBase + n);
return;
}
}
auto CPU::raise(Interrupt irq) -> void {
if(!r.interruptEnable.bit((uint)irq)) return;
r.interruptStatus.bit((uint)irq) = 1;
}
auto CPU::lower(Interrupt irq) -> void {
r.interruptStatus.bit((uint)irq) = 0;
}