mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-08-09 00:25:10 +00:00
I think this fixes one of my NES issues. The fix-up required for the PC is handled by the fetchByte associated with the BRK instruction.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -58,13 +58,13 @@ void EightBit::MOS6502::handleRESET() {
|
|||||||
|
|
||||||
void EightBit::MOS6502::handleNMI() {
|
void EightBit::MOS6502::handleNMI() {
|
||||||
raise(HALT());
|
raise(HALT());
|
||||||
interrupt();
|
Processor::execute(0);
|
||||||
raise(NMI());
|
raise(NMI());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EightBit::MOS6502::handleIRQ() {
|
void EightBit::MOS6502::handleIRQ() {
|
||||||
raise(HALT());
|
raise(HALT());
|
||||||
interrupt();
|
Processor::execute(0);
|
||||||
raise(INT());
|
raise(INT());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ int EightBit::MOS6502::execute() {
|
|||||||
|
|
||||||
switch (opcode()) {
|
switch (opcode()) {
|
||||||
|
|
||||||
case 0x00: fetchByte(); interrupt(); break; // BRK (implied)
|
case 0x00: fetchByte(); interrupt(); break; // BRK (implied)
|
||||||
case 0x01: A() = orr(A(), AM_IndexedIndirectX()); break; // ORA (indexed indirect X)
|
case 0x01: A() = orr(A(), AM_IndexedIndirectX()); break; // ORA (indexed indirect X)
|
||||||
case 0x02: break;
|
case 0x02: break;
|
||||||
case 0x03: slo(AM_IndexedIndirectX()); break; // *SLO (indexed indirect X)
|
case 0x03: slo(AM_IndexedIndirectX()); break; // *SLO (indexed indirect X)
|
||||||
|
Reference in New Issue
Block a user