Skip to content

Improvement: Modwerk's own core for the Model:Cycles base - #2394

Merged
repeat98 merged 6 commits into
mainfrom
base/mc-own-core
Nov 30, 2026
Merged

repeat98 merged 6 commits into
mainfrom
base/mc-own-core

Conversation

@repeat98

@repeat98 repeat98 commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

What this is: the Model:Cycles base's core parts (core-mc/mod.json, fw.s, boot.s) and its public header (include/model-cycles/core.h, core.inc) are now Modwerk's own source (GPL-2.0-or-later, so it links beside GPL-2.0-only modules), at the same paths. The hook bus it builds on is on main since the Rytm PR (#2399); main is merged in and the base still rebuilds as dda53ffd.

  • Works (software, with the stock OS 1.13): the base rebuilds from source as dda53ffd (was e7958028 on the hook bus draft) and passes its keeps check against the release it started from. Its sites, exports, imports, collections and section sizes equal the previous base's. All 25 firmware addresses equal the earlier core's, pinned by a new test. core.h compiles for the host and the target. test_machine_base.py, the elekloader and elektron tests, modules:check and elekloader:check pass.
  • Ran on a Model:Cycles (durchgemacht's unit, results): release dda53ffd flashed and the development base from the same head RAM-booted, at PR head c7ee00ad0 with the stock OS 1.13. Boot, ev_boot, development RAM boot, tick, draw, keys, encoders, key LEDs, the USB link, LOG, audio load, and runtime trials with keep and undo all pass; the stock OS restores the unit. Nothing is broken. One USB re-enumeration hiccup after two RAM boots in a row did not repeat. Not run: Windows, DIN MIDI.
  • Musically: nothing changes; there are no Model:Cycles modules yet.
  • Who acts: nobody; durchgemacht's next base PR (machine table and switches on this core) targets base/model-cycles-next once this is in main and merged there.

Tested on a unit: base dda53ffd, Model:Cycles (durchgemacht's unit, stock OS 1.13), release flashed and dev base RAM-booted: boot, ev_boot, tick, draw, keys, encoders, key LEDs, USB link, LOG, load, trials with keep and undo.

Edge cases

Case Why this change makes it a risk How run Result
base rebuild against the release it started from new core recipe, firmware addresses and core_boot_init npm run machine:base -- model-cycles --stock <OS> (keeps check) and the fw_* value test pass
boot, ev_boot and the development RAM boot core_boot_init is new code durchgemacht's unit: release flashed, dev RAM-booted pass
tick, draw, keys, encoders and key LEDs the header's helpers are new code durchgemacht's unit: freeze, two ev_draw modules, grab, an ev_key_leds mod pass
USB link, LOG, audio load, runtime trial with keep and undo they run on this base durchgemacht's unit: ident, log, load, try/keep/undo, 60 s trial, Ctrl-C trial pass
Details
  • The core sites now live in base.json common.sites (address, length and SHA-256, in the same order), so the recipe has no stock hex.
  • test_machine_base.py: the "unchanged import" test for this core became a test that it is Modwerk's own source, and the hooks test reads the sites from base.json. Every other imported file stays pinned.
  • There's a new catalogue record for the package; the old packages stay in the catalogue.
  • The include/mc/core.h header is still GPL-2.0-or-later and was left as is.
  • main merged in (592bb8748): machine.json keeps this summary and main's deviceMaintainer; test_machine_base.py keeps OWN_CORE beside main's RYTM_CORE. npm run machine:base -- model-cycles --stock <OS 1.13> still gives dda53ffd with main's builder.

Guides: nothing; they were updated with the change.

🤖 Generated with Claude Code

repeat98 and others added 4 commits November 28, 2026 19:21
The Model:Cycles core is now Modwerk's own source (GPL-3.0-or-later), at
the paths of the core-mc 0.3 files it replaces, written from a behavioural
spec: the recipe (core-mc/mod.json), the 25 firmware locations by name
(fw.s), ev_boot (boot.s, core_boot_init) and their C and assembly
declarations (include/model-cycles/core.h, core.inc). The core's five stock
sites moved to base.json's common, named by length and SHA-256, so the
recipe holds no stock bytes; the package keeps today's site order.

Model:Cycles 1.13: 485c526a -> c8e9966a, recorded with machine:base
--write; a second run matches. Sections (.boot 94, .run 38250, .bss
115796) and 8 sites are unchanged; exports, imports, sites, collections,
contributions and every fw_* value equal 485c526a's. The old packages
stay in the catalogue.

test_machine_base.py: the core-mc 0.3 source test pinned files that are
no longer imported, so it becomes a test that every file of that import
is now Modwerk's own (OWN_CORE beside HOOK_BUS, GPL-3.0 SPDX, hashes
differ from the record, which stays as history). The hooks test reads the
core sites from base.json common instead of the recipe's stock hex. A new
test checks every fw_* value of the bound package against core-mc 0.3,
which keeps (names only) does not. Every other file stays pinned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
One dated record names the package of the previous commit (Model:Cycles
c8e9966a). Its licence follows the new core's recipe: GPL-3.0-or-later.
The older packages and their records stay, so older evidence still
relinks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its five files now carry GPL-2.0-or-later like the hook bus they sit on,
and the base is re-recorded on the relicensed bus: dda53ffd (code as
c8e9966a; only licence lines differ).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@repeat98
repeat98 changed the base branch from base/hookbus to main November 28, 2026 19:16
@repeat98

Copy link
Copy Markdown
Owner Author

One PR per device now. This PR targets main and carries Modwerk's own hook bus for this machine (from the closed #2392) together with its core, so a tester can build and test this device from this branch alone. Until one of the Digitakt II, Rytm and Model:Cycles PRs merges, the diff also shows the shared bus files for the other two.

@durchgemacht

Copy link
Copy Markdown
Contributor

The own-core Model:Cycles base runs on my unit. Release dda53ffd is flashed and passes everything the 25 November round covered; the development base built from the same head passes the dev-only steps from a RAM boot. Nothing is broken. One USB re-enumeration hiccup after a RAM boot did not repeat (below). The unit stays on dda53ffd.

Build and results

PR head c7ee00ad0, stock 1.13 (44fe5862…), kit 3b31ef3, m68k-elf GCC 16.2.0 / binutils 2.47.

Image Base Set CRC / bytes How
release, label OC01 dda53ffd (matches base-binding.json; byte-equal to the package in the PR) 0x6efeb35b / 38308 flashed with Transfer
development, label OC0D dev ea5315a9 0xed7d96cb / 42332 RAM boot
development + an ev_key_leds test mod (TRIG 16 blinks), label OC0L dev ea5315a9 0xa0b1896d / 42428 RAM boot

Test modules are the ones from the 25 November round, unchanged (built against the old core), so they also show the exports still line up.

# Check Result
1 RAM boot of OC0D from the flashed 25 November dev base pass: booted from RAM, identity as above
2 frames (own site) try 5 s, keep, remove; mem 0x40007678 6 after each pass: stock 4e b9 40 07 00 a4, kept 4e b9 4f e1 6e 00, stock again
3 two ev_draw modules kept, one removed pass: both draw, the other stays, 1 live
4 grab (ev_key, ev_enc) on trial 15 s pass: keys and knobs taken, back to stock after the trial
5 freeze (ev_tick held 6 s), playing; trial while playing; log pass: audio ran on, unsafe, two FREEZE (a 9008 / 9004; TRIG 16 reached the module twice, the second press replayed from stock's key queue), CPU 73-74 %, BASE 0xed7d96cb
6 RAM boot of OC0L (ev_key_leds) pass: TRIG 16 blinks, pattern plays normally
7 release flashed, ident pass: identity as above, armed 0, RAM boot mailbox empty
8 release: frames try/undo, two ev_draw kept + one removed, frames keep + remove pass
9 release, Transfer open and connected: load, log, trial while playing, 60 s trial, trial stopped with Ctrl-C pass: load 74.2 / 79.1 / 83.5 %, log BASE 0x6efeb35b, unsafe, 60 s trial undone, Ctrl-C trial put back about 10 s later
10 stock 1.13 over the release with Transfer, then the release back pass: stock plays, no link reply; then the release identity

Observation, not reproduced: after the second RAM boot in a row (OC0D running from RAM → OC0L) the Mac listed no MIDI port at all until the USB cable was replugged; the unit itself ran (TRIG 16 blinking, pattern fine) and answered ident right after the replug. The two RAM boots after that (OC0L → OC0D, OC0D → OC0L) were back on USB within 5 s, so I take it as a host-side one-off.

Software: machine:base rebuilds dda53ffd; test_machine_base.py 34 OK. test:procedure -- --base model-cycles on c7ee00ad0: step 1 passed (815 cases, 77 skips for missing toolchains); steps 2-10 not run, as the procedure has no Model:Cycles steps yet (step 3 needs --package; the images above name the build instead). Steps 11 and 12 are the unit run above.

repeat98 and others added 2 commits November 30, 2026 16:50
machine.json keeps the own-core summary and main's deviceMaintainer; the base test keeps
OWN_CORE and main's RYTM_CORE. The base still rebuilds as dda53ffd.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@repeat98
repeat98 marked this pull request as ready for review November 30, 2026 17:00
@repeat98
repeat98 enabled auto-merge November 30, 2026 17:00
@repeat98
repeat98 merged commit 724dba4 into main Nov 30, 2026
27 of 28 checks passed
repeat98 added a commit that referenced this pull request Nov 30, 2026
durchgemacht added a commit to durchgemacht/modwerk that referenced this pull request Nov 30, 2026
repeat98#2394) into base/model-cycles-machine-table-core

The Model:Cycles sources are unchanged by the merge: the base still builds as 7b0c96d9 (94 bytes .boot, 47,540
.run, 125,060 .bss, 126 sites), matching base-binding.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
repeat98 added a commit that referenced this pull request Nov 30, 2026
main's Model:Cycles core (#2394) and this branch each defined a module-level OWN_CORE in
sdk/tests/test_machine_base.py; the merge kept both, so the second replaced the first. The sets
are now DT2_CORE and MC_CORE, each test checks its own, and still_imported checks both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants