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 | |
| parent | 0cf21c9484ac695b4f6d7e84b34c8eebc9a5108e (diff) | |
Improve pip install process
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | atk16_emu/peripherals.py | 3 | ||||
| -rw-r--r-- | atk16_emu/resources/charmem.bin | bin | 0 -> 2048 bytes | |||
| -rw-r--r-- | setup.py | 5 |
4 files changed, 8 insertions, 1 deletions
@@ -9,3 +9,4 @@ __pycache__ .pytest_cache build/ +atk16.egg-info/ 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 diff --git a/atk16_emu/resources/charmem.bin b/atk16_emu/resources/charmem.bin Binary files differnew file mode 100644 index 0000000..1276d28 --- /dev/null +++ b/atk16_emu/resources/charmem.bin @@ -10,7 +10,12 @@ setup( 'atk16emu=atk16_emu.cli:main', ], }, + package_data={ + "atk16_asm": ["builtin_asm/*"], + "atk16_emu": ["resources/*"], + }, install_requires=[ "getch>=1.0", + "pygame>=2.5.2", ] ) |
