ICD Multi I/O Board Manual (Rev 5/20/1987) MIO Hardware Configuration

 

Chapter 5 — MIO Hardware Configuration Index

This chapter fully documents the operation of the MIO hardware. This information is intended for the curious and those who wish to better utilize the power of the MIO. If you do plan on accessing the hardware directly, you must take care since the software (in ROM) has set several conventions that must be followed if any portion of its software is to be used. This information is in the section entitled "Software Description".

Hardware Description

The MIO has 3 basic addressing areas: 1) ACIA at $D1C0-$D1DF, 2) MIO Latches at $D1E0-$D1FF, and 3) 256 bytes of RAM at $D600-$D6FF. Note that the ACIA and MIO latches are not fully decoded; both contain 4 read/write registers, but each register has 7 shadows. Tables 5-1 through 5-3 briefly describes the MIO registers.

ACIA Operation

For more information on the ACIA operation, refer to a 6551A or 65C51 data manual (this part is manufactured by Rockwell, GTE, NCR, and RCA). The only irregularity of usage is that the lines DSR, CTS, and DCD are tied to ground. This is due to the fact that the ACIA will not receive data if either of these lines are false. To read the actual state of these lines, you must read location $D1E3 (bits 2,1,0). This will return the true lines sense (DCD true is indicated by a high on bit 1 of $D1E3).

SASI/SCSI Interface

The data input/output ($D1E1) and input control lines ($D1E2) reflect the true voltage levels on the ports. Thus, the input control lines are normally all ones (port voltages are +5) which represents a logic false on the bus. For more information on SASI/SCSI bus protocol, refer to the Adaptec ACB-4000 Series User's Manual, the XEBEC S1410A disk controller document, the Seagate ST225N manual, or any other device manual employing these protocols.

The ACK-/REQ- handshake cycle is performed by the MIO hardware. Whenever the data ($D1E1) is read or written, ACK- is set true. It is cleared by a high level on the REQ- input signal.

The RST- is set true when $D1E0 is read or when the RESET key pressed on the computer (or during powerup). It is cleared by reading location $D1E2.

The I/O- controls whether the 8-bit printer/SASI registers are input or output. When I/O- is high (input to SASI controller), the data is output on the printer and SASI port. If I/O- is low, then the output latches are disabled (it will latch new data, but the output is tri-stated).

Printer Interface

The printer data ($D1E1) and BUSY signals are high true logic. The a high (1) on BUSY (bit 6 of $D1E2) indicates the printer is busy. A low (0) on FAULT- (bit 4 of $D1E2) reflects an error condition in the printer (printer off?).

Table 5-1. MIO Register Selection

Address (HEX)

Register Operation

Write

Read

$D1E0

Set address A15-A8 for $D600 RAM window. (LSB of sector number.) Set RST- signal true (low). Resets the SCSI/SASI bus. (RST- also true during RESET)

$D1E1

Set printer data and SCSI/SASI data. True logic for printer — Inverted for SCSI/SASI bus. Read data from SCSI/SASI bus. Data is inverted.

$D1E2

General purpose outputs.
  B[3..0] High RAM address,
   sets address A19-A16.
  B[4] 1 = Set SEL- true
  B[5] 1 = Enable RAM access
  B[6] 1 = Set STROBE- true
  B[7] 1 = Enable Parallel IRQ
General purpose inputs.
  B[0] = SASI C/D-
  B[1] = SASI MSG-
  B[2] = SASI I/O-
  B[4] = Printer FAULT-
  B[5] = SASI BUSY-
  B[6] = Printer BUSY
  B[7] = SASI REQ-
Also clears RST- signal

$D1E3
or
$D1FF

Set ROM enable and bank. Only
1 bit allowed set at a time.
  B[2] 1 = Disk Interface ROM
  B[3] 1 = Seg 2 of setup MENU
  B[4] 1 = R:/P: Handler ROM
  B[5] 1 = Seg 1 of setup MENU
All bits 0 disable the ROM.
IRQ sense bits + Misc inputs.
  B[0] = RS-232 DCD line
  B[1] = RS-232 DSR line
  B[2] = RS-232 CTS line
  B[3] = Printer BUSY- IRQ
  B[4] = MIO IRQ (from 6551 or
            Printer BUSY- IRQ)

$D1C0

Write ACIA transmit register. Read ACIA receive register.

$D1C1

Perform a programmed RESET on ACIA (data is "don't care"). Read Status register (resets IRQ).
  B[0] 1 = Parity error
  B[1] 1 = Framing error
  B[2] 1 = Overrun has occurred
  B[3] 1 = Receiver reg. full
  B[4] 1 = Transmitter empty
  B[7] 1 = IRQ occurred

$D1C2

Write ACIA command register.
   (see table 5-2)
Read ACIA command register.
   (see table 5-2)

$D1C3

Write ACIA control register.
   (see table 5-3)
