Faster imul16 routine

Improves runtime from 16.24 ms/px to 14.44 ms/px

This uses a routine found on Everything2:
https://everything2.com/title/Fast+6502+multiplication

which uses a lookup table of squares to do 8-bit imuls,
which are then composed into a 16-bit imul
This commit is contained in:
Brooke Vibber 2023-02-11 12:24:48 -08:00 committed by Brooke Vibber
commit 5637783529
5 changed files with 183 additions and 81 deletions

View file

@ -2,13 +2,17 @@
all : mandel.xex
%.xex : %.o
ld65 -C atari-asm-xex.cfg -o $@ $<
mandel.xex : mandel.o tables.o
ld65 -C ./atari-asm-xex.cfg -o $@ $+
%.o : %.s
ca65 -o $@ $<
tables.s : tables.js
node tables.js > tables.s
clean :
rm -f tables.s
rm -f *.o
rm -f *.xex