From fbd213e2402f1a2f7c892f52b538001f870f100d Mon Sep 17 00:00:00 2001 From: James Tauber Date: Mon, 15 Aug 2011 09:34:49 -0400 Subject: [PATCH] made options...um...optional param to Memory so tests pass --- applepy.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/applepy.py b/applepy.py index 1d46a1e..769671a 100644 --- a/applepy.py +++ b/applepy.py @@ -355,17 +355,19 @@ class SoftSwitches: class Memory: - def __init__(self, options, display=None, speaker=None): + def __init__(self, options=None, display=None, speaker=None): self.display = display self.speaker = speaker self.rom = ROM(0xD000, 0x3000) - # available from http://www.easy68k.com/paulrsm/6502/index.html - self.rom.load_file(0xD000, options.rom) + if options: + self.rom.load_file(0xD000, options.rom) self.ram = RAM(0x0000, 0xC000) - if options.ram: + + if options and options.ram: self.ram.load_file(0x0000, options.ram) + self.softswitches = SoftSwitches(display, speaker) def load(self, address, data):