pouët.net

Go to bottom

[Question] Rotozoomer that will run on low specs

category: code [glöplog]
Quote:
I don't have comment up yet, but the main asm code was that, with a bit of unroll to win one reg and trying to use regs as much as possible, collecting sample in al and ah to write once for two pixels, using bp also as extra register.


If I understand correctly, when compiling, NASM will generate 160 repetitions of the block inside the "%rep" directive. So it’s more than just a "a bit of unroll" :)

Well, for a 386 this clearly works pretty well. It’s also possible that using "stosw" gives an advantage (compared to my code, where I use "mov" and "add", because on a 486 that’s faster).

Quote:
I was looking at the code of Second Reality where it's smoother.


As for the smoothness in the rotozoomer in Second Reality, it doesn’t really look smooth to me at high zoom levels. Seems like it’s still 8:8. I don’t really understand Psi’s code :)
added on the 2026-02-20 19:05:32 by bitl bitl

login

Go to top