aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_emu/peripherals.py
diff options
context:
space:
mode:
Diffstat (limited to 'atk16_emu/peripherals.py')
-rw-r--r--atk16_emu/peripherals.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/atk16_emu/peripherals.py b/atk16_emu/peripherals.py
index 0038a33..54020f4 100644
--- a/atk16_emu/peripherals.py
+++ b/atk16_emu/peripherals.py
@@ -8,6 +8,7 @@ class Peripherals:
pygame.init()
self.graphics = Graphics()
self.keyboard = Keyboard()
+ self.terminal = Terminal()
def step(self):
for event in pygame.event.get():
@@ -23,6 +24,7 @@ class DummyPeripherals:
def __init__(self):
self.graphics = DummyGraphics()
self.keyboard = DummyKeyboard()
+ self.terminal = Terminal()
def step(self):
pass
@@ -127,3 +129,11 @@ class DummyKeyboard:
def read(self) -> int:
print("warning: reading from dummy keyboard")
return 0xFFFF
+
+class Terminal:
+ def __init__(self):
+ pass
+
+ def write(self, s: int):
+ print(chr(s), end="")
+ sys.stdout.flush()