Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ttsiodras/zx_spectrum_scrolling
Using Z80 assembly to perform screen scrolling (per-pixel)
https://github.com/ttsiodras/zx_spectrum_scrolling
Last synced: 4 days ago
JSON representation
Using Z80 assembly to perform screen scrolling (per-pixel)
- Host: GitHub
- URL: https://github.com/ttsiodras/zx_spectrum_scrolling
- Owner: ttsiodras
- Created: 2022-02-15T20:21:54.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T12:54:47.000Z (4 months ago)
- Last Synced: 2024-08-18T13:59:54.946Z (4 months ago)
- Language: C
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
It was fun, writing this. Memories from childhood!
Click the image below to see the code run inside FUSE:
[![Scrolling per-pixel the Speccy's screen via Z80 ASM](https://img.youtube.com/vi/LsN2iZfjdZ0/0.jpg)](https://youtu.be/LsN2iZfjdZ0)
- Scrolling the top 2/3rds of the Speccy's screen
one pixel at a time, via optimised Z80 assembly...
- ...and finally printing the achieved frames per
second *(~23 running under FUSE; no idea what a
real Speccy would score, but probably something
close)*.z88dk doesn't support macros in the inline assembly;
but it does support `m4`! So I [defined](scroller.c.m4#L5)
an `m4` macro to emit the bodies of the scrolling
functions; their only difference being the direction
of the change to the `HL` register (`inc`/`dec`), and
the `RL`/`RR` instructions used to shift the bits.Sigh... :-)
I can still remember my 13 year old self struggling
to understand how one could possibly scroll the
Speccy's screen... It now only took me a couple of
hours to write this!3 decades of coding definitely helped :-)