lb3361 wrote: ↑11 Jul 2023, 23:25
At67 does not wish to see Invader or any of his applications in a mainline ROMv6 (see his own words in the pull request; let's abstain from discussing his decision in this thread).
What is there to discuss? Correct, there is nothing to discuss.
The dev rom already contains a faster Mandelbrot program using quertyface's quarter square idea https://forum.gigatron.io/viewtopic.php?p=2632#p2632. This code is about five times faster than the original Mandelbrot. It steals two screen rows to hold a table of squares and uses the identity 2ab = a^2 + b^2 - (a-b)^2 to compute products. Then one can do the following calculation in the escape time algorithm:
repeat:
x2=x*x; y2=y*y. # two accesses to the square table
if x2 + y2 > 4 then break
y = 2*x*y + y0. # one product = three accesses to the square table
x = x2 - y2 + x0
Turns out that we can trivially replace the y calculation by
The most conservative approach is to reinstate the Pictures application into ROMv6 (instead of Invader). The v6 pull request https://github.com/kervinck/gigatron-rom/pull/249 has been reshuffled to do achieve this. The last comment provides a break down of all the reshuffled commits for review. I believe this is good to go.
To run this proposed ROMv6.rom inside the version of gtemuAT67 that is in the gigatron-rom repository, you must to disable the test that makes gtemuAT67 bail out when it encounters an unrecognized ROM (see https://github.com/lb3361/gigatron-rom/ ... u.cpp#L521). Alternatively you can run the new dev.rom (attached) which is identical to the proposed ROMv6 save for having RomTypeValue_DEVROM instead of the unrecognized RomTypeValue_ROMv6.