Skip to content

FM Synth 0.1.3-experimental: keep the SRC page out of the stock DELAY's table tail - #895

Closed
repeat98 wants to merge 9 commits into
mainfrom
claude/fm-synth-dram-page
Closed

repeat98 wants to merge 9 commits into
mainfrom
claude/fm-synth-dram-page

Conversation

@repeat98

Copy link
Copy Markdown
Owner

FM Synth 0.1.3-experimental moves its SRC page code out of the 16 bytes the stock DELAY reads past its table. It's a card-build fix; the USB package is unchanged.

Draft: waiting for the owner's approval record. Everything below is done and checked except the steps that need it.

What was wrong

The stock DELAY looks up 0x400d1ce0 + 4 * (x >> 6) and keeps the word in the track's delay state. Its table has 508 entries and ends at 0x400d24d0. At a slow tempo with a long TIME the index goes past the end (508 at 51 BPM, measured under the ColdFire port) and reads the next 16 bytes, which are zero on a stock unit.

FM Synth 0.1.2 linked its SRC page at exactly 0x400d24d0 in card builds. In the browser-composed FM-Synth-only image those 16 bytes hold page code (202f0008…), so DELAY at those settings reads code as a coefficient. Not heard on a unit.

What changes

  • The page is a DRAM unit, like machine.s and registration.c already were (manifest.py).
  • Registration calls the page by its symbol, fm_descriptor, instead of 0x400d24d0. registration.s is the compiler's own output for the changed registration.c (GCC 16.2.0 in the pinned image, same flags as before), byte for byte.
  • USB adapter: it used to rewrite those two calls from the fixed address. Now it maps the compiler's jra fm_descriptor back to the absolute jmp it always emitted, so the USB package image stays the one its recipe binds.
  • Machine port and recipes: the port's reviewed source hashes and the five machine recipes' source pins are updated. Every recipe still matches its image.
  • Version, catalogue, release notes, changelog, README and TESTING.

Tests

  • Card image: the 0.1.3 FM-Synth-only MAIN has zeros at 0x400d24d0..0x400d24df; 0.1.2's has code there.
  • LCD: all seven captures retaken from the 0.1.3 image with the recorded plan, and from 0.1.2 with the same emulator. All fourteen PNGs are byte-identical to the committed ones, including the SRC page the moved code draws. The 0.1.2 captures' emulator build is gone; these used ot_emu bdbe962c….
  • USB package: 0.1.3-experimental.mwrm is byte-identical to 0.1.2's (29,810 bytes). Both stock-free scans pass: longest shared run 11 bytes (limit 12), no 16-byte run. octatrack-module-packages.py --check reports it identical.
  • Card packages: only fmpage (now DRAM) and fmregistration (two symbol relocations, 1,408 → 1,464 bytes) change. Every other package changes only its version label.
  • Adapters: fm_runtime_tests and machine_composition_tests pass, including the relocation proof (no 0x400d24d0 in the package) and both composition proofs.
  • Native parity: the native side of module:verify synth ran (154 selections, cached). Its browser side needs the regenerated documents, so the record isn't written yet.

Not done

  • Owner approval record, sdk/synth-build-approval.json, for this version: same waivers as 0.1.2 (current-build hardware, chip worst-case cycles, complete memory bounds). Native source a2d318bb91b4c115dd248c9b439250eb28552e2dc70eb83f967a0e24ad8b7f39. After that: npm run modules:generate, module:verify synth (browser side from cache), the parity record and pr:ready.
  • Not rerun: the Octemu MIDI-selector and mono/four-voice audio regressions. The engine and the bundled quantizer are unchanged, and the sample-free fixture those runs used is no longer on the test machine.
  • Hardware: none, as for 0.1.2.
  • Locally, npm run octatrack:module-packages still stops at Tape Echo's and Euclid's standalone recipes, which were already stale on main after kit 0.7.0. CI skips those builds. The follow-up DELAY-guard PR re-pins them.

Once published, this notifies FM Synth's followers, by email according to their preferences.

🤖 Generated with Claude Code

repeat98 and others added 7 commits October 25, 2026 07:27
… table tail

The page was linked at 0x400d24d0 in card builds. At a slow tempo with a
long TIME the stock DELAY reads 16 bytes past its 508-entry table, the
first bytes of that free run, which are zero on a stock unit. The page is
now a DRAM unit like the machine and registration; registration calls it
by its symbol (registration.s recompiled from registration.c), so the USB
adapter no longer rewrites those two calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The USB adapter keeps emitting the absolute jmp it always made for the page
call, so the package image is unchanged (29,810 bytes, 0 differing). The
machine port's reviewed sources and the five machine recipes re-pin to the
changed manifest, registration.s, fm_runtime.py and machine-ports.json;
every recipe still matches its image. Stock-free scans: longest shared run
11 bytes (limit 12), no 16-byte run.

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

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

# Conflicts:
#	src/engine/assets/bootstrap-package.json
#	src/engine/assets/coldfire-packages.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/dsp-packages.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/platform-writes.json
#	src/engine/assets/requested-packages.json
#	src/engine/assets/resident-dsp.json
#	src/engine/assets/rom-packages.json
#	src/engine/assets/usb-audio-packages.json
#	src/engine/assets/utility-packages.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 and others added 2 commits October 25, 2026 09:42
… this branch's engine assets

After merging main (#898 re-pinned them to main's assets), the four asset
files this update changes no longer matched. octatrack-module-packages.py
--check reports all 25 published packages identical.

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

Copy link
Copy Markdown
Owner Author

@timhastie heads-up on FM Synth: this moves the SRC page code into DRAM on card builds, so the stock DELAY no longer reads it past the end of its table at slow tempos with a long TIME. Your engine and quantizer files are unchanged and the USB package stays byte for byte the same. Tell me if you see a problem with it.

@timhastie

Copy link
Copy Markdown
Contributor

Thanks for this! I'll fold your SRC page move into FM Synth 0.1.4, credited to you, so #895 can close once 0.1.4 is up.

@repeat98

repeat98 commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Closing: #1146 (FM Synth 0.1.4) moves the SRC page out of the 16 bytes the stock DELAY reads past its table in FM Synth itself, so this fallback isn't needed.


Generated by Claude Code

@repeat98 repeat98 closed this Nov 2, 2026
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