IWMRES* is placed, and $cc00 and $ce80 are measured rather than guessed
The last of the glue chip's four latched outputs, and a count that answers the two questions MG's page leaves open -- for this firmware, which is as far as a firmware can answer them. Counting every access ROM 5 makes in $c800-$cfff with the auxiliary bank selected, over a boot and a whole 800K format: $cc40 0 reads, 2 writes IWMRES* $cc80 0 reads, 225 writes INTEN* asserted $ccc0 19 reads, 24 writes INTEN* de-asserted $cc00 0 reads, 0 writes $ce80 0 reads, 0 writes $c840/$c880/$c8c0 1 write each, of $81 **`$cc40` is IWMRES*.** MG hedges it twice -- "(probably) /IWMRES", "set (or pulsed?)" -- and observes that the manual calling it latched would want a second address to let it go, for which he found no evidence. The count settles that half: `$cc00`, where such an address would sit, is not touched once, so there is nothing here for a latch to be released by and it is modelled as a pulse. Both writes come from the same three instructions at bank 1 $cd1c -- `STA $CC40`, `STA $CC80`, `STA $CCC0`, `RTS` -- which is the disk port being put back to a known state: reset the chip, swing the drive 2 select in to the drive in the case and back out to the port. Four places call it, twice around the device scan at $e603 and $e652, once in the retry loop at $e524, and once at $efc6. A routine that resets a chip and clears its routing, called exactly where one would expect it, is about as much corroboration as a firmware can give a pin description. `Iwm.reset` splits in two for it. `resetChip` is the chip's own reset line and nothing further: the mode register, the two state flip flops, the four phases, the drive select and the enable -- and the enable goes down through the latch rather than by assignment, so a turning drive hears about it. It leaves alone everything across the cable and everything across the machine: where a head was left is mechanical, and whether the port is talking to a 3.5-inch drive is $c031 on a IIgs and the glue chip's own 3.5DRIVE* here, neither of which is on this line. `reset` is that plus the drives. `$ce80` "affects signal on ENB2" and MG says the firmware "does not appear to use" it; the count agrees, so it stays unmodelled and the README says why rather than leaving it looking forgotten. `$c840`, `$c880` and `$c8c0` are written $81 once each from the routine at $ef02 on its way into the SmartPort firmware. MG lists all three and says nothing about what they do, and nothing here can say either: they fall in the half of the window shared with the ROM, so the write is dropped whether the chip is watching or not, and no test written here could tell those apart. It is recorded as an open question rather than modelled as a guess. Every test passes unchanged, which is the expected outcome: the two IWMRES* pulses land at initialisation and in a retry loop, where a chip reset is what the routine is for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aieuyb2KR2DsKyZWPJpas6