Scroller | Demoscene | ZX Spectrum 128

Subscribers:
289
Published on ● Video Link: https://www.youtube.com/watch?v=P6wQnp7qYs4



Duration: 1:26
44 views
2


Scroller | Demoscene | ZX Spectrum 128
Vertical per pixel full screen scroller for ZX spectrum.
Designed for Pentagon 128/256/512/1024.
Build number 3.10.
Pouet: https://www.pouet.net/prod.php?which=90767
Demozoo: https://demozoo.org/productions/304794/
Download: https://emulate.su/rmda/scroller.zip
ZXArt: https://zxart.ee/eng/software/demoscene/demo/fast-demo/scroller5/
Source: https://github.com/vasilenkoroman/zx_scroll
How it works:
the engine compares two screens and updates changed bytes only both for raster and color bytes.
This pre-calculation is performed on PC and generator produce Z80 code for it. The generated code
contains such commands like LD/PUSH and INC/DEC for registers. Generator keeps current state of Z80
registers for the each step. So, when it need to write next 16 bit value, it tries to deduce it
from the current registers state first: direct using of existing 16-bit register or updating only 8
bit of 16-bit register or use 8-bit increment only e.t.c.
Generator looks up to 40 millions combination for the each line to choose that register is better to
use for N-th step. Sometimes it is better to keep 'BC' for example, and use 'DE' for N-th step,
because BC value can be reused at step N+x. It just doing brute force for it. Such registers state
is shared between lines across whole frames.
The images itself isn't multicolor, this term related to scroller itself because it is able to move image
with per-pixel accuracy. To achieve that the engine draw colors twice: for upper and lower part of
each cell. The second draw is occurred just in time when the Ray is about to draw N-th color line.
The most difficult part is the task manager: it need to switch between drawing colors and raster without
losing time on waits but second color drawing should be synchronized with Screen Ray.
So, it need to save register values to switch to another task and it need to do as fast as possible.
Actually, this task manager is pre-calculated at PC as well, inside Z80 code generator.
In addition, there are a lot of minor optimization tricks: using push AF, writing random values to th
raster bytes for hidden attributes (in case of same inc/paper), using LD (HL), reg8 in addition to
PUSH command and many others.
Download: https://github.com/vasilenkoroman/zx_scroll/releases/download/3.11/scroller.zip







Tags:
scroller
pentagon 128
zx spectrum
zx spectrum demo
retro gaming
zx spectrum games
top zx spectrum games
sinclair zx spectrum
sinclair zx spectrum demo
zx spectrum demoscene
demo
retro gaming now
retro gaming 2023
retro gaming community
best zx spectrum games
top 10 zx spectrum games
clive sinclair
sinclair zx spectrum next
spectrum
zx
demoscene