From 3344005fe7e8e1cecac4c03e5556fd4db91a3a9f Mon Sep 17 00:00:00 2001 From: James Tauber Date: Sat, 6 Aug 2011 18:08:39 -0400 Subject: [PATCH] added wrap-around for zero_page_x_mode --- applepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applepy.py b/applepy.py index bd19168..d9d8fd7 100644 --- a/applepy.py +++ b/applepy.py @@ -328,7 +328,7 @@ class CPU: return self.read_pc_byte() 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): return self.memory.read_word(self.absolute_mode())