w0ts / Multitone

For a firmware author

The flash holds 1.12 + Multitone (Elektron OS 1.12 with the Multitone kernel). Your firmware lives in a slot on the +Drive; at power-on Multitone boots it, or stays on 1.12 + Multitone if it fails.

To run there, your build follows the rules below. To prove it, run the kit (last section) on every build.

BUILT · DN2 built and tested on a DN2   BUILT · emulator built and tested in the emulator gates

1 · Run as a guest BUILT · DN2

#ruleif brokenkit check
1Built on Digitone II OS 1.12 (container version 1.12, product code 52).not bootedbase, product
2Two sites hold stock bytes: 0x401353AE 4F EF FF F4 48 D7 04 0C (the SPI NOR read routine's entry) and 0x4012681C 4E B9 40 12 9C 56 (OsUpgradeStart's job call). The kernel patches both: flash reads come from the staged copy, OS updates are refused.the kernel refuses it; 1.12 + Multitone bootssite-R1, site-U
3Stock start-up: MAIN OS runs at 0x40000400, its entry vector inside the image. A start-up that is stock 1.12's byte for byte (596 bytes; at 0x4000053E stock's calls or the platform loader's) is chained without the reset when the root's route bit is set.the kernel refuses it; a changed start-up is chained with the resetentry; startup (INFO, with --stock)
4Section 3 (MAIN OS) unpacks with stage 1's depacker; unpacked 1 MiB .. 4 MiB.not bootedmain-os, depack, image-size
5The container (the .syx decoded, from ELE3) is at most 3,145,216 B (3 MiB − 512).the slot refuses itcontainer-size, slot-v1, slot-v2
6Never write the SPI NOR (the flash holds Multitone).Multitone is gone; the unit needs a reflashnot on the file (emulator: step 4 below)
7Leave Multitone's RAM alone: 0x47800000..0x47F10000 (the staging window, then the kernel; its start-up stack above).the chain or the next boot failsram (code chunks of a DNFW build only)
8Leave Multitone's +Drive range alone: sectors 0x4D8000..0x5D7FFF (the root, then slots 1..62).firmwares lostnot on the file
9Optional: the healthy report. After 30 s of UI, if stage 1 booted you, clear the root's pending and tries (root: sector 0x4D8000, 32 B, 'MTRO', CRC-32).after 2 boots without it, 1.12 + Multitone boots until the user picks againnot on the file
10Optional: the 7D 03 receiver, so the Manager's Firmwares tab can install, pick and forget firmwares while yours runs. Spec: docs/protocol-7d03.md.the user switches to a firmware that has itreceiver (INFO)
11Optional: the boot screen. Booted by the kernel, draw no boot logo of your own and keep the kernel's progress bar until your UI, advancing it (only the bar's row, never a wait). The record and the frame: spec/boot-screen.md.the bar stops, or your logo shows over itnot on the file (emulator: scripts/emu_multitone_s1.py)

Tested on the DN2 (2026-11-25, 2026-11-26)

whatresult
chained boot of the picked slotworks; +2.3 s over a direct boot
PLAY held at power-onthe firmware list
STOP held at power-on1.12 + Multitone
a firmware that fails 2 boots in a row1.12 + Multitone boots
the healthy reportpending and tries cleared; the pick stays
the chain without the reset (route bit set)taken; the guest starts about 488 ms after the decision point (t_nobs)

Sources: Wishes repository, main: csrc/multitone/kernel.c (sites, entry), nobs.c, nobs_ref.h (the chain without the reset), s1.h, mt.h (limits, RAM, +Drive), guestrx.c (receiver, healthy report); this repository's docs/protocol-7d03.md.

2 · Managing Projects and Data

