aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-11-09 22:59:11 -0500
committerB. Watson <urchlay@slackware.uk>2022-11-09 22:59:11 -0500
commite1aab2e0a37016b0a892405467697d68cdba467f (patch)
treeea2951578ae35bc3daa97cf222abc3cb884d065a
parent72e6cbfc6a4b4606f11a6d5285de65238dc0dbd4 (diff)
downloaddla-asm-e1aab2e0a37016b0a892405467697d68cdba467f.tar.gz
Keep drunkwalk and lineaddrs_l/h from crossing page boundaries (3% speedup).
-rw-r--r--dla.s24
-rw-r--r--nextpage.inc7
2 files changed, 11 insertions, 20 deletions
diff --git a/dla.s b/dla.s
index 12724d7..e1429e9 100644
--- a/dla.s
+++ b/dla.s
@@ -9,6 +9,7 @@
.include "atari.inc"
.include "xex.inc"
+ .include "nextpage.inc"
loadaddr = $2000
screen = $4000 ; must be on a x000 (4K) boundary
@@ -452,6 +453,7 @@ plot:
sta (pixptr),y
rts
+ nextpage
.include "drunkwalk.s"
;;; Subroutine: drawseed
@@ -632,6 +634,7 @@ seeds_h: .byte >(seed_point-1),>(seed_plus-1),>(seed_4pt-1),>(seed_long-1)
; table of addresses, for each line on the screen. bloats the
; code by 384 bytes, but compared to calculating the address, is
; twice as fast!
+ nextpage
lineaddrs_l:
laddr .set pixarray
.repeat 170
@@ -639,6 +642,7 @@ lineaddrs_l:
laddr .set laddr + 170
.endrep
+ nextpage
lineaddrs_h:
laddr .set pixarray
.repeat 170
@@ -646,26 +650,6 @@ lineaddrs_h:
laddr .set laddr + 170
.endrep
- ; tables to replace X coord => mask-and-offset calculations.
-xoffsets:
- xoffs .set 0
- .repeat 32
- .repeat 8
- .byte xoffs
- .endrep
- xoffs .set xoffs + 1
- .endrep
-
-xmasks:
- .repeat 32
- .byte $80,$40,$20,$10,$08,$04,$02,$01
- .endrep
-
-fastmasks:
- .repeat 32
- .byte $00,$a0,$50,$28,$14,$0a,$05,$00
- .endrep
-
;;; display list
; ANTIC opcodes
blank8 = $70
diff --git a/nextpage.inc b/nextpage.inc
new file mode 100644
index 0000000..7e13042
--- /dev/null
+++ b/nextpage.inc
@@ -0,0 +1,7 @@
+
+; fill to the start of the next page.
+ .macro nextpage
+ .repeat ((>(*)+1)*256)-*
+ .byte 0
+ .endrep
+ .endmacro