svi-328.dev

SVI-328 I/O Port Map

I/O port map for the SVI-318/328 computer system, as used by the CP/M 2.27 BIOS for SV-608M.

Derived from the CP/M BIOS disassembly. Port functions for ports 40h–46h confirmed by cross-reference with the WD1002-SHD OEM Manual (SASI bus protocol). Ports 60h–63h are a Centronics parallel printer interface on the SV-608M expansion unit, also used for presence detection.

Printer (ports 10h–12h)

Port R/W Name Description
10h W PRN_DATA Write Data Port
11h W PRN_STROBE Data Strobe
12h R PRN_STATUS Status (Bit 0 = 0 for Ready)

Modem / RS-232 #1 (ports 20h–26h)

Port R/W Name Description
20h R MODEM_RX Receiver Buffer Register
20h W MODEM_TX Transmitter Holding Buffer / Divisor LSB
21h W MODEM_IER Interrupt Enable Register / Divisor MSB
22h R MODEM_IIR Interrupt Identification Register
23h W MODEM_LCR Line Control Register
24h R/W MODEM_MCR Modem Control Register
25h R MODEM_LSR Line Status Register
26h R MODEM_MSR Modem Status Register

RS-232 #2 / UART (ports 28h–2Dh)

Port R/W Name Description
28h R RS232_DATA Receiver Buffer Register
28h W RS232_DATA Transmitter Holding Buffer / Divisor LSB
29h W RS232_IER Interrupt Enable Register / Divisor MSB
2Ah R RS232_IIR Interrupt Identification Register
2Bh W RS232_LCR Line Control Register
2Ch W RS232_MCR Modem Control Register
2Dh R RS232_LSR Line Status Register

Floppy Disk Controller (ports 30h–38h)

Port R/W Name Description
30h R FDC_STATUS Status Register
30h W FDC_CMD Command Register
31h R/W FDC_TRACK Track Register
32h R/W FDC_SECTOR Sector Register
33h R/W FDC_DATA Data Register
34h R FDC_INTRQ_DRQ Read INTRQ and DRQ output pins
34h W FDC_DISK_SELECT Disk Select (b0=0: Disk 1, b1=0: Disk 2)
38h W FDC_DENSITY Density Select (b0: 0=Double, 1=Single)

FDC Commands (written to port 30h)

Bits 7-4 Command Description
0x0_ Restore Seek to track 0
0x1_ Seek Seek to track in data register
0x5_ Step In Step toward higher track numbers
0x7_ Step Out Step toward lower track numbers
0x8_ Read Sector Read sector
0xA_ Write Sector Write sector
0xD_ Force Interrupt Abort current operation

FDC Status Register (read from port 30h)

Bit Type I (Seek) Type II/III (R/W)
0 Busy Busy
1 Index DRQ (Data Request)
2 Track 0 Lost Data
3 CRC Error CRC Error
4 Seek Error Record Not Found
5 Head Loaded Record Type
6 Write Protect Write Protect
7 Not Ready Not Ready

INTRQ/DRQ Status (read from port 34h)

Bit Description
6 DRQ — Data Request (ready for data transfer)
7 INTRQ — Interrupt Request (operation complete)

SV-608M SASI Host Adapter (ports 40h–46h)

SASI bus host adapter on the SV-608M expansion card, connecting to a WD1002-SHD Winchester Disk Controller Board. These ports bridge the Z80 bus to the SASI bus, translating Z80 I/O operations into SASI bus signals.

Port 46h exposes the five SASI bus control signals directly:

Bit Signal Meaning
0 BSY Target is busy / bus is in use
1 REQ Target requests a data transfer
2 C/D 1 = Command/Status, 0 = Data
3 I/O 1 = Input (target→host), 0 = Output (host→target)
4 MSG 1 = Message phase

Status values map directly to standard SASI Information Transfer Phases:

Value Signals SASI Phase Direction
00h (none) Bus Free
03h BSY+REQ Data Out host→target
0Bh BSY+REQ+C/D Command host→target
13h BSY+REQ+I/O Data In target→host
1Bh BSY+REQ+C/D+I/O Status target→host
1Fh all five Message In target→host
Port R/W Name Description
40h W SV608M_RESET Bus reset (de-asserts all SASI signals)
41h W SV608M_DATA_OUT SASI data bus write (auto-ACK)
42h R SV608M_DATA_IN SASI data bus read (auto-ACK)
43h W SV608M_SEL SEL signal assertion (Target Selection)
44h W SV608M_CTRL Additional bus control
46h R SV608M_STATUS SASI bus status (5 bits: MSG·I/O·C/D·REQ·BSY)

80-Column Card / Memory Mapper (ports 50h–58h)

Port R/W Name Description
50h W COL80_ADDR CRTC Address Register Select
51h R/W COL80_DATA CRTC Data Register (R0-R17)
58h W COL80_BANK Bank Control (FFh=Bank On, 00h=Bank Off)

SV-608M Centronics Printer (ports 60h–63h)

Centronics parallel printer interface on the SV-608M expansion unit. These ports also serve a dual purpose for hardware detection: the BIOS toggles bit 2 of the AUX port (63h) and reads back the STATUS port (62h) to check whether the SV-608M card is present (SUB56 at E5A7h).

At boot, SUB59 (E8A6h) detects the SV-608M and routes the CP/M LIST device accordingly:

The data port (60h) uses active-low signalling — the BIOS inverts the character via CPL before writing. The standard printer (10h) does not invert.

Port R/W Name Description
60h W SV608M_PRN_DATA Printer data (active-low, inverted by BIOS)
61h W SV608M_PRN_STROBE Printer strobe
62h R SV608M_PRN_STATUS Printer status (bit 0 = busy)
63h R/W SV608M_PRN_AUX Auxiliary control (bit 2 = detection toggle)

VDP (ports 80h–85h)

Port R/W Name Description
80h W VDP_DATA_W VRAM Data Write
81h W VDP_REG Register Write / VRAM Address Set
84h R VDP_DATA_R VRAM Data Read
85h R VDP_STATUS Status Register Read

PSG (ports 88h–90h)

Register 15 controls the memory mapper.

Port R/W Name Description
88h W PSG_ADDR Register Address Select (0-15)
8Ch W PSG_WRITE Register Data Write
90h R PSG_READ Register Data Read

PSG Register 15 — Memory Bank Select

Bit Bank Description
0 BK21 0=enabled (pages 4000h-7FFFh expansion RAM)
1 BK22 0=enabled (pages 8000h-BFFFh expansion RAM)
2 BK31 0=enabled (SV-603/608 bank 1)
3 BK32 0=enabled (SV-603/608 bank 2)
4 Reserved
5 BK01 0=enabled (BIOS ROM 0000h-7FFFh)
6 BK11 0=enabled (cartridge ROM 0000h-7FFFh)
7 BK12 0=enabled (cartridge ROM 8000h-BFFFh)

PPI (ports 96h–97h)

Port R/W Name Description
96h R/W PPI_DATA Port C data
97h W PPI_CTRL Control/Mode register

Other / Unknown

Port R/W Name Description
DCh W PORT_DC Unknown (seen in CP/M BIOS LIST output)