Repository navigation
Digitone II: the runtime loader in the development base, over the link - #1842
Draft
prodbysmolec wants to merge 142 commits into
Draft
prodbysmolec wants to merge 142 commits into
prodbysmolec wants to merge 142 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>
…oader # Conflicts: # sdk/machines/digitone-ii/GOAL.md
This was referenced Dec 5, 2026
…site reads it The base said version 2 but paged only the log (6,148 bytes), and device-log.ts refuses a version 2 log without the crash and stall records after it: on a unit, parseDeviceLog read nothing. LOG now pages DIAG_IMAGE_BYTES as on the Octatrack, the records zero, and a test reads a Digitone II image and refuses the log alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…silence On a unit the port disappeared during the reset and rtmidi raised InvalidPortError (or the port list changed under it), ending the command after the RAM boot had gone through. ask_ident_once now treats a port it cannot open as no answer yet. Host only: the package is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r not (measured on a unit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… about 2 s, not 3 (measured on a unit) 60 UI ticks at about 30 a second: a freeze request was refused until 1.67 s after a person's press and accepted at 1.93 s (5 December 2026). Text only; the package is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diagnostics # Conflicts: # sdk/machines/digitone-ii/LINK.md # sdk/machines/digitone-ii/tools/dn2_link.py
…ii-ramboot # Conflicts: # sdk/machines/digitone-ii/LINK.md # sdk/machines/digitone-ii/tools/dn2_link.py
…oader # Conflicts: # sdk/machines/digitone-ii/tools/dn2_link.py
… of the base's HELLO identity) The 2 s correction stays in LINK.md and the tool; link.c's comment follows with its next real change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…INK.md and GOAL.md One record for both sittings on the stack's development package a158dc91 (.syx 436b2afe), built from repeat98#1842 at 5a9aa01: the test procedure's fixed steps first, each run or not run with why (the runner has no Digitone II steps yet), then each PR's cases. Listening and the large flood's audio stay open. The link row and LINK.md now point at it; the 19 November run stays as history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at a late event costs a person The link's events stay held back at UPGRADE OS NOW? however late stock dispatches them; after the link has given up an event, a person's press of the same key can be held back once, so their first YES may do nothing (repeat98#1763 review, 5 December). The link row points at the new record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diagnostics Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ii-ramboot The RAM boot row points at the 5 December record too: this version, where ramboot's own marked YES answers the prompt, ran on a unit there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oader The loader row points at the 5 December record: this head's RAM boot and loader ran on a unit there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er on 5 December Over the unit's USB audio, with 250,000 foreign SysEx sent while a pattern played, every trig interval stayed 0.48 to 0.52 s before, during and after the flood, so the sound and the sequencer go on while the UI stands still. The developer listened to Voice Spread chords on this package and said it sounded good. The sound during the RAM boot's CRC at UPGRADE OS NOW? and during a loader trial stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (Jannik checked it on 1 December: the base branch already accepts asharedsource, and this only adds the check).Tested on a unit (5 December 2026): development package
a158dc917c68d70c61d895085da9f6451dafa6c54ee198a27a50dd061a641583(HELLO base44f30887…,.syx436b2afe93075f937142da2face861bc140b7611729f3e868c1f95afbdabfb1b), built from this branch at5a9aa0137afterbase/digitone-ii-nextwas merged up. This head (3b2da45e4) rebuilds the same SHA-256: since5a9aa0137only LINK.md, GOAL.md, the host tool, its test and the record changed. The record, both sittings: docs/verification/2026-12-05-digitone-ii-dev-stack-on-a-unit.md. Results: a trial rolled back after 5 s; a trial kept with--baseand the build's.identity, withcorner_dot's dot on the screen; the removal kept; another build's.identityrefused before sending; with the pattern playing from the link, a trial refused ("unsafe (the unit plays: stop it)"). Listening: the developer listened to Voice Spread chords on this package linked with Voice Spread and said it sounded good; this stack changes no sound path. The sound during a loader trial was not measured.Earlier, on 20 November: development package e4dfa5abc4b2fdbf701a03781ce38d7708e90a5b15ed9b3ace5e4619f4cccdc1 (.syx 9655e19e…), Digitone II OS 1.12, booted from RAM; the loader's trial, Keep, removal and hooks ran.
Details of the 20 November 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 build.identitybefore sending; the unit's own refusal not runAlso:
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