Repository navigation
Conversation
…s own sites (held-sites.h from machine:base), and the paused guard sized to 2 x TASKS (from the Rytm's review on repeat98#1934) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ompiler, the host stand-in named Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, this is the right fix, and it matches the Rytm's lines exactly. Model:Cycles base changes go on one cumulative draft, so I've started Please send the next Model:Cycles base change to that branch: cut from it, merge |
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.
What this fixes: on the Model:Cycles base, a module loaded over USB could patch over the base's own code. Its runtime glue allowed every stock address, so a module site overlapping one of the base's sites would replace the base's code with bytes the loader took for stock. Musically nothing changes until the base is rebuilt: nobody loads modules onto a Model:Cycles today (its base is unreleased, beta downloads only).
Who must act: someone with the Model:Cycles OS 1.13 file (@repeat98 or the Model:Cycles' developer) runs
npm run machine:base -- model-cycles --stock <OS> --writeand records the new identity; I don't have the OS file here. Not run on a unit.This is the Analog Rytm MKII's fix from @repeat98's review of #1934, brought to the Model:Cycles:
scripts/machine-base.pywritesheld-sites.hbeside a stagedruntime.c, holding the core's and base.json's sites as address ranges. These are the same lines as onbase/analog-rytm-mkii-next(commit 4fd9e10), copied byte for byte so the two branches merge cleanly. They also bring base-next'sversionlines, which do nothing on main (no base.json there has a top-levelversion).sdk/machines/model-cycles/elekloader/base/runtime.c:patchablerefuses any module site that touches a held range. Thepaused()guard is nowmax < 2u * TASKSwith a_Static_assert(2u * TASKS <= RUNTIME_PAUSED). The old2*TASKS+1was harmless with the Model:Cycles' 12 tasks; with the Rytm's 16 it refused every switch with sites.Tests and evidence
sdk/tests/test_machine_base.py::test_a_model_cycles_runtime_module_never_patches_over_the_base: the staged ranges equal the pinned package646706ff's 8 sites exactly. The realruntime.cbuilt on the host refuses every site, its last byte and a run-in, and allows the gaps between them. 33 tests pass.npm run checkpassed on 6be9e7c (the two review edits after it touch only a test skip and a comment).What the guides lacked: nothing kept a runtime module off a machine base's own sites. The Octatrack has its event list, but the elemod machines had no equivalent.
sdk/machines/model-cycles/LINK.mdnow says so.🤖 Generated with Claude Code