Welcome to the Datatron 205 and 220 Blog

This blog is a companion to T J Sawyer's Web Page that outlines the history of the Burroughs Datatron 205 and Paul Kimpel's incredible 205 and 220 emulators. Please visit those sites and return here to post any comments.

Sunday, May 10, 2020

retro-205 Emulator Version 1.03 Released

I am pleased to announce that version 1.03 of the retro-205 emulator has been released. This version introduces two significant enhancements, one to the Flexowriter output device, the other to have multiple, selectable system configurations.

These changes have been committed to the project's source repository on GitHub and uploaded to the project's hosting site from which you can run the emulator. The project wiki also has corresponding updates.

Flexowriter 203/204 Character Encoding

Tom Sawyer requested this enhancement for a project he has been pursuing, but explaining it requires a little background. The original ElectroData Datatron 203 computer (as well as the CEC models 30-201 and 30-202 that preceded it) had only primitive input/output devices -- a high-speed paper-tape reader, a significantly slower paper-tape punch, a Flexowriter electric typewriter, and a decimal keypad that could be used to enter instructions and data into the system via the Control Console.

The paper tape and keypad devices were numeric-only, operating with four-bit binary-coded decimal (BCD) digits. The Flexowriter, however, was an alphanumeric device. It could print signed numeric data directly from BCD digits supplied via the processor's A register, but could also print alphanumerically in mixed case, with the characters specified by pairs of adjacent digits. The assignment of the two codes closely matched the internal mechanism of the Flexowriter, with some codes serving to control non-printing functions, i.e., shifting between upper and lower-case, carriage-return, horizontal tabulation, backspacing, and shifting the ribbon between black and red colors.

When the Datatron 204 was introduced with support for magnetic tape, the same Flexowriter character encoding was carried forward. When the Datatron 205 was introduced with the Cardatron interface to IBM punched-card equipment, however, a different character-encoding scheme was adopted that mapped more directly to the zone/numeric scheme used with punched cards. It was also the case that the IBM equipment supported only upper-case letters and fewer special characters than the Flexowriter. As a result, the 205 used a modified Flexowriter that had been adapted to the Cardatron character set.

Prior to this release, the retro-205 emulator has used the 205's Cardatron character encoding scheme. The project that Tom has been working on involves a program that had been written for the 204, which meant that when it printed alphanumeric data to the Flexowriter, it printed gibberish. He needed the ability to switch the Flexowriter between the 205 and 203/204 character-encoding schemes.

