mirror of
https://github.com/jtauber/applepy.git
synced 2024-11-26 16:49:32 +00:00
make display optional (for testing)
This commit is contained in:
parent
d11aff5416
commit
4267732d7f
@ -175,7 +175,7 @@ class ROM:
|
|||||||
|
|
||||||
class Memory:
|
class Memory:
|
||||||
|
|
||||||
def __init__(self, display):
|
def __init__(self, display=None):
|
||||||
self.display = display
|
self.display = display
|
||||||
self.rom = ROM(0xD000, 0x3000)
|
self.rom = ROM(0xD000, 0x3000)
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class Memory:
|
|||||||
def write_byte(self, address, value):
|
def write_byte(self, address, value):
|
||||||
if address < 0xC000:
|
if address < 0xC000:
|
||||||
self.ram.write_byte(address, value)
|
self.ram.write_byte(address, value)
|
||||||
if 0x400 <= address < 0x800:
|
if 0x400 <= address < 0x800 and display:
|
||||||
self.display.update(address, value)
|
self.display.update(address, value)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user