From 2cade1508fba1840c9925bcd670ebebd3e672f20 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Mon, 22 Apr 2019 03:50:53 +0930 Subject: [PATCH] fix decoding of shifted and vendor shifted input. BASIC keyword short cuts now work. --- c64/kernal/chrin.s | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/c64/kernal/chrin.s b/c64/kernal/chrin.s index dd7d9ebb..090ce071 100644 --- a/c64/kernal/chrin.s +++ b/c64/kernal/chrin.s @@ -37,6 +37,7 @@ not_end_of_input: pla tax lda (start_of_keyboard_input),y + jsr screen_code_to_petscii inc keyboard_input_ready clc rts @@ -85,6 +86,7 @@ read_from_keyboard: pla tax lda (start_of_keyboard_input),y + jsr screen_code_to_petscii clc rts @@ -126,3 +128,28 @@ pop_keyboard_buffer: rts +screen_code_to_petscii: + cmp #$1a + bcs not_alpha + + clc + adc #$40 + rts + +not_alpha: + cmp #$40 + bcs not_punctuation + + rts + +not_punctuation: + cmp #$5a + bcs not_shifted + + clc + adc #$80 + +not_shifted: + + + rts