;
.export soft80_cgetc
- .import soft80_internal_cursorxlsb
+ .import soft80_internal_cellcolor, soft80_internal_cursorxlsb
.import cursor
.importzp tmp1
; save old value
lda (CRAM_PTR),y ; vram
sta tmp1
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
rts
;
.export soft80_textcolor, soft80_bgcolor
- .import soft80_internal_textcolor, soft80_internal_bgcolor
+ .import soft80_internal_cellcolor, soft80_internal_bgcolor
.import soft80_internal_cursorxlsb
.import soft80_kplot, soft80_checkchar
.include "soft80.inc"
soft80_textcolor:
- ldx soft80_internal_textcolor ; get old value
- sta soft80_internal_textcolor ; set new value
+ ldx CHARCOLOR ; get old value
+ sta CHARCOLOR ; set new value
mkcharcolor:
lda soft80_internal_bgcolor
asl a
asl a
sta tmp1 ; remember new bg color (high nibble)
- ora soft80_internal_textcolor
- sta CHARCOLOR ; text/bg combo for new chars
+ ora CHARCOLOR
+ sta soft80_internal_cellcolor ; text/bg combo for new chars
txa ; get old value
rts
.destructor soft80_shutdown
.import soft80_kclrscr, soft80_charset
- .export soft80_internal_textcolor, soft80_internal_bgcolor
+ .export soft80_internal_bgcolor, soft80_internal_cellcolor
.export soft80_internal_cursorxlsb
.importzp ptr1, ptr2, ptr3
; colorram being set up as expected, which is why we cant use the
; _bgcolor and _textcolor functions here.
- lda 646 ; use current textcolor
- and #$0f
- sta soft80_internal_textcolor
+ lda CHARCOLOR ; use current textcolor
+ and #$0f ; make sure the upper nibble is 0s
+ sta CHARCOLOR
lda VIC_BG_COLOR0 ; use current bgcolor
and #$0f
asl a
asl a
asl a
- ora soft80_internal_textcolor
- sta CHARCOLOR
+ ora CHARCOLOR
+ sta soft80_internal_cellcolor
lda #$3b
sta VIC_CTRL1
; code has been run.
.data ; FIXME
-soft80_internal_textcolor:
+soft80_internal_cellcolor:
.res 1
soft80_internal_bgcolor:
.res 1
.import popa, _gotoxy
.import soft80_kplot
- .import soft80_internal_bgcolor, soft80_internal_textcolor
+ .import soft80_internal_bgcolor, soft80_internal_cellcolor
.import soft80_internal_cursorxlsb
.importzp tmp4,tmp3
.if SOFT80COLORVOODOO = 1
jsr soft80_putcolor
.else
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
.endif
.if SOFT80COLORVOODOO = 1
jsr soft80_putcolor
.else
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
.endif
bne @sk2 ; jump if odd xpos
; vram = textcol
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
rts
beq @sk3 ; jump if even xpos
@sk2:
; colram = textcol
- lda soft80_internal_textcolor
+ lda CHARCOLOR
inc $01 ; $35
sta (CRAM_PTR),y ; colram
stx $01 ; $34
stx $01 ; $34
@sk1:
; vram = textcol
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
sta (CRAM_PTR),y ; vram
rts
.export soft80_kclrscr
.import soft80_kplot
- .import soft80_internal_bgcolor
+ .import soft80_internal_bgcolor, soft80_internal_cellcolor
.importzp ptr1
.include "c64.inc"
lda #$34 ; enable RAM under I/O
sta $01
- lda CHARCOLOR
+ lda soft80_internal_cellcolor
and #$f0
ora soft80_internal_bgcolor
jsr clear ; clear vram