Fix many bugs

This commit is contained in:
jede
2021-03-01 22:33:12 +01:00
parent b8889bf37e
commit 02e52fe24d
8 changed files with 109 additions and 55 deletions

View File

@@ -29,30 +29,23 @@ gotoxy: jsr popa ; Get Y
.endproc
.proc update_adscr
; Force to set again color if cursor moves
; $FF is used because we know that it's impossible to have this value with a color
; It prevents a bug : If bgcolor or textcolor is set to black for example with no char displays,
; next cputsxy will not set the attribute if y coordinate changes
lda #$FF
sta OLD_CHARCOLOR
sta OLD_BGCOLOR
lda #<SCREEN
sta ADSCRL
sta ADSCR
lda #>SCREEN
sta ADSCRH
sta ADSCR+1
ldy SCRY
beq out
loop:
lda ADSCRL
lda ADSCR
clc
adc #SCREEN_XSIZE
bcc skip
inc ADSCRH
inc ADSCR+1
skip:
sta ADSCRL
sta ADSCR
dey
bne loop
out: