A pull request (to be discussed)

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: A pull request (to be discussed)

Post by at67 »

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.

See this image? Do your best from now on.
rules.JPG
rules.JPG (25.99 KiB) Viewed 888 times
P.S. What is a mainline ROM?
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: A pull request (to be discussed)

Post by lb3361 »

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:

Code: Select all

  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

Code: Select all

    y = x2 + y2 - (x-y)^2 + y0    # one access to the square table only
This yields another 20% speedup, completing the first screen in Mode 1 in less than one minute.
Attachments
Mandelbrot.gt1
(1.22 KiB) Downloaded 61 times
Mandelbrot.gcl
(9.25 KiB) Downloaded 56 times
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: A pull request (to be discussed)

Post by lb3361 »

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.
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: A pull request (to be discussed)

Post by lb3361 »

The proposed state of the repository can be seen in this branch: https://github.com/lb3361/gigatron-rom/ ... request-v6. The file ROMv6.rom is the proposed ROMv6. This is a minor variation of the current dev rom which therefore fixes all known bugs in ROMv5a and provides good support for RAM & IO expansions that follow Marcel's original design https://forum.gigatron.io/viewtopic.php?p=3694#p3694.

There are only three differences between the current dev.rom and the proposed ROMv6: 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.
Attachments
ROMv6.rom
(128 KiB) Downloaded 49 times
dev.rom
(128 KiB) Downloaded 50 times
Post Reply