# Memory, paging and the models ## 16K and 48K (DOC: FAQ48) 16 KB ROM at 0000, RAM from 4000 (16K: 4000-7FFF only; the rest unattached). The ULA reads "the lowest 6912 bytes of RAM" (4000-5AFF: 6,144 bytes of pixels in the familiar thirds-interleaved order, then 768 attributes). Writes to ROM are ignored. Issue 2 and Issue 3 boards differ on port FE bit 6 (keyboard-border-sound.md); the board takes the issue as a model parameter. ## 128K and grey +2 (DOC: FAQ128, Wiki) - Port 7FFD, decoded on A15 = 0 and A1 = 0 (FAQ128; Wiki: "uses A15 and A1 lines only"): bits 0-2 the bank at C000, bit 3 the displayed screen (bank 5 or bank 7), bit 4 the ROM (0 = the 128 editor, 1 = 48 BASIC), bit 5 locks paging until reset. 4000-7FFF is always bank 5 and 8000-BFFF bank 2, whatever is paged at C000. - Contended banks 1, 3, 5, 7 (Wiki, against the service manual's 4-7: C4). - **Reading 7FFD**: the Wiki says the 128's HAL10H8 does not separate reads from writes, so a read writes the floating data bus into the paging latch and usually crashes; later grey +2s had a corrected HAL. FAQ128 says a read "produces no special results". C5; the board follows the Wiki's mechanism for the 128K and the first +2s (HYPOTHESIS until a test decides; Out7FFC, Woodmass, is the collection's test for writes, and its licence is GPL-2.0: run only, not fetched here). - The 128K's own ULA (7K010) keeps the 48K's floating bus and snow. ## +2A, +2B, +3, +3B (DOC: FAQ128, Wiki, +3 manual parts 24 and 30) - 7FFD as on the 128K, but bit 4 is now the low bit of a 2-bit ROM number and the decode is A15 = 0, A14 = 1, A1 = 0 (FAQ128). - 1FFD (A15-A13 = 000, A12 = 1, A1 = 0; write-only): bit 0 special (all-RAM) paging; in normal mode bit 2 is the ROM's high bit (ROM 0 editor, 1 syntax, 2 +3DOS, 3 48 BASIC), in special mode bits 1-2 choose one of four maps {0,1,2,3}, {4,5,6,7}, {4,5,6,3}, {4,7,6,3}; bit 3 disc motor; bit 4 printer strobe. - Contended banks 4, 5, 6, 7. - The ROMs are two 32 KB chips (+3 manual part 30: "two 32K devices (similar to the 27256)"), each holding two 16 KB ROMs; the RAM is four 64K x 4 DRAMs ("41464"), banks 4-7 time-shared with the video. - Boards (Wiki): Z70830 (common +2A/+3 board, issues 1 and 2, 1987), Z70833 (+2B, issues 1, 2 and 4), Z70835 (+3B). The +2B/+3B fixed an audio distortion in the +2A/+3's AY output path (Wiki): an analogue difference the board may record but not model. - The +3's manual calls its gate array "the ULA" (part 30); the Wiki and FAQ128 call the Amstrad chip a gate array. Naming only (C10). ## What the board's model switch selects `model` in {`16K`, `48K`, `128K`, `PLUS2`, `PLUS2A`, `PLUS3`} (proposed; handoff brief) selects: CPU clock; T/line and lines; the contention table and origin; contended banks; paging ports and decode; floating bus on/off and its table; snow on/off; ULA early/late (Ferranti models only); port FE bit 6 behaviour (issue 2/3 or +2A/+3); AY present; FDC present; ROM set by SHA-1 (firmware.md). ## MAME's view (OBSERVED, MAME 0.285, closed box) The boot ROMs of spec128 and specpls3 write 7FFD with banks 7 down to 0 in the first second (their RAM test) and the +3 writes 1FFD with 00, 04, 08 and 0C (ROM high bit and motor) during boot (mame-oracle.md).