Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/2026-12-04-octatrack-removed-effect-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Octatrack base: a removed effect leaves no page behind.

- After an effect module was removed, its FX page still held addresses into the removed code. A track still showing that page could draw a stale page, and turning a knob there could call code that was no longer installed.
- Now the removed effect's page becomes the MISSING page (NONE's before the first tick), so it draws MISSING and calls nothing of the removed module.
- A host test now looks for any address left pointing into a removed effect. Not yet tested on a unit.
8 changes: 4 additions & 4 deletions sdk/machines/octatrack/base-binding.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"schema": 1,
"identity": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2",
"identity": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424",
"arena": 1092470240,
"pool": 1087955104,
"symbols": {
"modwerk_controller_write_begin": 1084873616,
"modwerk_controller_write_end": 1084873644,
"modwerk_cue_cfg_clamp": 1085168868,
"modwerk_raise_ev_mute_keep": 1085173698
"modwerk_cue_cfg_clamp": 1085168968,
"modwerk_raise_ev_mute_keep": 1085173798
},
"controllers": {
"sidechain-compressor": "09f654725b6b0de472939719a7734015aecbc2b892a742c0646d33b8ae74d681",
"output-matrix": "cdef4c7be9a8489755cd0e476d02f92fb2c784db0abc211cec9a1af06c22e6e9",
"analog-bassdrum": "08055477d673f6f37ce4310fdbd3d2cf89d6588ed66e08ffd6c02ab35fe380b0"
},
"variants": {
"off": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"off": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
}
}
6 changes: 3 additions & 3 deletions sdk/machines/octatrack/base-sizes.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,11 @@
},
{
"base": "0.8.7",
"identity": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2",
"identity": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424",
"layouts": {
"off": {
"main": 1365375,
"container": 850956
"main": 1365463,
"container": 850912
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/machines/octatrack/base-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
{
"version": "0.8.7",
"identities": [
"3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
]
}
]
Expand Down
4 changes: 4 additions & 0 deletions sdk/machines/octatrack/elekloader/fxpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ void modwerk_fxpage_drop(unsigned id)
serves[id] = 0;
built_recipe[id] = 0;
checked_recipe[id] = 0; checked_bytes[id] = 0;
for (unsigned w = 0; w < WIDE; ++w) wide[id][w][0] = wide[id][w][1] = 0;
rows();
/* Stock may still hold this page: it draws what an unlisted handle shows, never the removed formatters (#2616). */
const volatile uint8_t *shown = AT(unlisted());
for (unsigned i = 0; i < PAGE; ++i) pages[id][i] = shown[i];
}

/* MODE renames follow the track being drawn (issue #2042). A select that renames its neighbours (Euclid's TYPE:
Expand Down
25 changes: 25 additions & 0 deletions sdk/machines/octatrack/elekloader/test_fxpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ static unsigned recipe(void) /* 1 integer, 1 string, slot 2 inherited, one forma
put32(code + 8, 0x16); /* the knob names, descriptor-relative */
return 160;
}
/* Words that point into [low, low + bytes): big-endian at every even address of the modelled memory outside that
* range, and the base's own tables and lists. After a removal none may remain (#2616). */
static unsigned into(uint32_t low, uint32_t bytes)
{
unsigned n = 0;
for (uint32_t a = 0; a + 4u <= sizeof modwerk_test_memory; a += 2u)
if (a - low >= bytes && be32(modwerk_test_memory + a) - low < bytes) ++n;
const uint32_t *held[] = {modwerk_test_tables[0], modwerk_fx1_list, modwerk_fx2_list, modwerk_wide_table, wide[0][0]};
const unsigned count[] = {4u * MODWERK_FX_IDS, MODWERK_LIST_ROWS, MODWERK_LIST_ROWS,
sizeof modwerk_wide_table / 4u, sizeof wide / 4u};
for (unsigned h = 0; h < 5u; ++h)
for (unsigned i = 0; i < count[h]; ++i) n += held[h][i] - low < bytes;
return n;
}

