diff --git a/src/kernal/screen_m65/mega65_chrout_screen_escmode.s b/src/kernal/screen_m65/mega65_chrout_screen_escmode.s index 3baf87b2..8d8a8e0c 100644 --- a/src/kernal/screen_m65/mega65_chrout_screen_escmode.s +++ b/src/kernal/screen_m65/mega65_chrout_screen_escmode.s @@ -12,15 +12,30 @@ m65_chrout_screen_escmode: ; Select subroutine txa - ; XXX cmp #$BD ; SHIFT + '@' - ; XXX beq m65_chrout_esc_AT sec - sbc #$30 ; '0' - cmp #$2E - bcs m65_chrout_esc_done + sbc #$40 ; '@' + cmp #$1E + bcc @1 - ; XXX add workaround for SHIFT+key + ; Check for shifted characters + sec + sbc #$20 + beq m65_chrout_esc_done ; $60 - character not supported here + cmp #$1B + bcc @1 + + + ; Check for fgew special shifted characters + cpx #$3A ; colon + beq m65_chrout_esc_LBR + cpx #$3B ; semicolon + beq m65_chrout_esc_RBR + cpx #$DB + beq m65_chrout_esc_AT + + bra m65_chrout_esc_done +@1: asl tax jmp (m65_chrout_screen_jumptable_escape, x) @@ -80,26 +95,6 @@ m65_chrout_esc_X: ; cycle through available screen modes ; XXX: implement screen routines below: -m65_chrout_esc_0: - +nop -m65_chrout_esc_1: - +nop -m65_chrout_esc_2: - +nop -m65_chrout_esc_3: - +nop -m65_chrout_esc_4: - +nop -m65_chrout_esc_5: - +nop -m65_chrout_esc_6: - +nop -m65_chrout_esc_7: - +nop -m65_chrout_esc_8: - +nop -m65_chrout_esc_9: - +nop m65_chrout_esc_AT: +nop m65_chrout_esc_A: diff --git a/src/kernal/screen_m65/mega65_screen_tables_misc.s b/src/kernal/screen_m65/mega65_screen_tables_misc.s index b3b3412a..7fa50574 100644 --- a/src/kernal/screen_m65/mega65_screen_tables_misc.s +++ b/src/kernal/screen_m65/mega65_screen_tables_misc.s @@ -113,22 +113,6 @@ m65_chrout_screen_jumptable: m65_chrout_screen_jumptable_escape: - !word m65_chrout_esc_0 - !word m65_chrout_esc_1 - !word m65_chrout_esc_2 - !word m65_chrout_esc_3 - !word m65_chrout_esc_4 - !word m65_chrout_esc_5 - !word m65_chrout_esc_6 - !word m65_chrout_esc_7 - !word m65_chrout_esc_8 - !word m65_chrout_esc_9 - !word m65_chrout_esc_LBR ; ':' - !word m65_chrout_esc_RBR ; ';' - !word m65_chrout_screen_done ; '<' - !word m65_chrout_screen_done ; '=' - !word m65_chrout_screen_done ; '>' - !word m65_chrout_screen_done ; '?' !word m65_chrout_esc_AT !word m65_chrout_esc_A !word m65_chrout_esc_B