Skip to content

Amiga port - #3

Merged
stuff merged 5 commits into
mainfrom
amiga
Oct 10, 2026
Merged

stuff merged 5 commits into
mainfrom
amiga

Conversation

@stuff

@stuff stuff commented Oct 10, 2026

Copy link
Copy Markdown
Owner

A bootable Amiga 500 disk (OCS, Kickstart 1.3, 512 KB chip + 512 KB slow) in 68000 assembly, in ports/amiga/: the whole demo, with the 8 modules on the disk.

What's in it

  • The intro: the ear screen while the disk loads, AN AURA PRODUCTION, HIGH FIDELITY DREAMS (with the rules in the side borders), CODE AND DESIGN AEON.
  • The text pages: a port of the demo's own 68000 code working on a copy of the ST's RAM. They cover the 4 bands, the text spreader and the channel analysers. The display is computed within the frame on a 7 MHz 68000, in at most 190 of the frame's 313 lines.
  • The menu and the song changes: SPACE, the cursor and RETURN. On RETURN the music fades out, LOADING and DECRUNCHING show while the module is read and decompressed, then the menu comes back with the new song playing.
  • The disk:
    • a bootblock, then a custom MFM trackloader;
    • the second part and the modules are compressed with ZX0 and decompress in place;
    • the samples are delta-coded when that compresses better;
    • 863 KB of 880 are used.
  • The tools:
    • tools/setup.sh builds vasm, ptplayer, zx0, vAmiga's core and capture;
    • make writes build/hfd.adf;
    • make AUTHENTIC=1 keeps the demo's original loading durations, for verification.

Verification (in vAmiga, headless, with tools/capture.cpp and tools/compare.py)

  • Intro: VBL 546 to 5298 (4,753 frames) are identical to the Hatari reference recording, borders included.
  • Text pages: the first 6,000 VBLs, plus 500 around the raster script's loop at VBL 17488, are identical to the web port's render, analysers included.
  • Menu and a song change: VBL 9024 to 10400 (1,377 frames) are identical to the reference recording, using the recording's SPACE, DOWN and RETURN.
  • Music:
    • Enigma starts on VBL 2836 and Just Spank It on VBL 10184, the same VBLs as the demo;
    • the 8 modules decompress byte for byte.

Not tested on a real Amiga 500 yet. The Kickstart ROM isn't in the repository. See ports/amiga/README.md.

🤖 Generated with Claude Code

stuff and others added 5 commits October 10, 2026 15:27
A bootable A500 disk (Kickstart 1.3, OCS) built with vasm: a bootblock loads
the program, which takes over the hardware, shows the ear screen with LOADING
pulsing through the Copper and plays Act of Impulse with ptplayer.

tools/capture drives vAmiga's core frame by frame (frames as PPM, sound as
WAV) and tools/compare.py compares the frames with the Hatari reference
recording: the 372 frames of the LOADING phase (reference VBLs 600-971) are
identical. tools/setup.sh fetches and builds the tools; the Kickstart ROM is
not in the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ear screen, AN AURA PRODUCTION, HIGH FIDELITY DREAMS and CODE AND
DESIGN AEON, with Enigma from VBL 2836, in 68000 assembly:
- the ST's per-line palettes become Copper lists: tools/mkintro.py builds
  each screen's template (only the colours a line shows) and its patch
  table (each colour faded to the 8 levels, and the band it follows), which
  the VBL interrupt patches every frame into a double-buffered list;
- HIGH FIDELITY DREAMS' rules are redrawn by the CPU in a double-buffered
  screen, their parts in the side borders painted by changing colour 0 in
  the middle of the line;
- ptplayer plays the module from the VBL interrupt, starting on the first
  tick like the demo's replay;
- the bootblock only loads the code and the ear; a trackloader loads the
  rest while the ear shows, which stays until the disk is loaded.

Every frame from VBL 546 to 5298 is identical to the Hatari reference
recording (capture now records the VBL each frame shows, and compare.py
compares the whole 416 x 276 frame).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A port of the demo's own 68000 code, as the web port's textpage.ts, on a
copy of the ST's RAM ($12000-$25B00): the 4 bands, the text-spreader and
the channel analysers, with Enigma going on. What changes is the display:
- the Timer B chain becomes a Copper list rebuilt in the frame it shows
  (the Copper waits for line 45 before reading the rasters);
- the drawing routines compute Amiga addresses; a letter on the last byte
  of a line wraps to the start of the next one, as on the ST;
- the analysers use bitplane 0 only (on the ST, bitplanes 0 and 3, colours
  1 and 8 being equal): the CPU draws a band's first line, the blitter
  copies it down;
- the spreader erases only what it drew 2 VBLs ago, as the ST does.
A VBL takes at most 190 of the frame's 313 lines; the STE colours'
conversion and the lines' offsets are precomputed.

The music's tick records what the analysers read (row read, note or
instrument, effect, volume). compare.py also compares with the web port's
rendered frames: the text pages are identical to them, analysers included,
over the first 6,000 VBLs and around the raster script's first loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The menu (SPACE, the cursor) and the song changes (RETURN), as the web
port's menu.ts and loading.ts: one Copper template per cursor position,
the measured exceptions (rules, outline) in their fade values; the music's
master volume falls to 0, then LOADING while the module is read and
DECRUNCHING while it is decompressed, both screens double-buffered.
SPACE goes back to the text pages, which resume where they were. The
keyboard comes from CIA-A's serial port (level 2).

The 8 modules are on the disk: everything after the program's first part
is compressed with ZX0 (modules with their samples as differences when
smaller) and decompresses in place, from a files' table that mkdisk.py
writes; 863 KB of the 880 are used. Shrinkler compresses 10 % smaller but
decompresses at 4 KB/s, too slow for the demo's timings.

The program now lives in any memory (an A500 with 1 MB), and only what
the custom chips read in a block of chip memory. The bootblock reads into
chip memory (Kickstart 1.3's trackdisk decodes with the blitter) and
copies. vasm's warnings are errors: it turns an out-of-range bsr into an
absolute jmp.

The reference recording's SPACE, DOWN and RETURN give frames identical to
the demo's from VBL 9024 to 10400; Just Spank It starts on the same VBL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds the default disk and make AUTHENTIC=1's, and keeps the default one as an
artifact; the ZX0 cache is kept between runs. tools/setup.sh --build-only only builds
what make needs (no vAmiga). make B=<dir> builds into another directory, sharing
build/packed: switching AUTHENTIC in one directory relies on the defines file's
timestamp, which macOS's make 3.81 compares to the second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stuff
stuff merged commit ccd9631 into main Oct 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant