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
1 change: 1 addition & 0 deletions changelog/2026-12-04-card-omitted-effect-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Card remix builds now leave USB-only effect IDs outside the stock 32-entry table alone and preserve the effect ID chosen by the remix when another, omitted module uses that ID. This prevents an absent effect from overwriting the next DSP payload record or silencing the selected effect.
5 changes: 5 additions & 0 deletions changelog/2026-12-04-chooser-placeholder-read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The 128-entry FX chooser tables can contain nonzero stock placeholder descriptors outside the development MEM windows. The qualification script used to read every nonzero descriptor's label, and `device pick` did the same while resolving a name. Both aborted before testing the requested effect.

Read labels only from descriptors inside the development MEM windows. Keep the table's zero terminator as the end of the list. This lets a named module effect or a readable stock row be selected without treating an unreadable placeholder as a test failure.

Observed in an offline Ghost Cut emulator procedure: the trial installed, then qualification read `0x40d4c8a9` from a placeholder and stopped. The same address later stopped `pick:T1:FX2:DELAY` while restoring the previous effect. This is a tooling fix; the emulator's 100% CPU meter still prevents a meaningful effect pick or price.
9 changes: 8 additions & 1 deletion scripts/device.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,14 @@ async function pick(track, slot, wanted) {
let id = typeof wanted === 'number' ? wanted : -1 // a number: that effect id, through its chooser row (pickid)
if (id < 0) { // a name: the chooser's own, or shortened there to its 12 letters (chooser-name.mjs)
const names = []
for (let i = 0; i < tables.count; i++) names.push(ids[i] ? Buffer.from(await mem(ids[i] + 9, 13)).toString('latin1').replace(/\0.*$/s, '') : null)
for (let i = 0; i < tables.count; i++) {
const nameAt = ids[i] + 9
// Some stock chooser placeholders point beyond the development MEM
// windows. They have no readable label and cannot match a pick by name.
const readable = (nameAt >= 0x40000400 && nameAt <= 0x40cffff3) ||
(nameAt >= 0x46000000 && nameAt <= 0x46fffff3)
names.push(ids[i] && readable ? Buffer.from(await mem(nameAt, 13)).toString('latin1').replace(/\0.*$/s, '') : null)
}
id = chooserIndex(names, wanted)
}
if (id < 0 || id >= tables.count || (typeof wanted === 'number' && !rows[id])) throw new Error('No ' + wanted + ' in the FX' + slot + ' chooser.')
Expand Down
19 changes: 17 additions & 2 deletions scripts/octatrack-qualify.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,25 @@ def part_copy(part, saved=False): return mem(u32(BANK) + (0x9504a if saved else
def part_saved_equal(): part = mem(PART, 1)[0]; return part_copy(part) == part_copy(part, saved=True)
def frames(): return int(re.search(r'frames=(\d+)', send('report')).group(1))
FX_IDS = {1: 0x40052798, 2: 0x4005252a} # lea operands naming FX1_IDS and FX2_IDS (id -> descriptor, its name at +9)
def fx_name(slot, fx): return mem(u32(u32(FX_IDS[slot]) + 4 * fx) + 9, 16).split(b'\0')[0].decode('latin1').upper().replace(' ', '_')
def fx_name(slot, fx):
descriptor = u32(u32(FX_IDS[slot]) + 4 * fx)
# A shorter stock table can contain placeholder descriptors outside the
# development MEM windows. The chooser can use them, but the test cannot
# read their labels; skip them rather than abort the whole qualification.
name_at = descriptor + 9
if not (0x40000400 <= name_at <= 0x40cffff0 or 0x46000000 <= name_at <= 0x46fffff0):
return ''
return mem(name_at, 16).split(b'\0')[0].decode('latin1').upper().replace(' ', '_')
def chooser_names(slot): # every effect's name in a chooser table (128 ids at most; a 0 ends a shorter table)
table = mem(u32(FX_IDS[slot]), 4 * 128)
return [fx_name(slot, fx) for fx in range(128) if int.from_bytes(table[4 * fx:4 * fx + 4], 'big')]
names = []
for fx in range(128):
if not int.from_bytes(table[4 * fx:4 * fx + 4], 'big'):
break
name = fx_name(slot, fx)
if name:
names.append(name)
return names
def chooser_name(names, name):
"""The chooser's name for an installed package: its page may say more than the package (Spectrum79 for Spectrum),
or the same words in another order (RINGMOD SC for SC Ringmod)."""
Expand Down
3 changes: 2 additions & 1 deletion sdk/octabam/tools/build/build_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,8 @@ def _link(src, at, cpu, work, sections=(), defsyms=(), incdir=None, asdefs=()):
# FX1 (which shares the dispatch tables) whole.
_omitted = [m for m in remix_modules().values()
if m.menu is not None and m.key not in REMIX.modules
and not m.is_stock]
and not m.is_stock and m.menu.fx2_id < remix_registry.CARD_FX_IDS
and m.menu.fx2_id not in NEW_IDS.values()]
# ⚠️ A REPLACEMENT THAT IS NOT IN THIS REMIX LEAVES STOCK ALONE. Aliasing
# its id to the fallback would take the stock effect away from BOTH menus
# -- which is exactly what happened for four days when Rungs sat on
Expand Down
Loading