Repository navigation
UsingMagneticTape
The Datatron 205 supported two types of magnetic tape device:
- The Model 544 DataReader. This was a traditional, upright, reel-to-reel drive.
- The Model 560 DataFile. This was a semi-random access device that used multiple tape strips and a moveable tape head.
Both types of devices interfaced to the 205 processor and memory through the Model 543 Tape Control Unit. The system supported one Control Unit. The Control Unit could support a total of ten devices, which could be any combination of DataReaders and DataFiles.
This page discusses the implementation and operation of the Tape Control Unit and DataReader in the retro-205 emulator. The DataFile is discussed in a separate wiki page. For more background on magnetic tape for the 205, see the following two posts on Tom Sawyer's 205 and 220 blog:
The DataReader used a 0.75-inch wide tape with a plastic base, wound on metal reels. Each reel could hold up to 2500 feet of tape. Data was recorded in six tracks -- four data tracks encoded as BCD digits, an even-parity track, and a control track that indicated the start of a block. The tape physically supported 12 tracks, however, so data was recorded in two "lanes" along the length of the tape. The 205's tape-search instruction (MTS, 42) provided the ability to switch between lanes; read and write instructions operated on only the currently-selected lane.
Data was recorded on the tape in fixed-length, 20-word blocks. A full reel of tape could store 10,000 of these blocks. Each word in a block consisted of 11 data digits (including sign) plus a spacer digit -- the same format as on the memory drum. The tape moved at 60 inches/second, recording at 100 bits/inch. In addition to data words, each block had a header that contained the address of that block, numbered 0-9999.
A block on tape required 2.4 inches for data, 0.08 inch for the header, and 0.3 inch for an inter-block gap, for a total of 2.78 inches. Read time was 46 ms per block, plus 6 ms start time to bring the tape up to speed at the start of an operation.
The Tape Control Unit supported reading or writing up to 100 blocks with a single instruction. The fixed-size, 20-word block format allowed a drive to overwrite existing blocks on a tape, something that was not practical with the variable-length block scheme of IBM tape drives that later became the de facto standard.
Based on the block numbers recorded in the block headers, the Tape Control Unit could search forward or backward for a specified block number in a specified lane. Standard read and write operations tied up the processor for their duration, but tape search proceeded independently and asynchronously of the processor.
Only one read, write, or search operation could take place at a time, although multiple drives could be rewinding simultaneously. Attempting to initiate a read, write, or search while another search was in progress, or to initiate an operation against a drive that was not ready or in rewind, set the Overflow toggle in the processor to indicate the requested operation could not be performed. Programs were required to test for this condition after a tape operation, the same as for any other operation that sets overflow.
To support block search and overwrite, tapes needed to be formatted, or "conditioned" before use. Conditioning was performed off-line by the Tape Control Unit in concert with one of the drives. The processor could not use the tape subsystem while conditioning was taking place.
The retro-205 emulator does not require conditioning of tape images, and thus does not implement the manual conditioning features of the Tape Control Unit.
The 205 Operating Procedures manual contains a good description of the DataReader and Control Unit, along with descriptions of the steps necessary to load, unload, and condition tapes.
The speed of data transfer to and from tape was a real problem for the 205. At 100 digits/inch and 60 inches/second, a word was transferred every two milliseconds to or from the tape drive. The high-speed loops on the memory drum (with a maximum access time of 1.68ms) were fast enough to handle this data rate, but main memory (with a maximum access time of 16.8ms) was not.
To solve this problem, the magnetic tape subsystem used two high-speed loops as buffers between the tape and main memory. It also used the memory block-transfer mechanism to rapidly move data between main memory and the loop buffers. Two buffers were used, so that one could be transferring a block of data to or from the tape, while the other could be transferring a block from or to main memory.
The 4000 and 5000 loops were used for these buffers. The buffers ping-ponged in such a way that data transfer always ended with the 4000 loop. Thus, if a even number of blocks were to be transferred, the transfer began with the 5000 loop; if an odd number were to be transferred, it began with the 4000 loop. Obviously, any prior contents of the loop buffers was destroyed by a tape read or write operation, although if only one block was transferred between memory and the tape unit, only the 4000 loop was overwritten.
As a special case, tape instructions that used a main memory address of 8000 or higher read or stored data the 4000 and 5000 loops directly, and did not transfer data to or from main memory.
The Datatron 205 processor supports four instructions that operate on magnetic tape:
-
0 nnup 40 aaaa: read nn blocks into address aaaa from unit u -
0 nnup 50 aaaa: write nn blocks from address aaaa to unit u -
0 llup 42 bbbb: search on lane ll of unit u for block bbbb -
0 xxup 52 xxxx: rewind unit u
where:
- aaaa is the memory address at which data transfer into or out of main memory will begin. If the address is 8000 or greater, then data transfer will take place directly to or from the 4000 and 5000 loops and main memory will not be accessed. It is not possible to read or write directly to the 6000 and 7000 loop addresses.
- bbbb is the zero-relative block address sought by a search command. The system will automatically determine whether a forward or backward search is necessary.
- ll is the lane number on which to search. On a DataReader unit, which supports only two lanes, only the low-order bit of this value is relevant. DataFile units have 100 lanes, so two full digits are required for a lane number on those drives.
- nn is the number of consecutive blocks to read or write. A value of 00 indicates 100 blocks.
- p is the standard breakpoint digit in 205 instructions.
- u is the logical unit number to which the operation will be directed. Each drive has a selector switch on its panel that designated the unit number to which it will respond.
- x indicates digits in an instruction word that are ignored.
Note that the lane can be selected only by a search command. Thereafter, read and write instructions for that drive will use the last lane selected. Also note that based on the value of the sign digit, the low-order four digits of each instruction word could be modified by the contents of the B register in the usual manner. Thus it was fairly easy to specify a dynamic block number for search commands.
This section describes the user interface for the Control Unit and DataReader as implemented in the retro-205 emulator. See the Configuring the Emulator page for instructions on determining the number and types of tape devices the system will use.
The Control Unit is the interface between the drives and the 205 processor and memory. It controlled all tape operations except rewind, which was handled locally by the drive. Since there was only one Control Unit per system, there could be only one tape operation (except rewind) active at a time.
In the emulator, the Control Unit has a small window with a number of lamps, two buttons, and a toggle switch.

