use 'soft80_internal_cellcolor' for the current cell color, and CHARCOLOR for the actual textcolor
This commit is contained in:
parent
ffda2a3603
commit
c708031374
5 changed files with 22 additions and 22 deletions
|
@ -5,7 +5,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
.export soft80_cgetc
|
.export soft80_cgetc
|
||||||
.import soft80_internal_cursorxlsb
|
.import soft80_internal_cellcolor, soft80_internal_cursorxlsb
|
||||||
.import cursor
|
.import cursor
|
||||||
.importzp tmp1
|
.importzp tmp1
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ setcolor:
|
||||||
; save old value
|
; save old value
|
||||||
lda (CRAM_PTR),y ; vram
|
lda (CRAM_PTR),y ; vram
|
||||||
sta tmp1
|
sta tmp1
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
sta (CRAM_PTR),y ; vram
|
sta (CRAM_PTR),y ; vram
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
.export soft80_textcolor, soft80_bgcolor
|
.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_internal_cursorxlsb
|
||||||
.import soft80_kplot, soft80_checkchar
|
.import soft80_kplot, soft80_checkchar
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
.include "soft80.inc"
|
.include "soft80.inc"
|
||||||
|
|
||||||
soft80_textcolor:
|
soft80_textcolor:
|
||||||
ldx soft80_internal_textcolor ; get old value
|
ldx CHARCOLOR ; get old value
|
||||||
sta soft80_internal_textcolor ; set new value
|
sta CHARCOLOR ; set new value
|
||||||
|
|
||||||
mkcharcolor:
|
mkcharcolor:
|
||||||
lda soft80_internal_bgcolor
|
lda soft80_internal_bgcolor
|
||||||
|
@ -26,8 +26,8 @@ mkcharcolor:
|
||||||
asl a
|
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
|
ora CHARCOLOR
|
||||||
sta CHARCOLOR ; text/bg combo for new chars
|
sta soft80_internal_cellcolor ; text/bg combo for new chars
|
||||||
|
|
||||||
txa ; get old value
|
txa ; get old value
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
.destructor soft80_shutdown
|
.destructor soft80_shutdown
|
||||||
|
|
||||||
.import soft80_kclrscr, soft80_charset
|
.import soft80_kclrscr, soft80_charset
|
||||||
.export soft80_internal_textcolor, soft80_internal_bgcolor
|
.export soft80_internal_bgcolor, soft80_internal_cellcolor
|
||||||
.export soft80_internal_cursorxlsb
|
.export soft80_internal_cursorxlsb
|
||||||
|
|
||||||
.importzp ptr1, ptr2, ptr3
|
.importzp ptr1, ptr2, ptr3
|
||||||
|
@ -25,9 +25,9 @@ soft80_init:
|
||||||
; colorram being set up as expected, which is why we cant use the
|
; colorram being set up as expected, which is why we cant use the
|
||||||
; _bgcolor and _textcolor functions here.
|
; _bgcolor and _textcolor functions here.
|
||||||
|
|
||||||
lda 646 ; use current textcolor
|
lda CHARCOLOR ; use current textcolor
|
||||||
and #$0f
|
and #$0f ; make sure the upper nibble is 0s
|
||||||
sta soft80_internal_textcolor
|
sta CHARCOLOR
|
||||||
|
|
||||||
lda VIC_BG_COLOR0 ; use current bgcolor
|
lda VIC_BG_COLOR0 ; use current bgcolor
|
||||||
and #$0f
|
and #$0f
|
||||||
|
@ -36,8 +36,8 @@ soft80_init:
|
||||||
asl a
|
asl a
|
||||||
asl a
|
asl a
|
||||||
asl a
|
asl a
|
||||||
ora soft80_internal_textcolor
|
ora CHARCOLOR
|
||||||
sta CHARCOLOR
|
sta soft80_internal_cellcolor
|
||||||
|
|
||||||
lda #$3b
|
lda #$3b
|
||||||
sta VIC_CTRL1
|
sta VIC_CTRL1
|
||||||
|
@ -154,7 +154,7 @@ soft80_tables_data_end:
|
||||||
; code has been run.
|
; code has been run.
|
||||||
|
|
||||||
.data ; FIXME
|
.data ; FIXME
|
||||||
soft80_internal_textcolor:
|
soft80_internal_cellcolor:
|
||||||
.res 1
|
.res 1
|
||||||
soft80_internal_bgcolor:
|
soft80_internal_bgcolor:
|
||||||
.res 1
|
.res 1
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
.import popa, _gotoxy
|
.import popa, _gotoxy
|
||||||
|
|
||||||
.import soft80_kplot
|
.import soft80_kplot
|
||||||
.import soft80_internal_bgcolor, soft80_internal_textcolor
|
.import soft80_internal_bgcolor, soft80_internal_cellcolor
|
||||||
.import soft80_internal_cursorxlsb
|
.import soft80_internal_cursorxlsb
|
||||||
|
|
||||||
.importzp tmp4,tmp3
|
.importzp tmp4,tmp3
|
||||||
|
@ -148,7 +148,7 @@ draw_spaceinvers:
|
||||||
.if SOFT80COLORVOODOO = 1
|
.if SOFT80COLORVOODOO = 1
|
||||||
jsr soft80_putcolor
|
jsr soft80_putcolor
|
||||||
.else
|
.else
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
sta (CRAM_PTR),y ; vram
|
sta (CRAM_PTR),y ; vram
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ soft80_putchar:
|
||||||
.if SOFT80COLORVOODOO = 1
|
.if SOFT80COLORVOODOO = 1
|
||||||
jsr soft80_putcolor
|
jsr soft80_putcolor
|
||||||
.else
|
.else
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
sta (CRAM_PTR),y ; vram
|
sta (CRAM_PTR),y ; vram
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ soft80_putcolor:
|
||||||
bne @sk2 ; jump if odd xpos
|
bne @sk2 ; jump if odd xpos
|
||||||
|
|
||||||
; vram = textcol
|
; vram = textcol
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
sta (CRAM_PTR),y ; vram
|
sta (CRAM_PTR),y ; vram
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ soft80_putcolor:
|
||||||
beq @sk3 ; jump if even xpos
|
beq @sk3 ; jump if even xpos
|
||||||
@sk2:
|
@sk2:
|
||||||
; colram = textcol
|
; colram = textcol
|
||||||
lda soft80_internal_textcolor
|
lda CHARCOLOR
|
||||||
inc $01 ; $35
|
inc $01 ; $35
|
||||||
sta (CRAM_PTR),y ; colram
|
sta (CRAM_PTR),y ; colram
|
||||||
stx $01 ; $34
|
stx $01 ; $34
|
||||||
|
@ -463,7 +463,7 @@ soft80_putcolor:
|
||||||
stx $01 ; $34
|
stx $01 ; $34
|
||||||
@sk1:
|
@sk1:
|
||||||
; vram = textcol
|
; vram = textcol
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
sta (CRAM_PTR),y ; vram
|
sta (CRAM_PTR),y ; vram
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
.export soft80_kclrscr
|
.export soft80_kclrscr
|
||||||
.import soft80_kplot
|
.import soft80_kplot
|
||||||
.import soft80_internal_bgcolor
|
.import soft80_internal_bgcolor, soft80_internal_cellcolor
|
||||||
.importzp ptr1
|
.importzp ptr1
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
|
@ -48,7 +48,7 @@ soft80_kclrscr:
|
||||||
lda #$34 ; enable RAM under I/O
|
lda #$34 ; enable RAM under I/O
|
||||||
sta $01
|
sta $01
|
||||||
|
|
||||||
lda CHARCOLOR
|
lda soft80_internal_cellcolor
|
||||||
and #$f0
|
and #$f0
|
||||||
ora soft80_internal_bgcolor
|
ora soft80_internal_bgcolor
|
||||||
jsr clear ; clear vram
|
jsr clear ; clear vram
|
||||||
|
|
Loading…
Add table
Reference in a new issue