Sprites in Gigatron TTL gtBASIC, (ROMvX0)

Опубликовано: 16 Март 2026
на канале: at67
424
8

Fully coded in gtBASIC, it makes maximum use of the Gigatron's new instruction's and sys call's in ROMvX0.

Draws ten 9x10 sprites at ~10FPS in mode0, 30FPS in mode1, 30FPS in mode2 and 60FPS in mode3.
Colourkey, background restore and depth priority are automatically handled at the native code level.
Digit0 is being user controlled.
Sprites can be any height from 2 to 120, (height must be an even integer).
Maximum number of sprites is limited by total of all sprites heights less than or equal to 120 for 32K RAM Gigatron and less than or equal to 248 for a 64K Gigatron.
Sprites are always 9 pixels wide, (I chose 9 rather than 8 as I had spare cycles free during VBlank scanlines and 9 allows for better pixel symmetry when creating sprite artwork).
This simple example uses no ASM, rather using new ROMvX0 gtBASIC SPRITE commands.
Uses a simple byte array for the SPRITE's XY positions.
Minimises flicker as much as possible, (still more work to do, sorting by ascending Y value will help considerably as long as there are not too many simultaneous sprites near the top of the screen..
Flicker will be reduced completely when I add in support for double buffering, (this will require a 64K RAM Gigatron).

Gigatron TTL Forums:
https://forum.gigatron.io/index.php​​

Source code available at:
https://github.com/at67/gigatron-rom/...
https://github.com/kervinck/gigatron-rom