Search   
Home  Print View  

 

Specs

Branch Content

Internal Registers

Tape Drives connect to the LC-81, physically, through the EXT-BUS. The computer communicates with the Drive by the mean of three 8-bits read/write registers (having each its own I/O address) that are directly exposed to the bus:

  Register D: Data
  Register C: Control
  Register F: FID

The register D is used for data interchange.
The register C is used to report status from and send commands to the Drive.
The register F is used to read or set the File Identification number (FID).

Register's addresses must be consecutive in this order: D, C, F; the address of D is considered the "Base Address" of the device. Other registers could also exists to support advanced functionality in which case their addresses must also be consecutive after F. If some kind of programmable chip is used to implement D (for instance, an UART chip) and that chip takes more than one I/O address, then the address of C must follow the last address occupied by the chip.

It is also possible to connect the Drive via serial port instead of EXT-BUS but that approach is only acceptable for simulation software such as VTCOM, not for actual drives.

Register D

In real tapes, bits are encoded serially along the tape. The drive must decode them and group them into bytes using some kind of shift register. Once a byte have been decoded, it is transferred in parallel to register D and an interrupt is asserted to the EXT-BUS to let LC-81 know that a byte is ready for reading. Software running at LC-81 reads register D in response to the interrupt.

The time needed to decode a byte, and consequently the time between interrupts, varies depending of the drive, but is expected to be in the order of milisecons.

Register C

Register C holds drive's Status and operational Mode, according to the following bit-map:

  Bits    Meaning
  ----------------------------
  0-3     Mode
  4       BOT (Begin Of Tape)
  5       EOT (End Of Tape)
  6       On-Line
  7       Alarm
  ----------------------------

Where Mode, in turn, is bit-mapped as following:

  Bits    Meaning
  ----------------------------
  0-1     Transport Status:
            00   STOP
            01   Rewinding
            10   Fast Forwarding
            11   Moving at nominal speed (Read, Write, or Making GAP)

  2-3     Operation:
            00  (Illegal)
            01   READ
            10   WRITE
            11   Making GAP
  ----------------------------

The register can be read or written though the EXT-BUS but the Drive's electronics must prevent bits 4-7 from being overwritten. Software running at the LC-81 can then read the entire register but only write the least significant nibble (Mode); the most significant nibble is simply ignored and can be filled with zeros. This results in the following:

  Mode    Meaning
  ----------------------------
  00H     STOP
  01H     RWD
  02H     FF
  07H     READ
  0bH     WRITE
  0fH     Make GAP
  ----------------------------

Register F

This register holds the effective File Identification Number (FID) and its content is always shown in Hex in the 2-digits seven-segment display on the front panel.

When the drive goes "On-Line" the content of the FID rotatory Hex key is copied into F so LC-81 software can read it. Software can also write the FID to F so the Operator can see it.

In reality, the only role of register F is to display its content in the front panel. It can be used for other purposes as well, such as reporting status or error conditions to the Operator.

LC-81 Homebrew Minicomputer -- this software is based on Help Books running at melissa