This proved to be not very difficult to do. The character encoding for the Flexowriter can now be changed in two ways:
  1. On the system configuration page (accessed from the emulator's home page, webUI/D205.html), in the Console Unit Selection section, there is a new check box, "Use 203/204 Flexowriter encoding." When this box is ticked, the Flexowriter will use the original encoding for the Datatron 203/204. When the box is not ticked, the device will use the 205 Cardatron encoding. This setting is preserved across emulator restarts. Note that the configuration page can be accessed only when the emulator is in a "power off" state.
  2. On the Flexowriter's browser window, there is a new button below the logo that indicates the encoding scheme currently in effect. This is initialized to the setting from the configuration page when the emulator is started. Clicking the button will toggle between the 203/204 and 205 Cardatron schemes. This button allows the encoding scheme to be changed while the emulator is running, even in the midst of the Flexowriter printing. Changes made using this button are not preserved across an emulator restart -- the setting will revert to that from the configuration page.
Character codes used with the 203/204 are shown starting in Section 3 page 21 of ElectroData Technical Bulletin 3040, Datatron Programming and Coding Manual. Note that there is an error in this table for code 33 -- for lower case it prints the apostrophe (') as shown; for upper case, however, it prints the double-quote (").

Character codes used with the 205, Cardatron, and modified Flexowriter are shown on the Burroughs 220 Pocket Card -- the 205 and 220 used the same Cardatron codes. The codes are also shown in Figure 2 of United States Patent 3,000,556.

When printing in 203/204 mode, the emulator supports all character glyphs except the 1/2 (one-half) symbol, which prints as the crosshatch (#). It supports the control codes for upper- and lower-case, carriage return, horizontal tab (with stops at every eight positions), backspace (overwriting rather than overprinting any existing characters), and the black/red color shift. It ignores the stop code, 07.

Multiple System Configurations

Since version 0.06, the emulator has supported customization of its input/output configuration -- console devices, magnetic tape drives, and Cardatron punched-card equipment. There was only one configuration, however -- if you wanted a different arrangement, you had to modify the configuration and save it, which overwrote any prior arrangement.

This next enhancement also originated from a request by Tom Sawyer. He wanted the ability to store multiple configurations and a way to select easily among them. In particular, he wanted the emulator to support some number of predefined configurations so that users of the emulator could easily choose one.

The emulator now supports multiple configurations. There is a "Default" configuration, which is created automatically when the emulator is first loaded to an instance of a browser. This is equivalent to the single configuration that existed previously, and is initialized to the same settings. When running version 1.03 or later for the first time, any existing single configuration will be transferred to the Default one. You can modify this configuration in any way you wish, but you cannot delete it.

In addition, there is -- initially -- one predefined configuration named "Basic203." This configuration, as its name implies, gives you the input/output devices you would have had on a Datatron 203 -- paper-tape reader and punch, plus the Flexowriter printer with 203/204 character encoding enabled. This is what Tom needed for his 204-vintage program. You can neither modify nor delete predefined configurations, but you can clone a new configuration from it and modify the clone, as discussed below. We may be implementing additional predefined configurations in future releases of the emulator.

You configure the emulator the same way as in the past, by clicking the Configure System button on the emulator home page. This can be done only when the emulator is in a "power off" state. Clicking the button opens the configuration page in a separate window, which has changed somewhat from previous releases:

retro-205 Configuration Page

The buttons have been moved and two new ones added. To the left of the buttons is a new pull-down list that holds the available configurations and shows which one is presently selected. You can also see the new check box for 203/204 Flexowriter character encoding discussed earlier in this post.

The buttons work as follows:
  • CANCEL -- Closes the configuration page without saving any changes you have made. You can accomplish the same thing by clicking the close-window icon on the page's title bar (i.e., the "X" on Microsoft Windows systems).
  • SAVE -- Saves any changes you have made on the page to the currently-selected configuration, makes that configuration the current one for the emulator, and closes the configuration page. An alert box will pop up confirming this fact.
  • DELETE -- Deletes the currently-selected configuration and makes the "Default" configuration the current one. You cannot delete the "Default" configuration or any of the predefined ones.
  • CLONE -- Creates a copy of the currently-selected configuration under a new name and makes the new copy the currently-selected configuration. The page will prompt you for the new name. The page stays open after this so that you can customize the new configuration. All cloned configurations can be modified and deleted later.
Thus, to switch to a different configuration that already exists, you need only select the configuration's name from the pull-down list and click the SAVE button.

There is no fixed upper limit on the number of configurations you can have. The configuration data is stored by the browser on your workstation using a standard mechanism known as LocalStorage. The limiting factor is how much data the browser will allow for an entry in LocalStorage. For most modern browsers, this is a figure in the low megabytes. Most configurations require only 2000-3000 bytes.

In addition to its setting on the configuration page, the name of currently-selected configuration is shown under the blue buttons on the retro-205 emulator home page and in the lower-right corner of the Supervisory Panel window.

There is a second method that can be used to select the configuration under which the emulator will run. You can include the name of the configuration in the query string of the URL that opens the emulator home page, e.g.,
The query string is the portion of the URL that begins with "?". The "config" key is case-insensitive, but the configuration name must be written exactly as it is stated in the configuration list, including case and any internal spacing. This will make the named configuration (if it exists) the current one, exactly as if you had selected it on the System Configuration window. If that configuration name does not exist, the emulator displays an alert and opens with its currently-selected configuration.

The idea behind this second method is that it's an easy way to send someone a link that will run a specific emulator configuration.

No further additional features are planned for the retro-205 emulator at present, but occasionally bugs crop us, and we do have a few items of software that are in various stages of restoration, so we aren't done with this system yet.

Thursday, May 7, 2020

retro-220 Emulator Version 1.02 Released

I am pleased to announce that version 1.02 of the retro-220 emulator has been released. This is a minor release, aggregating a number of corrections and small enhancements that have accumulated since 1.01 was released in October 2018.

The source code and supporting materials for this version of the emulator are available from the project repository. You can download the source from the repository and run it from your own web server. Alternatively, feel free to run it from our hosting site. Please see the Getting Started wiki page for instructions.

Emulator Corrections and Enhancements

The most significant changes involve corrections to the implementation of floating-point arithmetic instructions:
  • The implementation of the "normalizing limiter digit" in the floating add/subtract instructions has been redesigned to operate correctly. This was an unusual feature in the 220, and was the subject of a patent (US 3022006A) awarded to John Alrich, who designed the floating-point circuitry for both the 220 and the 205. In essence, if the high-order (sL=11) digit in the instruction word was between 1 and 7, the processor monitored the number of normalization shifts that took place after the add/subtract operation. If the number of shifts exceeded the value of the digit, the processor halted at the end of the instruction, and from the contents of the C register, the operator could determine the number of shifts that actually occurred. Normalization shifts (with accompanying adjustments to the exponent field) are necessary after floating-point add/subtract when one or more high-order digits of the mantissa are zero. The intent of this feature was to trap loss of precision due to very small differences between the two operands. The limiter digit worked only up to seven digits because after eight shifts the mantissa would be all zeroes, yielding a floating-zero result. For details on the normalization limiter, see the 220 Operating Characteristics manual, pp. 2-18 to 2-22.
  • The final value of the A register for floating multiply when exponent overflow occurred was incorrect and has been fixed.
  • The final value of the A register for floating divide when the D register (memory operand) is not normalized was incorrect and has been fixed.
  • The way that registers were being set up for floating divide and post-divide normalization was being done was incorrect and has been fixed.
Text files loaded into magnetic tape drives as tape images are now validated during the load process. If they do not have the correct format, or contain invalid data, or exceed the maximum capacity of a 3500-foot reel of tape (approximately 729,000 words), the tape image file is rejected.

A couple of hidden user interface features used for internal emulator testing have been implemented. These are described in the repository commit note (1893b8a2) associated with the release.

Tuesday, February 11, 2020

retro-205 Emulator Version 1.02 Released

The retro-205 emulator for the ElectroData/Burroughs Datatron 205 has been stable and operating nicely now for almost three years. I occasionally find small problems to fix, or come across a reference that sheds new light on the operation of the system that prompts a programming change. Enough of these have accumulated that I recently pushed out a new release, version 1.02.

This post describes the changes in 1.02. These changes have been committed to the project's source repository on GitHub and uploaded to the project's hosting site from which you can run the emulator. The project wiki also has a few minor updates.

Application Cache Feature Removed

Support for the browser Application Cache ("appcache") feature has been removed from the emulator. This feature allowed the browser to load the entire emulator into local storage and run it, once the code was loaded, without requiring access to the host web site, or even to a network connection. Alas, this feature was not well-accepted by web developers and was deprecated as a standard a few years ago. Some browsers may no longer support it.

The impact of this on most users should range from minor to none. The browser will still require network access to the host web site, either to load the code or verify that the copies in its cache are still current. Once loaded into the browser and running, the emulator requires no further access to the host site, as before. If you want to run the emulator from a location that cannot access your host site, a possible option is to set up a web server on your local workstation. Only a very simple web server is needed. See "Setting Up a Web Server" in the Getting Started wiki for more information.

Floating Point Issues Corrected

I came across a set of floating-point diagnostic test routines at the Charles Babbage Institute (CBI) during a visit in October 2019. These looked interesting, so I transcribed them and got them to run in the retro-205 emulator. That exercise uncovered one bug in the emulator's implementation of floating-point arithmetic, and one aspect of the implementation that was incorrect, but relatively benign.
  • Floating Divide (FDIV, 83) should set the Overflow Toggle when dividing by zero. It was not doing this, however, when the mantissas of both the divisor and dividend were zero. This bug was due to testing the mantissas of the two operands for zero in the wrong order.
  • The emulator included code to pre-normalize the operands, i.e., shift the mantissa left and decrement the exponent until the high-order digit was non-zero. This was code carried over from the retro-b5500 emulator, which I used as a base for the implementation of floating point in retro-205. In fact, I discovered, the 205 always assumed the operands were normalized and did not adjust them before commencing an operation. All pre-normalization code has therefore been removed from the emulator.
The floating-point diagnostic routines are interesting, and I plan a future blog post to discuss them in more detail.

Breakpoint Switch on Control Console Corrected

In the process of getting the floating-point diagnostic routines to work, I discovered that the Breakpoint switch on the Control Console was not working correctly. Setting the switch to the "4" position did not cause the processor to halt after it executed an instruction having the 4-bit set in the fourth digit of the instruction word. Having the switch in the "2" position worked correctly. Have it in the "1" position also worked, but only accidentally -- a case of two errors canceling each other out. This bug was introduced version 0.04e (July 2015) as part of the change that caused the switch to reverse when it was clicked at either end of its travel, and is now fixed.

Rogue Paper-Tape Reader Brought to Heel

During the floating-point routine testing, I also discovered that the paper-tape reader stayed "hot" after clearing the system. If the device was hanging on a read command, waiting for a paper-tape image file to be loaded, then even though the processor had been halted and the system cleared, the reader would immediately started reading when a paper-tape file was loaded into it. It now detects the system clear operation and does not start reading the tape until specifically commanded to do so.

External Control Instruction Corrected

The External Control instruction (EXC, 71) was implemented in the 205 as a potential means for the system to control external equipment. There were eight external switches in the Model 421 External Switching Unit that could be set from the high-order eight digits (not including sign) of the memory word fetched by the instruction's operand address. See the DATATRON Command List (Bulletin 3030C, which follows the DATATRON 204 Central Computer Handbook at the link) for details.

The change in this release is a detail that Bulletin 3030C did not discuss, viz, if the low-order bit of the operand word's sign bit is set, the computer will halt in the same manner as for the Breakpoint switch, i.e., at the end of the instruction. This detail was discovered in a copy of Bulletin 3031, External Switching Unit Model 421 and Output Selector Unit Model 420 (Preliminary Edition), ElectroData Division of Burroughs Corporation, 1956.

Note that although the emulator implements the EXC instruction, it presently doesn't do anything except set flags corresponding to the switches internally in the Processor. In the future it could be possible to use these flags to control some new mechanism.

Cardatron Reader Format Lockout Corrected

The Cardatron interface to IBM punched-card equipment had a feature when reading cards termed "format lockout" that would prohibit the next card from being read automatically. It was triggered by an 8-punch on the card in the column used to determine the format band that would convert the card punches to 205 memory words. Since the emulator uses ordinary ASCII text files as card decks, the concept of an "8 punch" does not translate well, and instead the emulator uses specific ASCII characters to encode the 8-punch along with another punch in rows 1-7 that indicates the format band to be selected.

Two of those ASCII characters were not represented properly in the code, the grave accent (`) for the 1-8 punch and the apostrophe (') for the 5-8 punch. This problem has been corrected. See the Cardatron wiki for the full list of format lockout codes.