mirror of https://github.com/bsnes-emu/bsnes.git
Fix Super Mario RPG regression.
This commit is contained in:
parent
5dc27a9fb3
commit
f857f35e72
|
@ -20,7 +20,7 @@ struct WDC65816 {
|
||||||
virtual auto readDisassembler(uint addr) -> uint8 { return 0; }
|
virtual auto readDisassembler(uint addr) -> uint8 { return 0; }
|
||||||
|
|
||||||
inline auto irq() const -> bool { return r.irq; }
|
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;
|
using r8 = uint8;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ struct CPU : Processor::WDC65816, Thread, PPUcounter {
|
||||||
alwaysinline auto dmaEdge() -> void;
|
alwaysinline auto dmaEdge() -> void;
|
||||||
|
|
||||||
//irq.cpp
|
//irq.cpp
|
||||||
auto irq(bool line) -> void override;
|
|
||||||
alwaysinline auto pollInterrupts() -> void;
|
alwaysinline auto pollInterrupts() -> void;
|
||||||
auto nmitimenUpdate(uint8 data) -> void;
|
auto nmitimenUpdate(uint8 data) -> void;
|
||||||
auto rdnmi() -> bool;
|
auto rdnmi() -> bool;
|
||||||
|
|
|
@ -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;
|
//called once every four clock cycles;
|
||||||
//as NMI steps by scanlines (divisible by 4) and IRQ by PPU 4-cycle dots.
|
//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 {
|
auto CPU::irqTest() -> bool {
|
||||||
if(!status.irqTransition) return 0;
|
if(!status.irqTransition && !r.irq) return 0;
|
||||||
status.irqTransition = 0;
|
status.irqTransition = 0;
|
||||||
r.wai = 0;
|
r.wai = 0;
|
||||||
return !r.p.i;
|
return !r.p.i;
|
||||||
|
|
Loading…
Reference in New Issue