Skip to content

Machine: Digitone II RAM boot over the development link (piece 5, stage one) - #1821

Open
prodbysmolec wants to merge 110 commits into
repeat98:base/digitone-ii-nextfrom
prodbysmolec:machine/digitone-ii-ramboot
Open

prodbysmolec wants to merge 110 commits into
repeat98:base/digitone-ii-nextfrom
prodbysmolec:machine/digitone-ii-ramboot

Conversation

@prodbysmolec

@prodbysmolec prodbysmolec commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator
  • What was wrong or hard: Piece 5 of the Digitone II goal starts with a trial in RAM: every test so far wrote the flash. The Rytm link boots an image from RAM; the Digitone II had none of the addresses, and one thing differs. Builds on Machine: Digitone II diagnostics log, the Octatrack's layout, over the development link #1820 (this branch holds its commits, Machine: Digitone II development link, stage two (panel keys and encoders over USB MIDI) #1817's and Machine: Digitone II development link, stage one (read-only diagnostics over USB MIDI) #1763's): please review it after them.
  • What this changes: Development bases only. The Rytm link's RAM boot at OS 1.12's addresses (link.s, link.c): ramboot (armed) presses YES at UPGRADE OS NOW?; a site at the upgrade job's call of the erase-and-write routine (0x4010921c -> 0x40139104) resets instead when asked, after stock's wait and drain, with the data cache written out and off; a gate at 0x4000053e (the same 8 bytes as the Rytm's 0x400008c6, before stock fills SRAM and clears its RAM) checks the mailbox, unpacks with the Rytm link's depacker and enters the image. The difference: the Digitone II's bootstrap reads the flashed MAIN OS to 0x40400000, inside the staged upload (0x4038bec0), so the container is copied to 0x47000000 before the reset; the CRCs guard it. The same reset (0x80 to 0xec090000 after 27 nops) and cache settings (0xa50ce100) as the Rytm's 1.74. There is no remote YES for a flash: only a person's YES writes the flash. Host ramboot and bootdiag, LINK.md's RAM boot section, a test that the host's limits are the gate's, a changelog entry.
  • How I checked it: npm run pr:ready; the gate's CRC, container parse and depacker, compiled for a computer from link.c, unpacked the development image's container to the linker's main OS byte for byte (202fa0da…), and its four numbers match the host's.
  • Tested on a unit: on 5 December 2026, the stack's development package a158dc917c68d70c61d895085da9f6451dafa6c54ee198a27a50dd061a641583 (HELLO base 44f30887…, .syx 436b2afe93075f937142da2face861bc140b7611729f3e868c1f95afbdabfb1b), built from Digitone II: the runtime loader in the development base, over the link #1842 at 5a9aa0137 after base/digitone-ii-next was merged up, so it carries this branch; Digitone II: the runtime loader in the development base, over the link #1842's last head rebuilds the same SHA-256 (record, both sittings): four RAM boots in a row, three of them from a RAM-booted base, each boot 1 with the image's CRC f0aebc69; a RAM boot whose boot gate fails (unpacked CRC one bit off) came back with status 0, then boot 8: the flashed OS with its own HELLO, nothing written; at UPGRADE OS NOW? a container CRC that does not match came back with status 7, the prompt still waited, and a correct ramboot then answered it from RAM; the CRC over the full 1.9 MB container answered status 7 after 0.22 s and OK after 0.39 s. 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 that CRC was not measured. Earlier, on 20 November: development base 6f72efd1 (this code before the addresses moved into the recipe, the same sections), my Digitone II: flashed with the marker (.syx 70634720); ramboot of the image without it (.syx 59800fb7) booted from RAM, ident boot 1 with the image's own CRC, the marker gone; a power cycle brought the flashed image back; then stock 1.12 flashed normally from this base (record). Seen: RSR reads 0x20 after a power cycle too, so the mailbox, not RSR, is what keeps a power cycle from booting from RAM. Not tested: cancelling by a press or disarm.
    Edge cases
Case Why this change makes it a risk How run Result
A RAM boot of an image without the marker it must boot from RAM, not flash ramboot, no hand on the unit pass: boot 1, CRC its own
A power cycle after the flashed OS must come back the developer power-cycled pass: boot 0, marker back
A normal flash from this base the new site in the upgrade path must pass it through stock 1.12 over USB, YES pass: it installed
A failing check the gate must boot the flashed OS a RAM boot with the unpacked CRC one bit off, 5 December pass: status 0, boot 8, the flashed OS, nothing written
A container CRC that does not match the prompt must keep waiting at UPGRADE OS NOW?, 5 December pass: status 7, the prompt still waited, a correct ramboot then answered it
The CRC over a full-size image at the prompt the unit stands still while it runs ramboot at UPGRADE OS NOW?, 5 December 0.22 s to status 7, 0.39 s to OK; stock's frame counter already stands still while the prompt waits; the sound: not measured
A cancelled request the gate must boot the flashed OS not run not run: not tried yet
Repeated RAM boots the gate and the copy each time many RAM boots during #1842's tests pass: every one booted from RAM; four in a row on 5 December, three from a RAM-booted base
  • What the guides lacked or got wrong, and where I fixed it: LINK.md's RAM boot section says what differs from the Rytm's and why.

🤖 Generated with Claude Code

prodbysmolec and others added 26 commits November 19, 2026 03:03
…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>
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>
@gitguardian

gitguardian Bot commented Nov 20, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
40376663 Triggered Generic High Entropy Secret 19be13a src/community/agent-sessions.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 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.

prodbysmolec and others added 2 commits November 20, 2026 01:40
… 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>
prodbysmolec and others added 29 commits November 30, 2026 12:08
…ii-ramboot

# Conflicts:
#	sdk/tests/dn2_link_host.c
pend gave up a posted event after about a second, so a press or release
stock dispatched later than that counted as a person's and reached the
prompt (repeat98#1817 review). Now pend keeps the link's events while the prompt
waits, and what it gave up earlier goes into a ring of lost events that
the prompt holds back however late they come. A person's identical press
is held back once instead, the side that never flashes. The host test
covers a lag before and during the prompt, for a key and a turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diagnostics

# Conflicts:
#	sdk/machines/digitone-ii/elekloader/base/link.c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 19 November records come from builds that still read through mem
(review on repeat98#1763, 1 December).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diagnostics

# Conflicts:
#	sdk/machines/digitone-ii/GOAL.md
…ii-ramboot

# Conflicts:
#	sdk/machines/digitone-ii/GOAL.md
…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
… 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>
…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

No deployments
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.

2 participants