Skip to content

Octatrack base 0.8.2: a power-up keeps the current bank when stock's checks fix a value - #2223

Merged
repeat98 merged 1 commit into
base/octatrack-nextfrom
fix/082-empty-project
Nov 26, 2026
Merged

repeat98 merged 1 commit into
base/octatrack-nextfrom
fix/082-empty-project

Conversation

@repeat98

Copy link
Copy Markdown
Owner

For #2201, part of the 0.8.2 batch (#2216). A tester's project came up empty at every start after a save, and PROJ > RELOAD brought it back each time.

Cause

At power-up stock restores the current bank from its battery-backed copy (0x40025770, called from main's init at 0x4001fb78). Before it copies the bank in, it runs its checks on:

  • the project settings and the arrangements (0x4000fda8, 0x4000fec8, 0x4001065c),
  • both copies of each Part (0x40002318, the base's mw_validate),
  • the bank's 16 patterns (0x4009a670).

If any check has to fix a single value, stock refuses the whole bank. Every Part and pattern of the current bank then reads as stock's empty defaults, while the saved copy on the card still holds the song. When the saved copy holds the value too, each RELOAD brings it back and the next power-up refuses the bank again. That is why it happened at every start. This is the class of trap OCTATRACK_HARDWARE_TRAPS.md documents for findings 24 and 47.

The tester's diagnostics fit this:

  • On each of the three empty starts, the first record shows the current Part with no machines (all type bytes 0). That is how a refused restore leaves it.
  • The tempo was still the one from the battery copy, because main copies it whatever the restore does.
  • The five starts before showed the project's machines.
  • The empty starts began with the first power cycle after the base update to 0.8.1, when SYNTIZ and Sidechain on COMPRESSOR were added to the current Part.

Which value was refused is not recorded on 0.8.1. This PR logs it from now on.

The save itself is not the cause; it worked every time.

Not explained by this PR: the freezes right after the tester's quick saves (STOP, FUNC, PROJ, YES; freeze records at about 22:25 and 22:49). In the emulator, a SAVE PROJECT with Kits active kept the UI tick at 60 a second, and a power cut taken during and after the save restored the bank. The hang is not reproduced, and Kits alone did not cause an empty start.

Change

  • diag.c modwerk_boot_restore, in place of main's call (site 0x4001fb78, status.s mw_boot_restore):
    • It runs stock's checks first, in stock's order, and keeps their fixes, as a file load of the same bank keeps them (the same validators).
    • If a settings check fixed something, it copies the UI state from battery RAM to main's memory again, because main copied it before the checks and the restore puts the bank back where that copy says.
    • Then it calls stock's restore, which finds nothing to refuse.
    • A copy with more than 64 fixes looks more like a lost battery than a stray value, so stock still refuses it, as before.
  • New RESTORE incident (diag.h kind 13, restore in DEVICE_INCIDENTS): the fixes per stage, the first record that needed one and the result. It is written right after the start it belongs to.
  • OCTATRACK_HARDWARE_TRAPS.md: the trap entry now covers the RELOAD loop, the guard and how to reproduce it.

The committed base assets are not regenerated here; the coordinator's 0.8.2 build does that.

Tests

  • Host: test_diag.c covers:
    • a clean copy: stock's restore runs once and nothing is logged,
    • one bad Part value: the bank comes back and RESTORE names the record,
    • a bad pattern value plus a bad saved bank byte: the UI state is copied again before the restore,
    • more than 64 fixes: refused and logged.
  • Checks: test_recipe (40 tests), tsc -b, and vitest for device-log and trial-verdict all pass.
  • ot_emu, two-process power cycle on the beta base built from this branch (--cs1-in with boot 1's battery RAM, --no-post for the firmware's own power-up load, PC watches on the restore's steps):
    • Base without this change, one byte out of range in the battery copy's working Part 1 (0x100a4ece + 16): the restore is refused at the Part check. The current bank comes up as stock's defaults: Part names ONE… instead of the marked name, T8 FX2 back to DELAY. The tempo comes from the battery copy, as in the tester's records.
    • With this change, the same copy restores whole (mark present). A bad pattern byte (0x1001614e + 80) restores as well, and the log shows restore a=1 … screen 0x200.
    • Controls: a clean copy restores on both bases. Kits 0.1.1 kept, then SAVE PROJECT (0x40022c74), with cuts before, during and after: no empty start.

Not tested

🤖 Generated with Claude Code

…checks fix a value

At power-up stock restores the current bank from its battery-backed copy
(0x40025770, called from main's init at 0x4001fb78). Before it copies the
bank in, it runs its checks on the project settings, the arrangements, both
copies of each Part and the bank's 16 patterns, and a single value any of
them has to fix refuses the whole bank: every Part and pattern of it then
reads as stock's empty defaults, while the saved copy on the card still holds
the song. When the saved copy holds the value, each RELOAD brings it back and
the next power-up refuses the bank again. A tester's project came up empty at
every start after a save (#2201): the first record after each of those
starts shows the current Part with no machines, as a refused restore leaves
it, and the tempo kept from the battery copy.

The base now runs those checks itself first, in stock's order, keeping their
fixes as a file load of the same bank keeps them (the same validators), and
then calls stock's restore, which finds nothing left to refuse. A battery
copy with more than 64 fixes, more like one the battery lost than a stray
value, is still refused as stock refuses it. Each start that fixed anything
logs a RESTORE incident (diag.h): the count per stage, the first record that
needed a fix and the result, so the value behind it can be traced.

ot_emu, two-process power cycle on the beta base (--cs1-in, --no-post): one
byte out of range in the battery copy's working Part 1 left the current bank
as stock's defaults on the base without this change (restore refused at the
Part check), and came back whole with it; the same for a pattern; a clean
copy restores as before. test_diag.c covers the order, the UI state taken
again after a settings fix, the 64-fix limit and the RESTORE record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Do Sidechain or SYNTIZ values make stock refuse the bank, and does this change alter them? (asked alongside #2222)

I tested this with an ot_emu power cycle (--cs1-in, --no-post), once on the base without this change and once with it. Before the cut I set the battery copy's working Part 1, and the same Part in RAM, to:

  • T3 FX1 COMPRESSOR, with Sidechain's slots 7-11 at MON 3, KEY T4, KGN 100, KBAS 64, KWID 127;
  • T4 as SYNTIZ: type STATIC, signature WV model 2, and all 12 machine bytes at 127.

Result:

  1. Stock does not refuse these values. Both bases restored the bank (watch: parts ok, patterns ok), and the base with the fix logged no restore record. The base's Part validator hook (mw_validate) already hides Sidechain's slots (finding 47) and an absent SYNTIZ's 12 bytes (orphan, finding 24) from stock's checks. It runs on the power-up restore as well as on file loads.
  2. This change does not alter them. All of the bytes above read back identical after the power cycle on both bases.
  3. The value the tester's restore refused is still unknown. It can only be something stock's own validators would also clamp when the bank is loaded from a file, which is what RELOAD does. So this change clamps nothing a RELOAD would not already clamp. Values these shields do not cover would be clamped on any load, with or without this change: Sidechain MON above 3 or KEY above T8, a SYNTIZ model above 15, or another module's bytes.

If the restore record names a module's value, the safer fix is to extend mw_validate's shield for it, which covers loads and the power-up together, not to change the restore.

@repeat98
repeat98 merged commit 91f4a9b into base/octatrack-next Nov 26, 2026
1 of 2 checks passed
repeat98 added a commit that referenced this pull request Nov 26, 2026
Base 0.8.2 is now 24e480c4 (was a991caf0), browser .bin 390ae8f5
(834,708 bytes), container 834,692 of 851,712 bytes. It carries #2217,
#2221, #2222, #2223 and #2226. Base-bound packages relinked to it (Sidechain,
Output Matrix and Analog BD bytes move; CC Map, Recorder Loop Fix and USB
Audio 0.4.1 keep theirs); base-size recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 26, 2026
docs/OCTATRACK_HARDWARE_TRAPS.md is over the 40 KB a guide may have and may
not grow; #2223's note added 996 bytes. The paragraph now says what stock
does, what 0.8.2 changes and how to test it in fewer words than before; the
full account stays in the commit and the verification record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 26, 2026
…ase run

The regenerated base moved the controller write lease (0x40a9d794/0x40a9d7b0
to 0x40a9d850/0x40a9d86c). Output Matrix, Analog BD and Sidechain Compressor
are 0.8.1's packages with only those two addresses substituted, checked byte
for byte, so their active-load readings are rebound to the new digests and
the cycle-scan table names Sidechain's new package.

The Model:Cycles diagnostics header takes the two new incident kinds
(RESTORE, FREEZE_PC), as the site reads it with the Octatrack's parser; the
self-test parse test expects #2221's busy byte. The verification record gets
the release image 24e480c4 and the twin 8a341725 results with their edge
cases, and the power-up restore (#2223) its changelog line.

Refs #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 26, 2026
* Octatrack base 0.8: compile the boot stub with the late-combine guard and check its objects

build_stub.py compiled stub.c and slots.c in one gcc call at -Os without
m68k_codegen.FLAGS and without m68k_codegen.check, the guard every other
ColdFire C compile of the base has had since #603. It now compiles each
source to an object with the flag, checks the C objects with
check_mcf54455 (the check build_core.py runs on the base's C), and links
them as before. The stub's code changes from 900 to 890 bytes;
check_stub.py passes all six slot states on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the recorder update writes its two CS1 fields only when they change

A recording track runs stock's recorder control-record update (0x4000432c) about 1.5 times a frame, with six writes
into slow CS1 memory, and in steady recording [r+300] and [r+308] already hold what it computes. The base replaces the
routine with stock's arithmetic and writes, storing those two only when they differ from the values it reads, read
under stock's own interrupt mask so CS1 ends as stock leaves it. Idea and hardware figures: Bryan T.

rec-harness/ runs stock's routine and the base's side by side on the emulator: 1,000,000 random calls, every
register, the CS1 records, the 44-byte records and the stack equal stock's; CS1 writes a call 4.49 -> 3.02.
Not yet measured on a unit: the 0.8.1 twin's RAM boot did not come back on USB (#1985).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebuild with the boot stub's late-combine guard (#2028)

Merging #2028 changes build_stub.py, which the base records, so the release
base is regenerated: identity c5791ec9 (was 6852c1ff), stub_body.c 5be076c9
(was 89b61a6d), MAIN 12 bytes smaller, base-bound packages relinked with
unchanged bytes. Not run on a unit: only a two-slot conversion writes the
stub and only a cold start runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the CPU record names the tracks refused since the last one

diag.c's CPU record gave only every track refused since the start, while its machine
list is the Part's at the moment of the record, so a pass could not tell whose price
caused a refusal. cpu_refuse now bumps a per-track counter (its only writer); diag.c
compares them with its own copy and puts the tracks that moved in bits 16-23, the
count in the low 16 bits, every track since the start in the top byte as before. The
pull names each such track's machine signature; older records print as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: an in-use refusal says which track and FX slot run the module

dsp.c's admission knew which live slot runs the effect it refuses RUNTIME_IN_USE but
only returned the code. It now keeps that slot (1-8 FX1 of T1-T8, 9-16 FX2), cleared
at each admission, and the self-test record carries it above the refusal (bits 16-23;
the record keeps its 96 bytes). The site reads it and says "Track 6 runs Tape Echo as
its FX2 effect in the current Part." Older bases leave the bits 0 and keep the old hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebuild for the CPU record's tracks and the in-use slot

Release base ada74e3d (was c5791ec9), browser = native .bin 5c7e9eba, container 200
bytes larger. The resident port's dsp.c hunks move 6 lines and its pin follows;
base-bound packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: relink USB Audio 0.4.0 from main to the 0.8.2 base

The merge brought main's USB Audio 0.4.0, bound to 0.8.1 (eb667962). Base-bound
packages follow the cumulative base: requiredBase ada74e3d, package bytes unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: split the in-use test's two assignments, as lint asks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: an in-use slot shows only with its own admission's refusal

Analog BD's and Output Matrix's controllers refuse RUNTIME_IN_USE too, without dsp.c's
admission, so a slot an earlier sync's admission left could name an unrelated track.
The self-test record now carries the slot only while the loader's refusal is that
admission's (RUNTIME_CHECK_DSP, set with each refusal and reset at every prepare), and
the admission no longer clears it. Clearing it in boot.c's prepare instead would move
the base's write-lease entries and need Analog BD's reviewed recipe recaptured.

Rebuilt: base 2f4d5955 (was ada74e3d), browser = native .bin 4e056c4c, resident dsp.c
hunks re-pinned, base-bound packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a frame-admission refusal names its track in the CPU record

status.c's frame admission counts a CPU refusal without moving that track's counter,
so diag.c's CPU record named no recent track for the commonest refusal: on a twin a
POLY8 pick refused on T3 logged 0x04000001 (since-boot T3, recent 0). It now moves
mw_cpu_track_refusals[slot] too; diag.c's comment names both writers.

Rebuilt: base 8f179f5e (was 2f4d5955), browser = native .bin b5336893, base-bound
packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the CPU record and the in-use slot on the owner's MKII

A development twin of 6663f66 (58babe99): a POLY8 pick refused on T3 now names T3 in the
CPU record's recent tracks (0x04040001; the build before the fix left it 0), and two
whole sets of 18 and 20 packages ran 30 s each and rolled back with no fault. The unit
came back on its flashed 0.8.1 with its nine modules. An in-use refusal, the soak and the
price were not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a table owner may rest its detours; admit Mute Modes 0.2.4

Mute Modes 0.2.4 rests while MUTE MODE is OT (ev_in_use, runtime.json "rests"); 0.2.3
cost 0.9 points of the frame interrupt at rest. table_declarations.validate read a
site's rest bit (RUNTIME_SITE_RESTS, 0x80) as length, so no base admitted it. The
validator now reads the bit on the owner's own detours and refuses it on the table
pointer and count sites, which must hold while the module rests. 0.2.4 (7542f10c,
declaration 64253fe3) joins 0.2.2 and 0.2.3 as a reviewed table owner (owner, 25 Nov).

Rebuilt: base 910e6625 (was 8f179f5e), browser = native .bin f6e46d06, base-bound
packages relinked with unchanged bytes. On a unit: 0.8.1 dev twin with the same change,
0.2.4 at rest +0.0 (0.2.3 +0.9). Waking on a MUTE MODE switch not run yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: keep the UI tick's bookkeeping between changes

Installed modules nobody uses cost every UI tick in the base, not in themselves (an
emulated twin, instructions a tick): the overload prediction read each trig-mask byte
once per step (512 uncached reads), searched the cost table for every installed module,
and walked the module table for each ev_frame_deadline row; each installed effect made
the handle map's 420 us whole check run more often; and the rest poll stepped through
all 32 positions for one asking module.

Now: the trig masks are read once and counted in bit planes; the rest booking, the
deadline rows' handles and the map's handles are kept until what they depend on
changes; the map's whole check runs once a second by DTIM3; the rest poll judges only
the asking positions. Nothing installed: 12,793 -> 4,147 instructions a tick; Mini Verb
15,673 -> 6,599; Tape Echo 17,647 -> 6,701 (before the rest-poll change). Host tests
for the bit-plane count, the caches' invalidation and the timed check.

Rebuilt: base fad2c729 (was 910e6625), browser = native .bin 1520e947, base-bound
packages relinked (Recorder Loop Fix 0.1.0 6b568782). Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: point Recorder Loop Fix's zero-DSP record at its relinked package

182d7d1 relinked Recorder Loop Fix 0.1.0 to the rebuilt base (6b568782, still
zero DSP words) but left its direct-DSP record on the 0.8.1 package (b39bfa9f),
so resource-indicators.test.ts failed on the draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: one NO leaves FX SETUP after a module pick

After a module effect is picked in FX1 or FX2 SETUP the base shows the memory
box for 1.5 s, and status.c took NO as well as YES while it showed. The
musician's NO back to the effect's page only closed the box and left the
knobs on SETUP, where a module without setup parameters has none: the effect
looked stuck until the page was left and entered again (Midiverb on the
owner's MKII). The owner's rule of 14 October was 'YES only closes it; any
other key goes on to stock'; #640's merge of the dialog key paths took NO
too. Now NO on that box closes it and goes on to stock; the other dialogs
still take it.

test_status.c covers it and fails without the change. On the owner's MKII a
twin of 8b26f3492 plus this change reached the FX2 page with one NO and PROG
moved at once. Rebuilt: base 1306e125 (was fad2c729); base-bound packages
relinked with unchanged bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: stage a module knob in the page's input layer too

mw_knob_step restaged a module page's turned knob in its record, but the page's
input layer still held the previous page's staging (a stock effect's 0..127
knobs) and the panel copies it into the record before each turn. Every detent
found the old step again, restaged and cleared the remainder, so a select
moved only on quick turns until the page was entered again (Midiverb's PROG on
the owner's MKII: ten slow detents left it at 0; FX1 -> FX2 put it right). The
knob's definition in the layer (22 B: slot, 0, then the record) is now staged
as its record, when it names the main pages' knob routine.

knob_step_fixture case E: staged, the remainder kept on the next turn, a
scene's definition and a stock page's layer untouched; fails without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: NO on a MODWERK page goes back to the menu

A page opened from PROJ > MODWERK (SETTINGS, MODULES, STATUS, MODULE COST,
MISSING) closed PROJ menu on the next tick, so NO and the arrows that close
the page left the player on the track screen (a tester, 25 November 2026).
Now the menu stays open under the page: NO, and LEFT or RIGHT (every arrow
on STATUS), close the page back to the menu with its cursor on the row
that opened it. YES on a page that closes still closes the menu; any other
key goes on to stock menu, so PROJ closes it. SELF TEST is unchanged.

test_status.c covers each page and fails without the change. Not rebuilt:
the base and its size record wait for the cumulative regeneration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a recorder's retained bank no longer blocks syncs

Stock keeps two state rows per track recorder and selects one with
0x80004f18. A recording started again while it records moves to the
other row, and STOP clears only that one: the row it left keeps state 2
with nothing recording behind it until the track records again. The
base read any nonzero row as recording, so modwerk_machine_stopped()
stayed false and every sync was refused as unsafe at enter ("Stop
playback or finish recording") on a stopped unit until a power cycle.
boot.c's STOP press was skipped for the same reason.

modwerk_machine_recorder_busy() now reads the selected row and accepts
only idle or that retained 2 in the other one, as the sample editor and
Amiga already do. modwerk_machine_busy() names what refuses a change
(recorder, transport, track byte, journal, with the track); the
self-test reply carries it in the refusal word's top byte, and the site
records it on an unsafe sync_failed (busy) and names the recorder's
track in its notice.

Host tests: test_runtime.c (the emulator's row sequence), the link
test with the fake unit's busy byte, the diagnostics field validation.

Refs #2211, #1596, #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: record the retained recorder bank on the MKII

On twin c6e64b77: T1's recorder started, started again while it
recorded, then STOP left bank A at state 2 with bank B selected and
idle. The twin admitted a trial with that state and refused enter as
unsafe during a live recording, with busy 1.

Refs #2211, #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: big effects load under Sidechain's engine words, and a refused COMPRESSOR pick says why

With Sidechain installed but no track on COMPRESSOR, its engine and the key bus
are not placed, and the allocator put big blocks (E-Verb, Resonator) into the
top words they take. Picking COMPRESSOR then had to copy that code below them;
with two big effects on a core there was often no free run for the copy, so the
claim was refused for memory and COMPRESSOR stayed stock with no KEY page and
no message, until an effect came off (#2189).

Big blocks now go under a soft ceiling first (the capacity less the words held
controllers' engines will still claim); a core that does not fit so is placed
as before. Packing keeps to the same ceiling. A COMPRESSOR pick refused for
memory shows SIDECHAIN PAUSED / DSP MEMORY. Host modes 76 and 77; on an MKII
dev twin the repro (E-Verb @3110, Resonator @1599, stock page) became E-Verb
@2400, Resonator @889, Sidechain active and the KEY page shown. Base not
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a power-up keeps the current bank when stock's checks fix a value

At power-up stock restores the current bank from its battery-backed copy
(0x40025770, called from main's init at 0x4001fb78). Before it copies the
bank in, it runs its checks on the project settings, the arrangements, both
copies of each Part and the bank's 16 patterns, and a single value any of
them has to fix refuses the whole bank: every Part and pattern of it then
reads as stock's empty defaults, while the saved copy on the card still holds
the song. When the saved copy holds the value, each RELOAD brings it back and
the next power-up refuses the bank again. A tester's project came up empty at
every start after a save (#2201): the first record after each of those
starts shows the current Part with no machines, as a refused restore leaves
it, and the tempo kept from the battery copy.

The base now runs those checks itself first, in stock's order, keeping their
fixes as a file load of the same bank keeps them (the same validators), and
then calls stock's restore, which finds nothing left to refuse. A battery
copy with more than 64 fixes, more like one the battery lost than a stray
value, is still refused as stock refuses it. Each start that fixed anything
logs a RESTORE incident (diag.h): the count per stage, the first record that
needed a fix and the result, so the value behind it can be traced.

ot_emu, two-process power cycle on the beta base (--cs1-in, --no-post): one
byte out of range in the battery copy's working Part 1 left the current bank
as stock's defaults on the base without this change (restore refused at the
Part check), and came back whole with it; the same for a pattern; a clean
copy restores as before. test_diag.c covers the order, the UI state taken
again after a settings fix, the 64-fix limit and the RESTORE record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: the module-pool tests no longer depend on MIDI Scenes 0.3.0's size

The tests for a set over the module pool used a tester's real set, which was over the
pool only because of MIDI Scenes 0.3.0 (282 kB); with 0.3.1 (127 kB) it fits and both
tests failed though the check is unchanged. They now grow three published packages to
the most a package may declare (over a third of the pool each) in a catalogue built
from the published manifest, so the set is over the pool whatever any module weighs.
Both behaviours stay covered: refused before the first write naming its largest
modules, and modules already on the unit counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a freeze records where the processor was

A tester's unit froze twice seconds after a quick SAVE PROJECT (#2225).
Each FREEZE record says only that the UI tick stood still while the audio
frames ran on; nothing says what held the processor, and neither the
emulator nor the owner's MKII reproduced it.

At 5, 6, 7 and 8 seconds of a freeze, diag.c now samples what the audio
frame's eDMA interrupt (level 6, where modwerk_diag_frame runs) interrupted:
the program counter and status register of its exception frame, and the
kernel's current task (0x800068fc). dl_state7 keeps its stack pointer before
it calls dl_frame (build_core.py's DSP_EDITS), the frame sits 60 bytes above
it, and a sample whose vector is not the frame transfer's reads as
0xffffffff. The samples wait in battery RAM ("MWFZ", 0x100f9728, 48 bytes)
and go into the log as a FREEZE_PC incident right after their FREEZE, at
the next start or once the tick moves again, in the existing incident
layout: the log's format and the site's parser are unchanged, and a site
without the new kind leaves the record out. device.mjs's diaglog and
diagnostics-pull.mjs name the code and the task.

Tested: test_diag.c (a freeze that comes back after one sample, one that
needs a restart with four, a frame of the wrong vector), test_recipe,
test_battery_ram, device-log.test.ts with the unit's own record, the
diagnostics tests, tsc and eslint. On the owner's MKII (RAM-booted twin
46c30886…): dev.c's FREEZE TEST held the UI tick 9 s,
and FREEZE_PC named modwerk_diag_tick+0x4fa and +0x508 (the test's wait
loop), level 0, in the UI task, as expected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: recapture Analog BD's reviewed recipe against the release base

The 0.8.2 fixes (#2221 among them) moved the base symbols Analog BD's package links
against, so its image changed and the reviewed recipe refused it. Captured with
build.py --capture-stock-recipe against the release's empty-row symbols: only
imageSha256 changes (ec3a42c0 -> 3d24a7fe); its six stock copies and source pins
are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: regenerate the release base with today's fixes

Base 0.8.2 is now 24e480c4 (was a991caf0), browser .bin 390ae8f5
(834,708 bytes), container 834,692 of 851,712 bytes. It carries #2217,
#2221, #2222, #2223 and #2226. Base-bound packages relinked to it (Sidechain,
Output Matrix and Analog BD bytes move; CC Map, Recorder Loop Fix and USB
Audio 0.4.1 keep theirs); base-size recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: read a freeze's samples from the shared diagnostics contract

diagnostics-pull.mjs (Elastic-2.0 pipeline) imported freezeSamples from
device-log.ts, a GPL frontend file, which licenses:check refuses. The
function and its task table move to octatrack-diagnostics-contract.ts, the
shared file the script already reads; device-log.ts re-exports it, so
device.mjs and its tests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: fold the power-up restore trap into its paragraph

docs/OCTATRACK_HARDWARE_TRAPS.md is over the 40 KB a guide may have and may
not grow; #2223's note added 996 bytes. The paragraph now says what stock
does, what 0.8.2 changes and how to test it in fewer words than before; the
full account stays in the commit and the verification record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebind the controller readings, record the release run

The regenerated base moved the controller write lease (0x40a9d794/0x40a9d7b0
to 0x40a9d850/0x40a9d86c). Output Matrix, Analog BD and Sidechain Compressor
are 0.8.1's packages with only those two addresses substituted, checked byte
for byte, so their active-load readings are rebound to the new digests and
the cycle-scan table names Sidechain's new package.

The Model:Cycles diagnostics header takes the two new incident kinds
(RESTORE, FREEZE_PC), as the site reads it with the Octatrack's parser; the
self-test parse test expects #2221's busy byte. The verification record gets
the release image 24e480c4 and the twin 8a341725 results with their edge
cases, and the power-up restore (#2223) its changelog line.

Refs #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: the sync-peak pool tests no longer depend on the published modules' sizes

#2218's three tests priced a tester's real 25 November set and pinned the
peak at 795 kB, so any package that grows by a kilobyte fails them: base
0.8.2's relinked packages read 796 kB (#2079). They now use the grown
packages the other pool tests use: two on the unit fit, two after the sync
fit, all three at once do not, and the message names the one to take out
first and the one to add after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: record the MODULES switch, the flash and the Keep on the MKII

The MODULES page switched a kept module off and on with the menu open on
twin 8a341725; the release image 24e480c4 wrote itself to slot B and kept
the project's three modules. Its first start from NOR waits for a power
cycle.

Refs #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 27, 2026
…in the CPU limit, no USB DISK freeze, and four more (#2246)

* Octatrack base 0.8: compile the boot stub with the late-combine guard and check its objects

build_stub.py compiled stub.c and slots.c in one gcc call at -Os without
m68k_codegen.FLAGS and without m68k_codegen.check, the guard every other
ColdFire C compile of the base has had since #603. It now compiles each
source to an object with the flag, checks the C objects with
check_mcf54455 (the check build_core.py runs on the base's C), and links
them as before. The stub's code changes from 900 to 890 bytes;
check_stub.py passes all six slot states on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the recorder update writes its two CS1 fields only when they change

A recording track runs stock's recorder control-record update (0x4000432c) about 1.5 times a frame, with six writes
into slow CS1 memory, and in steady recording [r+300] and [r+308] already hold what it computes. The base replaces the
routine with stock's arithmetic and writes, storing those two only when they differ from the values it reads, read
under stock's own interrupt mask so CS1 ends as stock leaves it. Idea and hardware figures: Bryan T.

rec-harness/ runs stock's routine and the base's side by side on the emulator: 1,000,000 random calls, every
register, the CS1 records, the 44-byte records and the stack equal stock's; CS1 writes a call 4.49 -> 3.02.
Not yet measured on a unit: the 0.8.1 twin's RAM boot did not come back on USB (#1985).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebuild with the boot stub's late-combine guard (#2028)

Merging #2028 changes build_stub.py, which the base records, so the release
base is regenerated: identity c5791ec9 (was 6852c1ff), stub_body.c 5be076c9
(was 89b61a6d), MAIN 12 bytes smaller, base-bound packages relinked with
unchanged bytes. Not run on a unit: only a two-slot conversion writes the
stub and only a cold start runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the CPU record names the tracks refused since the last one

diag.c's CPU record gave only every track refused since the start, while its machine
list is the Part's at the moment of the record, so a pass could not tell whose price
caused a refusal. cpu_refuse now bumps a per-track counter (its only writer); diag.c
compares them with its own copy and puts the tracks that moved in bits 16-23, the
count in the low 16 bits, every track since the start in the top byte as before. The
pull names each such track's machine signature; older records print as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: an in-use refusal says which track and FX slot run the module

dsp.c's admission knew which live slot runs the effect it refuses RUNTIME_IN_USE but
only returned the code. It now keeps that slot (1-8 FX1 of T1-T8, 9-16 FX2), cleared
at each admission, and the self-test record carries it above the refusal (bits 16-23;
the record keeps its 96 bytes). The site reads it and says "Track 6 runs Tape Echo as
its FX2 effect in the current Part." Older bases leave the bits 0 and keep the old hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebuild for the CPU record's tracks and the in-use slot

Release base ada74e3d (was c5791ec9), browser = native .bin 5c7e9eba, container 200
bytes larger. The resident port's dsp.c hunks move 6 lines and its pin follows;
base-bound packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: relink USB Audio 0.4.0 from main to the 0.8.2 base

The merge brought main's USB Audio 0.4.0, bound to 0.8.1 (eb667962). Base-bound
packages follow the cumulative base: requiredBase ada74e3d, package bytes unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: split the in-use test's two assignments, as lint asks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: an in-use slot shows only with its own admission's refusal

Analog BD's and Output Matrix's controllers refuse RUNTIME_IN_USE too, without dsp.c's
admission, so a slot an earlier sync's admission left could name an unrelated track.
The self-test record now carries the slot only while the loader's refusal is that
admission's (RUNTIME_CHECK_DSP, set with each refusal and reset at every prepare), and
the admission no longer clears it. Clearing it in boot.c's prepare instead would move
the base's write-lease entries and need Analog BD's reviewed recipe recaptured.

Rebuilt: base 2f4d5955 (was ada74e3d), browser = native .bin 4e056c4c, resident dsp.c
hunks re-pinned, base-bound packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a frame-admission refusal names its track in the CPU record

status.c's frame admission counts a CPU refusal without moving that track's counter,
so diag.c's CPU record named no recent track for the commonest refusal: on a twin a
POLY8 pick refused on T3 logged 0x04000001 (since-boot T3, recent 0). It now moves
mw_cpu_track_refusals[slot] too; diag.c's comment names both writers.

Rebuilt: base 8f179f5e (was 2f4d5955), browser = native .bin b5336893, base-bound
packages relinked with unchanged bytes. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: the CPU record and the in-use slot on the owner's MKII

A development twin of 6663f66 (58babe99): a POLY8 pick refused on T3 now names T3 in the
CPU record's recent tracks (0x04040001; the build before the fix left it 0), and two
whole sets of 18 and 20 packages ran 30 s each and rolled back with no fault. The unit
came back on its flashed 0.8.1 with its nine modules. An in-use refusal, the soak and the
price were not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a table owner may rest its detours; admit Mute Modes 0.2.4

Mute Modes 0.2.4 rests while MUTE MODE is OT (ev_in_use, runtime.json "rests"); 0.2.3
cost 0.9 points of the frame interrupt at rest. table_declarations.validate read a
site's rest bit (RUNTIME_SITE_RESTS, 0x80) as length, so no base admitted it. The
validator now reads the bit on the owner's own detours and refuses it on the table
pointer and count sites, which must hold while the module rests. 0.2.4 (7542f10c,
declaration 64253fe3) joins 0.2.2 and 0.2.3 as a reviewed table owner (owner, 25 Nov).

Rebuilt: base 910e6625 (was 8f179f5e), browser = native .bin f6e46d06, base-bound
packages relinked with unchanged bytes. On a unit: 0.8.1 dev twin with the same change,
0.2.4 at rest +0.0 (0.2.3 +0.9). Waking on a MUTE MODE switch not run yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: keep the UI tick's bookkeeping between changes

Installed modules nobody uses cost every UI tick in the base, not in themselves (an
emulated twin, instructions a tick): the overload prediction read each trig-mask byte
once per step (512 uncached reads), searched the cost table for every installed module,
and walked the module table for each ev_frame_deadline row; each installed effect made
the handle map's 420 us whole check run more often; and the rest poll stepped through
all 32 positions for one asking module.

Now: the trig masks are read once and counted in bit planes; the rest booking, the
deadline rows' handles and the map's handles are kept until what they depend on
changes; the map's whole check runs once a second by DTIM3; the rest poll judges only
the asking positions. Nothing installed: 12,793 -> 4,147 instructions a tick; Mini Verb
15,673 -> 6,599; Tape Echo 17,647 -> 6,701 (before the rest-poll change). Host tests
for the bit-plane count, the caches' invalidation and the timed check.

Rebuilt: base fad2c729 (was 910e6625), browser = native .bin 1520e947, base-bound
packages relinked (Recorder Loop Fix 0.1.0 6b568782). Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: point Recorder Loop Fix's zero-DSP record at its relinked package

182d7d1 relinked Recorder Loop Fix 0.1.0 to the rebuilt base (6b568782, still
zero DSP words) but left its direct-DSP record on the 0.8.1 package (b39bfa9f),
so resource-indicators.test.ts failed on the draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: one NO leaves FX SETUP after a module pick

After a module effect is picked in FX1 or FX2 SETUP the base shows the memory
box for 1.5 s, and status.c took NO as well as YES while it showed. The
musician's NO back to the effect's page only closed the box and left the
knobs on SETUP, where a module without setup parameters has none: the effect
looked stuck until the page was left and entered again (Midiverb on the
owner's MKII). The owner's rule of 14 October was 'YES only closes it; any
other key goes on to stock'; #640's merge of the dialog key paths took NO
too. Now NO on that box closes it and goes on to stock; the other dialogs
still take it.

test_status.c covers it and fails without the change. On the owner's MKII a
twin of 8b26f3492 plus this change reached the FX2 page with one NO and PROG
moved at once. Rebuilt: base 1306e125 (was fad2c729); base-bound packages
relinked with unchanged bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: stage a module knob in the page's input layer too

mw_knob_step restaged a module page's turned knob in its record, but the page's
input layer still held the previous page's staging (a stock effect's 0..127
knobs) and the panel copies it into the record before each turn. Every detent
found the old step again, restaged and cleared the remainder, so a select
moved only on quick turns until the page was entered again (Midiverb's PROG on
the owner's MKII: ten slow detents left it at 0; FX1 -> FX2 put it right). The
knob's definition in the layer (22 B: slot, 0, then the record) is now staged
as its record, when it names the main pages' knob routine.

knob_step_fixture case E: staged, the remainder kept on the next turn, a
scene's definition and a stock page's layer untouched; fails without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: NO on a MODWERK page goes back to the menu

A page opened from PROJ > MODWERK (SETTINGS, MODULES, STATUS, MODULE COST,
MISSING) closed PROJ menu on the next tick, so NO and the arrows that close
the page left the player on the track screen (a tester, 25 November 2026).
Now the menu stays open under the page: NO, and LEFT or RIGHT (every arrow
on STATUS), close the page back to the menu with its cursor on the row
that opened it. YES on a page that closes still closes the menu; any other
key goes on to stock menu, so PROJ closes it. SELF TEST is unchanged.

test_status.c covers each page and fails without the change. Not rebuilt:
the base and its size record wait for the cumulative regeneration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a recorder's retained bank no longer blocks syncs

Stock keeps two state rows per track recorder and selects one with
0x80004f18. A recording started again while it records moves to the
other row, and STOP clears only that one: the row it left keeps state 2
with nothing recording behind it until the track records again. The
base read any nonzero row as recording, so modwerk_machine_stopped()
stayed false and every sync was refused as unsafe at enter ("Stop
playback or finish recording") on a stopped unit until a power cycle.
boot.c's STOP press was skipped for the same reason.

modwerk_machine_recorder_busy() now reads the selected row and accepts
only idle or that retained 2 in the other one, as the sample editor and
Amiga already do. modwerk_machine_busy() names what refuses a change
(recorder, transport, track byte, journal, with the track); the
self-test reply carries it in the refusal word's top byte, and the site
records it on an unsafe sync_failed (busy) and names the recorder's
track in its notice.

Host tests: test_runtime.c (the emulator's row sequence), the link
test with the fake unit's busy byte, the diagnostics field validation.

Refs #2211, #1596, #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: record the retained recorder bank on the MKII

On twin c6e64b77: T1's recorder started, started again while it
recorded, then STOP left bank A at state 2 with bank B selected and
idle. The twin admitted a trial with that state and refused enter as
unsafe during a live recording, with busy 1.

Refs #2211, #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: big effects load under Sidechain's engine words, and a refused COMPRESSOR pick says why

With Sidechain installed but no track on COMPRESSOR, its engine and the key bus
are not placed, and the allocator put big blocks (E-Verb, Resonator) into the
top words they take. Picking COMPRESSOR then had to copy that code below them;
with two big effects on a core there was often no free run for the copy, so the
claim was refused for memory and COMPRESSOR stayed stock with no KEY page and
no message, until an effect came off (#2189).

Big blocks now go under a soft ceiling first (the capacity less the words held
controllers' engines will still claim); a core that does not fit so is placed
as before. Packing keeps to the same ceiling. A COMPRESSOR pick refused for
memory shows SIDECHAIN PAUSED / DSP MEMORY. Host modes 76 and 77; on an MKII
dev twin the repro (E-Verb @3110, Resonator @1599, stock page) became E-Verb
@2400, Resonator @889, Sidechain active and the KEY page shown. Base not
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a power-up keeps the current bank when stock's checks fix a value

At power-up stock restores the current bank from its battery-backed copy
(0x40025770, called from main's init at 0x4001fb78). Before it copies the
bank in, it runs its checks on the project settings, the arrangements, both
copies of each Part and the bank's 16 patterns, and a single value any of
them has to fix refuses the whole bank: every Part and pattern of it then
reads as stock's empty defaults, while the saved copy on the card still holds
the song. When the saved copy holds the value, each RELOAD brings it back and
the next power-up refuses the bank again. A tester's project came up empty at
every start after a save (#2201): the first record after each of those
starts shows the current Part with no machines, as a refused restore leaves
it, and the tempo kept from the battery copy.

The base now runs those checks itself first, in stock's order, keeping their
fixes as a file load of the same bank keeps them (the same validators), and
then calls stock's restore, which finds nothing left to refuse. A battery
copy with more than 64 fixes, more like one the battery lost than a stray
value, is still refused as stock refuses it. Each start that fixed anything
logs a RESTORE incident (diag.h): the count per stage, the first record that
needed a fix and the result, so the value behind it can be traced.

ot_emu, two-process power cycle on the beta base (--cs1-in, --no-post): one
byte out of range in the battery copy's working Part 1 left the current bank
as stock's defaults on the base without this change (restore refused at the
Part check), and came back whole with it; the same for a pattern; a clean
copy restores as before. test_diag.c covers the order, the UI state taken
again after a settings fix, the 64-fix limit and the RESTORE record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: the module-pool tests no longer depend on MIDI Scenes 0.3.0's size

The tests for a set over the module pool used a tester's real set, which was over the
pool only because of MIDI Scenes 0.3.0 (282 kB); with 0.3.1 (127 kB) it fits and both
tests failed though the check is unchanged. They now grow three published packages to
the most a package may declare (over a third of the pool each) in a catalogue built
from the published manifest, so the set is over the pool whatever any module weighs.
Both behaviours stay covered: refused before the first write naming its largest
modules, and modules already on the unit counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: a freeze records where the processor was

A tester's unit froze twice seconds after a quick SAVE PROJECT (#2225).
Each FREEZE record says only that the UI tick stood still while the audio
frames ran on; nothing says what held the processor, and neither the
emulator nor the owner's MKII reproduced it.

At 5, 6, 7 and 8 seconds of a freeze, diag.c now samples what the audio
frame's eDMA interrupt (level 6, where modwerk_diag_frame runs) interrupted:
the program counter and status register of its exception frame, and the
kernel's current task (0x800068fc). dl_state7 keeps its stack pointer before
it calls dl_frame (build_core.py's DSP_EDITS), the frame sits 60 bytes above
it, and a sample whose vector is not the frame transfer's reads as
0xffffffff. The samples wait in battery RAM ("MWFZ", 0x100f9728, 48 bytes)
and go into the log as a FREEZE_PC incident right after their FREEZE, at
the next start or once the tick moves again, in the existing incident
layout: the log's format and the site's parser are unchanged, and a site
without the new kind leaves the record out. device.mjs's diaglog and
diagnostics-pull.mjs name the code and the task.

Tested: test_diag.c (a freeze that comes back after one sample, one that
needs a restart with four, a frame of the wrong vector), test_recipe,
test_battery_ram, device-log.test.ts with the unit's own record, the
diagnostics tests, tsc and eslint. On the owner's MKII (RAM-booted twin
46c30886…): dev.c's FREEZE TEST held the UI tick 9 s,
and FREEZE_PC named modwerk_diag_tick+0x4fa and +0x508 (the test's wait
loop), level 0, in the UI task, as expected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: recapture Analog BD's reviewed recipe against the release base

The 0.8.2 fixes (#2221 among them) moved the base symbols Analog BD's package links
against, so its image changed and the reviewed recipe refused it. Captured with
build.py --capture-stock-recipe against the release's empty-row symbols: only
imageSha256 changes (ec3a42c0 -> 3d24a7fe); its six stock copies and source pins
are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: regenerate the release base with today's fixes

Base 0.8.2 is now 24e480c4 (was a991caf0), browser .bin 390ae8f5
(834,708 bytes), container 834,692 of 851,712 bytes. It carries #2217,
#2221, #2222, #2223 and #2226. Base-bound packages relinked to it (Sidechain,
Output Matrix and Analog BD bytes move; CC Map, Recorder Loop Fix and USB
Audio 0.4.1 keep theirs); base-size recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: read a freeze's samples from the shared diagnostics contract

diagnostics-pull.mjs (Elastic-2.0 pipeline) imported freezeSamples from
device-log.ts, a GPL frontend file, which licenses:check refuses. The
function and its task table move to octatrack-diagnostics-contract.ts, the
shared file the script already reads; device-log.ts re-exports it, so
device.mjs and its tests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: fold the power-up restore trap into its paragraph

docs/OCTATRACK_HARDWARE_TRAPS.md is over the 40 KB a guide may have and may
not grow; #2223's note added 996 bytes. The paragraph now says what stock
does, what 0.8.2 changes and how to test it in fewer words than before; the
full account stays in the commit and the verification record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: rebind the controller readings, record the release run

The regenerated base moved the controller write lease (0x40a9d794/0x40a9d7b0
to 0x40a9d850/0x40a9d86c). Output Matrix, Analog BD and Sidechain Compressor
are 0.8.1's packages with only those two addresses substituted, checked byte
for byte, so their active-load readings are rebound to the new digests and
the cycle-scan table names Sidechain's new package.

The Model:Cycles diagnostics header takes the two new incident kinds
(RESTORE, FREEZE_PC), as the site reads it with the Octatrack's parser; the
self-test parse test expects #2221's busy byte. The verification record gets
the release image 24e480c4 and the twin 8a341725 results with their edge
cases, and the power-up restore (#2223) its changelog line.

Refs #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: the sync-peak pool tests no longer depend on the published modules' sizes

#2218's three tests priced a tester's real 25 November set and pinned the
peak at 795 kB, so any package that grows by a kilobyte fails them: base
0.8.2's relinked packages read 796 kB (#2079). They now use the grown
packages the other pool tests use: two on the unit fit, two after the sync
fit, all three at once do not, and the message names the one to take out
first and the one to add after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.2: record the MODULES switch, the flash and the Keep on the MKII

The MODULES page switched a kept module off and on with the menu open on
twin 8a341725; the release image 24e480c4 wrote itself to slot B and kept
the project's three modules. Its first start from NOR waits for a power
cycle.

Refs #2216.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a Keep never loses to a saved-set file the start could not read

The restore's load() returned 0 both for a missing slot file and for one it failed to read. With
neither file whole it zeroed the header, generation included, and reported NONE_SAVED when both
failed; the next Keep sealed generation 1 into the other file, so a file that failed to read at
that start and read again later, holding a higher generation, won over the Keep.

load() now tells absent (stock's open -12 or -10, as the logger reads it), read in full but no
set, and unreadable (any other open failure, or any read failing) apart. An unreadable file
reports DAMAGED, the next save goes first to it, and every file the start could not read gets the
set too before the save counts as saved. A header that is not whole is never trusted for its
generation. A newer file that read whole and then failed the restore's second read leaves an
empty set[] with its generation instead of the other file's bytes.

test_modset_card.c runs modset.c's own sector store and load: the power cut before every stock
file call of a save (328 cuts, length landing per sector or at close) and nine read-error cases;
test_modset.c adds three on its pretend card. On f99c1d5's modset.c 13 and 6 checks fail; all
pass now. Fixtures return stock's -12 for a missing file. Release rebuilt: base 39f56803
(was c5791ec9), container 831,656 bytes (+188), base-bound packages relinked. Not run on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix: module knob names that a select changes follow the track on screen

A select that renames its neighbours (Euclid's TYPE) writes the names into
its module's FX page, which every track running the module shares, and the
panel called it only when it drew that select. TYPE sits on FX SETUP, so the
names one track's TYPE set showed on every other track's main page (#2042).

The base now runs a module page's renaming formatters with the drawn track's
own values right before the main FX page and both FX SETUP pages draw their
names (fxpage.s hooks at the drawers, fxpage.c modwerk_fxpage_names). Needs
the next base build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the frame interrupt reads the current Part from SRAM

0x400068e4, called 16 times a frame from the frame interrupt, read the
current Part from CS1 (0x100b14cf); stock writes the same byte to SRAM at
0x80000003 alongside it everywhere. The base reads SRAM there. Emulator
A/B equal to the unpatched twin; on an MKII the frame interrupt fell one
point in every state. Base 880c0a34.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base: number the next base 0.8.3, with its record and changelog

0.8.2 shipped as #2079. The next base carries #2174 (Laslo: the frame interrupt reads
the current Part from SRAM; his record section and Part-switch run, with the boot clamp
answer added), #2109 (a Keep never loses to an unreadable saved-set file) and #2228
(knob names follow the drawn track). Builds follow in the regeneration.

Co-Authored-By: Lasl00 <358371972+Lasl00@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate the base (dbe84522)

npm run octatrack:base -- --beta --write with the pinned m68k toolchain on OS 1.40C:
base dbe84522c4aed776…, browser .bin 52e82bc54f1490cf… (835,440 bytes), packed 835,424,
16,288 under a flash slot. Every change inside a declared site; bootloader copy identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: record its size and bind the base-bound packages to it

base-size.mjs --write records dbe84522; octatrack:module-packages --base-only moves
Sidechain Compressor, Output Matrix, CC Map, Recorder Loop Fix and Analog BD to it.
Their bytes are unchanged: the 0.8.3 changes move no address they link against.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the journal host tests stub the knob-name hooks

test_journal_dsp.c and test_journal_board.c include fxpage.c, which since #2228 calls
modwerk_test_part_store and modwerk_test_format on the host; only test_fxpage.c defined
them, so both failed to link (#2228's own CI never ran: it conflicted). Inert stubs: no
project, no names drawn. test_runtime_journal 7 OK, test_recipe 41 OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate after the test stubs (a7771b08)

The base identity covers its source files, so the journal tests' stubs moved it:
base a7771b082b3a0750…, browser .bin cc0519b85418b0d4… (835,484 bytes). Size recorded,
base-bound packages bound (bytes unchanged), modules regenerated; the record names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack stream probe A: N halfwords a frame to DSP core 0, dev twins only

A development build (module-adapters/stream_probe.py --stream-probe N plus
build_core.py's arguments) that measures whether the base can push N more
halfwords a frame to core 0 through stock's host-port chain. It runs
build_core.py with its seams applied in memory, so build_core.py and every
file a base's identity hashes stay untouched: every other build is
byte-identical. The probe's files and N enter the probe twin's identity.

- ColdFire: the shared state-7 scheduler sends one block (32-160 halfwords,
  whole 64-byte minor loops) from a 16-byte-aligned buffer to X:$x360
  before the loader's packet, in USB AUDIO IN's place (the build refuses
  --usb-input beside it). TCD0's SADDR, NBYTES, CITER and BITER are saved
  before the block and restored right before state 7 unmasks the frame
  interrupt. DTCN3 stamps the block's start, completion and the unmask
  against the frame interrupt's entry (min/mean/max windows).
- DSP: a checker at core 0's frame head (P:$88) checks magic, sequence,
  every pattern word and bits 16-23, counts frames, good, bad, missing and
  out-of-order blocks in private P words and publishes a copy when a block
  asks; dev request 47 reads it with the loader's PEEK.
- X:$x360-$x3ff: no ledger region on core 0, no stock X record in either
  bank (checked at build), the loader's packet ends at $x35f, stock's next
  transfer starts at $x400.

sdk/tests/test_stream_probe.py runs the checker in dsp_host on good, bad,
stale, junk, missing, out-of-order, wrapped and snapshot blocks on both
banks, and checks every build seam once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* device: read stream probe A (do stream, stream:on, stream:off, stream:dsp)

On a twin built with --stream-probe N (dev request 47): `stream` prints the
ColdFire's counts (blocks offered, sent, completed, refused, blocks across
a frame start, state-7 early visits) and the block's start, completion,
transfer and unmask times since the last `stream` as min/mean/max in us
and percent of a frame; `stream:on` starts sending, `stream:off` stops
after one last snapshot block; `stream:dsp` asks the next block for a
snapshot and reads the core-0 checker's frames, good, bad, missing,
out-of-order and junk counts through the loader's PEEK, refusing a torn
or partial read. The decoder is scripts/stream-probe.mjs, with its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Stream probe A: keep the unmask time of frames without a block as a baseline

stream_probe.c keeps a fifth window, the state-7 unmask against the frame
interrupt's entry in every frame that carries no block, so one twin
measures stock's own unmask (stream off) beside the block's (stream on).
The reply grows to 51 words; the test now holds stream_probe.c, dev.c's
length check and scripts/stream-probe.mjs to one layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack stream probe B: N halfwords a frame from DSP core 0, dev twins only

stream_probe.py takes --stream-read N (32-928 by 16) beside --stream-probe N;
a build carries probe A, probe B or both, the real channel's shape.

- DSP: core 0's frame head (P:$88, the site probe A's checker takes) writes a
  block of N words into this frame's bank at X:$x1840: magic $5352, a 16-bit
  sequence, then ((sequence & $ff) << 8) + i. B's writer runs first, then A's
  checker; registers a, x1, r0, r1 only, one DO loop, no rep.
- ColdFire: stock's state 0 (0x40004862, its first 8 bytes, guarded) comes
  to mw_stream_state0. At channel 7's completion, with core 0 still selected
  after the frame entry's own pull, it pulls N halfwords from $7840 stock's
  way (ICR $81, address, count - 1, host command $89, TCD1 CSR $0002 as stock
  writes it, DADDR, NBYTES 64 or 32, self-linked CITER/BITER, SSRT), so it
  reads the block the DSP wrote one frame earlier in the bank it does not
  touch now. Channel 1's completion puts TCD1's DADDR, NBYTES, CITER and
  BITER back and stock's state 0 runs as before. The block is checked after
  state 7's unmask (magic, order, stale, every word); the read's start,
  completion, transfer, the unmask with and without a read and the check
  are timed against the frame interrupt's entry.
- Region: X:$x1840-$x1f7f is free in both banks (payload A's X records
  stop at $583f, the ledger's Analog BD region at $36ff, its frame head
  writes $3f80); the build checks the ledger, the stock X records, the
  stock and loader transfers (TRANSFERS, read from stock chain bytes whose
  hashes chain_proof checks) at every build.
- Probe A keeps X:$x360 up to 160 halfwords and may now go from 192 to 928
  at X:$x1be0, above B; its pattern adds i (the same words up to 256), and
  its checker's junk test skips the pattern's carry into bit 16 past 256.
- dev request 48 (STREAM PROBE B): read, start, stop, zero, windows.

sdk/tests/test_stream_probe.py runs B's writer in dsp_host alone and beside
A's checker on both banks (32 to 928 words, the sequence wrapping), compiles
B's ColdFire check on the host and feeds it good, bad, stale, missing and
out-of-order blocks against a Python model, checks wide A, the proofs, the
reply layouts and every seam of both schedulers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* device: read stream probe B (do streamb, streamb:on, streamb:off, streamb:zero)

On a twin built with --stream-read N (dev request 48): `streamb` prints the
reads offered, sent, completed, checked, refused and lost to a restarted
frame, the ColdFire's check of the blocks (good, bad, missing, out of
order, stale, the last bad block's differences and first words), and the
read's start, completion, transfer, unmask, baseline and check times since
the last `streamb`; `streamb:on` starts reading (counts restart),
`streamb:off` stops, `streamb:zero` zeroes the block counts. The decoder
is in scripts/stream-probe.mjs, with its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a USB Audio stream counts in the CPU limit (#2251)

While a computer streams, the USB interrupt runs inside the frame
interrupt's renders and stretches every frame (owner's MKII: 1.19 to 1.76
times the mean with 16 channels). The base reads EP3's enable bits
(usb_function.c), and status.c stretches what the reserve predicts and what
a pick adds by the stream's factor, keeps the figure kept from a play as it
would be without a stream, and names USB AUDIO STREAM in the CPU FULL box
and the predicted brake's notice. The factor travels in the set's stock
table (stream, streamDuplex: 65, pseudo ids 0xffffffe0/1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate after the USB stream booking (71ecb7a1)

base 71ecb7a1e7d8d831…, browser .bin 27472da4c5a3eeca… (835,864 bytes; 835,848 of
851,712 container bytes). Size recorded, base-bound packages bound (bytes unchanged),
modules regenerated; the record has #2251's measurements and unit results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base: MISSING names the effect slot and how many places name it

The MISSING MODULES line said BANK B PART 1 T4: not which FX slot, and only
the first of several places, so a tester fixed one place after another.
It now reads BANK B PART 4 T4 FX1 +2 (brief and unindented when narrow).
fxmap.c's search returns the slot and counts every slot, working and saved.
Base regenerated (a16ce5d2), base-bound packages rebound; size record owed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: size record after the MISSING slot change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the attach watchdog waits for a configured unit, not an addressed one

Four times on 26 November 2026 the owner's MKII ran on with USB dead until a power cycle,
after a RAM boot, a USB Audio install and a layout change, with no usb incident logged:
the watchdog took any address for enumerated, so a Mac that failed part way left the
unit addressed and it was never offered again. ep0.c's enumerated() is now USB MIDI's
usbmidi_up (set at SET_CONFIGURATION, cleared at a bus reset and the session's end) on a
base with USB functions. ot_emu, twin 764b6e71: a host that addresses the unit and stops
gets a re-offer within 8 s; a configured unit gets none for 15 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate after the attach watchdog change (c7478e59)

base c7478e593d347461…, browser .bin 5361c502ea850b3e… (836,272 bytes). Size recorded,
base-bound packages bound (bytes unchanged), modules regenerated; the record has the
watchdog's emulator results and what the unit still has to show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: pin Recorder Loop Fix's rebound package in the direct DSP evidence

2fcbc28 rebound recorder-loop-fix 0.1.0-experimental (1c68607e); the package
still has zero DSP program words, so the record holds with the new hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the attach watchdog's unit run (no drop, no false re-offer)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: record the USB loss at a USB Audio rollback after a stream (open)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the rollback loss follows a large set, not an open stream

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a USB stream booked by its width (#2251)

A stream's stretch depends on how many channels it carries and on the USB
Audio version: after 0.4.2's cost cut, Main + Cue stretches the frame
interrupt about 1.26 times and 16 channels about 1.86 times, against the one
1.65 the base books for every stream. usb_function.c reads the active
high-speed profile's EP3 IN packet as it composes the configuration, and
status.c looks up the set's figure for that width (up to 2, 4, 8, 16 and 20
channels, stock ids 0xffffffe2-6), else the single one as before. The site
sends them from frame-costs-base.json's stock.streamByWidth; until that holds
measured figures, nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate after the stream width booking (1fa425c3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: changelog for the attach watchdog change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: record the night's last USB loss (a twin-to-twin RAM boot after a large rollback)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: a RAM boot right after a finished recover also failed (26 November 2026)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a USB reset retires stock's mass-storage replies

The owner's MKII froze with the screen and USB dead and the audio running
(27 November 2026, a USB Audio install a minute after a rollback): freeze PC
0x4001cc30 at level 4, stock's USB DISK reply sender spinning inside the USB
interrupt until its next transfer descriptor (slots 4-15 at 0x46c95000) goes
inactive. The base always offers mass storage, so a host probes it after every
reconnect; a reset that came while a reply was primed left that slot ACTIVE for
good (stock's own ring reset clears 4-14 only), and when the ring came round to
it the interrupt never returned.

ep0.c's bus-reset hook now flushes EP1's transmit side (bounded) and clears the
token of every send slot (usb_stock_sends.h; host test test_usb_stock_sends.c).
Every reconnect the base makes ends in the host's bus reset, so this covers
installs, removals, profile changes, the attach watchdog and a pulled cable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate after the USB reset fix (88698afc)

base 88698afcaf9bca89…, browser .bin f39567debdf46834… (836,540 bytes; 15,188 container
bytes free). The record has the freeze's cause, the fix's unit run on twin 9cf5c4a8 and
the rollback loss that remains open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: record which side gave up when the host's USB frames stop (#2290)

The frame interrupt watches FRINDEX. When the host's start-of-frame packets stand still
for 3 s while the base expects a host (heard in the last 10 s, configured, or its own
reconnect under way; never with a RAM boot armed), it keeps the controller's OTGSC,
PORTSC1, USBCMD, DEVICEADDR and FRINDEX, usb_function.c's state, timer, off_ticks,
reset_seen and retried, the attach watchdog's off, tries, detached and fresh,
usbmidi_up and the busy flags at 3, 4, 5 and 6 s in battery RAM ("MWUG", 0x100f9758).
It also keeps how far the UI tick, ep0_tick and the reconnect tick moved in those 3 s.
The tick adds it as a USB_GONE incident (kind 15), or the next start does; once an
episode, at most four a boot. The site, `device do diaglog` and diagnostics:pull
decode it in one line.

Host: test_diag.c (samples, early end, nobody expected, four a boot, next start),
device-log.test.ts, test_recipe host tests, the Model:Cycles layout test, battery RAM.
Beta base compiles (MAIN 1,353,772 bytes; packed 837,872, 13,840 free); the committed
.elemod is not regenerated here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a reconnect that cut a transfer stays off the bus ten seconds

Owner's MKII, 27 November 2026, twin 4dd69450 (dc9d156 + the USB_GONE record): an
install whose reconnect waited out the patience was forced; 0.3 s after the unit left the
bus the Mac's hub reset the port ("reset did not enable port"), the unit came back half a
second after leaving, in the middle of the host's reset retries, and its controller took no
reset after that (USB_GONE at 3-6 s: attached, enabled, address 4, back on the bus). macOS
gave up ("persistent enumeration failures"); neither the watchdog's re-offers nor a cable
replug brought it back, only a power cycle.

A forced detach now stays off for ten seconds (UF_DOWN_LONG), longer than the host's
reset retries, so the hub sees a clean disconnect. The attach check retries when no reset
came within three seconds even when the port reads attached (CCS does not tell), off for
ten seconds as well; a resetting or suspended port is still left alone. Host tests updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: a port the host never brings back gets the controller reset

Owner's MKII, 27 November 2026, behind a USB 2.0 hub: a host reset that met the base's
own reconnect left the port stuck in two ways, both with no frames from the host:
attached and enabled with the old address and no reset taken (twin 4dd69450), or held in
reset, PORTSC1.PR for seconds (twin ed5474c6). Neither the pull-up off and on, the attach
watchdog nor a cable replug brought it back; a power cycle did.

Three seconds after the unit comes back, no new frame for half a second (FRINDEX) on a
powered, unsuspended bus now resets the controller (USBCMD.RST), sets the transceiver up
as the bootloader does (ULPI in PORTSC1, a wake through the viewport, bounded waits),
runs stock's reset and start, and stays off ten seconds before attaching once more. Host
tests: the stuck cases recover, a suspended port and an unpowered bus are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Revert "Octatrack base 0.8.3: a port the host never brings back gets the controller reset"

This reverts commit e183a30.

* Octatrack base 0.8.3: regenerate (5af431bd); the reconnect drop understood, shipped as known

base 5af431bd3e42d93c…, browser .bin cf4fef8f637d8336… (837,908 bytes; 13,820 container
bytes free). The record has the drop's two sides (the Mac's kernel log, the usb_gone
record), the forced-reconnect fix's unit run and what stays open; the changelog names
the known issue for musicians.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: regenerate on main with USB Audio 0.4.2, which moves onto 0.8.3

The base is unchanged (5af431bd); USB Audio 0.4.2's package (c2597a32) now names 0.8.3 as its base, as every earlier
version moved with its base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Octatrack base 0.8.3: the base test procedure on twin ed5474c6 and the release image booted

Steps 1-4 and 8-10 passed; step 7 ran in halves without RINGMOD SC (a twin without controller rows; the release
image admits it). Three set publications were cut at 10 s and not reproduced in 14 runs: recorded as open. The
release image booted on the owner's MKII and ran USB Audio 0.4.2 and RINGMOD SC as trials.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Lasl00 <358371972+Lasl00@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant