Skip to content

Module: Master Thru (draft): THRU's controls on the master's PLAYBACK page - #2604

Draft
Takuhito-bit wants to merge 9 commits into
repeat98:mainfrom
Takuhito-bit:module/master-thru
Draft

Takuhito-bit wants to merge 9 commits into
repeat98:mainfrom
Takuhito-bit:module/master-thru

Conversation

@Takuhito-bit

Copy link
Copy Markdown

Draft: Master Thru, the page part. It works on an MKI; the sound part waits on base support (#2602). Not for review yet.

What it means for players: with MASTER TRACK on, the master (T8) gets THRU's controls on its PLAYBACK page, so the live inputs can join the master's mix without spending a track on a THRU machine. In this draft the controls show and edit, but change nothing you hear yet.

What works (on my MKI, RAM trial, rolled back):

  • T8 → PLAYBACK with MASTER TRACK on shows THRU's own page (stock shows nothing there): INAB, VOL, PAN, INCD, VOL, PAN.
  • INAB/INCD read as on a THRU track; VOL and PAN show -64..+63; INAB > VOL > PAN and INCD > VOL > PAN are linked by stock's arrows.
  • Values change and take locks. No crash, stall or skipped track in the trial's log.

What is missing:

Next step: once the base change is agreed, the engine and the AMP page, then a full test on the unit.

How it works
  • One detour at 0x40031e6a, in stock's page selector (0x40031e08). Stock loads the empty page 0x400d2e8a for T8's PLAYBACK while it is the master; the detour returns a page built once from the unit's own THRU page (0x400d3308, 0x1ca bytes, copied at run time as Amiga copies FLEX's), with PAN copied from VOL into THRU's empty slots 2 and 5 and the link nibbles at +0x1c6 set to 0x00331331. Every other track replays the stock instruction and continues at 0x40031e70.
  • Nothing runs per frame. 236 bytes of code and data, 464 bytes of bss, one stock site.
  • module:doctor -- --draft master-thru: the experimental lines are green.

What the guides lacked: that section_3_MAIN_OS.bin loads at 0x40000400, not 0x40000000 (I disassembled at the wrong base first; my first comment on #2602 had every ColdFire address 0x400 low). And that a machine page's descriptor starts 0x38 bytes before the selector's table entry. I'll put both where a reader would look before this leaves draft.

🤖 Generated with Claude Code

Takuhito-bit and others added 2 commits December 4, 2026 18:28
With MASTER TRACK on, stock leaves T8's PLAYBACK page empty. One detour in
the page selector returns a page built from the unit's own THRU page, with
PAN in THRU's two empty slots and the three knobs of each pair linked.
Tried on an MKI (TESTING.md). The DSP part waits on base support (repeat98#2602).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second detour, at the selector's AMP branch (0x40031e7e), returns stock's
AMP page with ATK/HOLD/REL for inputs A/B on the top row and C/D on the
bottom. On an MKI the page shows, and moving or locking its knobs leaves the
master's sound alone (TESTING.md).

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

Copy link
Copy Markdown
Author

Milestone: the AMP page works on my MKI too. With MASTER TRACK on, T8 → AMP now shows ATK > HOLD > REL for inputs A/B (top row) and C/D (bottom row), from stock's AMP page (second detour, at the selector's AMP branch 0x40031e7e). Moving and locking those knobs changes nothing heard in the master's mix, so stock's AMP stage leaves the master alone with T8's AMP slots set: the envelopes can live in Master Thru's own DSP engine, on the inputs only. Trial 07c177fc, rolled back, no crash or stall logged.

Still missing: the DSP engine (waits on #2602). Its trig could come from the step clock proposed in #2491 (hook 92), or from T8's frame record as SHRED reads it today.

Takuhito-bit and others added 2 commits December 4, 2026 18:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…TER+THRU

The pages' marks show that PLAYBACK's rows read on into AMP's (A/B on top,
C/D below); the master's name says it also takes the inputs. Seen on an
MKI (TESTING.md).

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

Copy link
Copy Markdown
Author

Milestone: the pages' final look, on my MKI. PLAYBACK reads INAB VOL PAN> over INCD VOL PAN>, AMP reads >ATK HOLD REL on both rows (inputs A/B on top, C/D below), without link marks, and with MASTER TRACK on the master is named MASTER+THRU. Nothing else on other tracks or screens changed. Trial f99c4cb4, rolled back, nothing logged.

How

The marks are plain > in the page copies' slot names. The name: two SymbolRefs, at 0x4003d684 and 0x4004c180 (the pea operands that push stock's MASTER string for the master), point at the module's own string. 0x4004c180 sits before the base's mw_name_b site (0x4004c36a) without overlapping it; modules:compat reports no problems.

Still waiting on #2602 for the sound.

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

repeat98 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Thanks @Takuhito-bit. It's a nice idea: live inputs on the master without spending a track on THRU. Building the pages from the unit's own THRU and AMP pages at run time keeps stock bytes out of the repository.

Where it stands: both pages show and edit on your MKI in RAM trials, and nothing is heard yet, because the sound part waits on the base support you asked about on #2602. TESTING.md now names 0.1.0-experimental, and every check on 8ae23cfa is green. Who acts: you, on the points below, whenever you're next on this; the base questions stay on #2602. Nothing here has run on an MKII yet.

