{{keywords>amstrad,pcw,hardware,io,address,memory}} ====== I/O Ports ====== | Port (hex) | Direction | Peripheral / Function | Notes | | &00 | Read/Write | Floppy Disk Controller (uPD765A) - Main Status Register | FDC status register | | &01 | Read/Write | Floppy Disk Controller (uPD765A) - Data Register | FDC data register | | &80 | Read | AMX Mouse - Vertical Movement (alternate) | Alternate mapping of &A0. Stop Press relocates the mouse to &80-&83 if &A2 reads &10 at startup (believed to avoid an ASD hard drive conflict) | | &81 | Read | AMX Mouse - Horizontal Movement (alternate) | Alternate mapping of &A1 | | &82 | Read/Write | AMX Mouse - Button State & Reset (alternate) | Alternate mapping of &A2 | | &83 | Write | AMX Mouse - PPI Mode Register (alternate) | Alternate mapping of &A3 | | &84 | Read | Standalone Centronics (CEN) Port - Status | Bit 0: 1=busy / 0=ready | | &85 | Write | Standalone Centronics (CEN) Port - Strobe | Write byte to &87 then &85 then &87 to toggle STROBE | | &87 | Write | Standalone Centronics (CEN) Port - Data | Write data byte here as part of output sequence | | &9F | Read | Kempston Joystick Interface | Bit 4=Fire, Bit 3=Down, Bit 2=Up, Bit 1=Left, Bit 0=Right | | &A0 | Read | AMX Mouse - Vertical Movement (8255 PPI Port A) | Low nibble=moves up, high nibble=moves down | | &A0 | Read/Write | Timatic Winchester / SASI (NCR 5380) - SCSI Data | Also used by ASD PCWHD10/20 as Data register (see &A0 conflict) | | &A0 | Read/Write | ASD PCWHD10/PCWHD20 - Data Register | Conflicts with Timatic and AMX Mouse | | &A1 | Read | AMX Mouse - Horizontal Movement (8255 PPI Port B) | Low nibble=moves right, high nibble=moves left | | &A1 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Initiator Command Register | Also used by ASD PCWHD10/20 as Error/Features | | &A1 | Read/Write | ASD PCWHD10/PCWHD20 - Error / Features | Conflicts with Timatic | | &A2 | Read/Write | AMX Mouse - Button State & Reset (8255 PPI Port C) | Input: bits 0-2=button states, Output: write &FF then 0 to reset | | &A2 | Read | EMR MIDI Interface - Status Register | ~31250 baud serial-style interface. Bit 1=ready to receive data. Requires EMR's supplied init software to be run first. Conflicts with AMX Mouse, Timatic and ASD at &A2 | | &A2 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Mode Register | Also used by ASD PCWHD10/20 as Sector Count | | &A2 | Read/Write | ASD PCWHD10/PCWHD20 - Sector Count | Conflicts with Timatic | | &A3 | Write | AMX Mouse - PPI Mode Register | Write &93 at startup for basic I/O mode | | &A3 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Target Command Register | Also used by ASD PCWHD10/20 as Sector Number | | &A3 | Read/Write | ASD PCWHD10/PCWHD20 - Sector Number | Conflicts with Timatic | | &A3 | Read/Write | EMR MIDI Interface - Data I/O Register | MIDI data in/out. Note: Fairhurst (systemed.net) lists the interface as &A0-&A2 rather than &A2-&A3 | | &A4 | Read/Write | Timatic Winchester / SASI (NCR 5380) - SCSI Bus Status / Select Register | Also used by ASD PCWHD10/20 as Cylinder Low | | &A4 | Read/Write | ASD PCWHD10/PCWHD20 - Cylinder Low | Conflicts with Timatic | | &A5 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Bus and Status Register | Also used by ASD PCWHD10/20 as Cylinder High | | &A5 | Read/Write | ASD PCWHD10/PCWHD20 - Cylinder High | Conflicts with Timatic | | &A6 | Read | Electric Studio Light Pen - Position Low 8 Bits | 12-bit position counter low byte | | &A6 | Read/Write | Multilink Network Interface - Control / Status | Input: Bit 7=1 (8251 DSR), Bits 6-2=0 (error flags), Bit 1=byte waiting to send to PCW, Bit 0=ready to receive from PCW. Output: write &48 to reset the card | | &A6 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Start DMA Target Receive / Input Data | Not used by PCW, also used by ASD PCWHD10/20 as Drive/Head | | &A6 | Read/Write | ASD PCWHD10/PCWHD20 - Drive / Head | Conflicts with Timatic and Light Pen and Multilink | | &A7 | Read | Electric Studio Light Pen - Position High 4 Bits + Retrace Flags | Bits 6=V.Retrace, Bit 5=H.Retrace, Bits 3-0=high 4 bits of position | | &A7 | Read/Write | Multilink Network Interface - Data | Read/write data byte | | &A7 | Read/Write | Timatic Winchester / SASI (NCR 5380) - Start DMA Initiator Receive / Reset Parity | Not used by PCW, also used by ASD PCWHD10/20 as Status/Command | | &A7 | Read/Write | ASD PCWHD10/PCWHD20 - Status / Command | Conflicts with Timatic and Light Pen and Multilink | | &A8 | Read/Write | Cirtech Gem (XTA) - Data Register | XTA hard drive interface, ATA variant maps &A8-&AF | | &A8 | Read/Write | Cirtech Gem (ATA) - Data | ATA variant. Cirtech Insyder / Hardpak use the same register layout but additionally write 0 to &FF94 before each transfer, believed to reset the mechanism that converts between 8-bit and 16-bit transfers | | &A9 | Read | Cirtech Gem (XTA) - Controller Status | Also: Write=Reset controller | | &A9 | Read/Write | Cirtech Gem (ATA) - Error / Features | ATA variant | | &A9 | Read | DKTronics Sound Generator - Read Selected AY-3-8912 Register | Read currently selected register | | &AA | Read/Write | Cirtech Gem (XTA) - Controller DIP Switches / Generate Controller-Select Pulse | Read=DIP switches, Write=select pulse | | &AA | Read/Write | Cirtech Gem (ATA) - Sector Count | ATA variant | | &AA | Write | DKTronics Sound Generator - Select AY-3-8912 Register | Write register number to select it | | &AB | Write | Cirtech Gem (XTA) - DMA and Interrupt Mask | Not used on PCW | | &AB | Read/Write | Cirtech Gem (ATA) - Sector Number | ATA variant | | &AB | Write | DKTronics Sound Generator - Write to Selected AY-3-8912 Register | Write value to selected register | | &AC | Read/Write | Cirtech Gem (ATA) - Cylinder Low | ATA variant only | | &AD | Read/Write | Cirtech Gem (ATA) - Cylinder High | ATA variant only | | &AE | Read/Write | Cirtech Gem (ATA) - Drive / Head | ATA variant only | | &AF | Read/Write | Cirtech Gem (ATA) - Status / Command | ATA variant only | | &C8 | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &C9 | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CA | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CB | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CC | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CD | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CE | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &CF | Read/Write | Fax Link Interface | CPS8256-compatible serial circuitry (cf. &E0-&E7) but with different baud-rate values | | &D0 | Read | Kempston Mouse - X Position | 0-255, also readable at &D2 | | &D1 | Read | Kempston Mouse - Y Position | 0-255, also readable at &D3 | | &D2 | Read | Kempston Mouse - X Position (mirror) | Same value as &D0 | | &D3 | Read | Kempston Mouse - Y Position (mirror) | Same value as &D1 | | &D4 | Read | Kempston Mouse - Button State | Bit 0=Left, Bit 1=Right, 0=pressed | | &D8 | Read | Cirtech Flash Drive - Page In | Reading pages the drive into memory; high byte of the 16-bit port address selects the 32k bank. Bank appears at &00-&7F, &0100-&017F … &FF00-&FF7F. Flash-based (Intel E28F008SA) replacement for Gem drive + boot ROM | | &D9 | Read | Cirtech Flash Drive - Page Out | Reading pages the drive back out of memory | | &DF | Read | MasterScan Optical Scanner | Bit 0: 0=light, 1=dark | | &E0 | Read | Spectravideo Joystick Interface | Bit 4=Right, Bit 3=Up, Bit 2=Left, Bit 1=Fire, Bit 0=Down | | &E0 | Read | Cascade (JoyceStick) Joystick Interface | Bit 7=Fire, Bit 4=Up, Bit 2=Down, Bit 1=Right, Bit 0=Left, conflicts with Spectravideo | | &E0 | Read/Write | CPS8256 - DART Channel A Data | Serial/comms interface | | &E1 | Read/Write | CPS8256 - DART Channel A Control | | | &E2 | Read/Write | CPS8256 - DART Channel B Data | | | &E3 | Read/Write | CPS8256 - DART Channel B Control / CEN Port Status & Control | Also used as CPS8256 CEN port: write &10 to select status mode, bit 5=printer ready | | &E4 | Read/Write | CPS8256 - 8253 Counter 0 | Used for baud rate setting (transmit) | | &E5 | Read/Write | CPS8256 - 8253 Counter 1 | Used for baud rate setting (receive) | | &E7 | Write | CPS8256 - 8253 Write Mode Word | Write mode byte here (e.g. &36 or &76 for baud rate) | | &E8 | Write | CPS8256 CEN Port - Data Output | Write character to this port before toggling STROBE via &E3 | | &E9 | Read/Write | ProScan Interface - Base Port | Interface for Naksha hand scanner / fax | | &EA | Read/Write | ProScan Interface - Fax Device Select (FX1) | Select fax as image source | | &EB | Read/Write | ProScan Interface - Fax Device Select (FX2) | Select fax (second type) as image source | | &EC | Read/Write | ProScan Interface - Hand Scanner Select | Select hand scanner as image source | | &ED | Read/Write | ProScan Interface - Unknown Device Select | Possibly a second type of hand scanner | | &EF | Read/Write | ProScan Interface - Upper Bound Port | Upper port of ProScan range | | &F0 | Write | Memory Management - Bank Select for &0000-&3FFF | PCW paging: bit 7=1, bits 6-0=block number | | &F1 | Write | Memory Management - Bank Select for &4000-&7FFF | PCW paging | | &F2 | Write | Memory Management - Bank Select for &8000-&BFFF | PCW paging | | &F3 | Write | Memory Management - Bank Select for &C000-&FFFF | PCW paging | | &F4 | Write | CPC Paging Mode - Lock Register | Bits lock memory ranges from being read from alternate block, not used by CP/M or LocoScript | | &F4 | Read | Timer Counter | Bottom 4 bits: counter incremented by timer interrupt (0-15), reading resets it | | &F5 | Write | Video Controller - Roller-RAM Address | Bits 7-0 specify block and offset / 512 | | &F6 | Write | Video Controller - Vertical Scroll Origin | Specifies which Roller-RAM line is at top of screen | | &F7 | Write | Video Controller - Display Control | Bit 7=inverse video, Bit 6=screen on/off | | &F8 | Write | System Control Port | Multi-function: video enable/disable, FDC interrupt mode, boot sequence end (value 0 ends boot) | | &F8 | Read | System Control Port - Status | Bit 6=frame flyback, Bit 5=FDC interrupt pending, Bit 4=60Hz PCW flag | | &F9 | Read | Prototype Serial Interface (IM6403 UART) - Status Register | Only on prototype PCW, not on production hardware | | &FC | Read | PCW8256/8512/9256/10 Dot-Matrix Printer Controller - Error Status | Returns controller error number. Note: the PCW9512 has different controller hardware and decodes 16 bits here - its &00FC is instead a data register (read: data returned by a command), and &01FC is its status register (read twice in succession for a stable value) | | &FC | Write | PCW8256/8512/9256/10 Dot-Matrix Printer Controller - Command Port | Used to send commands during reset. Note: the PCW9512 has different controller hardware and decodes 16 bits here - its &00FC is instead a data register (write: data byte of a two-byte command), and &01FC is its command register (write: command byte) | | &FD | Read | PCW8256/8512/9256/10 Dot-Matrix Printer Controller - Printer Status | Bit 7=bail bar, Bit 6=command done, Bit 1=busy, Bit 0=fault, also used by PCW9512 at &00FD | | &FD | Write | PCW8256/8512/9256/10 Dot-Matrix Printer Controller - Command/Data Port | Sends printer commands during normal operation | | &FE | Read/Write | LocoLink Parallel Transfer Interface | Bit 1=Data 1 (input) / ACK (output), Bit 0=Data 0 (input) / BUSY (output) | | &FE | Read/Write | Prototype Serial Interface (IM6403 UART) - Data Register | Only on prototype PCW, not on production hardware, conflicts with LocoLink | | &FF | Read/Write | PCW Linkit Parallel Transfer Interface | Two-bit communication channel, value read is binary inverse of value written by other PCW | The above information is derived from John Elliott's excellent [[https://www.seasip.info/Unix/Joyce/hardware.pdf|PCW Hardware manual]]. Please note that the hard drive, and SCA Mark 2 Interface information have not been verified.