A2VERA · Apple //e · pure 6502

Two jukeboxes.
One VERA card.

A six-track PSG + PCM showreel and Melodius, a 94-song Commander X16 jukebox with emulated YM2151 FM — written in pure 6502 and streamed from ProDOS. Pick a disk; it boots here, in your browser.

Opens Apple2TS in a new tab with the 32 MiB disk streamed from this repository — VERA already in slot 2. The first boot pulls the image from GitHub, so give it a few seconds. Click the emulator once for keyboard focus and audio.

The jukebox.hdv menu on an Apple II text screen: six numbered tracks, a status line reading VERA CARD ON SLOT 2, and control hints
jukebox.hdv — R7 menu6 tracks · PSG + PCM

The two images

Two disks, one VERA card

Both are bootable ProDOS 2.4.3 volumes with Slot 2 and Slot 4 binaries and a BASIC launcher that probes the card before starting. They run from the image, or from a directory on your own ProDOS disk.

jukebox.hdv

32 MiB · HDV
jukebox.hdv playing Beat It: the title line, a 16-slot voice activity meter and a T: 00:08.6 clock on the bottom text row
Beat It · 16-voice PSG + GM drums

Six tracks through four engines: a RAM-resident PSG demo, Chopin’s Fantaisie-Impromptu pre-loaded into VERA’s 128 KiB SRAM, streamed PSG for Beat It and Caribbean Blue, and 8 kHz PCM for Space Debris and The Wellerman. The player keeps a live 16-voice meter and a running clock on the last text row.

  • 6502
  • 16-voice PSG
  • 8 kHz PCM
  • VERA SRAM

melodius.hdv

32 MiB · HDV
Melodius playing Watching Paint Dry: a MELODIUS / FURN: BURNT FISHY header, a track title and a 16-slot status meter
Watching Paint Dry · YM2151 FM + PSG

A two-level jukebox for 94 ZSM files in 17 categories — eleven Furnace artists, five Commander X16 game soundtracks and the PCM-only TREE. YM2151 FM, the 16 PSG voices and the PCM FIFO can all play at once from a single ZSM stream.

  • YM2151 FM
  • 94 ZSM songs
  • PCM FIFO
  • Slot 2 / 4

jukebox.hdv · menu 1–6

Six tracks, four playback engines

The whole lineup fits in one 32 MiB ProDOS volume. Every player is a 6502 binary; nothing is decoded or mixed on the host.

Included jukebox lineup
#TrackEngineTime
01Melody DemoRAM PSG0:30
02Fantaisie-ImpromptuVERA SRAM PSG5:02
03Beat ItStream PSG3:58
04Caribbean BlueStream PSG2:56
05Space DebrisStream PCM5:05
06The WellermanStream PCM2:00

Fantaisie-Impromptu is copied into VERA’s onboard SRAM before the first note, so the floppy version never moves its drive head during playback. ▶ Also on a 140 KiB floppy: jukebox.po ↗


melodius.hdv · 94 songs

Ninety-four songs, seventeen shelves

Melodius streams Commander X16 ZSM files from ProDOS. Each frame’s register writes are decoded ahead in the main loop, then published from the 60 Hz interrupt; FM and PSG stay in sync with streamed PCM samples.

Furnace 11 artists · 67 songs

  • Bernie 1
  • Burnt Fishy 1
  • Crisps 17
  • GTR3QQ 16
  • Lunathir 1
  • MooingLemur 4
  • MooingLemur & ZeroByte 2
  • SnugglyBun 5
  • dumbut 9
  • nicco1690 10
  • usersniper 1

Game soundtracks 5 games · 26 songs

  • Mine-Rescue 5
  • Montezuma 4
  • Quarx 3
  • Tetrads 4
  • X16 Robots 10

Menu music, high-score loops and game-over stings from the Commander X16 ports.

PCM 1 track

  • TREE 1

A ZSM whose music is entirely the VERA PCM FIFO: samples stream from the companion PCM01.PCM while the FIFO refills from disk in 2 KiB windows.

Tick rates from 50 Hz to 240 Hz are normalised to the 60 Hz output clock, so a 240 Hz file such as Headbanger! lasts 4:24 rather than 17:34. 28 tracks carry PCM instruments, decimated at build time to 8,011 Hz and shipped as companion .PCM files.


In the player

What the status line is telling you

Both jukeboxes paint a compact readout on the last text row and leave the middle of the screen to the song. The controls are the same across every track.

  • Choose a menu item123…AH
  • Confirm selectionReturn
  • Pause / resumePSpace
  • Mute / unmuteM
  • Master volume 0–15+−
  • Seek 5 seconds[]
  • Loop (Melodius)L
  • Restart (Melodius)R
  • Back to BASICEscQ

Under the hood

Everything is 6502 and ProDOS MLI

No patched emulator features and no host audio mixing: the PSG and PCM paths run the same on a real Apple IIe with a VERA card in slot 2 or slot 4. The YM2151 half of Melodius writes the FM register window that the VERA emulation provides; PSG and PCM stay native VERA hardware.

PSG

Sixteen voices at 48,828 Hz

A 60 Hz event stream writes four bytes per voice; pulse, sawtooth, triangle and noise are all hardware. Volume follows the card’s 64-step logarithmic curve, and additive partials give the acoustic grand piano its bass foundation.

PCM

8,010.864 Hz, straight from disk

Eight-bit signed samples are TPDF-dithered at build time and streamed through OPEN / READ into VERA’s 4 KiB FIFO. A 512-byte buffer rides out disk seek latency at under 5% CPU.

VERA SRAM

A floppy that goes quiet

The SRAM pre-load player copies the whole PSG stream into the card’s 128 KiB before playback starts. Seeking is instantaneous and the Disk II stays silent, even on a 140 KiB floppy.

ZSM

Decode ahead, never in the IRQ

The ZSM decoder walks ticks and batches FM register pairs in the main loop; the interrupt only publishes the next frame. Companion PCM files are opened once and refilled in 2 KiB windows while the sample plays.


Build it

Two commands, zero dependencies

The 6502 assembler, the Applesoft tokenizer and the disk packager are all in this repository — plus the sibling veratest checkout.

REM needs Node.js 18+ and a sibling C:\dev\veratest checkout
git clone https://github.com/anomixer/veramusic
cd veramusic

REM players, jukebox.po, jukebox.hdv + .zip
build.bat quick
REM assemble zsmstream.asm, pack melodius.hdv + .zip
build.bat melodius
  • build.bat jukebox reconverts every MIDI, MOD and PCM source before packing the images.
  • Set CADIUS to use a different Cadius executable; the bundled one is tools/cadius.exe.
  • tools/psgplay.exe auditions .psg streams on Windows; tools/melodius.exe plays ZSM and ZCM with the board’s (PSG + PCM) × 2 + YM balance.
  • node tools/build_melodius.mjs --list prints the 94-song index; --autoplay <n> writes a headless test image.