Wednesday, September 30, 2015

Small progress and ceasefire on the 1053 spring front, major coding and testing of the SAC Interface virtual and mirror devices

1053 CONSOLE PRINTER RESTORATION

After studiously ignoring the spring most of the day, I strode back into the valley of death for my day's ration of utter frustration. After only 30 minutes, I was able to get the errant spring completely out of the typewriter. Now, if I can get the spring attached first to the tab interposer, while dangling backwards, I theoretically can reach in with a spring hook and pull the rear of the spring back over its mounting tang.

I put in another 30 minutes - my quota for a session - but didn't succeed. I will keep coming back, but in frustration-limiting short bursts until I get an end on, then repeat for the other end as long as necessary.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I completed the Python (PC side) code for the virtual 2310 disk drive, allowing the user to open an IBM 1130 Simulator disk image file and allow the 1130 system to access it as if it were a physical cartridge sitting in a real disk drive (an IBM 2310 drive, number D).

I made some enhancements for more faithful error recovery and behavior. A helper thread now models the 1500 rpm rotational speed of the disk, cycling the sector number so each sector lasts 10ms. The read and write logic will wait until the helper thread's sector number matches the target before it begins the data movement. The seek logic will calculate the time a seek would consume on the physical 2310 drive and sleep until that has passed.

My experiments with the disk image files showed that I was correctly converting between those encodings and the 1130 words that I would read or write. All that remains is to do some testing - a safe copy of the file, load the DCIP utility into core, set the console switches for drive D and then do some IO to it.

In lieu of battling the typewriter spring, I worked on the Python program to fill out the remaining virtual or mirror drivers. Still to complete were:

  • Mirror bit switches
  • 1403 line printer
By the end of the evening, I had most of the bit switch coded, although the GUI display of the switch settings is not yet done. I also roughed out all the pseudo code for the 1403 printer function. In addition to finishing that worker thread for the 1403, I have to write the routine to select an output file when the user wants to start the 1403 printer. 


Monday, September 28, 2015

Spring 99999, me 0 but continued building out SAC Interface Box functionality

1053 CONSOLE PRINTER RESTORATION

I put in two hours with the fiber optic camera, rotating the typewriter every which way and attempting to find two paths:

  1. a path for the camera head that would let me see the interposer tang and the unattached spring end beyond it
  2. a path for tools to reach in, snag the end of the spring, pull it over the tang and release it there
I was not successful. I made a try again in the early evening when work was done. What I was trying to avoid is the need to disassemble everything once again (remove operational magnets, remove mainspring, unhook linkages for various functions like space and return) which would effectively set me back many weeks. 

I did manage to find a path with both visibility and tool access. It is up from directly under the typewriter, as long as I rotate one mechanism out of the way. Manipulating the spring to fit through the interposer hole was still a very fiddly and business, but after about thirty minutes, it popped off the spring hook and rotated somehow inside so I can't see it, find it or move it.

I rotated the typewriter once to move the spring back where I can see it, but as I barely touched it, the spring fell back into the Stygian depths. After a bit more time, I set the task aside AGAIN.

1442 CARD READER/PUNCH RESTORATION

I cleaned up some logic in the fpga for the virtual card reader/punch, which should allow me to begin testing it after I disable the built in 1442 adapter in the 1131 and I get the typewriter back in operation.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Besides testing the virtual, real and mirror device adapters I already have coded, there is more I can do to complete this circuitry. I have the switch over to the I2C breakout boards, replacing the medium speed SPI links, but also several additional device adapters need to be developed:

  1. real adapters to connect to a pair of IBM 9 track tape drives, requiring a SCSI interface to speak to those two drives. They will appear as 2415 tape drives.
  2. a virtual 2415 tape drive, allowing the PC to act as a tape drive with files acting as tape reels.
  3. real adapters to connect three DEC RK-05 disk drives, emulating 2310 disk drives
  4. a virtual 2310 disk drive allowing an IBM Simulator format disk file to be accessed from the PC. 
  5. a real adapter for my Dura IO Selectric to act like a 2741 terminal for use with APL/1130
  6. a virtual 2250 graphics terminal

Four of the six device adapters are going to be harder than the prior set, partly due to the more complex device management involved, but the virtual 2310 disk drive and real 2741 terminal support won't be that complex. The 2741 will look almost the same as the 1053 adapter logic, which is well documented in the ALDs of the 1130.

