mirror of
https://github.com/jtauber/applepy.git
synced 2024-11-27 07:51:10 +00:00
added wrap-around for zero_page_x_mode
This commit is contained in:
parent
fef234f7c0
commit
3344005fe7
@ -328,7 +328,7 @@ class CPU:
|
|||||||
return self.read_pc_byte()
|
return self.read_pc_byte()
|
||||||
|
|
||||||
def zero_page_x_mode(self):
|
def zero_page_x_mode(self):
|
||||||
return self.zero_page_mode() + signed(self.x_index)
|
return (self.zero_page_mode() + signed(self.x_index)) % 0x100
|
||||||
|
|
||||||
def indirect_mode(self):
|
def indirect_mode(self):
|
||||||
return self.memory.read_word(self.absolute_mode())
|
return self.memory.read_word(self.absolute_mode())
|
||||||
|
Loading…
Reference in New Issue
Block a user