SIDin #12 — Ripping Trivia Arcade (Stefano Tognon, 2008)

author Stefano Tognon (ice00), SIDin magazine
date 2008-05-24
article SIDin issue 12 (version 1.00, 24 May 2008), pp. 26–32: 'Ripping Trivia Arcade' — sections Starting, SID file, Conclusion; a step-by-step rip of the music of the game The Trivia Arcade into a .sid file
created 2026-08-30 · updated 2026-08-30

A worked example of turning game music into a .sid file when the player does not follow the init/play convention: the music of The Trivia Arcade sits in a separate file, has three entry points, and runs four times per frame from a raster-line chain. Tognon shows the tools (vice's monitor, c1541, LaLa's SIDedit) and the reasoning.

Key claims#

  • The game comes on two disks (TRIVIAA0.D64, TRIVIAA1.D64). c1541 TRIVIAA0.D64listextractquit pulls every file out as a PRG; a file named trimus.obj is guessed to be the "Trivia Music Object".
  • LaLa's SIDedit (a Perl program) on the file: load address $1000, three JMPs at the start, and code that addresses $5000 — so the music must be relocated to $5000 and "not uses a standard IRQ calling (+0=init, +3=play), as there are 3 pointers".
  • VICE monitor: break 5000, break 5003, break 5006 before loading the game show $5000 hit once, $5003 once for every four hits of $5006; m 314 reveals the IRQ vector $2E3F, and a breakpoint there shows $5006 on every interrupt and $5003 on every fourth. $5000 only clears $D400–$D418 and stores 1 to $5010–$5012 — an init without a subtune argument.
  • A first test player (raster IRQ at line 50, calling $5003 every fourth tick) played nothing. Disassembling $5003$5020 shows $5009 compared with $500A — subtune selection versus the subtune playing; > 5009 2 then x in the monitor makes the tune play, but far too slowly: a multispeed tune.
  • The game's IRQ setup ($2DE5): NMI vector $2F08, $DC0D = $7F, IRQ vector $2E3F, raster line 1, $D01A = 1, then JSR $5000. The IRQ routine dispatches on $D012 values $01, $41, $6E, $C3, $D2 and re-arms the next; a breakpoint log shows only lines 001, 065, 110, 196 in use for all five subtunes — four calls per frame, $D2 unused.
  • The final player: A = tune number → tax; inx; stx $5009; inx; stx $500a (skipping subtune 0), JSR $5000, a raster IRQ that walks $01 → $41 → $6E → $C3 → $01, calls $5003 at line $01 only and $5006 at every line, then dec $d019; jmp $ea31; the music binary is .incbin'd at $4FFE (two-byte load address included).
  • Subtune count found by trying $5009 values: 0 starts with "some strange sound" (or silence if played first), 1–4 play well, 5 duplicates one of them, 6 and above repeat — hence 4 subtunes. The wrapper code is moved next to the data ("e.g 4f95"), the BASIC SYS stub dropped, and SIDedit writes "a standard sidplay header … Real C64 tune, init address, 4 subtunes".

Practical takeaways#

  • Ripping checklist for a non-standard player: extract with c1541; inspect load address and entry points (SIDedit); breakpoints on the entry points and on the IRQ vector at $0314 to learn call order and rate; find the subtune variable by reading the play routine; log $D012 at the IRQ to get the raster positions; write a tiny raster driver that reproduces the call pattern; mark the result as a real-C64 (RSID) tune because it installs its own interrupt chain.
  • The four raster positions are what a 4× tune looked like in a 1980s game: not a CIA timer, but a chain of raster interrupts.

Notable quotes#

"Ripping is alway a way to make you enjoy a sid tune into your sidplayer, so I hope that looking even at how this is done is a good way for new rippers to learn how to do that."

Relevance to the wiki#

A concrete workflow for sid-format (when RSID is needed, what SIDedit fills in) and for vice's monitor (break, m, >, x); a raster-chain example for multispeed; a non-standard calling convention for sid-player-routine next to the +0/+3 norm; related to player-identification and sidid.

Pages touched#

sid-format · vice · multispeed · sid-player-routine · hvsc · player-identification · sidid · sidin

source file wiki/summaries/s-sidin12-ripping-trivia-arcade.md · graph