int main(void)
{
Expand Down Expand Up @@ -85,6 +99,7 @@ int main(void)
modwerk_fx2_list[5] == ADDR(pages[27]) && TABLE(3)[27] == 5);
modwerk_fxpage_drop(26);
CHECK(!modwerk_fx1_list[3] && modwerk_fx2_list[4] == ADDR(d) && TABLE(1)[26] == 0x1000 && !TABLE(3)[26]);
CHECK(!memcmp(pages[26], AT(0x1000), PAGE)); /* before the first tick its page becomes NONE's */
formats = 0; modwerk_fxpage_names(ADDR(pages[26]), 2, 1, 0); CHECK(!formats); /* a dropped page: nothing */
/* Refused: another donor's bytes, a fixup past its code, the image cut short, a stock effect's id. */
bytes = recipe(); image[8] ^= 1; CHECK(!modwerk_fxpage_build(26, image, bytes, 2));
Expand Down Expand Up @@ -124,6 +139,16 @@ int main(void)
MISSING_PAGE[3] == 0 && MISSING_PAGE[0x40] == 0x5a);
bytes = recipe(); CHECK(modwerk_fxpage_build(26, image, bytes, 2) && TABLE(1)[26] == ADDR(pages[26]) && TABLE(0)[26] == ADDR(MISSING_PAGE));
modwerk_fxpage_drop(26); CHECK(TABLE(1)[26] == ADDR(MISSING_PAGE) && modwerk_fxpage_current(26, 0, 0, 0));
/* Removal leaves nothing behind (#2616): 26 built from a second image while 27 keeps the first, a wide formatter
* included. Its page held formatter addresses into its image; after the drop no word does, and the page stock may
* still hold draws MISSING. The other image keeps its words: the sweep sees them. */
bytes = recipe(); image[52 + 16 + 3] = 64;
uint8_t *other = modwerk_test_memory + 0x3000;
memcpy(other, image, bytes); put32(other + 52 + 16 + 4, ADDR(other + 128));
CHECK(modwerk_fxpage_build(26, other, bytes, 3) && modwerk_fxpage_build(27, image, recipe(), 2));
CHECK(into(ADDR(other), bytes) > 0 && into(ADDR(image), bytes) > 0);
modwerk_fxpage_drop(26);
CHECK(into(ADDR(other), bytes) == 0 && !memcmp(pages[26], MISSING_PAGE, PAGE) && into(ADDR(image), bytes) > 0);
if (failures) { fprintf(stderr, "%u FX page checks failed\n", failures); return 1; }
puts("Octatrack FX pages: a recipe becomes its descriptor and chooser rows, follows its handle, and is refused when it is wrong.");
return 0;
Expand Down
4 changes: 2 additions & 2 deletions src/engine/assets/octatrack-base-sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"sdk/machines/octatrack/elekloader/fxmap.c": "8205e72879af42ed1dffe917fd1554024d66e023ecace47754b0085a4bf32d12",
"sdk/machines/octatrack/elekloader/fxmap.h": "08a41ac22374b28846a3d5c14609aec411a32bbc4207c997f6979592f8968b54",
"sdk/machines/octatrack/elekloader/fxmap.s": "cffc4ac29128e0522e9bcafa6bbdb6dfae3910b40d2f29b07863953e7d3ceea3",
"sdk/machines/octatrack/elekloader/fxpage.c": "91fbe7aa6b5c7e9ae9a2c467ef6dc105868cb58ffa88bdbbc68839f0d5b41adb",
"sdk/machines/octatrack/elekloader/fxpage.c": "c08f7fd2f28277a0c1346939183f6b5fa3ce778a52552b4a7f753c7968649e5d",
"sdk/machines/octatrack/elekloader/fxpage.h": "027ee8d259253a16bc35c61077de607a068a8c4c0b2582443aa29681c49f5e05",
"sdk/machines/octatrack/elekloader/fxpage.s": "a62bed2018521463f099e743bb4657254fd5efc7ff6f99477b69d510af8e8170",
"sdk/machines/octatrack/elekloader/in_use.h": "d6873cdc923b2750eff76843f71abb9846fdcf227fee8f0f235cfb9b04ef5273",
Expand Down Expand Up @@ -102,7 +102,7 @@
"sdk/machines/octatrack/elekloader/test_dsp.c": "65f19d5bfad5cdbab7e4ff3da4a77664d516d1aa97e479b367d11a63253246b5",
"sdk/machines/octatrack/elekloader/test_flash.c": "037892a2fc6600709937c5b4c6b100ab3ccdbd97c3f99ca1d009a2c80b996b33",
"sdk/machines/octatrack/elekloader/test_fxmap.c": "43cab48a6f5339bee26288faf92b81da70708106ebdf2150e58748afdefa472b",
"sdk/machines/octatrack/elekloader/test_fxpage.c": "ba71df72ee8d9a6987d2d6d3fd8ec80fedc3e3f552be3900ab1b3110020506ef",
"sdk/machines/octatrack/elekloader/test_fxpage.c": "988d1f71629c8a8da3198f862cffb7f0b2d2ba7038968cb64e67269fa5dfab0b",
"sdk/machines/octatrack/elekloader/test_in_use.c": "8b11c6b2379c48312ae646755684420f7e2fbe30f9491c6f8f5cef8ff5d33e48",
"sdk/machines/octatrack/elekloader/test_journal_board.c": "0a0b89a2a55b970dd5b3f6120f6fd03c948e95996495746e5d903edb8c65f802",
"sdk/machines/octatrack/elekloader/test_journal_dsp.c": "cd273262b1eac271c52abc0b90b226cda27dff1ea9bf1a9071e6aa87be312c6d",
Expand Down
2 changes: 1 addition & 1 deletion src/engine/assets/octatrack-base-variants.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"schema":1,"packageSha256":"3824ff926532ee81edb536ee953d24f8188f65917188529b217d213f3193629b","variants":[]}
{"schema":1,"packageSha256":"6c18d16a9b137c68319c60413560a1652bd3da5944306b98cc41cfdfcf8abc15","variants":[]}
18,930 changes: 9,480 additions & 9,450 deletions src/engine/assets/octatrack-base.elemod

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/engine/assets/octatrack-module-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
"bytes": 2636,
"sha256": "6dd2b668e6ab5b6ab9d5bd11a84f68690616e1ad75cd7f21c4c0e329cd8f518f",
"path": "octatrack-modules/sidechain-compressor/0.2.2-experimental.mwrm",
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
},
{
"id": "output-matrix",
Expand All @@ -357,7 +357,7 @@
"bytes": 4870,
"sha256": "ffbdef92560ee1335c916fe21812319127362e5e7a8d42595fe8eaa198898224",
"path": "octatrack-modules/output-matrix/0.2.0-experimental.mwrm",
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
},
{
"id": "cc-map",
Expand All @@ -373,7 +373,7 @@
"bytes": 966,
"sha256": "c7cd39a5f645d69279d3a288c40b8366e6638acdc042cf0fe68dfb9964a68ea2",
"path": "octatrack-modules/cc-map/0.1.2-experimental.mwrm",
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
},
{
"id": "quantize-live-rec-toggle",
Expand Down Expand Up @@ -451,7 +451,7 @@
"bytes": 1818,
"sha256": "14247c8bc46d09f3419fead5ae2a2f738aa1e63d328fd41b9df7fad814f3ff8a",
"path": "octatrack-modules/recorder-loop-fix/0.1.0-experimental.mwrm",
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
},
{
"id": "analog-bassdrum",
Expand All @@ -467,7 +467,7 @@
"bytes": 26172,
"sha256": "f76f6ad64cbe1a5c4c36311daa006b564a8d78b6a7f1bb48b4e6008ec83c3b79",
"path": "octatrack-modules/analog-bassdrum/0.1.7-experimental.mwrm",
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2",
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424",
"requires": 0,
"claims": 1,
"entries": 1
Expand Down Expand Up @@ -944,7 +944,7 @@
"copies": 4,
"fills": 0,
"installPresets": true,
"requiredBase": "3ad89c171b83c31cd8212618f2c3a43428a4529d42847297bba22eb28667b1d2"
"requiredBase": "d517f418ae19288b040b04501f82b4610efc5eb6c8d63c1db551f58509623424"
},
"configurable-0.4.1": {
"name": "USB Audio",
Expand Down