October 10, 2026 at 12:00:00 AM UTC

SMBC's sound engine is translated

smbccnes

The sound engine from smb.asm is translated, closing issue #1. SoundEngine dispatches title-mode bypass, the pause branch and RunSoundSubroutines; the three SFX handlers (Square1, Square2, Noise) each keep their Play and Continue routines with the original length-counter schedules, and MusicHandler does header loads, per-channel note sequencing, length-table and envelope processing, and the end-of-data loopbacks — including the ground-music header walk that plays the lead-in exactly once.

Music data

The song blob in data/music assembles at $f9b8 so the disassembly's raw 16-bit stream pointers land correctly, and the offset table and headers keep their MHD-relative addressing — the same indirection the original used. Every table is byte-verified against the donor ROM, right down to the envelope arrays that spill across label boundaries when read past the end.

Tests cover the pause jingle, jump/coin/brick-shatter SFX, the first frame of the ground-level lead-in (header loads, per-channel counters and every APU register write), silence music, and the DAC counter lag. make test is green.


all entries