started work on escape sequences, some cleanup

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 790807c369
commit f77496a724
8 files changed
+193 -26

No files matched your search

@@ -15,6 +15,11 @@ m65_chrout_screen:
lda SCHAR
tax
; Check for escape mode
bit M65_ESCMODE
+bmi m65_chrout_screen_escmode
; All the PETSCII control codes are within $0x, $1x, $8x, $9x, remaining
; ones are always printable characters; separate away control codes
@@ -89,12 +89,6 @@ m65_chrout_screen_FLASHING_OFF:
+nop
m65_chrout_screen_TAB_SET_CLR:
+nop
m65_chrout_screen_ESC:
+nop
m65_chrout_screen_BELL:
jmp m65_chrout_screen_done
; XXX: implement the following functionalities according to MEGA65 book:
; CTRL +T +Z +E +Q +G +J +U +W +B +N +M +] +I +X +K +L +[
; ESC +@ +A +B +C +D +E +F +G +H +I +J +K +L +M +N +O +P +Q +S +T +U +V +W +X +Y +Z +1..8
@@ -2,6 +2,15 @@
;; #LAYOUT# * * #IGNORE
; Escape mode support
m65_chrout_screen_ESC:
lda #$FF
sta M65_ESCMODE
bra m65_chrout_screen_ctrl2_end
; 'REVERSE' mode support
m65_chrout_screen_RVS_ON:
@@ -14,7 +23,6 @@ m65_chrout_screen_RVS_ON:
m65_chrout_screen_RVS_OFF:
lda #$00
sta RVS
; FALLTROUGH
@@ -0,0 +1,100 @@
;; #LAYOUT# M65 KERNAL_1 #TAKE
;; #LAYOUT# * * #IGNORE
m65_chrout_screen_escmode:
; Regardless if the escape sequence is supported, or not - cancel escape mode
lda #$00
sta M65_ESCMODE
; XXX
m65_chrout_screen_escmode_end:
jmp m65_chrout_screen_done
; 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:
+nop
m65_chrout_esc_B:
+nop
m65_chrout_esc_C:
+nop
m65_chrout_esc_D:
+nop
m65_chrout_esc_E:
+nop
m65_chrout_esc_F:
+nop
m65_chrout_esc_G:
+nop
m65_chrout_esc_H:
+nop
m65_chrout_esc_I:
+nop
m65_chrout_esc_J:
+nop
m65_chrout_esc_K:
+nop
m65_chrout_esc_L:
+nop
m65_chrout_esc_M:
+nop
m65_chrout_esc_N:
+nop
m65_chrout_esc_O:
+nop
m65_chrout_esc_P:
+nop
m65_chrout_esc_Q:
+nop
m65_chrout_esc_R:
+nop
m65_chrout_esc_S:
+nop
m65_chrout_esc_T:
+nop
m65_chrout_esc_U:
+nop
m65_chrout_esc_V:
+nop
m65_chrout_esc_W:
+nop
m65_chrout_esc_X:
+nop
m65_chrout_esc_Y:
+nop
m65_chrout_esc_Z:
+nop
m65_chrout_esc_LBR:
+nop
m65_chrout_esc_RBR:
+nop
jmp m65_chrout_screen_done
@@ -110,3 +110,52 @@ m65_chrout_screen_jumptable:
!word m65_chrout_screen_DEL
!word m65_chrout_screen_RETURN
!word m65_chrout_screen_RETURN
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_screen_done ; ':'
!word m65_chrout_screen_done ; ';'
!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
!word m65_chrout_esc_C
!word m65_chrout_esc_D
!word m65_chrout_esc_E
!word m65_chrout_esc_F
!word m65_chrout_esc_G
!word m65_chrout_esc_H
!word m65_chrout_esc_I
!word m65_chrout_esc_J
!word m65_chrout_esc_K
!word m65_chrout_esc_L
!word m65_chrout_esc_M
!word m65_chrout_esc_N
!word m65_chrout_esc_O
!word m65_chrout_esc_P
!word m65_chrout_esc_Q
!word m65_chrout_esc_R
!word m65_chrout_esc_S
!word m65_chrout_esc_T
!word m65_chrout_esc_U
!word m65_chrout_esc_V
!word m65_chrout_esc_W
!word m65_chrout_esc_X
!word m65_chrout_esc_Y
!word m65_chrout_esc_Z
!word m65_chrout_esc_LBR
!word m65_chrout_screen_done ; pound symbol
!word m65_chrout_esc_RBR