Monday, April 16, 2018

Enhancements made to the 1053 Console Printer emulator for IBM 1130


I decided to improve the project I roughed out and coded a few days ago, adding more complete emulation of the 1053 console printer atop the IBM 1130. The 1053 is based on the IBM selectric typewriter, an output only version of the 1052 which was the operator console on the IBM 360 mainframes.

The 1053 attaches to the 1130 system through two SMS paddle cards and a power connector. The paddle card is a short printed circuit board that mates with the 16 signal SMS socket - using technology developed for IBM's transistor generation of systems such as the 1401 and 7090.

Typing a character involves triggering one or more of the tilt and rotate signals, which starts a print cycle on the typewriter and causes the print ball to tilt and rotate to bring the intended character to face the paper as the ball strikes forward through the ribbon to the paper.

In addition to typing a single character, the mechanism can be asked to space, backspace, tab, return the carrier, drop to a new line, shift to 'upper' or 'lower' case mode, and shift between red and black ribbon colors.

The typewriter has a series of microswitches that provide feedback on the status of the mechanism. Selecting the new character to type has to wait until the print cycle is nearly complete from the last typed letter. Letters shouldn't be typed while the carrier is still moving towards the left or moving to a tab or the paper is moving down to the next line.

My emulator will capture the requested letter or action, but also provide the appropriate feedback at the same timing as a real 1053. On the front of a 1053 printer are three pushbuttons and an up-down toggle lever. The lever will set or clear a tab stop at the current column. The buttons cause a space, tab or return to be performed. An indicator shows through a horizontal plastic scale to mark which column the carrier has reached. 

My initial design did not display the current column. It had no means of requesting the space, return or tab operation that is provided by the three buttons. More seriously, it made a naive assumption of tab stops a fixed number of columns apart, rather than allowing the setting or clearing  of arbitrary stops. 

Many programs written to use the 1053 would expect the operator to set up tab stops at suitable positions - using a simplistic tab scheme would distort the output. I therefore decided to model the tab lever and three buttons. Three seven-segment LED displays will show the current column number digitally. 

The Arduino had 26 unassigned pins based on my initial design. 9 pins were sufficient to drive three BCD to 7-segment decoders (the high order display wired to only decode 0000 or 0001). Five more signals hooked to five pushbutton switches will provide for the faceplate functions of the 1053.

I have ordered all the parts, other than a larger and more suitable enclosure to hold the emulator, its display digits and pushbuttons. I have SMS paddle cards and sockets to wire up everything, once the remaining parts arrive.

There are a last two dimensions of the 1053 that I was not fully reflecting with the emulator. Two of the characters on the typeball of the 1053 are not in ASCII. The cent sign ¢ and the logical not ¬ are those missing characters. 

A solution is the UTF-8 encoding supported by many terminal emulators, which would let me represent the two characters properly. Too, using a terminal emulator program with mono color type would not display the effect of programs choosing red or black ribbon colors. Thus I would need to adopt some color selection mechanism that fit with common emulator programs. If the terminal program supports ANSI color selection, I can make use of that. 

I can switch to UTF-8 and capture the two missing characters from their Unicode values, rather than my initial decision to type some artificial string such as {cent sign} which will distort spacing of the remainder of the typed line. It does not fix the ribbon color issue but UTF-8 would at least cause each letter to take up one column on the screen. 

The ANSI colors are selected by sending a sequence esc[##m to the terminal, where esc is 0x1b, and the one or two digits of ## are:

  • 1 sets on bold mode (higher intensity)
  • 0 resets intensity and other color selections
  • 47 sets the background to white
  • 30 sets the foreground (text) color to black
  • 31 sets the foreground color to red

I therefore set the terminal initially with esc[0m esc[47m and esc[30m then process a shift to red with the sequence esc[31m and esc[1m while a shift to black is the sequence esc[0m esc[47m esc[30m sent to the terminal. 

My final bit of code converted the integer column number to ones, tens and hundreds digits, then wrote each out in BCD to the hardware that will convert BCD to 7-segment LED display drive signals. 

No comments:

Post a Comment