# Paula: audio, the disk controller, interrupts, the UART, the pots Paula (8364, unchanged through OCS, ECS and AGA) has four functions that share one chip and one family of registers. Facts from HRM3 (tier 2), PDF pages: audio chapter 5 (pdf~150-185), interrupts chapter 7 (pdf~232-236), disk, serial and pots chapter 8 (pdf~240-290). ## Interrupts INTENA (enable) and INTREQ (request) with a SET/CLR bit 15; bit 14 INTEN is the master enable. Paula drives the 68000's three IPL lines with the highest pending enabled level (HRM3 pdf236, figure 7-4): | Level | Sources (INTREQ bit) | | --- | --- | | 1 | TBE (0), DSKBLK (1), SOFTINT (2) | | 2 | PORTS (3): INT2 and CIA-A | | 3 | COPER (4), VERTB (5), BLIT (6) | | 4 | AUD0-3 (7-10) | | 5 | RBF (11), DSKSYNC (12) | | 6 | EXTER (13): INT6 and CIA-B | | 7 | NMI (external only) | All interrupts are taken autovectored (the 68000's VPA path; cpu-m68000.md). The delay between a write to INTREQ/INTENA and the IPL lines changing, and between IPL and the 68000 sampling it, is U19 (a known source of "one instruction later" differences; vAmigaTS Paula/Interrupts decides). ## Audio - Four 8-bit PCM channels, each with a period counter clocked by the colour clock (the "clock constant" 3,579,545 Hz NTSC, 3,546,895 Hz PAL, HRM3 pdf174), a 6-bit volume (0-64), a pointer and a length in words, fetched by audio DMA in that channel's slot. Channels 0 and 3 go to one stereo side, 1 and 2 to the other (chapter 5). - **The minimum period is 124 colour clocks** if DMA is to keep up (HRM3 pdf156, pdf171); at 124 a channel plays about 28,867 samples a second (pdf156). Below that DMA cannot fetch in time and samples repeat (what exactly is heard: U20). - Attach modes (ADKCON): a channel modulates the next one's period or volume (tables 5-4, 5-5, pdf~165). - Each channel is an **eight-state machine clocked at the colour clock** ("three of the states are basically unused", HRM3 pdf179, figure 5-8): this diagram is the specification's audio model, state by state, with its DMA request and interrupt points. Its exact timing against the DMA slot (when the request is raised and when the word arrives) is U21. - Output: a DAC per channel, then the board's analogue path: a fixed low-pass filter and the switchable "LED" filter on CIA-A PRA bit 1 (HRM3 pdf172: on later A500 and two-layer A2000 boards the bit bypasses the filter). The filters are the board's, not Paula's; the A1000 lacks the switch. Their exact curves are U22 (the family's "sound: good enough" rule applies: Aubrey 2026-11-13). ## The disk controller - DMA from the drive's serial bit stream into chip RAM, a word at a time, in the disk slots (3 per line). Started by writing DSKLEN twice with the DMA bit set (table 8-6, pdf~246: the double write is a safety rule); interrupt DSKBLK (level 1) at the end. - ADKCON (table 8-8): FAST (bit 8: 2 µs MFM bit cells; clear: 4 µs, "usually GCR", HRM3 pdf264), MFMPREC, PRECOMP (write precompensation), WORDSYNC (start DMA only after a DSKSYNC match), MSBSYNC (GCR). - DSKSYNC (DFF07E) holds the sync word, "typically ... the magic MFM sync mark value, $4489"; the DSKSYNC interrupt (level 5) is raised on every match, independent of WORDSYNC (HRM3 pdf265). - DSKBYTR gives the CPU a byte-at-a-time view of the stream (and DMAON, WORDEQUAL). - Paula only sees a bit stream and an index pulse arriving through CIA-B's FLAG pin; the drive itself (motor, heads, the rotating track) is floppy.md's. ## UART SERPER (baud divisor in colour clocks, and 8/9-bit long mode), SERDAT (write: start, data, stop bits), SERDATR (read, with RBF, TBE, TSRE status), interrupts TBE (level 1) and RBF (level 5) (HRM3 pdf~256-258, figure 8-11, table 8-9). The Kickstart writes debug text to it on some revisions (to observe, not rely on). vAmigaTS Mainboard/UART judges the timing. ## Pots and buttons POTGO starts the proportional counters (normally during vertical blank) and sets the direction and value of the pot pins, which double as the second and third mouse buttons; POT0DAT/POT1DAT read the counts; POTINP reads the pin levels (HRM3 pdf249-255, table 8-4). The counter rate and the capacitor charge model (pdf251: 0.047 µF, "16.6 milliseconds for charge to full") matter only for analogue joysticks: functional level.