# Sound: YM2151, CUS30 and two DACs System 1's sound is split between two CPUs: the **sound 6809** plays music and effects on the YM2151 and the CUS30, and the **MCU** (the CUS64) plays sampled voices from the voice ROMs through two 8-bit DACs (OBSERVED: the MCU's map banks the `voice` region at $4000-$BFFF; [memory-map.md](memory-map.md)). jrok's System 1 page agrees: "One of the CPUs and the microcontroller handle sampled waveform playback", stereo output. ## YM2151 (OPM): [ym2151-python](../../ym2151-python) - One YM2151 at 3.579545 MHz (OBSERVED), on the sound 6809 at $4000-$4001. - ym2151-python is **Phase 0, restarted 2026-11-19, no core yet** (HEAD `3207328`). Its [users.md](../../ym2151-python/docs/users.md) counts `namco/namcos1` (40 machines) among MAME's YM2151 drivers; its first consumer is cps1-python. System 1 needs what CPS-1 needs: timers, the IRQ line, BUSY, the stereo output; the IRQ goes to the sound 6809 (HYPOTHESIS: which 6809 input it drives is not visible in the map). - Sample rate at 3.579545 MHz: 3,579,545 / 64 = 55,930 Hz (DOC: ym2151-python's registers and output notes take the 64-clock sample from Yamaha's manual). ## CUS30: Namco's 8-voice wavetable chip - MAME device `namco_cus30`; listxml clock 12,000; at start MAME logs `Namco: freq fractional bits = 19: internal freq = 192000, output freq = 192000` (OBSERVED). Mapped at the sound CPU's $5000-$53FF and at the CUS117 space's $2FE000, both 1 KB with the same mirror: its registers and its wave RAM are written by software (unlike the Pac-Man WSG, whose waves are in a PROM). - jrok's page speaks of "two Namco 8-channel custom sound chips"; MAME 0.285 describes one `namco_cus30` per set. Contradiction C2 in the brief; settle it from a board photograph or schematic before modelling. - **Not the Pac-Man WSG.** The family's Namco 8-bit work (emu-galaga, a Rust site project outside the x-python shape) models MAME's `namco_wsg` (3 voices, waves in PROM). MAME has three relatives: `namco_wsg` (Pac-Man, Galaga), `namco_15xx` (Mappy, Gaplus, Toy Pop) and `namco_cus30` (System 1, System 86, Baraduke, Pac-Land, Sky Kid, Thunder Ceptor, 20 Pac-Gal). They share an idea, not a register map. A family "namco-wsg" core would have to model three variants; its consumers today: emu-galaga (WSG only) and this board (CUS30 only). - No document of the CUS30 was found. The register layout is to be **reconstructed from observation** (the sound CPU's write stream against MAME's audio) unless open decision 1 opens MAME's BSD-3-Clause `sound/namco.cpp` (Nicola Salmoria, Aaron Giles). ## The DACs Two "8-Bit R-2R DAC" devices (OBSERVED, `-listxml`), written by the MCU (HYPOTHESIS: the write handlers at $D000/$D400/$D800 in its map). Their mix levels and any filter are U8. ## Chip rule | Chip | Family consumers | Proposal | | --- | --- | --- | | YM2151 | cps1-python, namcos1, namcos2, system16-python and others | the existing core, ym2151-python (pin it when it exists) | | CUS30 | this board only (no System 86 or Pac-Land board exists) | stays in the board behind a pin-shaped class; extract to a Namco wavetable core when a second board needs it | | DACs | - | board |