The only way that the virtual 2310 drive can work is to drop the goal of matching the real disk drive performance. Since the drive uses cycle steal to move the words being read or written, I can stretch out the IO to work over the USB link transactional system. I already have the scheme for the PC side worked out.

By the end of the evening, I had all four 2310 drives set up in the SAC box fpga - the first three are stubs that simply return a Disk Not Ready status DSW when addressed. The fourth is all the logic needed on the fpga side for the virtual 2310 disk drive.

Knowing the format of the IBM 1130 Simulator disk files, I could begin writing the code in Python for the PC side application. That process will take a day or two.



Getting camera visibility with the fiber optic camera, plus fpga touchup

1053 CONSOLE PRINTER RESTORATION

I didn't have much free time but I did get into the workshop and inserted the fiber optic camera into several vantage points wide enough for the head to clear. My goal was to get a view of the unattached spring and the hook on the back of the tab interposer where the spring needs to be connected. If I can see it, then I can probably maneuver a tool in, through another opening, and accomplish the deed.

I got a pretty good view for seeing the unattached end of the spring, but not quite the end of the tab interposer where it should hook. Once I find a route in, I will hook the end of the spring in preparation to pull it forward towards the interposer tang where it should be attached.

Loose end of spring, down inside mechanism, using endoscope to see it

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I completed the logic for the virtual 1442 adapter with its ability to ignore any IO directed at area code 2 unless it is ready (meaning active on the PC). This is important for when I leave the IBM built adapter inside the 1131 enabled, particularly if I want to use the real 1442 reader/punch.



Sunday, September 27, 2015

Using fiber optic camera to work on 1053, plus continued SAC Interface enhancement work

1053 CONSOLE PRINTER RESTORATION

