From e63c309f3517ef64b2f5fe190864bd2b85b84c79 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 25 Feb 2024 00:06:13 +0200 Subject: Add debug symbols, improve debugger, fix bugs --- atk16_emu/cli.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'atk16_emu/cli.py') diff --git a/atk16_emu/cli.py b/atk16_emu/cli.py index 824fbbf..fcea56b 100644 --- a/atk16_emu/cli.py +++ b/atk16_emu/cli.py @@ -39,13 +39,10 @@ def main(): print_help() sys.exit(1) - def load_rom_image_from_path(path: str) -> bytearray: - with open(path, "rb") as f: - return bytearray(f.read()) - - rom_image = load_rom_image_from_path(options.rom_image_path) - if not options.debugger_enabled: + with open(options.rom_image_path, "rb") as f: + rom_image = bytearray(f.read()) + machine = Machine() machine.load_rom_image(rom_image) machine.reset() @@ -58,7 +55,7 @@ def main(): else: debugger = Debugger() - debugger.load_rom_image(rom_image) + debugger.load_rom_image(options.rom_image_path) debugger.activate() if __name__ == "__main__": -- cgit v1.3