Tuesday, April 10, 2018

Developing 1053 console printer emulator for use with IBM 1130 systems

IBM 1130 TYPEWRITER (CONSOLE PRINTER) EMULATOR

I have thought about building a device to plug into the 1130 in lieu of the 1053 Selectric based console printer, since the device can get out of adjustment and block full use of the system. The device would be based on an Arduino with two SMS paddle cables that plug into the 1130 in place of the paddle cards from the 1053. 

SMS paddle cards
This device will communicate over a serial port to a terminal or PC where the output can be displayed and/or captured. An I/O Selectric operates at a maximum of 15.5 characters per second, with longer delays for operations such as carrier return, tabbing or line feed. This is easily within the performance of an Arduino without the need to do direct register manipulation or use interrupts. 

Today I coded the application which simply loops through these four steps:

  1. Read all input lines to look for character selection or commands
  2. Advance the state machines for print cycles, tracking the current column and movements
  3. Transmit the appropriate outputcharacter, space, tab, line feed as appropriate
  4. Control the feedback signals from the 1053 back to the 1130
The code sets a timer and uses it to decide how to step through the state machines. These are initially triggered by a positive value on the command or character selection lines, then they move through the 65 ms duration of a print cycle or the 2 second duration of a long movement command. Thus, it will take many loops through the logic for the time to elapse for state machine changes. 

Selectric typewriters choose which of four vertical bands of characters to print with two tilt control bits, T1 and T2. It also chooses which of 11 rotations of the current typeball hemisphere by using the rotate bits R1, R2, R2A and R5. On a typewriter, lower case and upper case letters are on separate hemispheres, thus a control line AUX determines which hemisphere should be rotated to the front. 

All told, these codes select one of 11 rotations on one of 4 tilts, for one of 2 hemispheres, a total of 88 printable character positions. The particular typeball installed determines the type of font and other characteristics. The console typeball, used on both 1130 and S/360 main consoles, has upper case letters on both hemispheres, thus there are two copies of each alphabetic letter. This reduces the number of unique characters on these balls to 62. 

The processor types a character by emitting one or more 1 bits on the signals T1, T2, R1, R2, R2A, R5 and AUX, which triggers a print cycle, rotating and tilting the ball before the mechanism slams it forward into the ribbon and onto the paper. The typewriter has a microswitch based feedback line that tells the processor when the mechanism has completed the critical part of the print cycle, after which a new character can be selected for typing. 

Other commands have discrete signals to the typewriter - line feed, carrier return, space without printing, backspace, tab, shift to uppercase, shift to lowercase, shift to use black ribbon and shift to use red ribbon. On the typewriter, the ribbon is inked with dual colors, top and bottom, thus the program can select the color which will be typed. Additional microswitches provide feedback for when long duration events such as carrier return have completed. 

I keep track of the current column, manipulating it as each character is printed, space or backspace occurs, resetting when the carrier returns, and arbitrarily choosing five columns for every tab. When the current column reaches 100, I emit a feedback signal; the typewriter has a microswitch near the end of line that accomplishes this task in a physical 1053. 


I have spare SMS paddle cards, which I will wire up to an Arduino in a case. I will need to use relays for the feedback signals, since the 1130 is expected 12 or 48V on those lines. The signals coming from the 1130 to my device are open collector outputs, thus they can work with the 5V pullup of the Arduino inputs. On the live 1053, these signals will ground 48V to operate solenoids, but my device does not have the voltage or current requirements being purely electronic. 

1053 printer - the 1130 adds 16 toggle switches across the faceplate as Console Entry Switches

2 comments:

  1. Hi Carl,

    Certainly interested in this and I have some spare SMS paddle cables from an old printer so could try it out once you have things sorted.

    One thought... would it also be possible to simulate the toggle switches on the console with some link to the Start Program button to load into core - i.e. to load a program via this method.

    I currently have no way to enter new programs on my 1130 except via the toggle switches which, as you know, is difficult and error prone. If I can find a way to get a program loaded I would have a chance of writing & loading a program to use my synchronous communications adapter for input.

    Anyway, just simulating the console printer would be a big step forward.

    Peter Vaughan (TNMOC)

    ReplyDelete
  2. Hi Peter.

    The console switches themselves are easy - if they are left in the 0 position, then we could inject +12V to simulate any 1 bits by hooking up only 16 wires plus ground. If using an Arduino, you would need relays because the controller cards like Arduino work with 3.3 or 5V max voltages.

    The difficulty is with the Start button. The Program Start button is a switch that connects +12V to two different wires depending on whether it is pressed or not. We would have to interrupt the connection through the physical button in order to switch the 12V between wires to simulate presses.

    Still, that can be accomplished by routing the +12V that feeds the Prog Start button through a relay switch which you can activate to disable the console button. Then, we feed the +12V via relays to the two wires of the Prog Start switch.

    An Arduino, 18 relays and a bit of wiring will accomplish the task. I will draw it up and indicate where to make the connections. I suggest that the Arduino sits under the console beneath the lamps and pushbuttons, to make the wiring easy and to keep the 18 relays and board out of sight.

    You would have a USB cable that would come out of the console table somewhere convenient and hook to a PC where you could issue simple commands to load memory.

    The operator would need to switch the rotary mode knob to LOAD and set the IAR to the initial memory address, but from that point the Arduino could be sent words to load to memory, by simulating the console entry switches and Prog Start pushbutton.

    Carl

    ReplyDelete