diff --git a/CONFIG.md b/CONFIG.md index c3033ba5..54740738 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -257,12 +257,6 @@ If enabled, STOP key terminates insert/quote mode (like on some _Black Box_ cart Feature needs 12 bytes in KERNAL segment. If unsure - enable. -### `EDIT_TABULATORS` - -If enabled, allows use of TAB (or CTRL+>) and SHIFT+TAB (or CTRL+<) to switch between predefined tabulator positions. - -Feature needs 35-45 bytes in KERNAL segment. If unsure - enable. - ## Software features ### `PANIC_SCREEN` diff --git a/doc/Development.md b/doc/Development.md index 775a21ce..2f76bdfd 100644 --- a/doc/Development.md +++ b/doc/Development.md @@ -31,23 +31,17 @@ Open ROMs interrupt handlers do not touch the ROM mapping, range `0x4000-0xBFFF` ### API extensions -#### PETSCII +#### PETSCII - C128 -Open ROMs provides support for several additional PETSCII codes (all compatible with C128 and/or C65): +When C128 keyboard support is compiled-in, Open ROMs provides support for a few PETSCII codes: -| PETSCII code | description | -| :----------: | :-------------------------------------------------- | -| `$07` | bell (C128 and C65 compatible), not implemented yet | -| `$1B` | `ESC` key (C128 and C65 compatible) | -| `$84` | `HELP` key (C128 and C65 compatible) | -| `$10` | `F9` key (C65 compatible) | -| `$15` | `F10` key (C65 compatible) | -| `$16` | `F11` key (C65 compatible) | -| `$17` | `F12` key (C65 compatible) | -| `$19` | `F13` key (C65 compatible) | -| `$1A` | `F14` key (C65 compatible) | +| PETSCII code | description | +| :----------: | :--------------------- | +| `$07` | bell | +| `$1B` | `ESC` key | +| `$84` | `HELP` key | -There is no official PETSCII code for `TAB` - we can't utilize the ones from C128 or C65 because it conflicts with some C64 codes. +There is no PETSCII code for `TAB` key - we can't utilize the ones from C128 or C65 because it conflicts with some C64 codes. #### Bucky keys diff --git a/src/,,config_custom.s b/src/,,config_custom.s index 17fa482c..8ae90876 100644 --- a/src/,,config_custom.s +++ b/src/,,config_custom.s @@ -113,7 +113,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_cx16.s b/src/,,config_cx16.s index b1f3b2c8..988b917a 100644 --- a/src/,,config_cx16.s +++ b/src/,,config_cx16.s @@ -47,7 +47,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE NO -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_generic.s b/src/,,config_generic.s index ba3b0c5d..13d75e0a 100644 --- a/src/,,config_generic.s +++ b/src/,,config_generic.s @@ -100,7 +100,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_generic_crt.s b/src/,,config_generic_crt.s index 045a4632..2b539aff 100644 --- a/src/,,config_generic_crt.s +++ b/src/,,config_generic_crt.s @@ -102,7 +102,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_mega65.s b/src/,,config_mega65.s index 40166e4e..b12ad9d2 100644 --- a/src/,,config_mega65.s +++ b/src/,,config_mega65.s @@ -82,7 +82,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_testing.s b/src/,,config_testing.s index fb714a01..05fb3231 100644 --- a/src/,,config_testing.s +++ b/src/,,config_testing.s @@ -100,7 +100,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS YES ; --- Software features diff --git a/src/,,config_ultimate64.s b/src/,,config_ultimate64.s index e295751d..7406fa92 100644 --- a/src/,,config_ultimate64.s +++ b/src/,,config_ultimate64.s @@ -90,7 +90,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/,,config_ultimate64_crt.s b/src/,,config_ultimate64_crt.s index 566868c0..83733a83 100644 --- a/src/,,config_ultimate64_crt.s +++ b/src/,,config_ultimate64_crt.s @@ -92,7 +92,6 @@ ; --- Screen editor ;; #CONFIG# EDIT_STOPQUOTE YES -;; #CONFIG# EDIT_TABULATORS NO ; --- Software features diff --git a/src/aliases/,aliases_petscii_codes.s b/src/aliases/,aliases_petscii_codes.s index 474573cf..8d10f8f4 100644 --- a/src/aliases/,aliases_petscii_codes.s +++ b/src/aliases/,aliases_petscii_codes.s @@ -40,34 +40,27 @@ -; Note - the following PETSCII codes are currently unassigned, can be used for further extensions: $01, $04, $06, ($80 ?) +; Note - the following PETSCII codes are currently unassigned, can be used for further extensions: $01, $04, $06, $80, $8F !set KEY_NA = $00 ; to indicate that no key is presed - -; PETSCII codes for our extended screen editor - -!set KEY_C64_TAB_FW = $8F ; CTRL+>, TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove? -!set KEY_C64_TAB_BW = $80 ; CTRL+<, SHIFT+TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove? - - ; PETSCII codes for certain C128 and C65 functionalities !ifdef _NEED_EXTENDED { - !set KEY_BELL = $07 ; no key, originally CTRL+G ; XXX implement, add to C65 keyboard matrix + !set KEY_BELL = $07 ; no key, originally CTRL+G ; XXX implement !set KEY_ESC = $1B } !ifdef _NEED_C65KB { - !set KEY_TAB = $09 ; XXX add to C65 keyboard matrix - !set KEY_LINE_FEED = $0A ; XXX add to C65 keyboard matrix - !set KEY_TAB_SET_CLR = $18 ; XXX add to C65 keyboard matrix - !set KEY_UNDERLINE_ON = $02 ; XXX add to C65 keyboard matrix - !set KEY_UNDERLINE_OFF = $82 ; XXX add to C65 keyboard matrix - !set KEY_FLASHING_ON = $0F ; XXX add to C65 keyboard matrix - !set KEY_FLASHING_OFF = $8F ; XXX add to C65 keyboard matrix + !set KEY_TAB = $09 + !set KEY_LINE_FEED = $0A + !set KEY_TAB_SET_CLR = $18 + !set KEY_UNDERLINE_ON = $02 + !set KEY_UNDERLINE_OFF = $82 + !set KEY_FLASHING_ON = $0F + !set KEY_FLASHING_OFF = $8F } diff --git a/src/kernal/keyboard/kb_matrix.s b/src/kernal/keyboard/kb_matrix.s index 71c982b4..631dc00d 100644 --- a/src/kernal/keyboard/kb_matrix.s +++ b/src/kernal/keyboard/kb_matrix.s @@ -55,10 +55,6 @@ __kb_matrix_ctrl: !byte $9C,$12,$04,$1E,$03,$06,$14,$18 !byte $1F,$19,$07,$9E,$02,$08,$15,$16 !byte $12,$09,$0A,$92,$0D,$0B,$0F,$0E -!ifdef CONFIG_EDIT_TABULATORS { - !byte $00,$10,$0C,$00,KEY_C64_TAB_FW,$1B,$00,KEY_C64_TAB_BW -} else { !byte $00,$10,$0C,$00,$00,$1B,$00,$00 -} !byte $1C,$00,$1D,$00,$00,$1F,$1E,$00 !byte $90,$06,$00,$05,$00,$00,$11,$00 diff --git a/src/kernal/keyboard/kb_matrix_128.s b/src/kernal/keyboard/kb_matrix_128.s index 339cc107..d6083d68 100644 --- a/src/kernal/keyboard/kb_matrix_128.s +++ b/src/kernal/keyboard/kb_matrix_128.s @@ -16,7 +16,7 @@ kb_matrix_128: - !byte KEY_HELP,$38,$35,KEY_C64_TAB_FW,$32,$34,$37,$31 + !byte KEY_HELP,$38,$35,$00,$32,$34,$37,$31 ; $00 replaces TAB key !byte KEY_ESC,$2B,$2D,$8D,$0D,$36,$39,$33 !byte $00,$30,$2E,$91,$11,$9D,$1D,$00 diff --git a/src/kernal/keyboard/kb_matrix_65.s b/src/kernal/keyboard/kb_matrix_65.s index 998a29ec..06069c7d 100644 --- a/src/kernal/keyboard/kb_matrix_65.s +++ b/src/kernal/keyboard/kb_matrix_65.s @@ -15,11 +15,11 @@ kb_matrix_65: - !byte $00, KEY_C64_TAB_FW, $00, KEY_HELP, KEY_F9, KEY_F11, KEY_F13, KEY_ESC + !byte $00, $00, $00, KEY_HELP, KEY_F9, KEY_F11, KEY_F13, KEY_ESC kb_matrix_65_shifted: - !byte $00, KEY_C64_TAB_BW, $00, KEY_HELP, KEY_F10, KEY_F12, KEY_F14, KEY_ESC + !byte $00, $00, $00, KEY_HELP, KEY_F10, KEY_F12, KEY_F14, KEY_ESC } } ; CONFIG_KEYBOARD_C65 and no CONFIG_LEGACY_SCNKEY diff --git a/src/kernal/keyboard/scnkey.s b/src/kernal/keyboard/scnkey.s index 554d78fd..a2e236c7 100644 --- a/src/kernal/keyboard/scnkey.s +++ b/src/kernal/keyboard/scnkey.s @@ -401,22 +401,6 @@ scnkey_handle_caps_lock: scnkey_got_petscii: -!ifdef CONFIG_KEYBOARD_C128 { !ifdef CONFIG_EDIT_TABULATORS { - - ; Special handling for SHIFT+TAB; it is easier than creating new matrix - - tax - cmp #KEY_C64_TAB_FW - bne @8 - lda SHFLAG - and #KEY_FLAG_SHIFT - beq @8 - ldx #KEY_C64_TAB_BW -@8: - txa - -} } ; CONFIG_KEYBOARD_C128 and CONFIG_EDIT_TABULATORS - beq scnkey_no_keys ; branch if we have no PETSCII code for this key ldy NDX sta KEYD, y diff --git a/src/kernal/screen/chrout_screen_jumptable_codes.s b/src/kernal/screen/chrout_screen_jumptable_codes.s index 1777deba..f9555801 100644 --- a/src/kernal/screen/chrout_screen_jumptable_codes.s +++ b/src/kernal/screen/chrout_screen_jumptable_codes.s @@ -29,10 +29,6 @@ __chrout_screen_jumptable_quote_guard: !ifdef CONFIG_EDIT_STOPQUOTE { !byte KEY_STOP -} -!ifdef CONFIG_EDIT_TABULATORS { - !byte KEY_C64_TAB_BW - !byte KEY_C64_TAB_FW } !byte KEY_DEL !byte KEY_RETURN @@ -60,10 +56,6 @@ chrout_screen_jumptable_lo: !byte <(chrout_screen_INS-1) !ifdef CONFIG_EDIT_STOPQUOTE { !byte <(chrout_screen_STOP-1) -} -!ifdef CONFIG_EDIT_TABULATORS { - !byte <(chrout_screen_TAB_BW-1) - !byte <(chrout_screen_TAB_FW-1) } !byte <(chrout_screen_DEL-1) !byte <(chrout_screen_RETURN-1) @@ -85,10 +77,6 @@ chrout_screen_jumptable_hi: !byte >(chrout_screen_INS-1) !ifdef CONFIG_EDIT_STOPQUOTE { !byte >(chrout_screen_STOP-1) -} -!ifdef CONFIG_EDIT_TABULATORS { - !byte >(chrout_screen_TAB_BW-1) - !byte >(chrout_screen_TAB_FW-1) } !byte >(chrout_screen_DEL-1) !byte >(chrout_screen_RETURN-1) @@ -114,10 +102,6 @@ chrout_screen_jumptable: !word chrout_screen_INS !ifdef CONFIG_EDIT_STOPQUOTE { !word chrout_screen_STOP -} -!ifdef CONFIG_EDIT_TABULATORS { - !word chrout_screen_TAB_BW - !word chrout_screen_TAB_FW } !word chrout_screen_DEL !word chrout_screen_RETURN diff --git a/src/kernal/screen/chrout_screen_tab.s b/src/kernal/screen/chrout_screen_tab.s deleted file mode 100644 index 390350de..00000000 --- a/src/kernal/screen/chrout_screen_tab.s +++ /dev/null @@ -1,42 +0,0 @@ -;; #LAYOUT# STD * #TAKE -;; #LAYOUT# X16 * #IGNORE -;; #LAYOUT# * KERNAL_0 #TAKE -;; #LAYOUT# * * #IGNORE - -; -; Tabulation keys handling within CHROUT -; - - -!ifdef CONFIG_EDIT_TABULATORS { - - -chrout_screen_TAB_FW: - - jsr screen_get_clipped_PNTR - tya - ora #%00000111 - tay - iny - cpy #40 - bcc @1 - ldy #39 -@1: - sty PNTR - - jmp chrout_screen_calc_lptr_done - - -chrout_screen_TAB_BW: - - jsr screen_get_clipped_PNTR - beq @2 ; column 0, recalculating pointers is not necessary, but this is a rare case nevertheless - - dey - tya - and #%11111000 - sta PNTR -@2: - jmp chrout_screen_calc_lptr_done - -} ; CONFIG_EDIT_TABULATORS