AndreaOrru / LaiNES

Cycle-accurate NES emulator in ~1000 lines of code
BSD 2-Clause "Simplified" License
1.49k stars 122 forks source link

BRK wrong PC pushed #38

Open Mat2095 opened 5 years ago

Mat2095 commented 5 years ago

BRK is a two-byte instruction, so PC is incremented twice before being pushed, not just once.

Sources: http://www.thealmightyguru.com/Games/Hacking/Wiki/index.php?title=BRK http://nesdev.com/the%20%27B%27%20flag%20&%20BRK%20instruction.txt and blaggr's instr_test_v5