more escape sequences implemented

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 6b8ef20dc0
commit 025201256c
3 files changed
+95 -22

No files matched your search

+20 -1
View File
@@ -88,16 +88,22 @@ m65_colorset_color:
@2:
lda (PTR1), y
sta PALETTE_R, y
jsr m65_colorset_get_bold
sta PALETTE_R + $10, y
jsr m65_colorset_PTR1_inc_16
lda (PTR1), y
sta PALETTE_G, y
jsr m65_colorset_get_bold
sta PALETTE_G + $10, y
jsr m65_colorset_PTR1_inc_16
lda (PTR1), y
sta PALETTE_B, y
jsr m65_colorset_get_bold
sta PALETTE_B + $10, y
jsr m65_colorset_PTR1_dec_32
@@ -134,11 +140,15 @@ m65_colorset_greyscale:
ldy #$0F
@2:
lda (PTR1), y
sta PALETTE_R, y
sta PALETTE_G, y
sta PALETTE_B, y
jsr m65_colorset_get_bold
sta PALETTE_R + $10, y
sta PALETTE_G + $10, y
sta PALETTE_B + $10, y
dey
bpl @2
@@ -170,6 +180,15 @@ m65_colorset_PTR1_dec_32:
@1:
rts
m65_colorset_get_bold:
phy
lda m65_colorset_bold_tab, y
tay
lda (PTR1), y
ply
rts
m65_colorset_selection:
@@ -2,6 +2,26 @@
;; #LAYOUT# * * #IGNORE
m65_colorset_bold_tab: ; color redirection table for bold attribute
!byte $0B ; black -> dark grey
!byte $0A ; white -> light red
!byte $0A ; red -> light red
!byte $07 ; cyan -> yellow
!byte $0A ; purple -> light red
!byte $0D ; green -> light green
!byte $0E ; blue -> light blue
!byte $0A ; yellow -> light red
!byte $07 ; orange -> yellow
!byte $08 ; brown -> orange
!byte $07 ; light red -> yellow
!byte $0C ; dark grey -> medium grey
!byte $0F ; medium grey -> light grey
!byte $07 ; light green -> yellow
!byte $03 ; ligh blue -> cyan
!byte $01 ; light grey -> white
; #1 - original C65 palette, data taken from C65 manual
; RRGGBB
@@ -13,7 +13,7 @@ m65_chrout_screen_escmode:
txa
sec
sbc #$40 ; '@'
sbc #$40 ; '@'
cmp #$1E
bcc @1
@@ -21,20 +21,20 @@ m65_chrout_screen_escmode:
sec
sbc #$20
beq m65_chrout_esc_done ; $60 - character not supported here
beq m65_chrout_esc_done_1 ; $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 #$3A ; colon
+beq m65_chrout_esc_LBR
cpx #$3B ; semicolon
+beq m65_chrout_esc_RBR
cpx #$DB
beq m65_chrout_esc_AT
+beq m65_chrout_esc_AT
bra m65_chrout_esc_done
bra m65_chrout_esc_done_1
@1:
asl
tax
@@ -44,7 +44,7 @@ m65_chrout_esc_J: ; move cursor to the beginning of the line
lda #$00
sta M65__TXTCOL
bra m65_chrout_esc_done
bra m65_chrout_esc_done_1
m65_chrout_esc_K: ; move cursor after the text within the line XXX update for window mode
@@ -65,9 +65,9 @@ m65_chrout_esc_K: ; move cursor after the text within the line XXX update
plz
lda M65__TXTCOL
cmp m65_scrtab_txtwidth,x
bne m65_chrout_esc_done
bne m65_chrout_esc_done_1
dec M65__TXTCOL
bra m65_chrout_esc_done
bra m65_chrout_esc_done_1
m65_chrout_esc_O: ; cancel quote, reverse, underline, flash, etc
@@ -76,7 +76,7 @@ m65_chrout_esc_O: ; cancel quote, reverse, underline, flash, etc
; FALLTROUGH
m65_chrout_esc_done:
m65_chrout_esc_done_1:
jmp m65_chrout_screen_done
@@ -89,7 +89,49 @@ m65_chrout_esc_X: ; cycle through available screen modes
@1:
jsr M65_SCRMODESET
jsr M65_CLRSCR
bra m65_chrout_esc_done
bra m65_chrout_esc_done_1
m65_chrout_esc_S: ; set 'bold' attribute
lda COLOR
ora #%01000000
; FALLTROUGH
m65_chrout_esc_COLOR_done:
sta COLOR
bra m65_chrout_esc_done_1
m65_chrout_esc_U: ; unset 'bold' attribute
lda COLOR
and #%10111111
bra m65_chrout_esc_COLOR_done
m65_chrout_esc_N: ; normal screen colors
lda #CONFIG_COLOR_BG
sta VIC_EXTCOL
sta VIC_BGCOL0
lda COLOR
and #$F0
ora #CONFIG_COLOR_TXT
bra m65_chrout_esc_COLOR_done
m65_chrout_esc_R: ; 'reversed' screen colors
lda #$0B
sta VIC_EXTCOL
lda #$0F
sta VIC_BGCOL0
lda COLOR
and #$F0
bra m65_chrout_esc_COLOR_done
@@ -119,20 +161,12 @@ m65_chrout_esc_L:
+nop
m65_chrout_esc_M:
+nop
m65_chrout_esc_N:
+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: