Browse Source

Fix status register saved on interrupt

v2
Nathaniel Walizer 3 months ago
parent
commit
708a6d9831
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/f6502.c

+ 1
- 1
src/f6502.c View File

@@ -434,7 +434,7 @@ static inline int f6502_interrupt(f6502_Core* core,
uint16_t addr) {
PUSH16(core, core->registers.S, core->registers.PC);
PUSH(core, core->registers.S,
core->registers.P & ~f6502_Status_B);
(core->registers.P & ~f6502_Status_B) | f6502_Status_1);
SET(core->registers.P, f6502_Status_I);
core->registers.PC = f6502_read16(&core->memory, addr);
return 7;


Loading…
Cancel
Save