diff --git a/C64/gr_basics.asm b/C64/gr_basics.asm index e9bbfb0..09a6fa1 100644 --- a/C64/gr_basics.asm +++ b/C64/gr_basics.asm @@ -16,8 +16,7 @@ unPlotAfterX lda oldplotH,x sta oldplot+1 - lda oldply,x - tay + ldy #0 lda oldora,x sta (oldplot),y @@ -31,30 +30,24 @@ CheckX jcs EndOfUnPlot MakeUnPlot ; let's count coordinates taken from xdraw and ydraw - ;xbyte = xbyte/8 - lda xdraw+1 - lsr lda xdraw - ror ;just one bit over 256. Max screenwidth = 512!!! - lsr - lsr -;--- - tay - ldx WhichUnPlot - tya - sta oldply,x - + and #%11111000 + ;sta xbyte + ;--- ldx ydraw - lda linetableL,x - sta xbyte - sta oldplot + clc + adc linetableL,x + sta xbyte + sta oldplot lda linetableH,x + adc xdraw+1 sta xbyte+1 - sta oldplot+1 + sta oldplot+1 lda xdraw and #$7 tax + ldy #0 lda color bne ClearUnPlot @@ -91,9 +84,6 @@ LetsCheckOverlapping lda oldplotH,x cmp oldplotH,y bne NotTheSamePlot - lda oldply,x - cmp oldply,y - bne NotTheSamePlot ; the pixel is in the same byte so let's take correct contents lda oldora,x sta oldora,y diff --git a/scorchC64.asm b/scorchC64.asm index 6e83f19..12f0d09 100644 --- a/scorchC64.asm +++ b/scorchC64.asm @@ -35,7 +35,7 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $30 ; $57 +FirstZpageVariable = $58 ; $57 .zpvar DliColorBack .byte = FirstZpageVariable .zpvar GradientNr .byte .zpvar GradientColors .word diff --git a/scorchC64.prg b/scorchC64.prg index 4ec4ea0..d4cd941 100644 Binary files a/scorchC64.prg and b/scorchC64.prg differ