Repository navigation
Machine: Digitone II development link, stage one (read-only diagnostics over USB MIDI) - #1763
prodbysmolec wants to merge 23 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>
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
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>
There was a problem hiding this comment.
Thanks for the Digitone II link work. Two things before this can go further:
- GitGuardian flagged one possible secret in this pull request. Please open its details, check what it found, and remove it from the commits if it is real. If it is a false positive (for example a test byte pattern), say so here.
- Please merge the current
maininto your branch and runnpm run pr:readyuntil it says Ready, so the pull request shows only your link change. This one belongs on the cumulative base pull request #1767, so the checks will also need to be green after that merge.
See https://github.com/repeat98/modwerk/blob/main/docs/DEVELOPER_WORKFLOW.md#make-it-mergeable for the steps.
|
The screen reader can accept the wrong chunk. In Please advance the sequence per request and check the echoed address and exact decoded length before accepting a chunk. A host test with a delayed previous reply and one with a short reply would cover both cases without a unit. |
…chine/digitone-ii-link
…m reply only for its address and exact length A late reply to the previous chunk or a short reply could reach the screen decoder. Host tests cover both without a unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, fixed in 6d07f4c:
GitGuardian: false positive. It flags |
|
The host tests cover reply ordering and length. One device-side issue remains. A USB client can ask for bytes at an address it chooses anywhere in the supported RAM regions. That gives a client access to unrelated instrument state when it asks for a screen capture. Could you expose the screen and link counters as bounded diagnostic operations, with the device selecting the data each operation returns? Please cover refusal of reads outside those diagnostic buffers. The panel and log PRs can then build on that narrower interface. |
…chine/digitone-ii-link # Conflicts: # sdk/machines/digitone-ii/GOAL.md
…screen), no read at a client's address mem (0x21) is gone. screen OFF (0x20) copies the frame on the screen at OFF 0 and sends eight 128-byte parts of that copy with its number, after checking stock's frame pointer lies wholly in DDR. A host C test compiles link.c and covers both requests and every refusal: offsets past or between parts, a part before any copy, a pointer outside DDR, the old mem at any address, every other command and another link version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n command, eight parts of one copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
What changed: the unit now chooses what each request returns.
Guides: |
… key link link.c keeps the keys and turns and takes repeat98#1763's screen in place of mem; one host fixture covers both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omes in parts the unit reads itself (log OFF) mem is gone, so link.c answers log OFF (0x24) with up to 128 bytes of diag.c's log and its seq; dn2_link.py diag --save and the site's readLog read part 0, the rest, then part 0 again, and keep only a log that stood still. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t: bootdiag gets its own request With mem gone, bootdiag (0x25) sends the gate's 15 words and the two marks the base itself writes; the host reads them with one request. 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>
|
To let you review the whole interface in one place: the later PRs now build on it. Each was merged down the stack and pushed, and none of them reads memory at an address a client names.
The site's client ( |
|
Thanks, this is the interface I asked for: Two things before this goes into
|
|
One more thing, and this one is on me: I just merged |
…chine/digitone-ii-link # Conflicts: # src/engine/elektron/dn2-link.ts
|
Thanks for the merge. One more thing for this PR: the site's client still has the old The unit run on the top head and the description update from my last comment are still open. After that, please carry the base merge up through #1820, #1821, #1842 and #2003. For you: I pushed |
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>
|
Where the stack stands: the code review points on #1763, #1817, #1820, #1821 and #1842 are all answered now. Thanks for the quick round this morning. What's left is the unit session and the descriptions. The checklist below gathers every case my comments asked for, so one sitting covers the whole stack, plus #2003 and #1819. I pushed to two of your branches. Please pull before you work on them:
My Next step (yours, on the unit): the session below. Then put its record, with the package's SHA-256, on each PR, refresh the descriptions, and mark them ready. I merge them down in order: #1763 → #1817 → #1820 → #1821, then #1842. One unit session: the checklistA. The dev package of #1842's head. It carries #1763, #1817, #1820 and #1821. Note its SHA-256 first. For the refusals, the CLI has no raw request, so send one through the tool's own #1763, the link:
#1817, keys:
#1820, diagnostics:
#1821, RAM boot:
#1842, loader:
B. #2003, Voice Spread, on the plain base (no link, as the page builds it)
C. #1819, installing from the page
|
|
Where the stack stands: the code points from my last round are answered. Holding back the link's key events at UPGRADE OS NOW? (#1817) and letting only ramboot's own marked YES through (#1821) are what the prompt needs, and it's good you caught the release case on the unit. What's left is the unit session and the descriptions, then I merge the five down in order. Three additions to the unit session:
The rest stands as before: one session on #1842's head |
base/digitone-ii-next), which already holds Machine: Digitone II base for OS 1.12 (from the Digitakt II base) #1760.dev,machine:base --dev, as the Rytm's link):base/link.sobserves stock's SysEx router at 0x4012197a (the site core-dn2 0.3'sev_sysexuses; the replacedlea SYSEX_TABLE,a3is checked by SHA-256 like every site) and passes the message (a1), length (d1) and source (d2) tolink.c, then restores every register and lets stock route as before.link.ckeeps the link's own messages from USB in a ring and answers them fromev_tickthrough stock'ssysex_send(0x401236d2, port 2), in the Rytm link's wire format:ident(link version, received, dropped, ticks) andmem(up to 128 bytes of DDR or SRAM). No keys, screen, remote YES or RAM boot yet. A host (sdk/machines/digitone-ii/tools/dn2_link.py:ident,mem, andscreen, which reads stock's frame pointer and the 128x64 frame throughmemand prints it or writes a PNG) with tests of its frames and the screen layout; the link waits a tick while stock's USB MIDI parser is mid-SysEx (0x445090ac);LINK.md, the goal row, the base README and a changelog entry.npm run pr:ready(Ready). On my own stock 1.12 with the reviewed toolchain:npm run machine:base -- digitone-ii --devbuilds the development package7b14964a…(.run 4,712, .bss 3,572 bytes; 15 sites; the codegen check passes); linked withhello-marker-dn2and verified (sections 2, 4, 5, 7 and 8 byte for byte, the in-place depack, 1.9 MB container under the unit's limit). The release variant is unchanged (7a60d82e…)..syxf580bf70; the first build, 7b14964a, before the mid-SysEx wait, too), my Digitone II on OS 1.12, flashed with Transfer:identanswered every request (received counted up, dropped 0, ticks rising),mem 0x47f00000 64returned the start of the package's.runas built with its relocation filled in,screenshowed the unit's screen as it was (pattern A01, UNTITLED, 120.0, the SYN 4 page), and requests out of range came back with status 4 (record). Not tested: a request while other SysEx runs on USB, a request over DIN, long sessions.Edge cases
identrepeatedly on the unitmemmust refuse outside DDR and SRAM and over 128 bytesmem 0x0 16,mem 0x47f00000 200memscreenon the unitLINK.mdsays what is not ported yet, among it the Rytm's wait while stock is mid-SysEx on USB, whose Digitone II address is not found.🤖 Generated with Claude Code