# The floating bus and snow Two effects of the same design: the ULA and the Z80 share data and address lines through resistors (FAQ48: "The data and address buses of the Z80 and the ULA are connected by small resistors; normally, these do effectively decouple the buses"). Both are observable by software, and commercial games depend on the first. ## The floating bus (DOC: FAQ48, Wiki; TEST ROM: Ramsoft, Woodmass, Hikaru) Reading a port nothing answers (an odd port with no peripheral, for example FF) returns what is on the ULA's side of the data bus: the screen or attribute byte the ULA is fetching at that moment, or FF when it is idle (border, blanking). Each 8-T fetch cycle (Wiki): | T after /INT, 48K | 128K | ULA bus | | --- | --- | --- | | 14,338 | 14,364 | pixels (4000) | | 14,339 | 14,365 | attribute (5800) | | 14,340 | 14,366 | pixels (4001) | | 14,341 | 14,367 | attribute (5801) | | 14,342-14,345 | 14,368-14,371 | idle (FF) | The Z80 samples the data bus in the last T-state of the I/O cycle; "late" machines are one T later (Wiki). Unattached memory (8000-FFFF on a 16K) is expected to show the same effect ("likely", Wiki: HYPOTHESIS there). Games known to use it (Wiki): Arkanoid and Cobra (original releases only; the Hit Squad re-releases do not), Sidewize, Short Circuit. These are census targets, not milestones. **The +2A/+3** (C9): FAQ128 (2004) says reading a non-existent port "will always return 255, and not give any screen/attribute bytes". Later tests contradict that: Woodmass's Float+3 (2017) and Hikaru's +2A/+3 Floating Bus Test v1.2 (2017) exist because the +2A/+3 **do** show a floating-bus effect: the collection's page for Hikaru's test gives a +3 column beside the 48K and 128K ones, with the fetch sequence at T 14,367 (4000), 14,368 (5800), 14,369 (4001), 14,370 (5801) and idle 14,371-14,374, three T after the 128K's. What the +2A/+3 return outside those cycles, and under which paging, is not stated in the pinned sources (U5); the two tests, run on the board, are the judge, and the FAQ's sentence is recorded as overruled only once they pass. Note that the +3 fetch column (14,367) and the +2A/+3 contention origins (14,361 Wiki, 14,365 FAQ128) are three different numbers to reconcile (C1). ## Snow (OBSERVED on real units; DOC: Weiv's account in the collection, 2022) When the I register points at contended memory (I in 40-7F on the 48K; on the 128K/+2 also C0-FF when a contended bank is paged there), the refresh cycle of an opcode fetch puts I:R on the address bus while the ULA is fetching, and the ULA's DRAM access picks up the low byte from the refresh address. Weiv's 2022 account (collection page "Snow effect", with help from TheMartian, NEO_SPECTRUMAN and Guesser, and hardware runs by Pheel and balford): 1. If T4 of an opcode fetch coincides with the third T-state of the ULA's 8-T fetch cycle, the first pixel/attribute pair is read from an address whose low byte is the current R (already incremented in this fetch): "snow". 2. If it coincides with the fifth, the second pair is not read and the first pair is shown again: the "double" effect. 3. Other overlaps: no effect. TheMartian's addition on the same page explains it at the DRAM signals: the ULA asserts the column address (video address bits 7-0) with CAS, then RAS twice; MREQ during the refresh cycle drives CAS, so a refresh landing on the first burst substitutes the refresh column, and one landing between the bursts holds it. That is a mechanism argument (HYPOTHESIS), consistent with the die's RAS/CAS module (`ras_cas_romcs`) but not derived from it here. No snow on the +2A/+2B/+3 (gate array). On some 128Ks it hangs or resets the machine (FAQ128, Wiki, Weiv), which the board will not model (named in the brief as out of scope unless a test needs it). Tests: Snow (Hikaru, 2014), Snow48 (azesmbog, 2021; eight hardware results on its page), the 48K NEC Contention Test Suite's "IR Contention" screen (with snow disabled, per its expected picture), Snow128N, Snow Tests (Weiv). Real-hardware videos are linked from the collection's pages. ## Board consequences - The ULA must know, at each T-state, the address on the Z80's bus, whether MREQ/IORQ is active and whether it is a refresh: the same per-T-state information contention needs (cpu-core.md, N1 and N2). - The floating-bus read and the snow substitution are computed from the ULA's fetch phase, which the board already has for drawing; no extra domain.