The physical Control Unit had two additional panels on either end, plus additional buttons and switches, as can be seen from Figure 9-3 in the 205 Operating Procedures manual. The lamps on the two additional panels reflected the status of circuits involved with physical recording on tape, parity generation and checking, and maintenance of the unit. The additional switches and buttons dealt with manipulation of the T register and manual calibration of tapes. None of these have any meaning in the context of the emulator, and thus have been omitted. Of the remaining panels:
- The two columns of lamps comprising the BZ register in the left-most panel indicate the currently-selected lane for the currently-selected tape unit. The lane is a decimal number displayed in BCD. For DataReader units, which have only two lanes, only the bottom lamp in the second column is relevant. DataFile units have 100 lanes, so both columns of lamps are used with those drives.
- The column of lamps comprising the Z register in the left-most panel indicates the currently selected tape unit. The unit number is also displayed in BCD. A value of zero indicates unit number 10.
- The four-digit T register in the center panel is used for two purposes:
- During search operations, the T register holds the BCD representation of the target block number. Once the desired block is located on the tape, the contents of the T register will be rotated one digit to the right.
- During read and write operations, the low-order digit position holds the selected unit number. The next two digits hold the number of blocks to be read or written -- these digits will be counted down as blocks are read or written. The high-order digit will always be zero during read or write operations.
- The right-most panel holds three columns of five lamps, but only four of these lamps are used by the emulator; the remaining lamps were for maintenance purposes:
- The S lamp indicates a search operation is in progress.
- The R lamp indicates a write (record) operation is in progress.
- The B lamp indicates backward tape motion.
- The F lamp indicates forward tape motion.
The CLEAR button clears the internal state of the Control Unit, including all of the lamps on the panels. This button should seldom be needed in the emulator.
The NORMAL/SUPPRESS B switch controls how sign digits of incoming words are interpreted during read operations. In the NORMAL position, sign digits with the second (2) bit set will cause the current value of the processor's B register to be added to the word before it is stored in memory. The 2-bit is also reset before the resulting word is stored. In the SUPPRESS B position, no action is taken based on the value of the sign digits, and they are stored with their words as-is. SUPPRESS B is normally used when loading programs from tape, to prevent altering the sign digits in words for Cardatron format bands. For normal operations, this switch should be left in the SUPPRESS B position.
The DISABLE button stopped all tape movement as long as it was depressed. This could be used, for example, to interrupt a search for a non-existent block. In the emulator, when this button is clicked, it aborts the current tape read, write, or search operation. It has no effect on tape rewind.
The DataReader handles open-reel tapes. In the emulator, these units are physically labeled MTA through MTJ. Each unit in the current system configuration has a separate window in the browser:

The POWER lamp, STOP REWIND button, and the ON/OFF and FORWARD/OFF/REVERSE toggle switches from the panel of the physical DataReader have been eliminated, as they have no function in the emulator. Two new buttons have been added to enable loading and unloading of tape images in the emulator version of the drive.
The DESIGNATED lamp lights when this unit is currently selected for a tape operation. Except for rewind, it remains lit while the operation is in progress.
Clicking the REWIND button while the unit has a tape mounted and is in local status will rewind the tape to its load point (BOT). The button is inactive when no tape is loaded or the unit is in remote status.
The pull-down DESIGNATE list determines the logical unit number of the drive. This is the unit number that tape instructions in the processor reference. No two drives should have the same logical number at the same time. If two or more drives are assigned the same number simultaneously, tape operations against that unit number will act as if the unit is not ready.
The REMOTE/LOCAL switch controls the status of the drive. If a tape is mounted, placing this switch in the REMOTE position will place the drive in remote status and make it ready; otherwise it is in local status and not-ready. Tape operations against a not-ready unit will result in the processor's Overflow toggle being set.
The NOT READY lamp indicates the remote (ready) or local (not-ready) status of the drive.
The REWIND-READY/REWIND-NOT READY switch determines the status of the drive after a rewind operation completes. In the REWIND-READY position, the drive will be placed in remote (ready) status after rewind completes, provided the LOCAL/REMOTE switch is in the REMOTE position. Otherwise, the drive will be in local (not-ready) status after a rewind.
The NOT WRITE lamp will be lit when the NOT WRITE/WRITE switch is in the NOT WRITE position. This indicates any tape that is loaded is write-protected.
The NOT WRITE/WRITE switch controls whether a tape can be written upon by the drive. In the NOT WRITE position, the NOT WRITE lamp illuminates and the tape is write-protected. Write operations will cause the tape to move the designated number of blocks, but data on the tape will not be overwritten.
Unit numbers and switch settings for each unit are persisted in the system configuration, except that the when the emulator is initialized, all REMOTE/LOCAL switches are set to LOCAL.
The progress meter at the bottom of the window shows the relative amount of tape left on the supply reel. As the tape moves forward, the meter bar will diminish towards the left; as the tape moves backward, the bar will increase towards the right
Above the progress meter is the name of the tape image file currently loaded into the drive, if any. If a blank tape has been loaded, this will read simply "(blank tape)".
The LOAD button is used to mount a reel of tape, in the form of a tape-image file, into the DataReader. This button is active only when no tape is loaded in the drive. Clicking this button will open a tape-loader dialog box:

