# Phase 0: the sources and what each can settle Written 2026-11-12 under [restart.md](restart.md). No chip model was written. This document lists every source found, how it was read, and what it can and cannot settle. The behaviour itself is in [spec.md](spec.md). ## How to read the tables **Tier** 1. Captured from hardware (a recording, an oscilloscope trace, a digital read-out through the chip's own test register), or a reading of the die. 2. The manufacturer's documents (Yamaha, Sega). 3. Community documents whose authors checked them on real hardware. 4. Hardware-description reimplementations. 5. Emulators. **Read** - *direct*: the file was opened and read in this phase by the session that wrote this document. - *notes*: every line was read in this phase by a reading pass that wrote notes with post numbers and exact quotations; this document and the spec were written from those notes. Fourteen quotations the spec leans on hardest were then searched for, word for word, in the fetched text, and all were found. The build session should still open the post before leaning on a statement: the post number is always given. - *summary*: seen only through a search tool's summary. Nothing is quoted from it. - *not read*: not opened, with the reason. Paths under `reference/` are fetched by `scripts/fetch_references.py` and pinned by SHA-256 in `scripts/reference_pins.json` (130 pins). Paths under `/data/emu/megadrive-python` are cited in place, not copied; `fetch_references.py --local` checks that they are still the bytes read and extracts the pinned members of its `FMDocs.7z` into `reference/fmdocs/`. ## Sources read ### Manufacturer documents (tier 2) | ID | What | Where | Licence | Read | |----|------|-------|---------|------| | S1 | Yamaha, "YM2612 アプリケーションマニュアル" (application manual), Japanese, about 38 pages. It sits as PDF pages 2 to 39 of a 125-page scan of a Sega of Japan binder ("the green folder") that also holds Sega's sound-driver and PSG manuals of 1989 | `reference/web/segaretro-YM2612_manual.pdf` () | © Yamaha and Sega, no licence. Internal developer material, published by Hidden Palace in 2024: see decision P1 | direct for PDF pages 8, 9, 15, 16, 34 (viewed as images); pages 3, 10, 13, 31, 37 by the notes pass (also as images). The rest is **not yet read**: the text layer is poor and every page must be viewed | | S2 | Yamaha, "YM3438 アプリケーションマニュアル OPN2C", April 1990, Japanese, 49 pages | `reference/fmdocs/FM Datasheets/YM3438_APL.pdf` and `YM3438_APL - OCR.pdf` (members of megadrive-python's `reference/manuals/FMDocs.7z`); a byte-identical copy of the first is `reference/web/segaretro-YM3438_JP_Application_Manual.pdf` () | © Yamaha, no licence; cited | direct: the OCR text of all 49 pages, and PDF pages 8, 10, 13, 16, 27, 31, 33, 37, 39 viewed as images. Japanese read directly; the translations in spec.md are this session's | | S3 | Yamaha, YM3438 catalogue sheet, Japanese, 12 pages, with a text copy and a machine translation of it | `reference/fmdocs/FM Datasheets/YM3438_Cat.pdf`, `YM3438 (YM2612 CMOS)/ym3438.txt`, `ym3438 translated.txt` | © Yamaha; the translation is unsigned machine output | the first 100 lines of the translation: outline and electrical tables, the same figures as S2's back pages. Not otherwise used | | S4 | Yamaha, YM2608 (OPNA) application manual, 67 pages, Japanese; and its English version, 56 pages, "Transcribed by Nemesis", by OCR and two web translators, dated 30/6/2008 (the PDF's author field is "rsanders") | megadrive-python `reference/manuals/YM2608J.pdf` and `YM2608J Translated.pdf` | © Yamaha; the translation carries no licence | direct: the English version's bus-control pages and the whole of chapter 2 (FM). The Japanese original was not opened. `FM Datasheets/YM3438.docx` in the bundle is, despite its name, a Word copy of this same translation | | S5 | "Sega Technical Overview 1.00" (Genesis), FM section, pages 92 to 119; the same chapter in the "Genesis Software Manual" | megadrive-python `reference/manuals/GenesisTechnicalOverview.pdf`, `GenesisSoftwareManual-150p.pdf` | © Sega; the Software Manual's pages are stamped "CONFIDENTIAL" and "PROPERTY OF SEGA" (decision P1) | direct: the Technical Overview's FM section whole, by its text layer. The Software Manual only where it repeats the busy-flag caution | | S6 | Sega of America, Technical Bulletin #11, 9 September 1991, "Problems during sound access" | megadrive-python `reference/manuals/GenesisTechnicalBulletins.pdf`, PDF page 20 (and a second copy at page 32) | © Sega | direct | | S7 | Yamaha YM2203 (OPN) data sheet, 13 pages, image only; Yamaha YM3015 data sheet, 8 pages, image only | `reference/fmdocs/FM Datasheets/ym2203.pdf`; megadrive-python `reference/manuals/YM3015.pdf` | © Yamaha | YM3015: page 1 viewed by the notes pass, to say what it is (an external floating-point DAC for the YM2151 and YM2608; the OPN2 does not use it). YM2203: not read | ### Research on real hardware and on the die (tiers 1 and 3) | ID | What | Where | Licence | Tier | Read | |----|------|-------|---------|------|------| | S8 | SpritesMind forum thread 386, "New Documentation: An authoritative reference on the YM2612", 866 posts, June 2008 to June 2023. Main contributors, with what each did: **Nemesis** (Roger Sanders): digital read-outs of the operator and envelope outputs of a discrete YM2612 through test register $21, oscilloscope work on the chip's pins, 96 kHz recordings, all on a PAL Mega Drive he calls "MD1600" (board "IC BD M5 PAL VA4"), and some on an MD2 (VA1.8, ASIC 315-5660). **GManiac** (Ghost): oscillograms and 96 kHz recordings of a European MD1. **HardWareMan**: oscilloscope traces; the photographs of a decapped YM2612. **Sauraen**: a reading of those photographs and of a YM2203 die, and test-register read-back on four discrete YM3438s in his own synthesiser. **Eke**: BUSY measurements in 2017 on a VA4 MD1 and a VA0 MD2. **Stef**: write-timing tests in 2023 on an MD1 VA0, a Nomad and a clone. **TmEE**, **Snake**, **Kabuto**, **Sik**: reports from driver writing | `reference/spritesmind/t386-000.html` to `t386-855.html` (58 pages; ) | forum posts, no licence; cited and quoted briefly | 1 where a post reports its own measurement or die reading; 3 otherwise. spec.md says which, post by post | notes, every post. Code blocks in posts by anyone other than Nemesis and Sauraen were removed mechanically before reading (44 blocks); see "Slips" for what got through | | S9 | Two texts saved by Nemesis in his bundle: his own post on the operator unit (also post p6114 of S8), and a note on test register $21 (unsigned; Exodus's reference list names "YM2612 Test Register Notes, Charles MacDonald") followed by Nemesis's own notes on the same bits | `reference/fmdocs/ym2612 operator unit.txt`, `ym2612 test register.txt`, `FM Datasheets/ym2612.txt` | none stated | 1 (Nemesis's read-outs) and 3 | direct, whole | | S10 | SpritesMind thread 1118, "undocumented register $2C" (Oerg866, Nemesis, GManiac and others, April 2012) | `reference/web/spritesmind-2c-register.html` | forum posts | 3, with hardware tests by the posters | notes | | S11 | SpritesMind thread 365, "Yamaha internal waveform info" (TmEE, HardWareMan, April 2008) | `reference/web/spritesmind-yamaha-internal-waveform.html` | forum posts | 1 by intent; its recordings are not in hand | notes | | S12 | Kabuto (TiTAN), "SEGA Mega Drive / Genesis hardware notes" v1.5, 2017 to 2018 | megadrive-python `reference/docs/kabuto-hardware-notes.html` (a mirror; the four diagrams of the audio analysis are missing from it) | none stated | 1 and 3: "Nearly all of this has been through running my own tests and guesswork" | notes: the section "The YM2612" and footnote 4 | | S13 | Nemesis's YM2612 test ROMs (SSG-EG, attack and release, CSM, detune, frequency write order, multiplexing) and his recordings from the MD1600 at 96 kHz: `ssg-eg md1600.wav` (16-bit mono, 83.33 s), `ssg-eg md1600 attack and release.wav` (180 MB, inside a 107 MB archive), `ym2612csmmode.wav` (5.07 s; post p5651 of S8 says it is "PAL MD1600 MegaDrive, recorded at 96KHz", which settles the doubt megadrive-python recorded about it) | megadrive-python `tests/test_roms/nemesis/`; the first recording was unpacked to `reference/recordings/ssg-eg md1600.wav` (SHA-256 `43224ac3…0896fd9`) | none stated | 1 | the ROMs were not run and not disassembled. The recordings were described (format, length), not analysed. The large one was not unpacked | | S14 | Aly James: `MD1_LADDER.wav` (16-bit mono, 44.1 kHz, 3.10 s: a tone walked down in level on "a Model 1"); the FMDrive user manual 1.2, section "Harmonic distortion – ladder"; his posts in S8 | megadrive-python `tests/test_roms/aly-james/MD1_LADDER.wav`; `reference/web/alyjames-FMDRIVE_USER_MANUAL_1.2.pdf` | none stated; a commercial plug-in's manual | 1 for the recording (board and gain unknown), 3 for the prose | notes | | S15 | Ghost (GManiac), sweep ROMs: `1000HZ.GEN`, `MIRROR.GEN`, `YM_67.GEN`, `YM_77.GEN` with their `.asm` | megadrive-python `tests/test_roms/ghost/sweep_1000.rar` | none stated | capture tools; no recordings inside | listed only. The `.asm` files were not opened (no licence, not needed) | | S16 | MDFourier (Artemio Urbina): recordings of one test signal (96 FM blocks, PSG, noise) from 21 Mega Drive boards, 192 kHz, spanning boards with the discrete chip and boards with the ASIC | megadrive-python `tests/test_roms/mdfourier/MDFourier-Genesis-SegaCD-Recordings-14062020.zip`; documentation `reference/web/junker-mdfourier*.html` | recordings: none stated. The analyser and the signal generator are GPL-2.0-or-later and were not read | 1 | notes (documentation). The recordings were not analysed here | | S17 | Sik, Plutiedev: "YM2612 register reference", "Common YM2612 operations" | `reference/web/plutiedev-ym2612-registers.html`, `plutiedev-ym2612-operations.html` | none stated | 3 (a working sound-driver author; the pages do not describe tests) | notes, whole | | S18 | Secondary pages: Maxim's transcription of Sega's YM2612 chapter; Sega Retro "YM2612"; ConsoleMods "Genesis: Audio Chip Notes" (which board carries which chip); the MegaDrive Wiki "YM2612" | `reference/web/maxim-ym2612.html`, `segaretro-ym2612.html`, `consolemods-audio-chip-notes.html`, `railgun-ym2612.html` | none stated, except the MegaDrive Wiki: CC BY-NC-SA (non-commercial: cited, nothing copied) | 3, secondary | notes | | S19 | Matthew Gambrell and Olli Niemitalo, "OPLx decapsulated", 20 April 2008: the log-sine and exponent ROMs read bit by bit from decapped YM3812 and YMF262 chips, with formulas that reproduce them | `reference/web/oplx-decapsulated.txt` | none stated: "We hope this will be useful for anyone writing a good emulator." | 1, but for the OPL2 and OPL3, not the OPN2 | notes | | S20 | Patents: US 4,018,121 (Chowning, FM synthesis); US 4,249,447 (Tomisawa, Nippon Gakki: operator self-feedback and averaging two adjacent samples to stop "hunting"); US 4,297,933 and US 4,554,857 (Nishimoto: selectable algorithms and one operator used in time division); US 4,643,066; US 4,813,326 | `reference/patents/*.html` | public documents, expired | 2 for the architecture; none is specific to the OPN | notes: abstracts and keyword passages | ### Source code under a permissive licence (tier 5) | ID | What | Where | Licence, as found in the files | Read | |----|------|-------|-------------------------------|------| | S21 | ymfm, by Aaron Giles | `reference/ymfm/` ( at `81aec25`) | every source file begins "BSD 3-Clause License / Copyright (c) 2021, Aaron Giles"; `LICENSE` the same (the first three lines of `ymfm_fm.ipp` were checked again by this session) | notes: `ymfm_fm.ipp` and `ymfm_fm.h` whole, the OPN register class and the YM2612, YM3438 and YMF276 classes of `ymfm_opn.cpp` and `ymfm_opn.h`. Nothing ported | | S22 | ares, YM2612 component, "Author: Talarubi" | `reference/ares/` ( at `0b92893`) | root `LICENSE`: ISC, "Copyright (c) 2004-2025 ares team, Near et al". The component's files have no header of their own | notes: all but `serialization.cpp`. It cites no sources at all. Nothing ported | | S23 | Exodus, by Roger Sanders (Nemesis): `Devices/YM2612/` | megadrive-python `reference/src/Exodus` at `08f388f` | `License.txt`: "MIT License / Copyright (c) 2024 Roger Sanders". No per-file headers | **`YM2612.h` only** (its header comment, to-do list and reference list). `YM2612.cpp` was closed after its first 12 lines: see "Found and not read" and decision P3 | | S24 | IKAOPN, by Raki | `reference/ikaopn/` ( at `a756c02`) | `LICENSE`: "BSD 2-Clause License / Copyright (c) 2022, Raki" | `LICENSE` and `README.md` only. At this commit the tree holds no HDL, only traced schematics, which were not fetched: decision P5 | Nothing was ported from any of these. ## Sources found and not read | What | Why not | |------|---------| | Nuked-OPN2, Nuked-MD, YM2608-LLE, wherever they sit (copies exist under megadrive-python `reference/src/`); Nuked-OPN2-FPGA | restart.md rule 1 | | MAME's `fm.cpp`, `fm2612.cpp`; Genesis Plus GX; BlastEm; Gens; PicoDrive; jt12 (GPL Verilog); clownmdemu; jgenesis; Furnace's and libOPNMIDI's bundled cores | restart.md rule 1, and the brief for this phase | | `/data/backup/nuked-derived/` | restart.md rule 2 | | megadrive-python `src/`, and any passage of its documents describing the FM chip's internals | the brief for this phase | | Exodus `YM2612.cpp` (4,061 lines), beyond line 12 | MIT, so rule 4 allows it, and it is the researcher's own implementation. But its lines 8 to 12 say its envelope tables "are primarily based on the work of Jarek Burczynski in his OPN envelope generator implementation for the MAME core". Stopped there. Decision P3 | | IKAOPN's schematics (`YM3438_schematics.pdf`, `YM3438_wires.svg`, and the YM2608 pair) | BSD-2-Clause, and the README says the work "does not reference any existing hard/soft core". A traced schematic of this exact chip is as near a blueprint as a source gets, and whose die photographs it traces was not checked. Decision P5 | | Sauraen's VHDL of the operator unit () | licence not stated in the thread and not checked; he calls it untested. Decision P5 | | HardWareMan's YM2612 die photograph (116 MB) and the siliconpr0n scans of the YM3438 | a photograph settles nothing without tracing it; the siliconpr0n scans' author was not established | | GManiac's Delphi emulator `YM_Emu.rar`; andlabs's `ym2612` on GitHub; `ym2612.js` | licence unknown for the first two; the third describes itself as a port of Genesis Plus GX | | MDFourier's analyser and the 240p Test Suite source | GPL-2.0-or-later; only the licence header of one file was read, to establish that | | Ghost's `.asm` files; TmEE's `MD_Sine.rar`; ConsoleMods' game recordings | no licence or dead hosts; not needed in Phase 0 | | The 180 MB attack-and-release recording | in hand, not unpacked: analysing it is build-session work | | Anything by the author the owner excludes | nothing of his was met. Every fetched HTML and text file was searched for his name before reading: no occurrence | Hosts that did not answer during this phase: `nemesis.hacking-cult.org` (502; his diagrams of the operator unit and phase generator, and his oscilloscope pictures, are therefore **not in hand**), `shedevr.org.ru` (403), the live `consolemods.org` (403; an archive copy was used). ## What each source can and cannot settle - **S1, S2, S4 (Yamaha)** settle the register map; the two address parts; the eight algorithms; the F-number formula; the key-code rule; the detune table (in hertz, to three decimals, which converts to whole steps); the multiple table; the rate formula `2R + Rks` and its limits; the key-scaling table; the weights of total level and sustain level; the SSG-EG shapes as pictures; the LFO's rates and depths; the timer formulas; the required waits after a write (17, 83 and 47 master clocks); the reset pulse (192 clocks); that the D/A converter is 9 bits; that the accumulator works on 9-bit slot outputs; that a channel panned off "may be faintly audible" (S1). They do **not** give the sine or exponent tables, the envelope's step patterns or counter, the attack curve, any timing inside a sample, the feedback arithmetic, the test registers' functions, the state after reset, or what BUSY measures. S1 and S2 disagree with each other on the timers and on channel 3's mode bits (C1, C2); where they do, S2 (the later document) agrees with the hardware. - **S5 (Sega)** repeats part of S1 in English, with errors of its own (channel 3's operator registers, the key code, "SSG-EG ... usage is unknown"). It adds the console's addresses and the instruction to poll BUSY. **S6** says the YM2612 does not give a defined status at any address but the first. - **S8, S9 (Nemesis)** are the main source for everything digital the manuals leave out: the phase generator's widths and order of steps, the detune overflow, the F-number latch, the operator unit to the bit, the envelope generator's clock, attack formula and corner cases, SSG-EG in full, the timers' reload rules, CSM, the absent OPNA registers. Most of it is tier 1: values read out of a real chip through the test register. Its limits: one chip in one PAL console for most results; the LFO, the feedback path and the test registers were never finished; the two envelope tables came to him from MAME and were then checked and corrected on hardware (decision P2). - **S8 (GManiac)** settles the 9-bit truncation before the accumulator, the limiting sum, the modulation scaling and the two feedback stores, by oscillogram; it describes the ladder effect without numbers. - **S8 (Sauraen, HardWareMan)** settle, from the die, the list of $2x registers that exist, the test registers' wiring, the operator pipeline's order and which stored output modulates which operator, the BUSY counter, the split register file, the structure of the LFO and of the DAC. A die reading says what is wired, not always what it does; Sauraen marks his own guesses and several were later corrected by him. - **S8 (Eke 2017, Stef 2023)** settle that BUSY is set only by data writes and lasts the same on both chips, and that Yamaha's 83 and 47 clock waits are real minimums. They contradict each other on which chip returns status at which address (C4). - **S12 (Kabuto)** settles that the discrete chip's output is a short pulse per channel and the ASIC's is held, and that the discrete chip's DAC has a step at mid-scale; the numbers behind his diagrams are not in the mirror. - **S13, S14, S16** are the only audio in hand. They pass through each console's filter and amplifier at unknown gain, so they can test envelope shapes, timing, pitch and the presence of the ladder plateau, not exact levels. - **S19, S20** support the architecture (log-sine and exponent ROMs, time-division operators, averaged feedback); S19's exact formulas are for another chip family and apply here only because Nemesis's read-outs give the same tables (spec.md 6). - **S21 (ymfm)** is a readable sample-level model. By its own comments its detune table, phase generator, vibrato and the LFO's off-by-one are "verified against" or "written to match" Nuked-OPN2, its two ROM tables are "extracted from the die" without credit, and its ladder constants have no stated source. Its README: "The goal of these cores is not 100% digital accuracy." It is an emulator, and where it is the only source the behaviour stands at tier 5. - **S22 (ares)** is independent in structure and cites nothing. It is useful as a second opinion and as a statement of the sine and exponent tables as formulas. ## Behaviours with no source above tier 5 Only S21 or S22, or an emulator's author speaking for his emulator, say these: - The size of the ladder effect as numbers: an offset of a few DAC steps by sign, and what a muted or idle slot outputs. (Hardware sources describe the effect and give one number, Kabuto's "jump of 3 samples" at mid-scale.) - The LFO's dividers being one less than the manual's rates imply (C14). - The per-level feedback shift (the manual gives the levels in radians; the shift follows by arithmetic, but only emulators state it as a shift). - Timer B's divide-by-16 running free of the load bit. - What every register holds after reset, beyond the panning bits. - The envelope counter skipping zero is said by GManiac without a stated test and by S22 as "confirmed behavior" without saying by whom: tier 3 at best. ## Behaviours with no source at all - Which of the 24 internal clocks of a sample a written register takes effect on, as a table. (The die reading says the register file has two write points 12 clocks apart; nobody published the mapping.) - The instant within a sample at which $2A is sampled (Kabuto: it differs between MD1 and MD2, "I can't give any precise values"). - The DAC's 512 output levels as voltages, on either chip. - The functions of $21 bits 0 and 1, $2C bit 6 and the TEST pin as an input. - What key-on channel values 3 and 7 do in register $28. - Whether the envelope counter and the LFO are cleared by reset, and where the 3-sample envelope cycle stands afterwards. - BUSY on a discrete YM3438. - Anything measured on the owner's own console. ## Slips and near misses All small; none reached the spec as a rule. 1. **Emulator fragments inside forum posts.** The mechanical filter removed `[CODE]` blocks from other authors, but a few lines of emulator source sat in `[QUOTE]` blocks or in Nemesis's own posts and were read before they could be recognised: Gens lines in p5630 and p5639; MAME lines in p5730, p6219, p6225, p6237 and a two-line MAME comment in p8905; Genesis Plus GX lines in p6519 and p10460. Nothing was taken from them. 2. **Emulator behaviour described in prose** was read in posts by Eke (p29476, p29508, p30935, p30938, p31050, p32605, p16391) and jotego (p34276, p34281, p34289): MAME's vibrato and phase formulas and LFO periods, the Nuked model's ladder offsets, names of functions in the Nuked source. spec.md does not use them as rules and says so where the same number arrives by another road. 3. **megadrive-python worklog lines 874 to 875**, which explain the ladder plateau in the withdrawn model's terms, were read before they were recognised. Not carried over. 4. **Search summaries**, unsought, showed three busy constants from a GPL emulator (17, 83, 47: the same numbers are printed in S1 and S2, which are what the spec cites), one line of a Genesis Plus GX change log and a paraphrase of a forum post. 5. **Exodus `YM2612.cpp`**: its first 12 lines were read, enough to meet the MAME attribution. 6. **ymfm's tables** whose stated origin is "the die" or a check against Nuked were read, being in BSD files. They are listed above so the owner can rule (decision P2). 7. Six patent pages were fetched with the User-Agent "Mozilla/5.0 reference-fetch" rather than the plain "reference-fetch" used elsewhere. Nothing identifying the owner or the project was sent in any request. 8. The first run of the fetch script requested the forum's 58 pages one second apart; megadrive-python already held nine of them. A politer run would have reused those.