# Sound: the 6809, a YM2151 and the C140 The sound 6809 (2.048 MHz) drives a YM2151 (3.579545 MHz, at $4000-$4001) and the C140 (at $5000-$51FF, and a second window at $6000, mirror $E00 each), and talks to the 68000s and the MCU through the dual-port RAM ([memory-map.md](memory-map.md)). OBSERVED. ## YM2151: [ym2151-python](../../ym2151-python) As in [namcos1-python's sound page](../../namcos1-python/docs/sound.md): Phase 0 only; System 2 needs timers, IRQ, BUSY, stereo output; 55,930 samples a second. ## C140: Namco's 24-voice PCM chip - MAME device `c140`, listxml clock 21,333 (OBSERVED); ROM region `c140` (1-2 ROMs per set; the device's `rom` space spans $000000-$7FFFFF in MAME's map). - 24 voices, stereo, 12-bit linear or 8-bit companded samples: so say web-search summaries of community pages this Phase 0 could not or would not open (vgmrips, Furnace). HYPOTHESIS until a primary source or the register stream says so. - **No document found.** The register layout will be reconstructed from observation (the 6809's write stream and MAME's audio) unless decision 1 opens MAME's BSD-3-Clause `sound/c140.cpp` (R. Belmont). - vgmrips.net (which has a C140 page) answered with an anti-bot challenge and is set aside (site's wishes); the Furnace tracker's C140 notes are part of a GPL-2.0 project and were not used. ## Chip rule | Chip | Users | Proposal | | --- | --- | --- | | YM2151 | cps1, namcos1, namcos2, system16 | ym2151-python | | C140 | MAME: namcos2 (60), namcos21 (3), namcos21_c67 (7), namcos21_de (3), gal3 (2), dangbar (3), ds5000 (1); its relative C219 on namcona1 (26). Family: this board only | stays in namcos2-python behind a pin-shaped class; extract (`c140-python`, with C219 as a variant) when a System 21 or NA-1 board starts |