# Sound: the TI SN76489A, on sn76489-python > **Superseded in part (2026-11-12).** This Phase 0 page describes the earlier > sn76489-python (`b0acbc8`/`b30935d`), withdrawn the same day and restarted from > documents. The board pins the restart, `main` `c0d88a6`, and uses its `SN76489AN` row: > 15-bit white noise (checked there against a BBC Micro capture), tone value 0 = a period of > 1,024 (provisional, its D4), not silent at power-on (provisional, its D5), > `ready_clocks = 32` (the board keeps its own 28-clock READY wait, C9). The old core's > `low_periods_hold_high`, its YM7101 engine and the "SN76489A row" requested below do not > exist in the restart; read the restart's README, `docs/api.md` and `docs/claims.md` > instead. The board side (READY, mixing) and the period-0/1 evidence (docs/results.md, M4) > still hold. The ColecoVision's sound is one discrete **SN76489A** (U20) clocked at 3.579545 MHz, written at port `$FF` (any write in `$E0-$FF`), with READY tied to the Z80's `/WAIT` ([memory-map.md](memory-map.md)). The chip is `sn76489-python`'s business (`sn76489-python`, HEAD `b30935d`; boards pin `b0acbc8`). This page says what that core already has for this chip and what it would have to gain. Nothing here was changed in the core. A note on names: Dan Boris's tracing and his page call the part "SN76489AN", MAME and Coleco's schematic redraw "SN76489A". TI's trailing "N" is its plastic-DIP package letter, so these are the same part; the core's row named `SN76489AN` is the SG-1000's chip, and which MAME device that row resembles is the question below (its noise taps `0x0003` are MAME's plain `SN76489`'s, `0x01` and `0x02` with feedback mask `0x4000`; MAME's `SN76489A` passes feedback mask `0x10000` and taps `0x04` and `0x08`, which its header describes as the same 15-bit register with the output one stage on). ## What the core has `PSGVariant` is data; the discrete TI part is already a row: ``` SN76489AN = PSGVariant("SN76489AN", lfsr_bits=15, white_noise_taps=0x0003, low_periods_hold_high=True) ``` used today by sms-python's SG-1000. The engine under every variant is the Mega Drive YM7101's PSG as Nuked-PSG transcribes it from that die; the core's own `docs/claims.md` marks the 15-bit register as "provisional" (it reproduces SMS Power's bit pattern, "an illustration, not a recording") and period 0 on the TI part as "undecidable here". Input divider: 16 input clocks per output step, which is the SN76489A's (the "A" has the /8 prescaler; the SN76494 does not). ## What differs for the SN76489A, by source | Property | sn76489-python `SN76489AN` | MAME 0.285 `sn76489a_device` (tier 5; its header says the noise of "all verified chips should be accurate") | TI manual (tier 2) | | --- | --- | --- | --- | | noise register | 15 bits, taps bits 0 and 1 | 15-bit shift register, taps "D and E", **output taken one stage later ("on F")** than the plain SN76489 | "shift register with an exclusive OR feedback network"; no width given in the pages read | | output polarity | not modelled (levels are positive) | **not inverted** (the plain SN76489 is inverted) | not stated | | tone period 0 | **held high** (`low_periods_hold_high`) | **acts as 1024** ("All the TI-made PSG chips act as if the frequency was set to 0x400 if 0 is written") | not stated | | tone period 1 | held high | toggles every step | not stated | | noise register write | resets the shift register (YM7101 engine) | resets it | resets it | | divider | 16 | 8, the output toggling on each count (same rate) | "decremented at a N/16 rate" | | READY | "outside the contract" | low for 32 input clocks after a write | about 32 clocks | | power-on | the YM7101's `/IC` sequence | registers at 0: "non-Sega chips output a low-pitch beep at cold boot" unless silenced | undefined | So: **the variant exists, and three things are open.** 1. **Period 0 (C8).** The core's row holds the output high, as reported for Sega's chips; MAME says the TI chips play period 0 as 1024. The core cannot offer MAME's reading today: it needs a variant field (say `zero_period`: `"high"` or `1024`) and then a decision per variant. For the ColecoVision the evidence is MAME's statement alone (tier 5), against nothing; the SG-1000 row has the same question. A game that writes period 0 to mute a channel sounds different under the two (a 109 Hz tone, 3,579,545 / (32 x 1024), versus DC). Finding such a game in the library is a cheap first test. Checked on 2026-11-12 in both trees: sn76489-python's `chip.py` (HEAD `b30935d` and the pinned `b0acbc8` alike) sets `low_periods_hold_high=True` on `SN76489AN`, documented as "tone periods 0 and 1 hold the channel's output high"; MAME's `sn76496.cpp` loads `m_period[c] = 0x400` when a TI chip's register is 0 (`if ((m_register[r] != 0) || m_sega_style_psg) ... else m_period[c] = 0x400`) and treats period 1 like any other. So the two differ on **both** 0 and 1. 2. **The noise output stage and the polarity.** A one-stage delay of the same sequence and a sign: inaudible alone, visible in a sample-exact comparison with MAME and audible only when mixed with a second source (the Super Game Module's AY). Two more variant fields if wanted; not needed for milestone M4. 3. **The engine is another chip's die.** Whether the discrete TI part steps its four counters in the YM7101's rotation is unknown; nobody has decapped an SN76489A for a netlist that we found. The core already says so. Stays "provisional". **Recommendation** (open decision 4): add an `SN76489A` variant row to sn76489-python (same data as `SN76489AN` today, so the ColecoVision's choices do not move the SG-1000's), plus the `zero_period` field, raised as an issue on the core with this table; keep READY and the mixer in the board. ## The board's part - **READY wait**: after each write the CPU is held; MAME's run here shows `OUT ($FF),A` taking 40 clocks (C9). The board adds the wait to the instruction's time and runs the chip to the moment the write is latched. z80-python needs nothing for this. - **The BIOS silences the chip first**: the first four I/O writes after reset are `$9F $BF $DF $FF` to port `$FF`, at clocks 100, 148, 196, 244 (measured in MAME): the four attenuators to "off". - **Output**: one mono signal to the RF modulator, mixed with the expansion port's audio input (the Super Game Module's AY). Level and filtering of the analogue path: nothing in hand (U12). - **Referee**: MAME's `sn76489a` stream at 223,722 Hz; the core's conformance kit already replays board streams, so a ColecoVision register log from MAME's `IW FF` lines is the test input. - The TI manual's text layer is missing in the pinned PDF; the rows above were read from an OCR pass made here (`tesseract`), which found "N/16 rate", "shift register with an exclusive OR feedback network", "Whenever the noise control register is changed, the shift register is cleared" and "approximately 32 clock cycles to load the data". - No sound test program written for the ColecoVision and checked on a console was found (U13). sms-python pins `SG1000SoundTestCV` (an SG-1000 image; what "CV" stands for was not established).