fix apple1 keyboard read

This commit is contained in:
nino-porcino 2021-11-28 21:00:24 +01:00
parent 4dc1959c18
commit 8e4bfd194e

6
test.c
View File

@ -318,7 +318,11 @@ void woz_mon() {
// reads a key from the apple-1 keyboard // reads a key from the apple-1 keyboard
byte woz_getkey() { byte woz_getkey() {
#ifdef APPLE1 #ifdef APPLE1
while((unsigned byte)PEEK(KEY_CTRL)>0); asm {
__wait:
lda KEY_CTRL
bpl __wait
}
return PEEK(KEY_DATA) & 0x7f; return PEEK(KEY_DATA) & 0x7f;
#else #else
byte key; byte key;