The fiber optic camera arrived today - may be a problem getting all the way into the small spots as it has an 8mm diameter (just under 1/3" for the metrically challenged). It also focuses 1" from the lens, which is a huge distance compared to my problem area, but we will probably get a better idea of what is going on inside, even if not perfect.

Fiber optic camera - inexpensive but quite useful
Looking with the camera in one of the few spaces it can fit, I did confirm that the problem is the rearward pulling spring that hooks to a bar at the back of the typewriter frame and with its front over a hook shape on the tab interposer. The spring is not hooked to the interposer.

So far, the camera does not give me a view of the critical area - the hook shape on the interposer and the far end of the spring - which is what I need to attempt a reconnection. I found a few other angles where I can insert the camera.

1442 CARD READER/PUNCH RESTORATION

I worked further on the PC side code, to allow the reader files to be opened, a 'blank deck' file to be created for punching, and to have the system convert between the 1130 word format and the file format. Before I can fire up this version of the SAC Interface Box, I need to have either:
  1. The logic for the virtual 1442 disabled so that it doesn't react to the area code for the device                                                            OR
  2. The device adapter circuits in the 1131 disabled by tying the area code 2 signal to ground
Ideally I can set up a logical switch, set by the PC program, such that the SAC Box ignores area code 2 unless I have set the DSW to ready. I will work on that circuitry in the fpga next.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I think I might change from the current medium speed link - an SPI protocol to link to Arduino controllers - and instead make use of a shared I2C bus to several IO concentrator boards. These boards control 16 IO pins (plus more) and can be strung together on the 400KHz I2C bus to handle all the slow speed signals for devices like the 1134/1055 paper tape units, the 1627 plotter and so forth.

I have ordered some boards which I should have in a week, so I need some design work to take advantage of these. I can always hang Arduinos or similar microcontrollers to deal with transient signals and other timing that might be too slow for the I2C link delays.  The board I bought.
I2C 16 pin IO breakout board

Friday, September 25, 2015

Not much free time, but accomplished a bit

1053 CONSOLE PRINTER RESTORATION

I spent my lunch hour attempting to liberate the spring causing the problems with my tab interposer. No luck. I need to get a fiber optic camera to see what is happening and guide what miniscule tool access I have.

1442 CARD READER/PUNCH RESTORATION

I coded the Python side completely and worked on the fpga logic for the virtual 1442 card reader/punch functionality.



Hunting errant spring in 1053, building out device support in SAC Interface Box

1053 CONSOLE PRINTER RESTORATION

The tab interposer has its rear spring in place, but there is another spring hanging in the space blocking the movement. I have to pull it out and figure out what is might be. I thought it might be the spring that holds the operational latch forward toward the interposer and out of the way of the bar that activates the machine function. However, I am not sure.

This is the most blocked and inaccessible area in the entire machine. I can only catch glimpses of part of the spring, I can't see the ends where it does or should attach. There are two possibilities - the spring is one that I lost deep in the machinery months ago, and thus superfluous, or it has partially detached and is needed for the tab interposer to work properly.

I put in another 45 minutes trying to sort out the spring issue, to no avail. Perhaps tomorrow.

1442 CARD READER/PUNCH RESTORATION

Worked out the scheme for the virtual 1442 card reader/punch, soon will finalize the fpga logic and start on the Python program for the PC side of the USB link. The PC side was all blocked out in pseudo code by the early evening.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I have no idea how fast or slow the Python program will deal with multiple peripheral devices simultaneously. There are various ways I can improve the performance, from the interactive workbench which only uses on PC processor through to versions will exploit all cores, then to a rewrite in C if that becomes necessary.

Each virtual or mirror device is a separate Python thread and if allowed to be dispatched across multiple cores on the PC, should handle a lot of the scaling required to support simultaneous peripheral operation. The bottleneck is the single USB link and simple transaction I am using to communicate. If this saturates it could keep the PC side from checking device conditions often enough to see all the activity. This is something to worry about later,not now.

The fpga itself is fully parallel, of course, and can support as devices as I wish without impact on the others. Ultimately, the bottleneck will be the 3.6 microsecond memory cycle of the 1130 and the interrupt intensive nature of some of the IO devices used with the system. If each instruction requires, on average 15 to 20 microseconds, then the code paths through the interrupt routines as well as the XIO instructions themselves will be a major limiter on system bandwidth.

The cycle stealing peak rate might be 277K words per second, but real life activity is going to be down in the thousands to tens of thousands of words per second. If we do an IO every 100 instructions, that is one word per 1.5 to 2 milliseconds, thus less than a thousand words per sec. As long as my PC program and the USB link can do at least 5000 transactions per second, it should be able to keep up with the IO activity. 

Wednesday, September 23, 2015

Console Printer (1053) improved again, working on SAC Box functionality

1053 CONSOLE PRINTER RESTORATION

I made an adjustment for the index operational magnet pull link and then fired up the diagnostics again. Things are much better today. The index (line feed) works well and the episodes of missing blocks of text are gone as well. Here is what remains to resolve:

  • Tab doesn't reliably fire by push button on the front of the printer
  • Tab doesn't fire by program command
  • Escapement is still slightly erratic - sometimes skips an extra space
  • Carrier Return force not yet validated
  • Red/Black ribbon color nylon tape not repaired or installed
  • Cover not installed and typewriter not returned to its normal spot on 1131
Never any miss-selection of characters, so that entire part of the machine is flawless. I suspect residual lubricant is causing the escapement defects - this will improve with more operational time. The tab issue appears to be a missing rear spring on the tab interposer (again). CR is likely an adjustment although it is fairly close and almost always works properly now. 


1442 CARD READER/PUNCH RESTORATION

I am investigating the possibility that I can re-install the punch unit with the broken wheel, on the hope that if I don't punch on the reader it will not try to rotate the wheel. If it leaves the wheel where I position it, with an unbroken arc of the wheel touching the cards, then I should be able to operate this as a 1442 reader.

Another possibility I am investigating is whether this can be used in conjunction with my virtual 1442 adapter logic. It would be necessary to switch the 1442 adapter on and off - through a toggle switch I could install - so that my interface box can respond to area code 2. I also need a means of switching my SAC box off so it ignores area code 2 while the 1442 itself is being used. This way, I could virtually punch as well as read cards on the PC, but also read real decks on the 1442.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

I completed (but have not yet tested) the 1053 mirroring device support on both sides of the SAC box, so that I can create and fill a file on the PC with the characters as typed by the console printer. I am now developing the mirror 1132 printer code on the PC to allow it to create and fill a file on the PC with the lines as they are printing on my real 1132 printer.

This evening I finished up the 1132 mirror code on the PC and made a few tweaks on the fpga side to suite the way it will work. Later I began on the 1442 fpga logic for a virtual 1442 reader and punch, for when I switch off the real device's adapter hardware in the 1131. I have to work out a way to control when my box responds to area code 2 and when the 1131 will handle the device.