Read ACIA control register.
   (see table 5-3)

$D6xx

Write RAM. High address A19-A8 selected by $D1E0/$D1E2. Read RAM. High address A19-A8 selected by $D1E0/D1E2.

 

Table 5-2. ACIA Command Register
 

7 6 5 4 3 2 1 0
PMC  PME  REM  TIC1  TIC0  IRD  DTR
 PNC1    PNC0  


Bits 7-6

Parity Mode Control (PMC)

  7          6  
0 0

Odd parity transmitted/received.

0 1

Even parity transmitted/received.

1 0

Mark parity bit transmitted, parity check disabled.

1 1

Space parity bit transmitted, parity check disabled.

Bit 5

Parity Mode Enable (PME)

0

Parity mode disabled — no parity bit transmitted.

1

Parity mode enabled.

Bit 4 Receiver Echo Mode (REM)
0 Receiver normal mode.
1 Receiver echo mode — bits 2 and 3 must be zero
  for receiver echo mode, RTS will be true.
Bit 3-2 Transmitter Interrupt Control (TIC)
  3          2  
0 0 RTS = false, transmitter disabled.
0 1 RTS = true, transmit interrupt enabled.
1 0 RTS = true, transmit interrupt disabled.
1 1 RTS = true, transmit interrupt disabled,
  and transmit break on TxD.
Bit 1 Receiver Interrupt Request Disabled (IRD)
0 IRQ- enabled (receiver)
1  IRQ- disabled (receiver)
Bit 0 Data Terminal Ready (DTR)
0 Data terminal not ready (DTR false)*.
1 Data terminal ready (DTR true).

Note
* The transmitter is disabled immediately. The receiver is disabled but will first complete receiving the byte in process.

Table 5-3. ACIA Control Register
 

7 6 5 4 3 2 1 0
SBN WL RCS SBR
WL1 WL0 SBR3 SBR2 SBR1 SBR0


Bit 7


Stop Bit Number (SBN)

0

1 Stop bit.

1

2 Stop bits.
1 1/2 stop bits for WL=5 and no parity.
1 stop bit for WL=8 and parity.

Bits 6-5

      Word Length (WL)
  6        5         Number of bits

0

0

      8
0 1       7
1 0       6
1 0       5

Bit 4

Receiver Clock Source (RCS)
0 External receiver clock (non-functional on MIO).
1 Baud Rate (SBR).
Bits 3-0       Selected Baud Rate (SBR)

  3   2   1   0  

      Baud Rate
0 0 0 0 16 x RxC (Not usable by MIO).
0 0 0 1 50
0 0 1 0 75
0 0 1 1 110
0 1 0 0 135
0 1 0 1 150
0 1 1 0 300
0 1 1 1 600
1 0 0 0 1200
1 0 0 1 1800
1 0 1 0 2400
1 0 1 1 3600
1 1 0 0 4800
1 1 0 1 7200
1 1 1 0 9600
1 1 1 1 19200

Addressing the RAM

The MIO can access up to 1 Megabyte of RAM which takes 20 bits to address. Address bits A19-A16 are set from writing to the latch at $D1E2, bits A15-A8 are set from writing to the latch at $D1E0, and bits A7-A0 are CPU address lines A7-A0 when reading/writing $D6xx. Thus there are up to 4096 "pages" of memory that may appear at the $D6xx window.

