Skip to content

D24: recover five EIII/ESI banks whose header name is a mistyped copy of the directory's - #48

Merged
bmxcode merged 1 commit into
mainfrom
d24-emu3-misnamed-bank-headers
Aug 24, 2026
Merged

D24: recover five EIII/ESI banks whose header name is a mistyped copy of the directory's#48
bmxcode merged 1 commit into
mainfrom
d24-emu3-misnamed-bank-headers

Conversation

@bmxcode

@bmxcode bmxcode commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Closes #43.

What this deliverable did

Five named EIII/ESI banks across three discs claimed a volume, found no bank header for their directory name, and read nothing — each correctly carrying the ADR-0012 note no bank header found for this bank; listed only, but named like ordinary sample banks rather than like the E3 Main Code OS slots that share it. Issue #43 left open which of three each was: a genuinely empty slot, a header the search could not reach, or a second copy of a bank read under a name written twice.

Measured against the discs (SAMPLERDISC_TEST_DISCS), all five are the same thing: a header the search does not reach. Each has a real EMULATOR/EMULATOR THREE header sitting at exactly the address ADR-0021's placement fit predicts, holding real audio named for the bank — but the header's own 16-byte name field at +16 is a corrupted copy of the directory name:

Disc Directory name Header +16 name Records First record
Vol. 10 – Elements of Sound 1MB Electric Grand X Eelectric GrandX 9 ELEC GRAND _000
Vol. 16 – Ditto Drums PERCUSSION#1 X PERCUSSION #1 X 31 TAMB BRASS
Vol. 17 – Heavy Guitars HvyGtr FX5 X HvyGtr FX5 XX 2 Gtr FX 11
Vol. 17 – Heavy Guitars Misc Gtr FX 2MbX Misc Gtr FX 2mbX 6 Gtr Feedback Shr
Vol. 17 – Heavy Guitars HvGtrFdBkTxtr2Mb HvGtrFdBkTxtr2M 1 Gtr FeedbackLoop

Every corruption is a shifted space, a case change, or a single doubled/dropped character — an edit of at most one once the name is lowercased and its spaces stripped.

The rule (ADR-0031)

A directory entry that no header names exactly binds the header sitting at the address its placement predicts, when all three hold: a header is there, the header's name is within one normalised edit of the entry's, and no other entry already claims it. _bank_offsets gains this recovery pass after its existing placement arbitration; nothing downstream changes, so a recovered bank flows through the same record walk and the ADR-0012 empty-with-note invariant is preserved.

This is ADR-0021's instrument one step wider — from which of two headers wearing this exact name to the near-named header this entry points at. Nothing is placed: a bank whose predicted address holds no header binds nothing.

Why the gates are load-bearing

The rejected alternative — bind by the predicted address alone — recovers all five but fails on ditto-drums, measured: the real OS-code slots E3 Main Code and E3X Main Code predict addresses that fall on the Ditto Drums X and DAVE W KIT1 X headers (other banks the directory names elsewhere). Address alone would hand each slot another bank's audio under the wrong name. The name gate (e3maincode is a dozen edits from dittodrumsx) and the unclaimed gate reject them together. Also rejected: fuzzy-matching names everywhere (reopens ADR-0015), leaving them noted (withholds 49 real samples), and rewriting the header name (invents an authority the disc does not grant).

What moved

  • Vol. 16 – Ditto Drums: 948 → 979 samples (+31, PERCUSSION#1 X), loops and stereo unchanged.
  • Vol. 10 – Elements of Sound 1MB and Vol. 17 – Heavy Guitars: pinned in tests/test_discs.py for the first time (102 volumes / 1 465 samples, and 68 / 870).
  • No reference disc moves. Simulated across all ten EMU3 reference discs and the three size-twins in the collection, the recovery binds nothing — it fires only where a name was mistyped.

Pins added/updated in _EMU3, _HEAD_DIGEST (the 1MB disc shares its size with the 2MB cut), _EMU3_RUN_ENDS, and a new _EMU3_RECOVERED_BANKS table asserting each of the five by the mistyped header name, not just the count. Synthetic unit tests (ADR-0008) cover _near_name, the recovery/unclaimed/near gates in _bank_offsets directly, and the end-to-end recovery via a new header_names fixture knob.

What it deliberately does not claim

Two of these discs list a bank name twice in the directory — Harpsichord X on Vol. 10, HvyGtr Maj.Open on Vol. 17 — and because located is keyed by name both entries resolve to one header and double-list the same records. That is a different mechanism (it reads the same audio twice, not nothing), one arm of the heavy pair points at a real but blank-named 6.3 MB header, and it needs per-entry header resolution. It is left to #47 and noted in docs/README.md; the D24 pins for those two discs include the double-count until it is fixed.

Verify

uv run ruff check .
uv run ruff format --check .
uv run pytest -q
uv tool install --editable . && samplerdisc --version
SAMPLERDISC_TEST_DISCS=… uv run pytest -q tests/test_discs.py -k emu3

… of the directory's

Five named banks across three discs (Elements of Sound 1MB, Ditto Drums, Heavy
Guitars) claimed a volume, found no bank header for their directory name and read
nothing. Measured: each has a real EMULATOR header at exactly the address its
placement predicts, holding audio named for the bank, but the header's own +16
name is the directory name mistyped by a shifted space, a case change or one
doubled/dropped character.

_bank_offsets gains a recovery pass: a directory entry no header names exactly
binds the header at its placement-predicted address when that header's name is
within one normalised edit and no other entry claims it (ADR-0031). Nothing is
placed; downstream is unchanged. Binding by address alone was rejected because
ditto-drums' E3 Main Code / E3X Main Code slots predict addresses that fall on
other banks' headers -- the name and unclaimed gates reject them.

ditto-drums 948 -> 979 samples; elements1mb and heavy pinned for the first time.
No reference disc moves. The separate duplicate-name double-listing found in
passing is deferred to #47.

Closes #43.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bmxcode
bmxcode merged commit 50d3551 into main Aug 24, 2026
1 check passed
@bmxcode
bmxcode deleted the d24-emu3-misnamed-bank-headers branch August 24, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EIII/ESI: five named banks report no bank header and read nothing, and two look like a second copy of a bank already read

1 participant