diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2024-02-25 00:06:13 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2024-02-25 00:17:07 +0200 |
| commit | e63c309f3517ef64b2f5fe190864bd2b85b84c79 (patch) | |
| tree | 9119a0a64f4661e21d683bde34fde06a98d65d68 /atk16_emu/cli.py | |
| parent | 6dd1e346d330e662e42dd8bc75d17317223908fd (diff) | |
Add debug symbols, improve debugger, fix bugs
Diffstat (limited to 'atk16_emu/cli.py')
| -rw-r--r-- | atk16_emu/cli.py | 11 |
1 files changed, 4 insertions, 7 deletions
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__": |
