# The 7501 / 8501 The 264 series' CPU: a 6502 core with an on-chip I/O port at $0000/$0001, like the C64's 6510, made in HMOS (7501) and later HMOS-II (8501). Citations: **TSHM** (TED System Hardware Manual, section 5), **7501DS** (the draft 7501 preliminary data sheet, GIF pages OCR'd locally into `reference/extracted/`), **SM** (Plus/4 service manual), **MAME** (0.285, run as a closed box). Every claim below names its source; nothing here comes from an emulator's code. ## What the documents say | Fact | Source | Tag | | --- | --- | --- | | "an HMOS version of the 6502 family or more specifically the 6510"; software compatible with 6502/6510 code | TSHM 5.1; SM p. 3 ("an HMOS version of the 6510") | DOC | | A **7-bit** bidirectional port; it drives the serial bus and the cassette | TSHM 5.1; 7501DS p. 1 ("7-Bit Bi-Directional I/O Port") | DOC | | The port's pins are **P0-P4, P6, P7**: there is no P5 pin (40-pin package; pins 24-30) | TSHM 5.2 pinout | DOC | | Pins: PHI IN (1), RDY (2), /IRQ (3), AEC (4), GATE IN (23), R/W (39), RES (40); **no NMI pin, no PHI2 output, no SYNC** | TSHM 5.2 | DOC | | RDY is the DMA request: TED's BA output drives it; AEC tri-states the address bus | TSHM 5.1, 4 (BA pin 34, AEC pin 35) | DOC | | GATE IN holds off R/W until /RAS rises, preventing an early write | TSHM 5.1 | DOC | | "1 MHz and 2 MHz operation" (a feature list largely copied from the 6510 sheet) | 7501DS p. 1 | DOC (weak) | | Clock: SM says ".89 or 1.76 MHz"; TEDDS says 894 kHz single, 1.788 MHz double (NTSC) | SM p. 3; TEDDS sheet 11 | DOC, conflict C3 | | MAME's device list: "MOS Technology 7501 @ 894.88 kHz" (NTSC) | `mame -listdevices plus4` | OBSERVED (detector) | The 8501 is named in MAME's and community descriptions as the later process; no 8501 data sheet was found, and the TSHM and SM name only the 7501 (U2). Treat 7501/8501 as one class with no known difference (U3). ## The port - **Addresses (conflict C1).** 7501DS p. 5: "The Output Register is located in RAM at Address 0001, and the Data Direction Register is at Address 0000" (the 6510's arrangement). TSHM 5.1: "The port is at location $0000 while the data direction register is at $0001". The MAME boot trace (detector) shows the KERNAL's first two port writes as `$0000 <- $0F` then `$0001 <- $08` at cycles 343 and 348, which fits "DDR first, then data" under the data sheet's reading. Proposal: the data sheet (and the 6510 precedent, c64-python's C1); confirm at M1 when the KERNAL's tape and serial routines drive the right pins. - **Wiring** (SCH sheets 1-4, read at M1; listed here from the TSHM's system description only): the serial bus (ATN, CLK, DATA out and in) and the cassette (motor, write, read) hang off the port; the cassette **sense** line is not on the port but on bit 2 of the user-port 6529 (TSHM 7.1). Exact bit assignments are U1 until the schematic is read (they are visible in the KERNAL's use but the board must take them from the schematic). - **The missing P5** reads as what? Unknown (U2): a floating input, a constant, or the latch. The 6510's unconnected bits 6-7 "fade" (c64-python cpu-6510.md, C2); whether the 7501's port has such behaviour is not documented anywhere read. ## What the board needs from the core (proposal for 6502-python) 6502-python (`sixfiveohtwo`, pin `81e0eb6`) has `MOS6502` only: no port variant, no SO input. c64-python's Phase 0 proposes **`MOS6510`** (upstream request 1 there). This board proposes **`MOS7501` beside it**, sharing the port machinery: 1. The port at $00/$01 inside the CPU, with a pin mask (6510: P0-P5; 7501: P0-P4, P6, P7) and host callbacks for input pins and output changes; every port access still placed on the bus as a cycle (the board decides what RAM sees underneath, as the 6510 does: on the C64 the VIC's phase-1 byte lands in RAM; on the Plus/4 the TSHM's map says "1 page [is] registers for 7501 port", what the RAM underneath gets is U4). 2. **No NMI input** on the 7501 variant (the host simply never raises it; a variant flag documents it). 3. **RDY** halts on a read cycle; the family's `note_stall()` / `dma_stalled` already cover a host-held read (a5200-python's SALLY analysis, c64-python's BA plan). The 7501's RDY+AEC pairing is the C64's BA+AEC pairing: the same core mechanism. 4. **Variable cycle length.** The CPU core counts cycles; it does not know that some of them are 1.1 us and some 0.56 us. The single/double clock lives entirely in the board's scheduler (ted.md, "the clock"). The core needs nothing for it, provided the bus callback is called once per cycle, which it is. **Request**: one variant family, `MOS6510` and `MOS7501`, raised on 6502-python with the c64-python request, before either board's M1 (open decision 2). ## Oracles | Oracle | Tier | Decides | Cannot decide | | --- | --- | --- | --- | | 6502-python's own suites (perfect6502 netlist, Harte tests) | 1/3 | everything the 6502 core does | the port, the pin set | | 7501DS, TSHM 5 | 2 | pins, port addresses (with C1), electrical | port timing, P5, fade | | VICE-testprogs `Plus4/` (HannesTest, openio, openbus) | 3 where the readme says "real machine" | open bus, unconnected I/O | the port | | MAME 0.285 `plus4` | 5 | detector: boot lockstep (instruction stream, register writes) | cycle timing (it counts 894,886 cycles a second: mame-oracle.md trap 2) | No hardware-tier oracle for the 7501's port exists in anything found.