more escape sequences implemented
This commit is contained in:
1 parent
a70cd521f0
commit
c9484fc7ef
3 files changed
+95
-22
No files matched your search
@@ -88,16 +88,22 @@ m65_colorset_color:
|
|||||||
@2:
|
@2:
|
||||||
lda (PTR1), y
|
lda (PTR1), y
|
||||||
sta PALETTE_R, y
|
sta PALETTE_R, y
|
||||||
|
jsr m65_colorset_get_bold
|
||||||
|
sta PALETTE_R + $10, y
|
||||||
|
|
||||||
jsr m65_colorset_PTR1_inc_16
|
jsr m65_colorset_PTR1_inc_16
|
||||||
|
|
||||||
lda (PTR1), y
|
lda (PTR1), y
|
||||||
sta PALETTE_G, y
|
sta PALETTE_G, y
|
||||||
|
jsr m65_colorset_get_bold
|
||||||
|
sta PALETTE_G + $10, y
|
||||||
|
|
||||||
jsr m65_colorset_PTR1_inc_16
|
jsr m65_colorset_PTR1_inc_16
|
||||||
|
|
||||||
lda (PTR1), y
|
lda (PTR1), y
|
||||||
sta PALETTE_B, y
|
sta PALETTE_B, y
|
||||||
|
jsr m65_colorset_get_bold
|
||||||
|
sta PALETTE_B + $10, y
|
||||||
|
|
||||||
jsr m65_colorset_PTR1_dec_32
|
jsr m65_colorset_PTR1_dec_32
|
||||||
|
|
||||||
@@ -134,11 +140,15 @@ m65_colorset_greyscale:
|
|||||||
ldy #$0F
|
ldy #$0F
|
||||||
@2:
|
@2:
|
||||||
lda (PTR1), y
|
lda (PTR1), y
|
||||||
|
|
||||||
sta PALETTE_R, y
|
sta PALETTE_R, y
|
||||||
sta PALETTE_G, y
|
sta PALETTE_G, y
|
||||||
sta PALETTE_B, 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
|
dey
|
||||||
bpl @2
|
bpl @2
|
||||||
|
|
||||||
@@ -170,6 +180,15 @@ m65_colorset_PTR1_dec_32:
|
|||||||
@1:
|
@1:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
m65_colorset_get_bold:
|
||||||
|
|
||||||
|
phy
|
||||||
|
lda m65_colorset_bold_tab, y
|
||||||
|
tay
|
||||||
|
lda (PTR1), y
|
||||||
|
ply
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
m65_colorset_selection:
|
m65_colorset_selection:
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,26 @@
|
|||||||
;; #LAYOUT# * * #IGNORE
|
;; #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
|
; #1 - original C65 palette, data taken from C65 manual
|
||||||
|
|
||||||
; RRGGBB
|
; RRGGBB
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ m65_chrout_screen_escmode:
|
|||||||
|
|
||||||
txa
|
txa
|
||||||
sec
|
sec
|
||||||
sbc #$40 ; '@'
|
sbc #$40 ; '@'
|
||||||
cmp #$1E
|
cmp #$1E
|
||||||
bcc @1
|
bcc @1
|
||||||
|
|
||||||
@@ -21,20 +21,20 @@ m65_chrout_screen_escmode:
|
|||||||
|
|
||||||
sec
|
sec
|
||||||
sbc #$20
|
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
|
cmp #$1B
|
||||||
bcc @1
|
bcc @1
|
||||||
|
|
||||||
|
|
||||||
; Check for fgew special shifted characters
|
; Check for fgew special shifted characters
|
||||||
cpx #$3A ; colon
|
cpx #$3A ; colon
|
||||||
beq m65_chrout_esc_LBR
|
+beq m65_chrout_esc_LBR
|
||||||
cpx #$3B ; semicolon
|
cpx #$3B ; semicolon
|
||||||
beq m65_chrout_esc_RBR
|
+beq m65_chrout_esc_RBR
|
||||||
cpx #$DB
|
cpx #$DB
|
||||||
beq m65_chrout_esc_AT
|
+beq m65_chrout_esc_AT
|
||||||
|
|
||||||
bra m65_chrout_esc_done
|
bra m65_chrout_esc_done_1
|
||||||
@1:
|
@1:
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
@@ -44,7 +44,7 @@ m65_chrout_esc_J: ; move cursor to the beginning of the line
|
|||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
sta M65__TXTCOL
|
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
|
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
|
plz
|
||||||
lda M65__TXTCOL
|
lda M65__TXTCOL
|
||||||
cmp m65_scrtab_txtwidth,x
|
cmp m65_scrtab_txtwidth,x
|
||||||
bne m65_chrout_esc_done
|
bne m65_chrout_esc_done_1
|
||||||
dec M65__TXTCOL
|
dec M65__TXTCOL
|
||||||
bra m65_chrout_esc_done
|
bra m65_chrout_esc_done_1
|
||||||
|
|
||||||
m65_chrout_esc_O: ; cancel quote, reverse, underline, flash, etc
|
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
|
; FALLTROUGH
|
||||||
|
|
||||||
m65_chrout_esc_done:
|
m65_chrout_esc_done_1:
|
||||||
|
|
||||||
jmp m65_chrout_screen_done
|
jmp m65_chrout_screen_done
|
||||||
|
|
||||||
@@ -89,7 +89,49 @@ m65_chrout_esc_X: ; cycle through available screen modes
|
|||||||
@1:
|
@1:
|
||||||
jsr M65_SCRMODESET
|
jsr M65_SCRMODESET
|
||||||
jsr M65_CLRSCR
|
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
|
+nop
|
||||||
m65_chrout_esc_M:
|
m65_chrout_esc_M:
|
||||||
+nop
|
+nop
|
||||||
m65_chrout_esc_N:
|
|
||||||
+nop
|
|
||||||
m65_chrout_esc_P:
|
m65_chrout_esc_P:
|
||||||
+nop
|
+nop
|
||||||
m65_chrout_esc_Q:
|
m65_chrout_esc_Q:
|
||||||
+nop
|
+nop
|
||||||
m65_chrout_esc_R:
|
|
||||||
+nop
|
|
||||||
m65_chrout_esc_S:
|
|
||||||
+nop
|
|
||||||
m65_chrout_esc_T:
|
m65_chrout_esc_T:
|
||||||
+nop
|
+nop
|
||||||
m65_chrout_esc_U:
|
|
||||||
+nop
|
|
||||||
m65_chrout_esc_V:
|
m65_chrout_esc_V:
|
||||||
+nop
|
+nop
|
||||||
m65_chrout_esc_W:
|
m65_chrout_esc_W:
|
||||||
|
|||||||
Reference in new issue
Block a user