mirror of
https://github.com/jtauber/applepy.git
synced 2024-12-28 09:29:51 +00:00
made options...um...optional param to Memory so tests pass
This commit is contained in:
parent
cba0ce064c
commit
fbd213e240
10
applepy.py
10
applepy.py
@ -355,17 +355,19 @@ class SoftSwitches:
|
|||||||
|
|
||||||
class Memory:
|
class Memory:
|
||||||
|
|
||||||
def __init__(self, options, display=None, speaker=None):
|
def __init__(self, options=None, display=None, speaker=None):
|
||||||
self.display = display
|
self.display = display
|
||||||
self.speaker = speaker
|
self.speaker = speaker
|
||||||
self.rom = ROM(0xD000, 0x3000)
|
self.rom = ROM(0xD000, 0x3000)
|
||||||
|
|
||||||
# available from http://www.easy68k.com/paulrsm/6502/index.html
|
if options:
|
||||||
self.rom.load_file(0xD000, options.rom)
|
self.rom.load_file(0xD000, options.rom)
|
||||||
|
|
||||||
self.ram = RAM(0x0000, 0xC000)
|
self.ram = RAM(0x0000, 0xC000)
|
||||||
if options.ram:
|
|
||||||
|
if options and options.ram:
|
||||||
self.ram.load_file(0x0000, options.ram)
|
self.ram.load_file(0x0000, options.ram)
|
||||||
|
|
||||||
self.softswitches = SoftSwitches(display, speaker)
|
self.softswitches = SoftSwitches(display, speaker)
|
||||||
|
|
||||||
def load(self, address, data):
|
def load(self, address, data):
|
||||||
|
Loading…
Reference in New Issue
Block a user