summaryrefslogtreecommitdiff
path: root/src/apple.c
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-12-01 00:47:05 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-12-01 00:47:05 +1100
commit580a7040ba53367c15ca682d4ea90c31fdcca45f (patch)
tree58ccb3ddb419884f6f9da790b0173a62eb4dd22f /src/apple.c
parent40447eccd6db43d636ccc518ae7792b7b43834b5 (diff)
large progress approaching functionality
Diffstat (limited to 'src/apple.c')
-rw-r--r--src/apple.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/apple.c b/src/apple.c
index 8a5e73b..6f48c10 100644
--- a/src/apple.c
+++ b/src/apple.c
@@ -84,9 +84,14 @@ byte GetMemory(address x){
// The keyboard does not act precisely as the real hardware, because there is no need to wait for the keyboard.
// So KBD_CR and DSP always return a high high-order bit, and when the keyboard data is requested it will wait for UserInput() to finish.
case KBD:
- return 0b10000000 | UserInput();
- case KBD_CR: case DSP:
+ char c = -1;
+ while(c == -1)
+ c = UserInput();
+ return 0b10000000 | c;
+ case KBD_CR:
return 0b10000000;
+ case DSP:
+ return 0b00000000;
}
if (x >= 0xFF00 && x <= 0xFFFF) {
@@ -100,6 +105,11 @@ byte GetMemory(address x){
}
void SetMemory(address x, byte y){
+ switch(x)
+ {
+ case DSP:
+
+ }
if (x < MEMORY_SIZE) {
Memory[x] = y;
}