To load a blank tape into the drive, simply click the OK button. To load an existing tape-image file, first use the file picker on the window to select the file, then click the OK button. All tape images are treated as if their reels had been calibrated to hold 10,000 blocks. Blank tapes are implicitly calibrated. The emulator does not support manual calibration of tapes, nor tapes containing other than 10,000 blocks.
When a tape is loaded into the drive, a small tape-reel icon will display on the right side of the tape drive window. This icon will rotate as tape commands move the tape in the drive. Below the icon are a set of orange annunciators that indicate the status of the tape image:
- UNLOADED: no tape is mounted in the drive.
- AT BOT: a tape is loaded and is positioned at the tape's load point.
- AT EOT: the tape is now positioned at physical end-of-tape. No further forward motion is possible. Either a backward search command must be executed, or a manual or programmatic rewind must be performed.
- REWINDING: the tape is currently rewinding.
The UNLOAD button dismounts a tape from the drive. This button is inactive unless a tape is mounted, the drive is in local (not-ready) status, and the tape is positioned at its load point (BOT).
If the tape has been written upon while it has been mounted, clicking this button will display a dialog box asking if you want to save the tape image data. If you respond by clicking the dialog's OK button, the emulator will render the contents of the tape as lines of ASCII text and display them in a new, temporary window. You may save the contents of this window to your local file system, or copy/paste the data into another program. When you are finished with the temporary window, simply close it.
Tape images are maintained externally as simple ASCII text files. Lines in the file may be delimited by carriage-return followed by line-feed, carriage-return only, or line-feed only. Empty lines (those containing no characters or only spaces) are ignored. Each non-empty line of text in the file represents two blocks, one in each lane. Words in the blocks are represented as hexadecimal numbers with BCD encoding, which you can think of simply as decimal numbers. Words within a block are delimited by commas.
The first 40 comma-delimited numbers on a line will be converted to the tape drive's internal format, one number per word. The first 20 words will become the contents of lane 0; the second 20 words will become the contents of lane 1. If a line contains fewer than 40 numbers, it will be implicitly extended to 40 with zeroes. If a line contains more than 40 numbers, those after 40 will be ignored. Two adjacent commas imply a zero word between them. Spaces before or after commas are ignored.
When loading an existing tape image file, parsing of the lines in the file proceeds as follows:
- Each line is extracted in turn from the file. If the line is empty, it is ignored and the load proceeds to the next line of the file.
- The text of the line is separated into individual strings of text at the point they are delimited by commas.
- Any leading or trailing spaces in each string are discarded.
- Each resulting string is converted to a numeric value by the Javascript
parseInt(...,16)function. This function will convert any leading hexadecimal characters (0-9, A-F) in a string to internal numeric form. The number may optionally be prefixed by a hyphen ("-") to indicate it is negative. Any trailing, non-hexadecimal characters in the string are ignored. - Each converted number is reduced to 11 hexadecimal digits by discarding any higher-order digits. If the number was prefixed by a hyphen, the low-order bit of the sign (11th) digit is set to one. Negative values may be indicated either by preceding the number with a hyphen, or setting the low-order bit of the 11th (highest order) digit to one, or both.
If a tape-image file contains fewer than 10,000 non-empty lines, the emulator will extend the drive's internal tape image to 10,000 blocks when it is loaded by appending blocks of zero words in each lane. If a file contains more than 10,000 lines, the extraneous blocks are ignored. A blank tape image initially consists of 10,000 blocks of zero words.
When unloading a tape image, the emulator will trim all blocks consisting entirely of zero words from the end of the tape-image text it creates. It will also trim zero words from the end of each line. If the blocks from both lanes are entirely zero, the unloaded image will have only a single comma rendered on that line. These trimming actions minimize the amount of redundant text in the resulting tape image file.
This format has been designed to create and maintain tape image files with a simple text editor. Most spreadsheet programs will read and write comma-delimited text files, so they can be used as well to view and edit tape image files. Note that if a block in lane 1 is non-zero, the corresponding block in lane 0 must be padded as necessary in the image file out to a full 20 words.