Long (generated) bittables for fastest plot and point

This commit is contained in:
Pecusx
2023-06-21 09:43:29 +02:00
parent 884a74c573
commit 189d3ed593
10 changed files with 83 additions and 46 deletions
+31 -16
View File
@@ -52,23 +52,24 @@ MakeUnPlot
sta xbyte+1
sta oldplot+1
lda xdraw
and #$7
tax
; lda xdraw
; and #$7
; tax
ldx xdraw ; optimization (256 bytes long bittable)
lda color
bne ClearUnPlot
;plotting here
lda (xbyte),y
sta OldOraTemp
ora bittable,x
ora bittable1_long,x
sta (xbyte),y
bne ContinueUnPlot ; allways <>0
ClearUnPlot
lda (xbyte),y
sta OldOraTemp
and bittable2,x
and bittable2_long,x
sta (xbyte),y
ContinueUnPlot
ldx WhichUnPlot
@@ -140,20 +141,22 @@ MakePlot
lda linetableH,x
sta xbyte+1
lda xdraw
and #$7
tax
; lda xdraw
; and #$7
; tax
ldx xdraw ; optimization (256 bytes long bittable)
lda color
bne ClearPlot
lda (xbyte),y
ora bittable,x
ora bittable1_long,x
sta (xbyte),y
EndOfPlot
rts
ClearPlot
lda (xbyte),y
and bittable2,x
and bittable2_long,x
sta (xbyte),y
rts
.endp
@@ -180,13 +183,14 @@ ClearPlot
lda linetableH,x
sta xbyte+1
lda xdraw
and #$7
tax
; lda xdraw
; and #$7
; tax
ldx xdraw ; optimization (256 bytes long bittable)
lda (xbyte),y
eor #$ff
and bittable,x
and bittable1_long,x
rts
.endp
;--------------------------------------------------
@@ -247,7 +251,7 @@ MinCalculated
; because one pixel is already plotted (and who cares? :) )
@
lda (xbyte),y
and bittable2,x
and bittable2_long,x
sta (xbyte),y
;IntoDraw
adw xbyte #screenBytes
@@ -752,6 +756,17 @@ loop sta (temp),y
iny
cpy #screenheight+1
bne @-
; and bittables for fastes plot and point
ldy #0
@ tya
and #%00000111
tax
lda bittable,x
sta bittable1_long,y
eor #%11111111
sta bittable2_long,y
iny
bne @-
rts
.endp
;--------------------------------------------------