# The cartridge port and the cassette Sources: the TRM's "Cartridge ROM and other devices" (Table 5, figure 15) and "Cassette interface" with its tape format; the SAM's memory map; LOM's cassette and cartridge sections; MAME's software lists for the media census. DOC unless tagged. ## Cartridge port (40 pins, TRM Table 5) | Pins | Signal | Use | | --- | --- | --- | | 1, 2, 9 | -12 V, +12 V, +5 V | (the CoCo 2 dropped the 12 V lines: LOM) | | 3 | HALT* | input to the CPU: the disk controller holds the CPU on DRQ ([disk.md](disk.md)) | | 4 | NMI* | input to the CPU: the disk controller's end-of-command | | 5 | RESET* | system reset | | 6, 7 | E, Q | the CPU clocks | | 8 | CART* | PIA1 CB1: cartridge detect and FIRQ | | 10-17, 18, 19-31, 37-39 | D0-D7, R/W*, A0-A15 | the CPU bus | | 32 | CTS* | ROM2 select: C000-FEFF (S=3; the TRM's text says "C000 through FFEF", against its own map and the SAM's: C5) | | 35 | SND | analogue sound into the MC14529B (select 01) | | 36 | SCS* | spare select: FF40-FF5F (S=6) | | 40 | SLENB* | disables the board's device selects, so a cartridge can claim decoded space | **Autostart.** A ROM pack ties Q to CART*, so while it is plugged in PIA1 CB1 sees a square wave at the E rate; with CB1's FIRQ enabled (the ROM sets FF23 = 37h, rising edge: OBSERVED, [pia-io.md](pia-io.md)) the first FIRQ makes BASIC jump to the cartridge at C000 (TRM: "This generates an interrupt anytime the cartridge is plugged in and forces the computer to jump to the program in ROM"). The board models CART as a level supplied by the cartridge object, computed from E for ROM packs, so the first FIRQ lands on the right cycle. With the disk controller in the slot MAME's `coco` shows "DISK EXTENDED COLOR BASIC 1.1" after 3 s and no cartridge-style start (OBSERVED); that Extended BASIC finds the disk ROM at C000 itself rather than by CART is HYPOTHESIS until the trace is read (U12). **Cartridge types for the board** (MAME's `coco_cart`/`dragon_cart` lists, 112 + 41 entries, CC0): plain ROM packs at C000 (the TRM's figure 15 shows up to two ROMs, "the total ... must not be greater than 64K"; the lists' ROM area sizes are counted in [census.md](census.md)), banked packs (three `coco_cart` entries carry the `slot` feature `banked_16k`, MAME's `cocopak_banked`; its bank register's address is U14), the disk controllers (eight `dragon_cart` entries are DragonDOS ROMs, `slot` `dragon_fdc`, one `premier_fdc`), and add-ons (Orch-90, the Speech/Sound and Sound Extension modules, modem and RS-232 paks, the Multi-Pak) as later sockets. Every other entry has no `slot` feature: a plain ROM pack. The `.ccc`/`.rom` image is raw bytes at C000; the list's `slot` names the device. ## Cassette Hardware (TRM): output from the DAC through an attenuator (about 1 V) to the recorder's input; motor relay on PIA1 CA2; input through a zero-crossing detector (comparator biased at 1 V, open collector, pull-up) to PIA1 PA0. All modulation is software: the board supplies a level stream in and a DAC voltage stream out, nothing more. Format (TRM "Detailed tape format information"; the firmware does it, the board does not): a 0 is one cycle of 1200 Hz, a 1 one cycle of 2400 Hz ("approximately 1500 baud"); a file is a leader of 128 bytes of 55h, a namefile block, about 0.5 s of silence, a second leader, data blocks, an end-of-file block; a block is 55h, 3Ch (sync), type (00 namefile, 01 data, FF EOF), length, 0-255 data bytes, checksum (sum of data, type and length), 55h. The namefile's 15 bytes: an 8-byte name, file type (00 BASIC, 01 data, 02 machine language), ASCII flag, gap flag, then the start and load addresses (TRM continues on the next page). Media: `.cas` (the byte stream, which a loader turns back into tones or feeds as bits) and `.wav`. MAME's `dragon_cass` list holds 934 entries (1,229 `.cas`, 1 `.wav`); the CoCo's cassettes are not in a MAME list. The first board milestone loads `.cas` by synthesising the waveform into PA0 (transaction level), so the real ROM routines decode it; a fast "byte injection" path would be a concession for turbo, not a board feature. ## Unknowns here U12 how Disk BASIC is entered on each machine (CART not used); U13 the zero-crossing detector's hysteresis and the level at which PA0 flips (it matters for `.wav` only); U14 the banked pack's register.