summaryrefslogtreecommitdiff
path: root/src/apple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apple.c')
-rw-r--r--src/apple.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/apple.c b/src/apple.c
index 5ef87f6..5877bc8 100644
--- a/src/apple.c
+++ b/src/apple.c
@@ -62,18 +62,20 @@ void AppleReset(){
Memory = calloc(MEMORY_SIZE, sizeof(byte));
}
+
+//byte KBD_CR_val;
+
byte GetMemory(address x){
switch(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.
+ // The keyboard does not act precisely as the real hardware, because there is no need to wait for the keyboard.
case KBD:
char c = -1;
while(c == -1)
c = UserInput();
return 0b10000000 | c;
case KBD_CR:
- return 0b10000000;
+ return 0b10100111;
case DSP:
return 0b00000000;
}
@@ -84,13 +86,15 @@ byte GetMemory(address x){
if (x < MEMORY_SIZE)
return Memory[x];
-
+
return -1;
}
void SetMemory(address x, byte y){
switch(x)
{
+ //case KBD_CR:
+ //KBD_CR_val = x;
case DSP:
if (y & 0x80)
DisplayInput(y);