What a member firmware does with projects and the shared +Drive data. 1.12 + Multitone is a member like any other: registry line 0, Elektron . DN2 . 1.12, opens Elektron . DN2 . 1.0 . 1.12, runs types 0..4; it does rules 1 to 9 (its one record is the project settings').

#rulespecstatekit check
1Carry one MTFW descriptor made from your registry line: identity, own machine types, types run, open list, declared +Drive ranges.spec/identity.md 3.4BUILT · emulator--registry
2Write only stock's store (through stock's code), your line's ranges and the formats it implements. One sector, one owner. Only a format's owner changes its layout; a version you do not know: leave the range alone.spec/data-rule.md 1, 2BUILT · emulatordrive (declared ranges)
3Per-item data: the 14-byte link in the item's free place, the record in a DN2W cell. Edit only your own section and keep every other byte for byte; at most 488 B; section 3 alone is spelt as version 1.spec/envelope.md 2–4BUILT · emulator--drive: cells
4At every project save, stamp the settings' record (section 1): PID and MADE at the first stamped save, LAST and USES every save.spec/envelope.md 5BUILT · emulator--drive: project stamps
5Write the MTWS stamps (LAST, USES): a project slot's after stock's slot write, tied to its first sector; the working project's ahead of the power-off write, tied to the bank it fills.spec/envelope.md 6BUILT · emulator--drive: ws-stamp, stamp-sN
6Compatible: no stamp (it counts as Elektron . DN2 . 1.12) or LAST inside your open list; no MUST section of a firmware you do not know; only machine types you run.spec/data-rule.md 5.1BUILT · emulatorcompatible() in mtkit/mtdata.py
7At power-on, before stock reads the working project: not compatible, hold it (nothing written over it) and ask MADE WITH <NAME> <VER> / NEW PROJECT? NO: LOAD, or, with unsaved changes, <NAME> <VER>: UNSAVED / NEW LOSES IT. NO:LOAD. YES: an empty project. NO: held until stock's LOAD or NEW succeeds.spec/data-rule.md 5.2BUILT · emulatornot on the file
8Before a slot LOAD: not compatible, ask MADE WITH <NAME> <VER> / OPEN READ-ONLY? Y/N. YES opens it and refuses SAVE over its slot; NO does not open it.spec/data-rule.md 5.3BUILT · emulatornot on the file
9No save question before a switch (a USB PICK, a pick in the PLAY list): rule 7 keeps the project.spec/data-rule.md 5.4BUILT · emulatornot on the file
10Erase: ERASE MOD DATA your own formats and sections; ERASE ALL MOD DATA every registered range but stock's store and Multitone's root, stamps and slots; REMOVE FIRMWARE one slot, its header first. (Wishes: menu, link commands 70 and 71.)spec/data-rule.md 4BUILT · emulatornot on the file
11STOP held at power-on: 1.12 + Multitone acts as plain 1.12: no stamp read or written, nothing asked.spec/data-rule.md 5.5BUILT · DN2not on the file

Sources: Wishes repository, main: csrc/mtdata/ (record.c, stamp.c, boot.c, boot112.c, slotchk.c, slotchk112.c: the C a member copies), csrc/multitone/s1member.c (1.12 + Multitone as a member), csrc/sampler/eraseall.c. Emulator: the stage-1 gate's wsguard, slotchk and member steps, Wishes' erase step.

3 · Submit your firmware to the registry

  1. Run the kit on your build (section 4): python3 conformance/check.py BUILD.syx must pass.
  2. Fork w0ts/multitone and add one line to registry/firmwares.txt: the next free number, a 4-letter id, brand, name, your machine-type block, your +Drive sector ranges, your RAM ranges (the format is in the file's header), and your formats to registry/formats.txt. Steps: registry/README.md. Check it yourself: python3 registry/check.py.
  3. Open a pull request with your firmware's public repository and the kit's output.
  4. The registry check runs on the pull request: no overlap with any other line (machine types, +Drive, RAM). A maintainer merges; numbers are never reused.
  5. Build with your line: python3 conformance/check.py BUILD.syx --registry registry/firmwares.txt compares your build's descriptor with your registered line.

4 · Check your firmware

  1. Get the kit: git clone https://github.com/w0ts/multitone. Python 3.9 or later, nothing to install.
  2. Run it on your build (a .syx, or a .zip holding one):
    python3 conformance/check.py BUILD.syx --stock Digitone_II_OS1.12.syx
    --stock is Elektron's own 1.12 file; it adds the start-up compare.
  3. Read the lines. A pass: no FAIL line, exit code 0. Exit 1: a check failed. Exit 2: a file could not be read.
  4. Advanced, not in the kit's run: the emulator (Wishes repository, digikit's bench). scripts/emu_multitone_s1.py STAGE1.syx BUILD.syx boots your build through stage 1 and compares it with its direct boot; scripts/emu_multitone_p8.py checks that no SPI NOR write happens under an update request and key fuzz (rule 6).
  5. On the DN2: install it with the Manager, pick it, power on. Then check PLAY (the list shows it), STOP (1.12 + Multitone), and, if you report healthy, the Firmwares tab after 30 s: pending 0.

The checks

