From a7cb7eb52e850d4b951a149e460affc2d090d08d Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Wed, 16 Oct 2019 20:24:47 +0200 Subject: [PATCH] small C128 keyboard handling optimization --- CONFIG.md | 2 +- c64/kernal/keyboard/scnkey_128.s | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CONFIG.md b/CONFIG.md index 49cbef82..cdb8f859 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -119,7 +119,7 @@ Needs 70-250 more space in KERNAL segment (depending on the features enabled for Allows to use additional keys found on the C128 keyboard. -Needs 128 bytes more space in KERNAL segment. If unsure - disable. +Needs about 125 bytes more space in KERNAL segment. If unsure - disable. ### `CONFIG_KEY_REPEAT_DEFAULT` diff --git a/c64/kernal/keyboard/scnkey_128.s b/c64/kernal/keyboard/scnkey_128.s index a6d14acf..a3e78d75 100644 --- a/c64/kernal/keyboard/scnkey_128.s +++ b/c64/kernal/keyboard/scnkey_128.s @@ -37,6 +37,7 @@ scnkey_matrix_128_loop_inner: tya // now .A contains key offset within a row clc adc kb_matrix_row_offsets, x // now .A contains key offset from the matrix start + adc #$40 // now .A contains fully normalized offset tay jmp scnkey_matrix_128_loop_next !: @@ -52,13 +53,6 @@ scnkey_matrix_128_loop_next: cpy #$FF beq scnkey_128_done - // Shift the matrix code - - clc - tya - adc #$40 - tay - // Continue with C64 keyboard scanning scnkey_128_done: