Zoom rotator [test]

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Zoom rotator [test]

Post by Phibrizzo »

Hello :)

I wanted to transfer one demo effect like in this old intro:
https://www.youtube.com/watch?v=_YklhD7 ... e=youtu.be

I did it, but doesn't look impressive :(
64k needed.
rotate.gt1
(345 Bytes) Downloaded 468 times
Edit: i did some optymalisations. Now is little bit faster.
rotate2.gt1
(334 Bytes) Downloaded 469 times
petersieg
Posts: 114
Joined: 28 Jun 2023, 09:06

Re: Zoom rotator [test]

Post by petersieg »

Thx.
In gtemuAT67 with ROMv5a it runs. It looks like attached pictures.
In gtemuAT67 with ROMv6 it crashes?
In real hardware, with ROMv6 and 128k RAM, it runs, and looks similiar (but not identical) to attached pictures.

best, Peter
Attachments
Bildschirmfoto 2023-11-07 um 16.23.59.png
Bildschirmfoto 2023-11-07 um 16.23.59.png (68.56 KiB) Viewed 3476 times
Bildschirmfoto 2023-11-07 um 16.12.47.png
Bildschirmfoto 2023-11-07 um 16.12.47.png (46.1 KiB) Viewed 3476 times
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Re: Zoom rotator [test]

Post by Phibrizzo »

Thanks for testing.

Yes, i dont know why emulator is freezing after 5-10 minutes.
On real hardware is ok. Maybe is something like leak to memory (hit).
I did all tests on ROMv5a/6 and 64 kB.
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Re: Zoom rotator [test]

Post by Phibrizzo »

Hello :)

I rewrote all code to vX0 asembler. Now is much faster but without rave ;)

Source: http://changeit.ppa.pl/ftp/rotator_vx0.asm
Attachments
rotator_vx0.gt1
(358 Bytes) Downloaded 62 times
lb3361
Posts: 384
Joined: 17 Feb 2021, 23:07

Re: Zoom rotator [test]

Post by lb3361 »

Here is another one, with adjusted ambitions and a brutal implementation.
This is for a dev7 machine with at least 64k.
You can run it on https://www.gigatron128k.com
Attachments
rotator.tar.gz
(1.4 KiB) Downloaded 31 times
rotator_dev7_64k.gt1
(6.98 KiB) Downloaded 32 times
lb3361
Posts: 384
Joined: 17 Feb 2021, 23:07

Re: Zoom rotator [test]

Post by lb3361 »

Here is a slightly better one.

The previous one worked by compiling a table of pixel addresses to copy. This one works by generating a vCPU routine to the same effect but twice faster (allowing for a 40% greater image size). It is also a little less robust because it does not scan the image in a spiral (for speed reasons) but always scans left to right or top to bottom. As a result it is easier to overwrite parts of the image than we'll need later. The remedy is to carefully select the rotation angle and the zoom factor. However this changes makes it also work quite well on ROMv6 (or even ROMv4!)
Attachments
rotator.tar.gz
(1.6 KiB) Downloaded 28 times
rotator_dev7_64k.gt1
(22.93 KiB) Downloaded 34 times
rotator_v6_64k.gt1
(23.26 KiB) Downloaded 33 times
rotator3.png
rotator3.png (48.23 KiB) Viewed 674 times
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Re: Zoom rotator [test]

Post by Phibrizzo »

Hello :)

Your effect is very spectatular :)
I tested previous version for dev7 on real hardware but not working. Propably i have too old version of this rom.
I hat to use emulator.
Where can i find latest version of dev7 rom?

Second version woking very well on ROMv6.
lb3361
Posts: 384
Joined: 17 Feb 2021, 23:07

Re: Zoom rotator [test]

Post by lb3361 »

https://github.com/lb3361/gigatron-rom

I added the leeks/lokea/copys instructions on Oct 19 and also changed the c compiler to take advantage of them. This means that programs compiled with the latest version of the compiler no longer run on earlier dev7 roms (but the converse works). I guess that was the problem…

The speed difference between the v6 and dev7 versions is negligible. The speed difference of running the v6 version on romv6 or dev7 is also negligible. I am less happy about the fact that one loses 10% when running on the dedicated 128k rom (dev128k7.rom) which steals two cycles from each vCPU scanline to distinguish the selected video bank from the vCPU bank. This should be less than 1%, but sometimes, when executing a very repetitive program, it can change how instructions are scheduled in ways that cause additional costs.

Update: I found a fix by using PEEKA(vAC) [24 cycles] instead of PEEK() [26 cycles], making the dev7 version a tad faster, fast enough to work around the packing problems. See https://github.com/lb3361/gigatron-lcc/ ... ff/rotator. This version of the source code contains instrumentation to count the number of frames per second (compile with "make GLCCFLAGS=-DSTATS ROM=dev7"). I am attaching the instrumented version to this post.
Attachments
rotator_v6_64k.gt1
(26.6 KiB) Downloaded 24 times
rotator_dev7_64k.gt1
(28.57 KiB) Downloaded 25 times
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Re: Zoom rotator [test]

Post by Phibrizzo »

Hello :)

This is my last word in this mather.
Now is much faster than latest version. I used one SYS function to copy areas.
Attachments
rotator5_vx0_64k.gt1
(355 Bytes) Downloaded 15 times
Phibrizzo
Posts: 94
Joined: 09 Nov 2022, 22:46

Re: Zoom rotator [test]

Post by Phibrizzo »

Hello :)

I apologize, i lied last time.
I have studied the ROMvX0's documentation and i did somethig faster.
I used two sys function: SYS_CopyMemory for forward copy areas and SYS_MemCopyByte for backward.
Now wroking good on the ScreenMode 2 too.
Attachments
rotator6_vX0.gt1
(343 Bytes) Downloaded 2 times
Post Reply