From 4267732d7f96dcff4709ab95f433c9b426d3cb6b Mon Sep 17 00:00:00 2001 From: James Tauber Date: Sat, 13 Aug 2011 04:02:43 -0400 Subject: [PATCH] make display optional (for testing) --- applepy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applepy.py b/applepy.py index ae5a390..4f0c67a 100644 --- a/applepy.py +++ b/applepy.py @@ -175,7 +175,7 @@ class ROM: class Memory: - def __init__(self, display): + def __init__(self, display=None): self.display = display self.rom = ROM(0xD000, 0x3000) @@ -209,7 +209,7 @@ class Memory: def write_byte(self, address, value): if address < 0xC000: self.ram.write_byte(address, value) - if 0x400 <= address < 0x800: + if 0x400 <= address < 0x800 and display: self.display.update(address, value)