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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/2026-11-21-dsp-div-half-quotient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The effects guide now explains how to get the integer quotient from the DSP's fractional divide when both operands are positive and in range.
1 change: 1 addition & 0 deletions docs/module-guides/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Octabam's behaviour tests run through its DSP host and need a native toolchain (

- No `rep` anywhere in a DSP source (`npm run modules:check` refuses one in a module listed from 23 October 2026; `do #n,>label / <one instruction> / label:` is bit-identical and interruptible): a `rep` cannot be interrupted, so the host-port handlers that arm the ColdFire's DMA answer late. The audio crackles, a core's tracks go silent or ColdFire RAM is written out of place, on hardware only. A `do` loop is bit-identical. Keep dense X work out of the 8K memory blocks a DMA uses as well; both are in [OCTATRACK_HARDWARE_TRAPS.md](../OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code).
- `dsp56kDisassemble` prints a `DO` endpoint as the exclusive next-instruction address (`LA+1`); the encoded loop-address word is the inclusive last loop word. CFG/cycle tooling must use `pc < printed_endpoint`. Do not reprice existing effects by confusing the two representations.
- `div` is a fractional divide. For positive integers N and D, put N's high word in a1 and low word in a0, put D in x0 and clear carry (`andi #$fe,ccr`). After 24 `div x0,a` steps, a0 holds floor(N / (2D)). To get floor(N / D), shift N left once (`asl a`) or store 2N. This works only while the dividend, including after doubling, is smaller than the divisor when both are interpreted as fractions. Ghost Cut's tempo-synced loop lengths came out half as long until its table held 2N (measured in `dsp_host`). A module's own reference model compared sample for sample with `dsp_host` catches it.
- The DSP assembler silently mis-encodes some instructions: [octabam's AGENTS.md](../../sdk/octabam/AGENTS.md). Disassemble what you assemble.
- A knob rename or count change is a stored-data change. Stamp every project before anyone plays it.
- A formatter overrides the count it sits beside; declare `formatter=` per slot.
Expand Down