.include "soft80.inc"
soft80_textcolor:
- ldx soft80_internal_textcolor ; get old value
- sta soft80_internal_textcolor ; set new value
+ ldx soft80_internal_textcolor ; get old value
+ sta soft80_internal_textcolor ; set new value
jsr mkcharcolor
- txa ; get old value
+ txa ; get old value
rts
soft80_bgcolor:
- ldx soft80_internal_bgcolor ; get old value
- stx tmp2 ; save old value
- sta soft80_internal_bgcolor ; set new value
+ ldx soft80_internal_bgcolor ; get old value
+ stx tmp2 ; save old value
+ sta soft80_internal_bgcolor ; set new value
jsr mkcharcolor
.scope
lda soft80_colram+(page*250),x
and #$0f
- cmp tmp2 ; old bg color
+ cmp tmp2 ; old bg color
bne @sk1
- lda soft80_internal_bgcolor ; new bg color
+ lda soft80_internal_bgcolor ; new bg color
sta soft80_colram+(page*250),x
@sk1:
.endscope
sei
ldy $01
- lda #$34 ; disable I/O
+ lda #$34 ; disable I/O
sta $01
; if the old bg color is equal to text color in this cell, then also
.scope
lda soft80_vram+(page*250),x
and #$0f
- cmp tmp2 ; old bg color
+ cmp tmp2 ; old bg color
bne @sk2
- lda soft80_internal_bgcolor ; new bg color
+ lda soft80_internal_bgcolor ; new bg color
@sk2:
- ora tmp1 ; new bg color (high nibble)
+ ora tmp1 ; new bg color (high nibble)
sta soft80_vram+(page*250),x
.endscope
.endrepeat
inx
bne lp2
- sty $01 ; enable I/O
+ sty $01 ; enable I/O
cli
- lda tmp2 ; get old value
+ lda tmp2 ; get old value
rts
mkcharcolor:
asl a
asl a
asl a
- sta tmp1 ; remember new bg color (high nibble)
+ sta tmp1 ; remember new bg color (high nibble)
ora soft80_internal_textcolor
- sta CHARCOLOR ; text/bg combo for new chars
+ sta CHARCOLOR ; text/bg combo for new chars
rts
;-------------------------------------------------------------------------------
.if SOFT80COLORVOODOO = 1
lda soft80_internal_bgcolor
- jsr clear ; clear color ram
+ jsr clear ; clear color ram
.endif
sei
ldy $01
- lda #$34 ; enable RAM under I/O
+ lda #$34 ; enable RAM under I/O
sta $01
lda CHARCOLOR
and #$f0
ora soft80_internal_bgcolor
- jsr clear ; clear vram
+ jsr clear ; clear vram
sty $01
cli