checkpasses when
syxthe file decodes; every data packet's checksum is right
containeran ELE3 container with a plausible section table
productproduct code 52: a Digitone II firmware
basethe container says OS 1.12
main-ossection 3 has destination 0x40000400, a stream length and a byte sum that match
depacksection 3 unpacks with stage 1's bounds
image-sizeunpacked MAIN OS 1,048,576 .. 4,194,304 B
entrythe entry vector (first word) points inside the image
site-R1, site-Uthe two kernel sites hold stock 1.12's bytes
container-sizecontainer ≤ 3,145,216 B
slot-v1a format v1 slot packs and its header reads back
slot-v2a format v2 slot packs inside stage 1's bounds and unpacks back to the same bytes
ramno code chunk of a DNFW build loads into 0x47800000..0x47F10000 (INFO when the build has no DNFW area)
stage1 (INFO)says whether the file is a Multitone stage 1 (a lone kernel code chunk at 0x47F00000 starting 'MTKT'): that one goes in the flash, not a slot
startup (INFO)with --stock: the 596 bytes stage 1 compares (0x4000045C, 0x400004E8, 0x40001992, 0x40001C14) equal stock's, at 0x4000053E stock's calls or the platform loader's: the chain without the reset (BUILT · DN2)
receiver (INFO)whether the 7D 03 header bytes are in the image (a hint, not a proof)
descriptor, linewith --registry: one MTFW descriptor that checks, its number's line, the same brand and name
types, types-lineits own types are its line's block; every type it runs is in some line's block
drive, line-ramits declared +Drive ranges inside its line's or a format it implements; its CODE chunks inside its line's RAM
opensits own identity is in its open list; every entry names a registry line, min ≤ max

Check a +Drive image

python3 conformance/check.py --drive IMAGE [--base SECTOR] [--all]

IMAGE is a whole +Drive (sector n at byte n × 512), or a dump that starts at sector --base. It reads, never writes. Each record is PASS (valid), FAIL (invalid) or INFO (absent, or valid but no longer tied: it reads as unstamped).

checkwhat
rootsector 0x4D8000: 'MTRO', version, CRC; pick, pending, tries, route
fw-slot Nfirmware slot N's header (v1, v2) and its payload's CRC-32
ws-stamp0x4D8001: the stamp checks, LAST and USES are right, its tie is the bank stock reads
stamp-sN0x4D8002 + N: the same, tied to project slot N's first sector
cell, cellsevery DN2W cell: its check, h0 and h1, its place (at most 64 cells on), kind, spelling, the record's fields; in a project settings' record, the project stamp (PID, MADE, LAST, USES naming the record's sections). --all lists every valid cell.

A pass (a Wishes build, 2026-11-25)

PASS  site-R1         the SPI NOR read routine's entry at 0x401353ae: 4f ef ff f4 48 d7 04 0c
PASS  site-U          OsUpgradeStart's job call at 0x4012681c: 4e b9 40 12 9c 56
PASS  container-size  container 2,056,352 B; a slot takes up to 3,145,216 B
PASS  slot-v2         format v2: 4,461,352 B (image 3,757,184 B, ranges 0x0+16,336, 0x14e348+687,448), unpacks back to the same bytes
PASS  ram             10 CODE chunks, none inside Multitone's RAM 0x47800000..0x47F10000
INFO  startup         start-up is stock's (the 596 bytes stage 1 compares; at 0x4000053E stock's calls or the platform loader's): eligible for the chain without the reset
...
DN2wishes_v0.71.1-mts2_b7d31092_TEST.syx: every check passed

For page and tool authors: the 7D 03 host side

commandwhat it does
python3 conformance/host.py replay CAPTURE.syx --firmware BUILD.syxPlays the SysEx your tool sent (saved from a MIDI monitor) into a fake DN2 built from the protocol document. FAIL on: a frame the DN2 ignores, any status but 0, BEGIN2 before INFO, a bad name, an install without END, a slot stage 1 would not boot, slot bytes that differ from the kit's own pack.
python3 conformance/host.py serveA fake DN2 on stdin/stdout: one request per line in hex, one reply per line. --no-drive: status 4 to everything.
python3 conformance/host.py demo BUILD.syx --capture OUT.syxThe kit's reference host installs the build (v1 and v2), picks and forgets it; OUT.syx is a capture that passes replay, to compare with yours.

The kit's own tests

python3 -m unittest discover -s conformance/tests

They check the kit against docs/protocol-7d03.md (frames, status, commands, stock 1.12's sizes and CRCs) and its shared-data code (mtkit/mtdata.py: compatible(), the link, the stamps, the cells) against the cases of the kernel's C host tests. File tests run when DN2_OS112 (stock 1.12) and MT_GUEST_SYX (a guest build) are set, and skip otherwise. No firmware is in the repository.