In order to access the memory, it must first be enabled by setting $D1E2 bit 5 to "1" (this also turns on the MIO's red LED). It is generally a good idea to leave the RAM disabled while not using it in case of a system crash (which could inadvertently write in the $D6xx window).

When power is removed from the computer (for whatever reason), the MIO will continue refreshing its dynamic RAM. This is accomplished by its ability to maintain a 02 clock after the computers clock has stopped. VC1 adjusts the MIO's 02 clock frequency. Adjustment requires special equipment and should not be attempted.

Checking IRQ Status

The MIO has two sources of interrupts; one is the ACIA and the other is the parallel printer port. The printer port may interrupt the computer only if bit 7 of $D1E2 is set ('1') and the printer BUSY is false ('0'). Bit 4 of $D1E3 is the general IRQ flag from the MIO (a 1 indicates that IRQ- is true). If bit 3 is also set, then the IRQ- is caused by the printer. If not, then it must be the ACIA (in which case $D1C1 bit 7 should be set).

Note that the parallel device IRQ mask (PDIMSK at $249) is set to $10 by the MIO RAM. This is because, there is only one interrupt handler (which supports all possible MIO interrupts) in the ROM. In fact, the system would crash if the OS tried to enter any of the other ROM banks to service the IRQ.

Accessing the ROM

The ROM on the MIO contains all the software necessary to access the hard disk, the RAM, the ACIA (as an R: or P:), and the parallel printer port. It also contains the configuration which is downloaded into the computer RAM when SELECT+RESET are pressed.

The ROM is accessed as 4-2K banks. (An additional 8K is reserved for the 80 column adapter.) Bits 5-2 (of $D1E3) select which bank will be active (if any) at the $D800-$DFFF region. Only 1 bit may be set and its position selects which bank of ROM is active. If all bits are zero, then no banks are active and the Floating Point Math package in the OS ROM is enabled.

According to Atari spec, 1 device is to occupy one bank of ROM and that device has a specific address range legal to it at $D1xx. Since the MIO is an all inclusive device, however, it deviates from this spec. Instead, it tries to cram as much code as possible into a small space. This meant juggling the banks around to get along with the computer and to allow for expansion of an 80 column adapter. This is why there is only one interrupt handler, yet several input bits are returned in what is considered to be strictly an interrupt sense register (at $D1FF).

Software Description

In order for the MIO to perform its multitude of tasks, one full page of memory has been allocated for general operating variables and configuration parameters. Two other pages have been reserved for "R:" handler input and output buffers, and the rest of memory (up to 4093 pages) can be used as RAM drives and a printer buffer through the MIO ROM. Table 5-4 describes the configuration parameters (those which are read from the hard disk (ID=0, LUN=0) when memory is invalid). This table occupies the first 192 bytes of memory page 0. The remaining 64 bytes are operating variables and are listed in table 5-5. Memory pages 1 and 2 are reserved for the "R:" handler input/output buffers.

Table 5-4. MIO Configuration Parameters

Address (HEX) Symbol Name Length (Dec) Function of parameter or variable.
$D600 MEMKEY 16 This contains a string of characters. If the string in memory is not equal to that in ROM, it is assumed that power to the MIO  has been lost and it should reconfigure.
$D610 DRDATA 64 This contains an array of 8 drive config records (each 8 bytes long). Records are:
+0: First physical block address (sector number) of logical device. MSB first.
+3: Last+1 physical block address (sector number) of logical device. MSB first.
+6:
B[2,0]  = SCSI/SASI ID if hard disk
 = drive number if floppy
B[5]  = 1 if floppy drive (reassign)
B[6]  = 1 if RAM drive
B[7]  = 1 if Hard drive
if B[7,5] = 0, then ignore
+7:
B[3]  = 1 if disk is write locked
B[4]  = 1 if SASI type interface
B[7,5]  = logical unit number of drive
$D652 PREND 2 Last+1 RAM page number allocated to print spooler.
$D654 PRUNIT 1 Printer device number (0 if P: disabled)
$D655 PRFLAGS 1 Printer configuration flags
  B[5] = 1 if using a serial printer
  B[6] = 1 if spooler is enabled
  B[7] = 1 if CR/LF option enabled
$D656 SERUNIT 1 RS-232 "R:" enable flag; 1=enable/0=disable
$D657 SERFLAGS 1 Default configuration for serial port.
  B[7] = 1 if to append LF after CR
  B[6] = 1 if 2 stop bits (else 1 stop bit)
  B[5] = 1 if no ATASCII/ASCII translation
  B[4,3] = parity mode: 00=none, 01=odd, 10=even, 11=mark
  B[2,0] = baud rate index
$D658 RAMUSAGL 8 Number pages allocated for each drive (low)
$D660 RAMUSAGH 8 Number pages allocated for each drive (hi)
$D668 RAMSIZE 1 Total number of RAM pages (high byte)
$D680 DRITYPE 64 Configuration data for SASI hard drives
  +0: Number cylinders on drive (MSB,LSB)
  +2: Numer heads on hard drive
  +3: Cylinder to start reduced write current
  +5: Precompensation value (usually 0)
  +7: ECC burst length (usually $0B)

Table 5-5. MIO Operating Variables

Address (HEX) Symbol Name Length (Dec) Function of operating variable
$D6C1 CPRINPG 2 Printer queue character entry pointer.
(memory page number) (LSB,MSB)
$D6C3 PRINPG 2 Printer queue character exit pointer.
(memory page number) (LSB,MSB)
$D6C5 CPROFFS 1 Printer queue entry page offset.
$D6C6 PROFFS 1 Printer queue exit page offset.
$D6C7 BADBUFF 1 If 255, this indicates that the queue has wrapped, thus repeat copies are invalid.
$D6C8 PRIRQ 1 If 128, then parallel IRQ is enabled. This byte gets copied to $D6E2 when ROM exited.
$D6CA PRPAUSE 1 If 0, then the printer spooler is paused.
$D6CB PCOPYT 1 Number repeat copies to be printed (normally zero unless they get stacked)
$D6CC SPOOLGO 1 Master spooler start/stop flag (255=go)
$D6CD XON 1 XON/XOFF flag for serial printer handshake. 255=on 0=off.
$D6FC CURPAGE 1 Shadow for $D6E0. Needed for IRQ operation.
$D6FD SMISC 1 Shadow for $D6E2. Needed for IRQ operation.

Previous page Next page