Please, before this leaves draft:

  1. The README says nothing else patches the selector, but the base does. Its page resolver for contributed machines patches 0x40031e74 (mw_resolve_pb) in the same selector at 0x40031e08, between your two detours (0x40031e6a, which rejoins at 0x40031e70, and 0x40031e7e). The base's machine-name hooks (mw_name_a at 0x4003d718, mw_name_b at 0x4004c36a) are in the same lookups as your two SymbolRefs. No bytes overlap, but please correct that line and say how your sites sit beside the base's.
  2. What T8 keeps when the master goes away. The values live in T8's PLAYBACK and AMP slots. Please try three things and write what you hear and see: MASTER TRACK turned off with INAB, VOL, PAN, ATK, HOLD and REL set (does T8's own machine read them as its PLAYBACK and AMP values?), the module removed, and a project saved with them set and loaded on a unit without the module.
  3. Stock's master pages, without the module. Add a capture of T8's PLAYBACK and AMP pages with MASTER TRACK on, so a reviewer can see that the AMP page has nothing to lose (MKI, and MKII if you can get one).
  4. The MASTER+THRU name costs two more stock sites and shows even with both inputs off. If it isn't needed, the stock MASTER is simpler. Your call.

A small one: the manifest's "Not tried on a unit yet." limitation predates your MKI trials.

What I checked
  • No other module or draft claims screen:MASTER PLAYBACK or screen:MASTER AMP, and none patches 0x40031e6a, 0x40031e7e, 0x4003d684 or 0x4004c180. Nothing in the library is a THRU-style source for the master. Output Matrix rewrites the master's mixdown on the DSP in MATRIX mode, so the engine part should be tried with it installed.
  • No requires, and no reference to another module's code. The trig source for the envelopes (the step clock proposed in Octatrack: a step and trig clock for DSP effects (for Glitchbox, SHRED, Freeze), and one effect or three? #2491, or T8's frame record) has to come from the base or stock, never from another module's code.
  • CI on 8ae23cfa: module-contract, module-suites, describe and module-pr-ok pass. No runs are waiting for approval. The branch is well behind main; no need to refresh it while it's a draft.

Generated by Claude Code

Takuhito-bit and others added 3 commits December 5, 2026 17:19
…etours beside the base's resolver

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the master goes away, on an MKI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r goes away

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

Copy link
Copy Markdown
Author

Thanks @repeat98. All four points are addressed in 15c4124b5..ed6a4e58a; everything on the unit below is from my MKI (OS 1.40C, base ddb56b72), RAM trials of b026a357, as I saw them.

  1. The selector. README's line is corrected. The base's mw_resolve_pb takes 0x40031e74..0x40031e7d; the PLAYBACK detour (0x40031e6a, 6 bytes) ends 4 bytes before it and the AMP detour (0x40031e7e, 6 bytes) starts on the next byte. For every track but the master, the PLAYBACK detour replays the displaced move.l and rejoins at 0x40031e70, which runs on into the base's resolver, so contributed machines still resolve there. With the name gone (point 4), the module no longer touches the lookups mw_name_a / mw_name_b sit in.

  2. What T8 keeps. The values stay T8's own and are saved with the project:

    • MASTER TRACK turned off with them set: T8's STATIC machine took them. Its AMP values sat all the way left, VOL and BAL among them, so T8 was silent until I raised VOL; it then played its sample.
    • Module removed (USB unplugged, rolled back, unit restarted): the master's pages are stock's again.
    • Project saved with them set, loaded without the module, MASTER TRACK off: the same. AMP all the way left; on PLAYBACK, PTCH and RATE all the way left, STRT all the way right, LEN, RTRG and RTIM centred.

    README now says so under "Changes to stock flows". This could surprise a player who turns the master off. Would you rather the module leave T8's slots alone (keep its own values elsewhere), or is documenting it enough for now?

  3. Stock's master pages. media/stock-master-playback-mki.png and media/stock-master-amp-mki.png, captured over USB without the module: both pages have no controls. No MKII here.

  4. The name. Dropped: the master is MASTER again, as stock. Two stock-code sites instead of four. Seen on the unit.

The manifest's "Not tried on a unit yet." now says MKI only. modules:check passes locally. Full record in TESTING.md.

🤖 Generated with Claude Code

@repeat98

repeat98 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

@Takuhito-bit thanks, all four are in, and the stock captures answer point 3: there's nothing on the master's pages to lose.

On your question: please keep the master's values out of T8's own slots, if you can do that without another stock site. Nothing on stock's master pages edits those slots, so when a player turns MASTER TRACK off, or removes the module, they should get back the T8 they had, not a silent machine with odd settings. The project's own storage is one place for them (project.work, through ev_project_load and ev_project_write, which is what the MIDI NRPN draft plans).

If keeping them elsewhere needs a new stock site, keep them where they are. Then say in the README and the limitations that turning MASTER TRACK off afterwards leaves T8 with those values, and that VOL starts all the way down.

Who acts: you, whenever you're next on it. The sound still waits on #2602.

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

This branch has not been deployed

No deployments
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.

2 participants