# Validation: the oracles, their tiers, and what rests on what The family's tiers: 1 hardware-captured (measurements of a real chip, die-level models) > 2 manufacturer documents > 3 hardware-corrected community documents and tests > 4 HDL reimplementations > 5 emulators. A low tier is a **detector**: it finds differences, it does not decide who is right. **There is no tier-1 judge of the MSM6295's decoder.** No decap, die photograph or die-level analysis of the MSM6295 was found (two web searches, 2026-11-11; siliconpr0n's OKI index answered with a Cloudflare challenge and could not be read). That is "none found", not "none exists". Nobody was found to have compared decoded sample values with a chip's output value for value. The only hardware captures are analogue recordings of two CPS-1 boards, through their filters. ## The oracles | Oracle | Tier | Licence | Pin | Can decide | Cannot decide | | --- | --- | --- | --- | --- | --- | | CPS-1 board recordings (Artemio Urbina, jtcores #559): Magic Sword 88617A-7b and SF2 89626A-4, 24-bit 192 kHz FLAC, with the Z80 test loop and sample ROM that produced them | 1 (analogue) | not stated: cite, never redistribute | SHA-256 of each zip (`fetch_references.py`) | the two sample rates (clock/132, /165) to the precision of the board's crystal; attenuation steps 0-8 in dB; perhaps how four channels add (U6) if a test plays several | any exact sample value (the board's filter, AC coupling and noise are in the way); the decoder's arithmetic; BUSY timing | | jotego's measurements of attenuation codes 0-7 on the same two boards (a source comment in jt6295, commit `0207ec1`; not fetched since 2026-11-24) | 1, second-hand; provisional (a GPL file's comment, 2026-11-19 ruling) | GPL-3.0 file | jt6295 `7d76b0b` | the 32-based multipliers for codes 0-7 to about 0.2 dB | code 8 and 9-15; the rounding | | OKI MSM6295 data sheet, '94 data book 5th ed. pp. 53-68 (and the 16-page copy in jt6295's `doc/`) | 2 | manufacturer document | SHA-256 | command format, table layout, nibble order, inclusive end, 132/165, BUSY at 15n, sound at 48n, stop at the next sample, attenuation codes 0-8 in dB, 12-bit D/A, the pins, the DIP's missing A17 and /RD | the decoder's arithmetic, step table, start state, overflow; codes 9-15; mixing; BUSY at a natural end; any edge case | | OKI 1987 data book (earlier MSM6295 sheet; ADPCM introduction) | 2 | manufacturer document | SHA-256 | OKI's ADPCM formula and 12-bit accumulator; the earlier timing (C1-C4) | the step table; the MSM6295's overflow behaviour | | OKI '94 data book, MSM5205 and MSM6585 pages, product table | 2 | manufacturer document | SHA-256 | that the MSM5205 wraps and the MSM5218/MSM6585 do not; that the MSM6295 has no low-pass filter | the MSM6295's overflow | | Dialogic, *Dialogic ADPCM Algorithm* (1988) | 2-3 (a licensee's application note for OKI's algorithm) | Dialogic document: cite | SHA-256 (Wayback snapshot) | the 49 step sizes, the index adjustments, the per-term formula, reset to X = 0 and step 16, for the algorithm | that the MSM6295 implements it bit for bit; overflow | | jt6295 (jotego), Verilog | 4 | GPL-3.0: closed box only (read under the old rule until 2026-11-19; not opened since; not fetched since 2026-11-24, Aubrey) | https://github.com/jotego/jt6295 @ `7d76b0b` | a second, cycle-structured reading of the data sheet; its README says what was not verified | anything the emulators agree on: its decoder was debugged against MAME, not hardware. Its clamp was wrong until its own pinned commit `7d76b0b` (2026-08-16, "unlim_V required an extra bit", fixing jtcores #1017, a Gunlun.Pa tone "MAME mix sounds correct"); earlier clipping fixes `7b6f04f` (#504) and `16f5d7d` | | MAME 0.285 `okim6295.cpp`, `okiadpcm.cpp` | 5 | BSD-3-Clause | tag `mame0285` = `f379cd0`, SHA-256 per file | the reference detector: the whole-chip streams are compared with it; its log of what CPS-1 programs write | anything about the chip; its 2020 start-value change gives no reason | | FinalBurn Neo | 5 | FBNeo licence, non-commercial: closed box only (read under the old rule until 2026-11-19; not opened since; not fetched since 2026-11-24, Aubrey); never built into this repository | https://github.com/finalburnneo/FBNeo @ `c3e8c4d`, SHA-256 | a second detector with different conventions (C5-C8, C11) | anything about the chip | | libvgm `okim6295.c`, `okiadpcm.c` | 5 | BSD-3-Clause (MAME-derived) | commit `c5c03a2`, SHA-256 | the pre-2020 MAME conventions (start -2); the VGM port map | anything about the chip | The live pages (jtcores issues 559 and 528 as JSON) are snapshots without a pin. ## What each behaviour rests on **On the data sheet (tier 2):** - the two-byte play command and the one-byte stop, with their bit layouts; - the status read: four BUSY bits on I0-I3, high = busy; I4-I7 are inputs; - BUSY rises 15 x n clocks after the second byte, the voice starts 48 x n clocks after it (alone), at most 2 samples + 15 x n with others playing; a stop takes effect at the next sample; a restart must wait more than one sample; - the phrase table at 8 x phrase, 18-bit big-endian start and end, two spare bytes, phrase 0 not valid, end inclusive, high nibble first; - one sample = 33 x n clocks, n = 4 (SS high) or 5 (SS low): /132 and /165; - the attenuation table for codes 0-8 (whose dB figures single out the multipliers 32, 22, 16, 11, 8, 6, 4, 3, 2 over 32, truncated to a tenth of a dB, and whose -24 dB swing is "1/16 VDD p-p"); - a 12-bit D/A, no internal filter ('94 product table: "Low-pass filter: None"); - the DIP42 lacks A17 and /RD. **On OKI's general literature and Dialogic's note (tier 2-3, not specific to this chip):** the delta formula with per-term truncation, the 49-entry step table floor(16 x 1.1^n), the index adjustments, a 12-bit accumulator, reset to 0 and step 16. **On hardware measurement (tier 1, analogue, second-hand):** attenuation codes 0-7 within about 0.2 dB on two CPS-1 boards (jotego); the board filters (770 Hz single pole on the 88617A, as its schematics; a 4 kHz second-order response on the 89626A), which are the board's and not the chip's. **On the recordings, not yet analysed:** both sample rates, code 8, perhaps U6. **On emulator agreement only (tier 4-5), no hardware or manufacturer basis:** - clamping the accumulator at -2048/2047 (U1); - clamping the step index at 0 and 48 (the table has 49 entries, so some limit is certain; that it clamps rather than wraps is agreement); - the starting signal value (disagreement: 0, -1, -2: U2, C5); - ignoring a play on a busy channel (jt6295's HDL does not: U5, C9); - starting every selected channel when several bits are set (U5); - silence for attenuation codes 9-15 (FBNeo differs: U5, C7); - no timeout on a pending first byte (U9); - status bits 7-4 as 1 (FBNeo: 0; on hardware the board's bus: U11, C8). **Nothing in hand decides:** what start >= end does (U3), phrase 0 (U4), mixing (U6), the rounding of the attenuation multiply (U7), BUSY at a natural end (U8), a pin 7 change inside a sample (U10). ## The rungs, and the referee each uses Detailed in [handoff-brief.md](handoff-brief.md). The decoder rung compares against a second implementation built from MAME's two BSD files (`okiadpcm.cpp`'s arithmetic, `okim6295.cpp`'s command handling) as a small C program, never against FBNeo's code. The whole-chip rung compares with MAME's device driven by the tap's write streams. Neither is a judge: a zero-difference result means "agrees with MAME 0.285's conventions", and each convention is named in the core as a variant field so a later judge can overrule it. Results of runs go below as the rungs are climbed. None yet (Phase 0).