Add 80 column mode
git-svn-id: svn://svn.cc65.org/cc65/trunk@1788 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -11,27 +11,48 @@
|
||||
.include "c128.inc"
|
||||
|
||||
|
||||
_textcolor:
|
||||
.proc _textcolor
|
||||
|
||||
bit MODE ; Check 80/40 column mode
|
||||
bpl @L1 ; Jump if 40 columns
|
||||
tax
|
||||
lda $CE5C,x ; Translate VIC color -> VDC color
|
||||
@L1: ldx CHARCOLOR ; get old value
|
||||
bmi @L1 ; Jump if 40 columns
|
||||
ldx CHARCOLOR ; get old value
|
||||
sta CHARCOLOR ; set new value
|
||||
txa
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
@L1: tax ; Move new color to X
|
||||
lda CHARCOLOR ; Get old color + attributes
|
||||
and #$F0 ; Keep old attributes
|
||||
ora $CE5C,x ; Translate VIC color -> VDC color
|
||||
ldx CHARCOLOR ; Get the old color
|
||||
sta CHARCOLOR ; Set the new color + old attributes
|
||||
txa ; Old color -> A
|
||||
and #$0F ; Mask out attributes
|
||||
ldx #$00 ; Load high byte
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
.proc _bgcolor
|
||||
|
||||
_bgcolor:
|
||||
ldx VIC_BG_COLOR0 ; get old value
|
||||
sta VIC_BG_COLOR0 ; set new value
|
||||
txa
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
.proc _bordercolor
|
||||
|
||||
_bordercolor:
|
||||
ldx VIC_BORDERCOLOR ; get old value
|
||||
sta VIC_BORDERCOLOR ; set new value
|
||||
txa
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user