make the Ensoniq's oscillators actually run
The chip was four registers and nothing behind them: it remembered a waveform and never played it. Now each of the thirty-two oscillators is what the part actually is -- an address generator rather than a tone generator, a 24-bit accumulator that a frequency is added to, some of whose bits are an address into the sound RAM, and the byte there is the signal. Which bits is Figure 5-7's business, and addressOf is written from the figure and tested at every corner of it. The end of a wavetable is where the four modes differ, and where two things had to be got right that a plain reading misses. An oscillator interrupts when it "reaches the end of its wavetable", says the Hardware Reference, and not when it halts. That distinction carries weight: Technical Note #23 describes the machine's own note synthesiser running a free-running oscillator over the first page of the sound RAM at zero volume purely as a clock. A free-running oscillator never halts, so interrupting only on a halt would have left every envelope in the machine frozen. Nothing published says how that interrupt is let go. The machine's own handler settles it: at $ffb8f6 it points the chip at the interrupt register, reads the data register twice -- once for the lag and once for the value, which also confirms the one-byte lag from the other side -- then tests bit 7 and puts the pointer and the control register back without writing anything to the chip. If the read were not the acknowledgement, the line would never drop. Technical Note #11's swap-mode anomaly is not modelled anywhere here. The DOC falls silent for a single sample whenever a swap goes from a higher-numbered oscillator to a lower-numbered one, and not the other way about; that falls out of scanning the oscillators in order, lowest first, as the chip does. An even oscillator woken by its odd mate has already been passed over this time round. The test asserts the anomaly rather than the tidy behaviour, because reproducing it is the evidence the scan order is right. advance divides against the scan rate exactly and keeps the remainder rather than rounding cycles-per-scan to a whole number. At 2.8 MHz with eight oscillators running that is 31.29 cycles, and calling it 31 played the machine one per cent sharp, which is a sixth of a semitone. Wired into the machine on scan-line boundaries -- a frame is too coarse a tick when the interrupt register holds one interrupt at a time -- and onto the IRQ line. System Disk 3.2 still boots to its menu with all of it running. What is still missing is the last step: gs has no audio output, so the oscillators are summed and the sum is thrown away. The README's IIgs ROM section still opened by saying nothing loaded those ROMs, which stopped being true some time ago; that and the Ensoniq passages are brought up to date, and the parent section's closing paragraph and examples are moved back out of the subsection that had swallowed them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGTyJ7dpf3LT6aU9icQwkV