# Provenance audit of the specification Done 2026-11-13 by the build session, before any code, under [restart.md](restart.md) rules 9 to 11. It answers one question for every statement of [spec.md](spec.md): is it supported by a manufacturer's document, or by a measurement someone made on a real chip **and stated in words**? Source IDs (S1, S8, ...) are [phase0.md](phase0.md)'s; "p7967" is a post of SpritesMind thread 386. ## Why it was needed Phase 0 reported two weaknesses. Most of its forum citations rested on notes taken by reading passes, fourteen of them spot-checked. And lines of emulator source that sat inside quotations (Gens, MAME, Genesis Plus GX; nine posts), and two lines of megadrive-python's worklog describing the withdrawn model's ladder, were read before they were recognised. Phase 0 also read the code boxes of two authors (Nemesis and Sauraen) on purpose, as the researcher's own account; rule 10, written the next day, closes every code box whoever wrote it. ## Method 1. `scripts/post_prose.py` prints a post's prose with every code box replaced by a marker, every remaining line that looks like program text dropped, and, for the nine posts with emulator source inside quotations, every quotation dropped. It refuses the posts Phase 0 lists as relaying an excluded model's code in prose (p16391, p29476, p29508, p30935, p30938, p31050, p32605, p34276, p34277, p34281, p34289) and every post by the authors of the Nuked models and of jt12 (which adds p34272). Those twelve posts were not read and nothing rests on them. 2. With it the audit read, whole: p5605, p5618, p5621, p5648, p5650, p5655, p5680, p5687, p5716, p5720, p5723, p5724, p5958, p5960, p6114, p6177, p6179, p6224, p6339, p6607, p6636, p6741, p7437, p7445, p7490, p7516, p7520, p7537, p7673, p7733, p7967, p7998, p7999, p8020, p8025, p8032, p8037, p8045, p8905, p8908, p8909, p8911, p9166, p9213, p11386, p11862, p11876, p12973, p12981, p12991, p13067, p14109, p14196, p16436, p16459, p18814, p18838, p18903, p26996, p27098, p27319, p28164, p29471, p30063, p30088, p30097, p30937, p31026, p31027, p31049, p31154, p32647, p34255, p34262, p37832, p37833: 76 posts. The emulator passages Phase 0 named were not re-read: their quotations were dropped mechanically. 3. Manufacturer documents: S2's OCR text was searched for the figures the spec quotes (the waits 83 and 47, "93dB", the LFO's eight rates, the tremolo and vibrato depth rows), and S2's printed pages 23, 25, 26 and 29 were viewed as images. The detune table (5.6) was converted again from the image of printed page 25, row by row; all 96 entries equal the spec's. S19 was read whole. Everything else the spec cites from S1, S2, S4, S5 and S6 stands on Phase 0's direct reading and is marked "Phase 0, direct" below. 4. ymfm (S21, BSD-3-Clause) was read where a provisional default had to be chosen: its envelope functions, its increment table, its LFO and vibrato functions, its reset and its YM2612 output stage. Nothing was ported. 5. Not re-audited, because the core does not rely on them (a sample-level model leaves them out; spec 4.6): 2.6, 2.8, 2.9, 12.4, 17 except $2C bit 3, and the die-reading posts behind them (p26964, p26980, p26987, p27032, p27060, p27124, p27138, p29513, p29516, p30065, p31240, p31285, p15000 to p15097, p15665, p6258, p6288, p6615, p6643, p8646, p25392, p27133, p27145, p27188, p27198). They stand as Phase 0 left them: read by its notes pass only. "Prose" below means the author's own sentences. A table inside a code box counts as the code box. A formula written in a sentence counts as prose. ## What was struck or re-marked, and why Eight things. In every case the *value* the core uses is unchanged from the first draft; what changed is what the repository may say about where it comes from. | # | Spec | First draft said | What the audit found | Now | |---|---|---|---|---| | A1 | 6.2, 6.3, 6.5 | log-sine and exponent tables and the quadrant rule "measured (read-out)" by Nemesis | his two table-building algorithms are code boxes; his diagram's host is dead. His prose gives the datapath (10-bit inputs, 14-bit output, 4.6 to 4.8 conversion, add, base-2 power) but no formula | formulas and quadrant rule from **S19** (Gambrell and Niemitalo: the YM3812's and YMF262's ROMs read bit by bit from the die, stated as formulas; rule 11). Tied to this chip by Nemesis's prose in p6741 (sine table "a perfect match"; power table "0x7FA-0x400", bit 10 left out of the ROM, order reversed) and by GManiac's measured ±8168 (p11876), which fixes the output scale | | A2 | 7.3.2, 7.3.3 | envelope step patterns and rate-to-shift rule "measured by Nemesis" | both tables are code boxes, and he says they are "based on information provided in MAME" and that he tested "most". Prose gives the mechanism, shift 0 to 11, the eight-step loop, rate 7's pattern, the pairs 2/3, 4/5, 6/7, the largest increment 8 at rates 60 to 63, and the two end points | mechanism and those facts **measured**; the rest **provisional, emulator tier: ymfm's table**, which agrees with every prose fact. New unknown U21 | | A3 | 7.4.2 | attack formula "measured (read-out)" | the formula is a code box in p5716 and again in p7967; prose says only that it equals MAME's | **provisional, emulator tier: ymfm's formula**. Two measured values in prose agree with it (ten steps from $3FF at increment 8, p7967; $200 to $1DF, p8037). U22 | | A4 | 7.6.1, 7.6.3 | SSG-EG rules "measured (read-out)" as a block | the implementation is five code boxes of Nemesis's emulator source. Prose in p7967, p8025, p8032, p8037 states most rules one by one | each rule marked: prose, or derived from prose with the manual's eight shapes (the below-$200 test; the held-silent case), with ymfm agreeing | | A5 | 7.6.5 | key-off while inverted converts the level, "measured" | code box only; prose says inversion is off in release, not what happens to the level | **provisional, emulator tier: ymfm**. U23 | | A6 | 8.3, 8.4 | LFO counter held at 0 while disabled, "measured in part"; triangle from the counter | the statement is a comment in a code box (p16436). Prose: tremolo still applied with the LFO off (p7490); counter 0 is maximum attenuation (p16436) | the still-applied rule **measured**; held at 0 and the triangle's construction **provisional, emulator tier: ymfm**. U26 | | A7 | 8.6 | vibrato table "Nemesis's" | code box; he calls the MAME table quoted to him "correct", so it descends from MAME. Prose gives the per-bit shifting, the 11-bit sum and its wrap | last column **documented** (it is the manual's cents, by arithmetic shown in the spec); the other seven columns **provisional, emulator tier: ymfm**, which says its form was written to match Nuked-OPN2. U24 | | A8 | 10.1 | mode 11 "as 01", measured | the four-row table is a code box; prose covers 10 (CSM, with separate frequencies) and that 11 is not CSM | mode 11 giving separate frequencies **provisional, emulator tier: ymfm**. U25 | Also struck, from [validation.md](validation.md) rung 1: "the hand-over sequence whose read-out is $001F and not $1FE8" and "in release with increment 1 the output goes from $0021 straight to 0". Neither appears in any post's prose; they can only have come from comments inside Nemesis's code boxes. No test uses them. And one statement gained support: spec 15.2.5 said the only numbers for the ladder effect were emulators'. GManiac (p30097, from memory) and Kabuto (S12) each give one for the mid-scale step. Both are now quoted there. The core's constants are still ymfm's (decision T10), which are larger than either. ## Statement by statement Chain format: *source (author; how established; upstream)*. "ok" means the audit found the statement in the source's prose. Tier words are the spec's. ### 1 to 4: parts, bus, registers, clock | Spec | Chain | Audit | |---|---|---| | 1.1 software compatible | S2 outline (Yamaha; manufacturer). p30063 (Sauraen; test-register read-back on four DIP YM3438s; none) | ok: "I haven't found any differences" | | 1.2 ASIC equals YM3438? | p13067 (TmEE; his tests on loose YM3438s against his MD2, method not described) | ok as a report; U20 stays | | 2.1 to 2.4 address and data | S1, S2 tables 1.2 (Yamaha) | Phase 0, direct | | 2.3 no global registers in part II | p5648 (Shiru; hardware test of $27 through part II) | ok | | 2.5 one nine-bit latch | p7673 (Nemesis; hardware test), p7733 (the same on both his consoles) | ok | | 2.7 waits 17, 83, 47 | S1, S2 (Yamaha); p37832 (Stef; timed 68000 writes on an MD1 VA0, a Nomad, a clone) | ok; OCR shows 83 and 47 | | 3 register map | S1, S2, S4 (Yamaha) | Phase 0, direct | | 3.1.2 no $29, $2D to $2F | p5680 (Nemesis; hardware, "had no noticeable effect") | ok | | 3.2.3 $90 upper bits | p8037, p14196 (Nemesis; all 256 values run on hardware) | ok | | 3.3.4 channel 3's registers | S4 table 2-2 (Yamaha); p5605 (Nemesis relaying Shiru's hardware test by keying operators singly; the post notes MAME agrees) | ok | | 3.3.5 F-number latch | S1, S2 (Yamaha: the order of writes); p5621 (Nemesis; test ROM on hardware) | ok. His prose reads per channel; decision T7's shared latch is **provisional, emulator tier: ymfm**, and gives the same result in the test he describes | | 4.1 divide by 6 | S2 page 12 (Yamaha); p5716 (Nemesis; output rate measured) | ok | | 4.2 144 clocks a sample | S4, S1 (Yamaha); p6177, p6224 (Nemesis) ; p7520 (oscilloscope: 24 master clocks a slot) | ok | | 4.4 operator order 1, 3, 2, 4 | p30063 (Sauraen; read-back on YM3438s) | ok ("in English: ... in the order 1324") | | 4.5 envelope every third sample | p6224, p7967 (Nemesis; read-out; he notes it is what MAME already did) | ok. History through an emulator, confirmed on hardware: middle rule | ### 5: phase generator | Spec | Chain | Audit | |---|---|---| | 5.1 20-bit counter, top 10 used | p6177 (Nemesis; hardware tests of precision) | ok | | 5.2 order of steps | p6177, p8908 (Nemesis; "a series of six discrete steps") | ok | | 5.3 block shift, examples | p6177 | ok: both worked examples are prose | | 5.4 frequency formula | S2 printed page 23 (Yamaha), viewed | ok | | 5.5 key code | S1, S2, S4 (Yamaha). p31049 (Sauraen; die: from the F-number before the LFO) | Phase 0, direct; die sentence ok | | 5.6 detune table | S2 printed page 25 (Yamaha), in hertz; conversion by p6177's prose (one step is 0.053 Hz; maximum 22; key code $14, magnitude 3 gives 11) | **re-derived by the audit from the page image: 96 of 96 equal** | | 5.7 17-bit wrap | p5618 (Nemesis; test ROM, "tested and confirmed this on the real hardware"), p6177 (17 bits; $1FFFF) | ok | | 5.8 multiple, 20 bits | S2 table 2.3, viewed; p6177 | ok | | 5.9 changes heard next sample; key-on clears the phase | p5655; p7967 item 4 (Nemesis) | ok | | 5.10 phase held in SSG-EG | p7967 item 4 | ok | ### 6: operator unit | Spec | Chain | Audit | |---|---|---| | 6.1 widths | p6114, p5958 (Nemesis; read-out); p30088 (Sauraen; YM3438 read-back) | ok | | 6.2, 6.3, 6.5 | S19 (Gambrell, Niemitalo; ROM read-out of YM3812, YMF262); p6741 (Nemesis: his YM2612 tables match) | **A1** | | 6.4 attenuation is 4.6, shifted to 4.8, added | p6114 prose | ok | | 6.6 silent past about 40 dB | p6114, p6224 prose | ok | | 6.8 eight total-level steps halve | p11876 (GManiac; oscillograms) | ok | ### 7: envelope generator | Spec | Chain | Audit | |---|---|---| | 7.1.1 10 bits, four phases | p5716 (Nemesis) | ok | | 7.1.2 output: inversion, then total level, then tremolo, limited | p5716, p7967 (Nemesis); p18903 (TmEE: clamp to 10 bits, by spectrum) | ok | | 7.1.3 weights; sustain level 15 | S2 (Yamaha; OCR shows "93dB"); p7967 says $3FF | ok; C9 stays, T6 takes the manual's | | 7.2.1 rate = 2R + Rks and its cases | S2 page 28 (Yamaha); p5716 prose repeats all three cases; p5724 (release never 0) | ok | | 7.2.2 key scaling | S2 table 2.6 (Yamaha) | Phase 0, direct | | 7.2.3 rate worked out every update | p7967 item 5 (Nemesis; read-out) | ok | | 7.3.1 one shared counter | p5716 prose | ok | | 7.3.2, 7.3.3 | p5716, p5724, p7967 prose; ymfm | **A2** | | 7.3.5 counter 1 to 4,095 | p18838 (GManiac; no test described) | ok as quoted; U3 stays, T13 provisional | | 7.4.1 decay adds the increment, limited | p5716, p8025 prose | ok | | 7.4.2 attack | ymfm; p7967, p8037 values | **A3** | | 7.4.3 key-on does not reset the level | p5724 (Nemesis: "they might be right"), p7999 (Snake, on the real chip, no test described) | ok, weaker than the draft's "measured": tier 3 | | 7.4.4, 7.4.5 rates 62 and 63 | p7967 item 8 (Nemesis; read-out) | ok | | 7.4.6 no clamp at the sustain level; one-way | p7967 items 5, 6 | ok | | 7.4.8 key-off | S17 (Sik; a driver author, no tests described); ymfm | tier 3 | | 7.4.9 keys acted on every sample | p7967 item 7 | ok | | 7.5 reset state | ymfm, ares | emulator tier, as the draft says (T14) | | 7.6 intro: eight shapes | S2 figure 2.4 (Yamaha), printed page 29, viewed | ok | | 7.6.1 to 7.6.4 | p7967, p8025, p8032, p8037 prose; S2's shapes | **A4** | | 7.6.5 | ymfm | **A5** | | 7.6.6 burst with slow attack | p7967, p8032, p8037 prose | ok | | 7.6.7 two unobservable choices | p8025 prose | ok | ### 8 to 10: LFO, algorithms, channel 3 | Spec | Chain | Audit | |---|---|---| | 8.1 rates; triangle | S2 page 31 (Yamaha; OCR read by the audit: 3.98 to 72.2 Hz, "sine"); p28164 (Sauraen; die: "it must be a triangle wave") | ok | | 8.2 divider 109, 78, ... | arithmetic from S2's rates; ymfm states the same table "based on converting the frequencies in the applications manual" | ok; C14 stays, T2 takes the manual's | | 8.3, 8.4 | p7490, p16436 prose; S2's depths; ymfm | **A6** | | 8.5 vibrato before the block; key code untouched | p8905, p8908 (Nemesis; "a whole battery of tests"), p31049 (die) | ok. p8905's quotations, which hold two lines of MAME, were not printed | | 8.6, 8.7 | S2's cents; p8908, p8911 prose; ymfm | **A7**; C16 stays, T1 | | 9.2 algorithms | S2 figure 2.2 (Yamaha) | Phase 0, direct | | 9.3 modulation is the sum shifted right once | p18814 (GManiac; "special tests"), p18903 (TmEE) | ok | | 9.4 feedback: two stores; shift 10 − level | p18814; p27319 (Sauraen; die: 15-bit sum into a shifter); levels S2 table 2.2 | ok; the shift is arithmetic from documented levels, U7 stays | | 9.5 heard at once | p5720 (Shiru) | ok | | 9.6 delayed paths | p29471 (Sauraen; die of the YM2203, cross-checked on the YM2612, order confirmed on YM3438 hardware), superseding p27098 | ok: his prose list gives exactly the three delayed paths; C11 stays, T4 | | 10.1 | p5650, p7967 prose; S2; ymfm for mode 11 | **A8** | | 10.3 to 10.5 CSM | p5650, p7967 (Nemesis; hardware tests) | ok | ### 11 to 16: timers, status, DAC, accumulator, output, reset | Spec | Chain | Audit | |---|---|---| | 11.1 periods 144 and 2,304 | S2 page 13 (Yamaha); p5680 prose ("twice as long" as the YM2608 manual's) | ok; his formula is a code box, not needed | | 11.2 reload rules | p5687, p5680 (Nemesis; hardware) | ok | | 11.3 flags, enable, reset | S1, S2 (Yamaha) | Phase 0, direct | | 11.4 /IRQ is the OR of the flags | p7967 (Nemesis; oscilloscope, correcting p5680) | ok | | 11.5 Timer B's prescaler free-running | ymfm, ares | emulator tier, as the draft says (T16) | | 12.1 status byte | S1, S2 (Yamaha) | Phase 0, direct | | 12.2 BUSY 192 clocks, data writes only | p31026 (Eke; counted BUSY reads on a VA4 MD1 and a VA0 MD2 and matched an emulator's count to them), p31154 (Sauraen; die) | ok. Measured on hardware with an emulator as the yardstick: middle rule | | 12.5 which address | S1, S2, S6; p5680; p31026; p37832 | ok, all as quoted; C4 stays, T3 | | 13.1 DAC replaces channel 6 | S2 page 15 (Yamaha) | Phase 0, direct | | 13.2 channel 6 keeps running | p14109 (GManiac; "I tested in on HW") | ok | | 13.3 scaling 2 × ($2A − $80), ninth bit $2C bit 3 | p26996 (Sauraen; die); p5958 (Nemesis: the DAC's maximum is slightly below one FM channel's) | ok. p34272 is by an excluded model's author and was not read; C10 stays | | 13.5 one write a sample is heard | p31027, p34262 (TmEE; shared-clock test) | ok | | 14.1 carriers cut to 9 bits, then summed | p11862, p11876 (GManiac; oscillograms); S2 page 33 | ok | | 14.2 limited; +255 or +256 | p11876 ("AFAIR"), p30088 | ok; C8 stays, T5 | | 14.4 muted channel faintly audible | S1 2-7-2 (Yamaha) | Phase 0, direct | | 15.1 six slots, order 1, 5, 3, 2, 6, 4 | p7516, p7520, p7537 (Nemesis; oscilloscope, both consoles); p30063 | ok | | 15.2.3 ladder, as described | p30097, p11876, p12991 (GManiac); p32647, S12 (Kabuto); p6636, p7437 | ok; megadrive-python's worklog lines were not re-read and nothing rests on them | | 15.2.5 ladder constants | ymfm | emulator tier (T10) | | 15.3 no ladder on the ASIC | p12981 (TmEE; MD2 capture), p32647 | ok | | 16.2 registers zero, panning set | p8020 (Nemesis: "I can't say I've done very thorough tests"), p7999 (Snake) | ok, lightly tested as the draft says | ## What the audit did not do - It did not re-read S1 (the binder scan) beyond what Phase 0 viewed; nearly every S1 citation is doubled by S2. - It did not re-audit the statements listed under Method 5. - It did not open megadrive-python's worklog, Exodus, any Nuked file, or any code box. - It trusted `scripts/post_prose.py` to remove program text. One fragment in ordinary prose was read as prose: Nemesis's "(phase != release) && (ATT ^ inversionBit)" in p8025, a rule he states in a sentence and which spec 7.6.2 gives in words. Three short lines of posters' own arithmetic survived the filter in p30097 and p9213; nothing was taken from them.