Repository navigation
Fix: Digitone II base: module project data follows the working state - #2684
Draft
prodbysmolec wants to merge 3 commits into
Draft
prodbysmolec wants to merge 3 commits into
prodbysmolec wants to merge 3 commits into
Conversation
…epeat98#2683) OS 1.12 keeps the unsaved project as its file image in RAM, writes it to the eMMC at power-off and loads it at boot, but refreshes the header (where core_projdata lives) only on Project::changed with flag 0x40 or all bits. The Digitone II copy of store.c now compares the mods' blocks each UI tick and on a change calls stock's Project::changed with a header-only ProjectDataChangeInfo, as stock's rename does with 0x20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2683 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd an LFO (repeat98#2683) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
I traced Project Rename on stock DT2 OS 1.17. Rename passes 0x20, updates the name in the RAM image and marks the project dirty. The core_projdata_save hook is reached through the 0x40 path. This is from a static trace. I haven’t tested a changed(0x40) call on the unit yet. If the fix goes into the shared core, I’d like to take the DT2 hardware check. |
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.
core_projdata) did not follow the project's working state (Digitone II base: module project data is lost at a power cycle and does not mark the project changed #2683). Found with Voice Spread (Voice Spread: the first Digitone II module, and the Digitone II becomes a preview #2003) on my unit: a module-only change came back after a power cycle with the values of the last full save, while an unsaved stock change made at the same time came back as changed. Loading another project after a module-only change dropped it without SAVE … BEFORE LOADING?. A full save (SAVE PROJECT AS, or YES at that question) and a load worked. OS 1.12 keeps the unsaved project as its file image in RAM, writes the whole block to the eMMC at power-off and loads it at boot; it refreshes the image's header, where the blocks live, only when the project'schanged()runs with flag bit 6 (0x40) or with every bit. Nothing called it after a module changed its data.store.c/store.s, itsmod.jsonand one address inbase.json's recipe. Each UI tick (ev_tick) core compares the modules' project blocks with what it last saved or loaded; on a difference it calls stock'sProject::changed(the project's vtable + 0x10) with a header-onlyProjectDataChangeInfo(vtable 0x401dd340, flags 0x40), as stock's project rename does with 0x20. Stock then rewrites the header in the working image through the existing save hook (0x400e18be), and its listener marks the project changed, so it asks before loading another one. A save or load in progress holds the check off. No new patch site, no module change, and the format of the saved blocks is the same, so the flashed base reads what the fixed one wrote. The plain base becomesb1f5b05c…(.run 3,920, .bss 3,604, 14 sites; was7a60d82e…).base-binding.jsonand the site's imported base package still name7a60d82e…: I left both for you, as the catalog's base comes from the reviewed toolchain. A changelog entry and the record.npm run check -- --base upstream/base/digitone-ii-next: everything passes except two tests. (1)test_machine_base.py'stest_digitone_ii_copies_change_only_what_their_readme_saysfails on purpose of this change: it allows the copies only the differences from core-dt2 that the README named before, and nosubscribein the copy'smod.json. I updated the README but left the test alone: please decide whether this belongs in the Digitone II copy (then the test needs your update for the new difference) or in core-dt2's ownstore.cfor both machines (then the Digitakt II needs itsProjectDataChangeInfovtable address and a check on OS 1.17, and I would move it). (2)usage-machine-migration.test.tsfails the same way onbase/digitone-ii-nextitself;mainalready has the updated test. The OS 1.12 paths were read from the stock OS on my computer: the power-off write of the state block, the boot load,Project::updateMirrorand its flags, and the one place that sets stock's changed flag; the record gives the addresses.4ef2c9abd), development basedebe5195…with Voice Spread 0.1.0 (9ce8ff19…),.syx90c0374a…, booted from RAM over the link; the flashed image was the development basea158dc91…with the same Voice Spread package (ef14a48c…), which does not have the fix. The agent drove the unit over the link and recorded its sound over USB audio; I power-cycled it. With the fix, an unsaved Voice Spread-only change (25 / LOW) survived a power cycle into the flashed base, and a Voice Spread-only change made the unit ask SAVE 'NEW PROJECT' BEFORE LOADING?; the flashed base without the fix did neither. The record also has Voice Spread's measured pan per voice (OFF 0.00, 100 up to −0.98 / +0.99) and FILTER SPREAD's per-voice levels.loaded()writes them), which must not count as an editcore_projdata[0]emptycore_kitdata)Related to #2683.
🤖 Generated with Claude Code