# Sound ## The subsystem A Z80 at 4 MHz (all generations, MAME) with its own ROM and RAM, a command latch written by the main CPU (MAME: `generic_latch_8`, read at $E000 on maps B and C) and one or two sound chips: | Chip | Sets (instances over the 55, [census.md](census.md)) | Clock (MAME) | What it is (DOC) | | --- | --- | --- | --- | | **YM3526** (OPL) | 42 | 4 MHz | 9 two-operator FM channels (or 6 + 5 rhythm), sine only; DS3526 (scan, no text layer) | | **Y8950** (MSX-AUDIO) | 26 | 4 MHz | an OPL plus a 4-bit ADPCM analysis/synthesis unit with up to 256 KB of external ROM or RAM, and 8-bit I/O ports for keyboard scanning (AM8950 ch. 1, "Features"). On these boards the ADPCM ROM is MAME's `ym2` region: 64 KB on gwar, 128 KB on victroad, 256 KB on psychos (Psycho Soldier's sung theme) | | **YM3812** (OPL2) | 8 | 4 MHz | OPL plus four waveforms, enabled by bit D5 of register $01 (AM3812, LSI-2438124, 1994-06, register map and "Wave Select") | | AY-3-8910A | 18 (9 sets, two each) | 2 MHz | the 1983-85 boards; [ay8910-python](../ay8910-python) as is | | SNK wave generator | 4 (marvins, madcrash, madcrush, vangrd2) | 8 MHz | SNK's own; MAME's `snkwave` device is shared only with Nichibutsu's `cclimber.cpp`. Stays in this board (chip rule) | All three Yamaha chips output a serial stream to a YM3014 DAC (AM3812: "D/A converter such as YM3014 is necessary"; the 13-bit serial output, SH and SY signals) and sample at the input clock / 72 (AM3812's formula, "fsam = fM/72", 50 kHz at its 3.6 MHz example): **55.56 kHz at the boards' 4 MHz** (DOC formula, MAME's clock: OBSERVED). SCH-TNK3's sound sheet shows the FM chip and a second part (the DAC's position) with SNK house markings; the readings ("SNK 5001 M..." and "SNK 8001 M...") are too faint to quote (U6). That SNK relabelled Yamaha parts is HYPOTHESIS until a board photograph or a clearer scan shows it. ## No YM2203, no MSM5205 The brief listed YM2203 and MSM5205 for reuse. MAME 0.285 puts neither on any `snk.cpp`, `snk68.cpp` or `prehisle.cpp` set (listxml, every set). The PC-88 Phase 0's OPN findings (`../pc88-python`, not yet committed when read on 2026-11-26) are therefore not needed here; the OPL family is. ## An OPL core: what the family has, and the proposal The family has no OPL core. What is near: - [ym2413-python](../ym2413-python) (OPLL): the OPLL is Yamaha's cut-down OPL with built-in instruments. Its specification's operator, the log-sine and exponential tables (from Gambrell and Niemitalo's OPLx read-out of a **YM3812** ROM, its source S11), the envelope counter and the phase generator are the same ideas an OPL core needs; its register file, instrument ROM, rhythm section and 9-bit DAC multiplexing are not. The chip rule forbids copying code between repositories, so it is a **relative to read**, not a base to extend. - [ym2610-python](../ym2610-python)'s ADPCM-B: Yamaha's delta-T ADPCM unit. That the Y8950's ADPCM is the same unit is HYPOTHESIS (both are 4-bit delta-T with start/stop/delta-N registers in Yamaha's manuals; not compared register by register in Phase 0). The PC-88 Phase 0 (`../pc88-python` `ab800e0`, docs/sound.md) proposes a `ym2608-python` (OPNA, with the YM2203 as a variant), whose ADPCM-B is the same unit again: three proposed or planned cores (Y8950 here, YM2608 there, YM2610) would each carry a delta-T decoder. Whether it becomes one shared piece is for whichever is built second to raise (open decision 1). - ymfm (Aaron Giles, BSD-3-Clause; sources.md "code OK (with notice)"): covers OPL, OPL2 and Y8950; the family's tier-5 comparator, readable with its notice. **Proposal (open decision 1): a new core, `ym3812-python`**, covering YM3526, YM3812 and Y8950 as variants (as `ay8910-python` covers AY, YM2149 and 5B), with the YM3014 output stage. Family consumers known on 2026-11-26: snk-python (all three), snk68-python (YM3812), deco16-python (YM3526, YM3812: its sources.md scopes "an OPL2 core"), msx-python (Y8950, MSX-AUDIO: its msx-music.md "the Y8950 has no family core"), ibmpc-python (YM3812 on AdLib and Sound Blaster, later), c64-python (YM3526 on the SFX Sound Expander, MAME's `sfx_sound_expander.cpp`). The chip rule is met many times over. Evidence for it: Yamaha's documents (DS3526, DS3812, AM3812, DS8950, AM8950: tier 2, pinned here), the OPLx ROM read-out (tier 1 for the two ROM tables), and closed boxes (jtopl, Nuked-OPL3, MAME's ymfm-based device) as detectors. No hardware capture of a YM3526 or Y8950 is known to the family (no tier-1 source for envelope and ADPCM timing): say so in the core's claims. The family's "sound: good enough" rule (Aubrey, 2026-11-13) applies. ## The uPD7759 Not on these boards; it is on the 68000 boards ([snk68-python](../snk68-python)).