Fix BRK bug. Ensure break_flag is set.
This commit is contained in:
parent
934bf1a495
commit
22031e8d1d
|
@ -1156,10 +1156,10 @@ class CPU:
|
|||
|
||||
def BRK(self):
|
||||
self.cycles += 5
|
||||
self.break_flag = 1 # set break_flag before status pushed
|
||||
self.push_word(self.program_counter + 1)
|
||||
self.push_byte(self.status_as_byte())
|
||||
self.program_counter = self.read_word(0xFFFE)
|
||||
self.break_flag = 1
|
||||
|
||||
def RTI(self):
|
||||
self.cycles += 4
|
||||
|
|
Loading…
Reference in New Issue