Skip to content

OniDaito/speccy

Repository files navigation

Introduction to ZX Spectrum (speccy/specky) programming

A small introduction to programming the ZX Spectrum.

Overview

  • We use pasmo to create the binary from the assembly code
  • We then convert to a tap file with bin2tap
  • Some basic is added using bin2tap (or compiled using zxbasic and added to the file). This makes the tap file run the program when loaded.
  • We run the final tap file in Fuse.

Setup

  • Install Fuse
  • Download Pasmo and bin2tap
  • Change the build.sh file so the paths at the top point to pasmo and bin2tap.
  • Run the build.sh file.
  • Load the .tap file you want to run inside Fuse.

Progams

I've included a number of small programs including:

  • hello.asm - write the classic text.
  • screen.asm - slowly fill the screen, showing the layout of screen memory.
  • invader.asm - draw a small space invader.
  • bitmap.asm - draw a picture, generated from a png with img2speccy.py

Commands

I use Pasmo as the compiler for the most part. To compile helloworld, you can run this:

pasmo -d -v --bin hello.asm ./build/hello.bin
bin2tap -b -cp 1 ./build/hello.bin -c 28672 -o ./build/hello.tap

Using vasm, one can make a tap file like so:

vasmz80_oldstyle -chklabels -nocase -Dvasm=1 -DBuildZXS=1 -DBuildZXS_TRD=1 -Fbin -i ~/Projects/speccy/first.asm -o ~/Projects/speccy/first.bin
bin2tap first.bin

Converting images to ASM

Lossless compression PNGs seem best. JPGs less good. This python script relies on Pillow.

python3 img2speccy.py --name horace images/horace.png > images/horace.asm

Useful Links

The following is a collection of links (or credits) to sites I found helpful when learning about the ZX Spectrum.

About

An introduction to programming the ZX Spectrum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published