;
; Groepaz/Hitmen, 11.10.2015
;
+; high level implementation for the soft80 implementation
+;
; void cputcxy (unsigned char x, unsigned char y, char c);
; void cputc (char c);
;
.export soft80_newline, soft80_plot
.export soft80_checkchar
- .import popa, _gotoxy
+ .import 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
soft80_cputcxy:
pha ; Save C
- jsr popa ; Get Y
- jsr _gotoxy ; Set cursor, drop x
+ jsr gotoxy ; Set cursor, drop x and y
pla ; Restore C
; Plot a character - also used as internal function
.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