Repository navigation
Digitone II: the runtime loader in the development base, over the link - #1842
prodbysmolec wants to merge 100 commits into
Conversation
…SB MIDI SysEx Development bases (base.json's dev) observe stock's SysEx router at 0x4012197a (core-dn2 0.3's ev_sysex site) and answer the Analog Rytm MKII link's ident and mem requests from ev_tick through stock's sysex_send on USB. A host (tools/dn2_link.py) with a test of its frames, LINK.md, the goal row and a changelog entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chine/digitone-ii-link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The status byte of stock's USB MIDI receive parser, 0x445090ac on OS 1.12, reads 0xF0 while a SysEx message arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, not yet on a unit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…host on a unit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and the encoder pushes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot yet on a unit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…red rate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot on a unit) DIAG, MARK and DIAG_STAGE are defined after their first use in link.c: move that block up before building. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upload is copied to 0x47000000 before the reset, because the bootstrap reads the flashed MAIN OS into the staged upload. Host ramboot and bootdiag; LINK.md; a test that the host's limits are the gate's. Not yet on a unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the same Every Digitone II address link.c held (keys, the upload buffer, the RAM boot's copy and diagnostics, stock's boot argument, wait and drain) is a cflag in base.json, as the owner asked for one link with each machine's addresses in its recipe. The built package's sections, symbols and relocations are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the link Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto the loader: ident sends the modules' test value itself Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oader # Conflicts: # sdk/tests/test_dn2_link.py
…n names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Point 1 is done, and the stack now carries #1763's bounded interface all the way down (4bb7a28). Not run on a unit yet (not on USB today).
|
|
Thanks, no One small new thing for when you do the unit run: The rest is as in my last comment: the rerun on this head's dev package with its SHA-256 and the |
…chine/digitone-ii-link # Conflicts: # src/engine/elektron/dn2-link.ts
…achine/digitone-ii-link-keys
…nto machine/digitone-ii-diagnostics # Conflicts: # src/engine/elektron/dn2-link.ts
…oader # Conflicts: # sdk/runtime/loader/README.md # sdk/tests/test_machine_base.py
The unit refuses 0x21 since the link became bounded, so mem, MEM_MAX, read() and the readLog that read through them are gone, with their tests. repeat98#1820 brings the log back through log OFF (0x24). The fake unit now refuses every command link.c does not serve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diagnostics # Conflicts: # src/engine/elektron/dn2-link.test.ts # src/engine/elektron/dn2-link.ts
Since HELLO names the build (its layout digest), no base reports the fixed text's SHA-256 any more, and nothing outside the tests used it. dn2-link.test.ts names its own test base so nothing binds an offer to a fixed string by mistake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a unit, the link held YES while an OS upload completed, then 'release' posted YES's key-up, and stock started the flash: it answers the prompt on the release as on the press. At the prompt mw_link_key now takes every key event the link posted, releases included, and counts it as refused; a person's YES and NO still reach stock. The host test asserted the old behaviour and now checks the release is taken (it fails against the old dispatch). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ii-ramboot # Conflicts: # sdk/machines/digitone-ii/LINK.md
With the link's releases held back at UPGRADE OS NOW? (repeat98#1817), ramboot's YES would be held back too: until now its press was taken at dispatch and only its release reached stock, which answered the prompt with it. The two events ramboot posts for the upload it checked (length and CRC32) are now marked in the pending queue and pass; any other key event the link posted is still taken. The host test checks both reach stock, and fails when the release is posted unmarked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oader # Conflicts: # sdk/tests/dn2_link_host.c
Digitone II, piece 5: the runtime loader in the development base. Stacked on #1763, #1817, #1820 and #1821: this branch carries their current heads until they merge into
base/digitone-ii-next; then I merge that branch here so the diff holds only the loader.RUNTIME_POOL_ATis settled: #1910 put it onmain, and withmainmerged,loader.c, the Octatrack base and its test are out of this diff.What was wrong or hard: The Digitone II had no way to try a module without building and flashing a whole OS. The Octatrack's machine-neutral loader (
sdk/runtime/loader) and its upload controller (sdk/runtime/upload) needed the Digitone II's glue, a transport, and a place for the pool: the base's area holds 256 KiB, the pool 2 MiB.What this changes:
sdk/machines/digitone-ii/elekloader/base/runtime.c: the Digitone II's glue, the Octatrack's with OS 1.12's values. Stopped is the sequencer's playing word. Modules run from the uncached alias (+0x08000000). The instruction caches are invalidated with stock's CACR value minus DCINVA, since the boot value would drop dirty data lines at runtime. Patchable code is the OS's code in RAM (0x40000400-0x401d0800). The lock is interrupt level 4, so the frame interrupt (level 5) keeps the sound going. Paused tasks come from all sixteen task records, each found from stock'stask_createcalls. The trampolines sit on the core'sev_tick,ev_draw,ev_keyandev_enc; the encoder delta is the raw count, as Digitakt II mods read it.link.c: anuploadcommand (0x30) carries one controller frame, 7-bit packed, in its own slot (stock passes link messages up to at least 8 KB). The UI task runs it. A trial whose host is silent for ten seconds rolls back once the unit is stopped.identalso reports the modules live and the modules' test value itself (no address for the host to read, since Machine: Digitone II development link, stage one (read-only diagnostics over USB MIDI) #1763's reads are bounded).RUNTIME_POOL_AT, from Octatrack base 0.8: playback admission, saved effects, restore outcomes, stock OS fixes and screen capture, with FM Synth 0.1.5 and Tape Echo 0.1.9 #1910 onmain): the Digitone II uses DDR above what stock clears (0x46800000, 2 MiB), with staging after it.scripts/machine-base.py: a dev base'ssharedstages repository sources (the loader, the controller,freestanding.c) beside its own.dn2_link.py:loader,try [--seconds] [--keep],remove [--keep],keep,undo.sdk/machines/digitone-ii/LOADER.md(how each value was found), LINK.md, GOAL.md, the loader's porting notes. Changelog entry.How I checked it:
npm run pr:ready.sdk/tests/test_runtime_loader.py(unchanged, green with and without the new define).sdk/tests/test_dn2_link.py: new upload tests (the frame and its packing, the largest frame fits the slot, the response fields, removal packages, the pool and staging inside the free DDR). Itsunittest.main()sat mid-file, so a direct run skipped later classes; it now ends the file.sdk/tests/test_machine_base.py: shared staging, and a source must be staged. One existing assertion changed: "every dev source is a file of the machine's base folder" now also accepts a file staged byshared, and checks that the staged file exists. Please look at that.Tested on a unit: development package e4dfa5abc4b2fdbf701a03781ce38d7708e90a5b15ed9b3ace5e4619f4cccdc1 (.syx 9655e19e…), Digitone II OS 1.12, booted from RAM; the loader's trial, Keep, removal and hooks ran.
To run again on this head (before HELLO named the build, the record above is for the earlier package): trial, Keep, removal and the refusal while playing on the resulting dev package,
try --basewith its.identityaccepted and another build's refused, and the package's SHA-256 in the record.Details of the unit run:
.syx9655e19e…988e, main CRC 304cfcdc, development packagee4dfa5ab…cdc1, after merging main. The same steps ran first on the build before the merge.docs/verification/2026-11-20-digitone-ii-runtime-loader-on-a-unit.md.jsr 0x40113e2aat 0x4002e4c0 (frame composition) to count redraws, ran, and its removal restored the stock bytes; ten keep/remove rounds, the log START only.The developer's own stage: with nine modules live at once (nearly the whole pool), they played a pattern and turned knobs: "alles lingt normal" ("everything sounds normal").
Edge cases
trytry --keepof the tick counter, thencorner_dotcorner_dotkept, then a build with the dot moved left under the same idjsrat 0x4002e4c0, ten keep and remove roundsremove, then undo, thenremove --keepidentboot 0, the flashed basedn2_link_host.c: link.c with one build's layout digest and the real upload controller, an offer bound to a second buildAlso:
dn2_link.py's load leaves upload mode at once after a refusal (abort, then leave), and the example modulesdk/machines/digitone-ii/examples/corner_dot.cran on the unit.sdk/runtime/loader/README.md#porting-to-another-machine. The verification records on this branch beyond the new one come from the stacked pull requests.🤖 Generated with Claude Code