Fix Super Mario RPG regression.

This commit is contained in:
byuu 2019-08-26 02:46:08 +09:00
parent 5dc27a9fb3
commit f857f35e72
3 changed files with 2 additions and 11 deletions

View File

@ -20,7 +20,7 @@ struct WDC65816 {
virtual auto readDisassembler(uint addr) -> uint8 { return 0; }
inline auto irq() const -> bool { return r.irq; }
virtual inline auto irq(bool line) -> void { r.irq = line; }
inline auto irq(bool line) -> void { r.irq = line; }
using r8 = uint8;

View File

@ -52,7 +52,6 @@ struct CPU : Processor::WDC65816, Thread, PPUcounter {
alwaysinline auto dmaEdge() -> void;
//irq.cpp
auto irq(bool line) -> void override;
alwaysinline auto pollInterrupts() -> void;
auto nmitimenUpdate(uint8 data) -> void;
auto rdnmi() -> bool;

View File

@ -1,11 +1,3 @@
//external interrupt line changed.
auto CPU::irq(bool line) -> void {
WDC65816::irq(line);
if(line) {
status.irqTransition = 1;
}
}
//called once every four clock cycles;
//as NMI steps by scanlines (divisible by 4) and IRQ by PPU 4-cycle dots.
//
@ -80,7 +72,7 @@ auto CPU::nmiTest() -> bool {
}
auto CPU::irqTest() -> bool {
if(!status.irqTransition) return 0;
if(!status.irqTransition && !r.irq) return 0;
status.irqTransition = 0;
r.wai = 0;
return !r.p.i;