diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-04-26 13:52:15 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-04-26 13:52:15 +0300 |
| commit | f3395cffedf488bcd1cad7e0c997742e6a227b8b (patch) | |
| tree | b13bf81aad2dd4e654c9170d34c915a276969552 /atk16_emu/peripherals.py | |
| parent | 0cf21c9484ac695b4f6d7e84b34c8eebc9a5108e (diff) | |
Improve pip install process
Diffstat (limited to 'atk16_emu/peripherals.py')
| -rw-r--r-- | atk16_emu/peripherals.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/atk16_emu/peripherals.py b/atk16_emu/peripherals.py index a090187..4ffffb2 100644 --- a/atk16_emu/peripherals.py +++ b/atk16_emu/peripherals.py @@ -1,5 +1,6 @@ import pygame import sys +import os import random from .memory import RAM, ROM from typing import Callable @@ -42,7 +43,7 @@ class TPU: self.text_mem = RAM(11, 8) self.char_mem = ROM(11, 8) - with open("out/charmem.bin", "rb") as f: + with open(os.path.join(os.path.dirname(__file__), "resources", "charmem.bin"), "rb") as f: charmem = f.read() for i in range(len(charmem)): self.char_mem.memory[i] = int(charmem[i]) & 0xFF |
