Thursday, December 19, 2024

Disk drive and Virtual 2315 Cartridge Facility accomplishments

NEW 48V BULB IN THE UNLOCK LIGHT WORKS PROPERLY

My bulbs came in and I inserted one in the IBM 1130. When powered up, the Unlock light will be lit indicating that the receiver can be opened to slide cartridges in and out of the drive. As soon as the Run switch is activated and the drive begins spinning, the Unlock light will extinguish and stay off until after the drive comes to a halt. 

VOLTAGE CHECKS BEFORE CONNECTING THE RK-05 EMULATOR TO 1130/2310 SIGNALS

I put a meter on all the signal lines that will be connected to the RK-05 emulator circuits to verify that they don't produce voltages that will cause problems for the interface circuitry in the emulator. I found three pins that recorded voltages around 6V, the rest are all 3V or less. 

Pin B13 from the disk drive is the Write Data and Clock signal, an input to the drive which is output by the emulator. The emulator uses an open collector driver gate which is insensitive to the fact that the pin has a pullup to 6V. 

Pin B03 from the 1130 controller logic is the Read Data input to the 1130, which is output by the emulator using a open collector driver gate. Again, it is a pullup voltage that won't affect the RK-05 circuits. 

Pin D10 from the 1130 controller logic is Write Gate output from the 1130, which is an input to the RK-05. I observed a voltage of just over 6V on the pin, which worries me because the SN74LVC244A chip has a specified range of 0 to 5.5V for its inputs and an absolute max, must avoid voltage of 6.5V. 

I am going to mull over whether I need to do anything for this signal or just hope that it doesn't overstress the level converter chip in the emulator. 

REPAIRED B12 PIN IN CONNECTOR TO 2310 DRIVE

After close examination with a microscope I could see the cause of the poor connectivity for the opening for B12. The connector uses individual sockets that have tabs which are bent inward to press against the pin when the connector is pushed onto the backplane. I can see this in all the other sockets but the one for B12 has its tabs pushed outward so that they don't contact the pin. 


Its hard to see to the sockets marked 2, 6 and 8 have tabs bent inward in the rectangular opening but socket 4 has flat sides. B12 is connected to socket 4.

I desoldered and carefully removed the socket from the connector shell, where I was able to gently reform the tabs on the socket to provide a reliable firm connection. 

Socket shell partly removed for B12

Socket shell with tabs not yet reformed inward

I then reinstalled the socket and soldered it up. Testing with the connector provided that the connection for B12 is now working properly. 

LOCATION BEING CONSIDERED TO MOUNT RK-05 EMULATOR BOX AND POWER SUPPLY


I will create a mounting so that this is accessible when the right side door of the 1130 is swung open. The interface card will sit behind it and a bit above. The power supply will be behind it against the housing for the peripheral cable connectors. 



During illness recovery time, building archiver logic to read 2315 cartridges on a Diablo drive and upload

DIABLO 33 DRIVE WITH STANDARD DENSITY HEAD ON HAND

The Diablo 33 drives were widely used for minicomputers and other systems, derived from the IBM 13SD (2310) disk drive developed for the IBM 1130 system. However, quite a few enhancements were included in these drives (and similar derivatives like DEC RK-05), including direct seek to a target cylinder and single command restore to home position.

The most important change that most implemented as to double the recording frequency, thus doubling bit density and cartridge capacity. On the IBM 1130 (13SD drive) the bit cell frequency is 720KHz, while the RK-05 and others use 1.44MHz. Thus a 2315 cartridge holds just 1MB at 720KHz but 2MB on the RK-05 (and others). 

The higher frequency uses a different recording/playback head, ceramic surface, while the IBM heads are chromed metal surfaces. The ceramic heads are more resistant to scratching from transient head/disk interference (such as a tiny dust particle slamming between head and disk), these can generally be cleaned well and put back into surface, whereas the metal surface slowly accumulates scratch lines until its aerodynamics are too spoiled for safe use. 

Diablo offered the model 33 in both standard and high density flavors, which are 720KHz and 1.44MHz bit cell rates. For the standard density they use chromed metal heads just like the IBM drive. I am fortunate enough to own a standard density model 33, although its heads had been badly scratched due to a crash before I acquired it.

I am now able to replace the heads with standard density heads in good enough condition to fly. Thus, I plan to use this drive as a means of reading and writing 2315 cartridges containing IBM 1130 software. 

ARCHIVER DESIGN BEING BUILT BASED ON DIGILENT ARTY A7 BOARD

I had a spare Arty A7 board, based on a Xilinx Artix 7 chip (xc7a35ticsg324-1L) and a 128MB DRAM. It has enough general IO connections to drive the Diablo for an archiving session, enough RAM to grab an entire 2315 cartridge in one pass, and a serial link over USB where I can send out the data once the archiving has completed. 

I am finalizing my testing of the DDR interface, ensuring I can reliably write and read to the RAM, before I move on to testing the rest of the design. The IP generation in Vivado provides an example program that does this satisfactorily, so I just loaded that into the board and watched the LEDs to see it perform. 

OVERALL LOGIC OF THE ARCHIVER

The archiver opens a serial port link to a remote host and waits for a simple command to start archiving. The drive comes ready with the arm at home (track 0) position. The logic will step through the 203 cylinders one by one, performing a one track seek between each. For each cylinder, it will step through both the top and bottom heads (two disk surfaces). For each head, it sequentially reads and saves sectors 0, 1, 2 and 3. 

The read logic will be set up when the target sector is approaching the read heads and given a read request. When the sector pulse from the drive arrives, the read gate is turned on and we begin to receive streamed bits on both read_data and read_clock lines. 

Every sector begins with a bit less than 200 bits of zero, which ensures the drive can correctly separate the clock and data pulses coming from the head and route them out on read_clock and read_data lines. The first nonzero bit is the sync word, a special value of 0x8000 that is used to identify where each 16 bit word begins. The 1130 stores words with the high order value labeled as b0 and the lowest order value at b15, thus the one bit coming in on read_data is for b0 of the sync word.

The actual data recorded on the cartridge is 20 bits long for each 16 bit 1130 data word, tacking on four error detection bits after b0 is read in. The stream of 20 bits is b15, b14, b13 . . . b0, e0, e1, e2 and e3. The error detection scheme is simple, based on counting how many one bits were received in each word. As long as the count of one bits received, after we accept all 20 bits from the disk head, is an even multiple of four, then we have a good word. Formally this is 0 modulo 4, implemented by the counter built from two bits so it is always modulo 4. 

The sync word has only a single one bit thus it needs to send three more to get our counter to 0b00 for a good status. Bits e0, e1 and e2 should be a value of 1 each, with the final e4 bit always a zero. We validate the sync word was properly formatted otherwise anything we try to extract in the sector will not be correct. The syncerror flag is raised if the error detection fails on the sync word. 

After each read_clock bit of 1, we see if a 1 bit comes in on read_data in the interval before the next read_clock bit. If it does, we saw a one value, otherwise the data value for this bit cell (combination of a clock pulse and either a data pulse for 1 or absence of a data pulse for 0) is a value of zero. In any case, after each read_clock pulse (1 bit arriving) we push the captured value into a shift register. 

Physically on the disk the low order data value arrives first, with b0 at the end, so we push into the shift register to produce an 1130 format value b0 to b15 once all 16 bit cells have arrived. Any time a one value was pushed into the shift register, we increment the error detection counter. This continues for the last four values, e0 to e3. After the 20th bit value was received, if the counter is not 0x00 (or rolled around to 0b00) we raise the ECCerror flag. 

The 16 bit value from the shift register is written to the ram and our word address bumps up by 1 (having started at 0). When we have read all 321 words - a full sector - we raise a done flag so that the archiver can advance to the next sector. 

Once all 203 cylinders are read and in RAM, we write the data values over USB serial link to a remote system where the data can be captured and postprocessed to build a virtual 2315 cartridge file. 

Tuesday, December 17, 2024

Fighting to get time in the shop; replacement light bulb arrived for Unlock lamp on 1130 console

ONE THING AFTER ANOTHER THIS SEASON

I had several visitors including my daughter and her fiancĂ©, as well as other family. In between, there are all the seasonal obligations to deal with. Nancy and I both caught upper respiratory infections while enjoying Disney's EPCOT with our daughter. Still mostly recovering but looking forward to a more normal schedule playing with old computers. 

RECEIVED REPLACEMENT INCANDESCENT BULB FOR UNLOCK LAMP

The colorful lamps on the 1130's console use incandescent bulbs behind frosted colored plastic rectangles. I have quite a few bulbs available for 12V and lower voltages, but a few of the lamps on the console are wired to 48V circuits such as the disk drive. Thus, they need a 48V bulb which I didn't have on hand.

The new 48V bayonet bulbs arrived today and I will replace the burned out bulb for the Unlock light. This illuminates when the drive is at rest, showing that the handle is unlocked. The operator can slide a disk cartridge into or out of the drive while this is lit. Once the Run switch is activated to turn on the drive, the handle locks and our bulb goes out. 

CONTENDING WITH ODIOUS BEHAVIOR OF A NORTON 360 UPGRADE

The new version that updated itself is much more active in its attempt to protect me. Overly so. When I run the Vivado toolchain to work on FPGA logic, it attempts to block several programs and hangs the start of simulation - claiming it is sending it for real time analysis in their labs. They way they do this leaves Vivado dead in the water, requiring me to kill a background task and restart. 

There is no straightforward way to tell the obnoxious software to not block the software, unlike the ability in the past to ask for a given program to be put on an exclusion list. The only way I could work with Vivado was to disable multiple of the Norton 'protection' services - three of them were involved in ruining the Vivado experience. 

The software now stomps through my system like hateful stormtroopers, interfering with many innocuous acts of trusted software. The change in aggressiveness is dramatic and I don't like it at all. 

Monday, December 16, 2024

Found narrower contacts for producing SLT cards, updated design and ordered new PCBs

ISSUES WITH THE CONTACT PARTS I ORIGINALLY SELECTED

The gold plated contacts I used for my double wide SLT card (a controller card for the 1627 Plotter) are wider than the IBM original parts. They make it hard to install them without shorting and there is some mechanical interference with the nylon covers unless they are just perfect.

I ordered a number of narrower contacts in order to satisfy myself that they will still provide good connectivity when the card is plugged into an SLT board slot, and that they accept the covers easily. I found one I really liked and conducted tests to ensure a good connection when plugged into a card slot.

NEW REVISION OF PCB TO ALIGN THESE CONTACTS IDEALLY

Using the mechanical drawings of the contacts, the 3D design of the nylon covers and the dimensions of original IBM boards, I came up with a pad design and placement that should allow for an easier construction without the risk of skewing that occurred with the prior contacts. 

The boards are being produced and a batch of fifty contacts are on their way as well. I hope to have the card connectors dialed in to my satisfaction once they arrive and are put together. When that is ready, I can mount all the parts for the 5806223 replacement card I am building to attach a plotter to my 1130. 

Virtual 2315 Cartridge Facility interface board connected and a number of tests performed

OVERVIEW OF THE FACILITY

The Virtual 2315 Cartridge Facility implements a virtual version of the 2315 disk cartridge that would be inserted into the disk drive in the IBM 1130. It works in hybrid mode with the disk drive, thus a physical 2315 is placed in the drive and spun while the data is provided by the facility. 

The drive spins the cartridge, the arms seek in and out as programs access the virtual cartridge - essentially everything the same except the heads don't fly down on the cartridge and the data is from the emulator. The timing as well as the physical sensations are just the same as if the heads were actually involved. 

This leverages the RK-05 Emulator designed by George Wiley, but with substantially rewritten logic to emulate a 2310 disk drive and to work in the hybrid mode which is unique to the Virtual 2315 Cartridge Facility. A micro SD card is inserted in the emulator box, containing the virtual 2315 disk cartridge contents. It is loaded into the facility and then waits for the physical disk drive to spin up.

An interface board intercepts the signals between disk drive and the IBM 1130 controller logic. The cable which is normally plugged into the disk drive instead plugs into the interface board. A cable wired to the interface board is plugged into the disk drive instead. The board also accepts two ribbon cables from the RK-05 Emulator box. Finally, it is powered from the 1130's 12V DC supply. 

In addition to the signals for the disk drive, we intercept two other switches on the disk drive. One of them indicates that the drive is unlocked to permit the introduction or removal of a 2315 cartridge. The other is the Run switch which is turned on to spin up the drive. 

The operation of the facility is straightforward. A micro SD card sits in the emulator box. When the emulator box has its switch toggled to activate the image, the cartridge image is read in to the emulator. With a real 2315 cartridge inserted in the drive, the Run switch is turned on. The motor starts spinning the cartridge. After 90 seconds, as long as the emulator had a virtual cartridge loaded, the drive believes it has loaded the heads onto the disk and it turns on the File Ready lamp.

The user operates the 1130 and runs software exactly as they would if the facility was not installed. When the user turns off the Run switch on the disk drive, the emulator will write back any changes to the virtual cartridge image on the mico-SD card at the same time that the real cartridge is slowing to a halt. Finally, the Unlock lamp comes on the 1130 console. 

INTERFACE BOARD INSTALLED INSIDE 1130 AND WIRED TO POWER AND SWITCHES

I tapped some holes in a support frame inside the 1130 and screwed the interface board into place. It also has wires from the DC 12V and ground, plus one wire each to the Disk Unlock switch on the drive and Unlock lamp on the machine console. 

The cable from the 1130 controller logic is plugged into the back of the interface board. A cable from the board is plugged into the card cage on the disk drive. Two ribbon cables are plugged into the board to connect it to the RK-05 Emulator box which is mounted on top of the disk drive, accessible by lifting the top cover of the 1130. The emulator box is also wired to the +12V power of the 1130, so that it only comes on when the 1130 is powered up. 

NEW VERSION OF PCB BEING FABRICATED

I improved the design in several ways. A mode switch was added, I did away with the sensing of the Run switch on the disk drive, and I added a circuit to light the Unlock lamp on the 1130 console when running in virtual mode. 

The PCB will have a tiny slide switch which sets the Virtual 2315 Cartridge Facility to either virtual or real mode. In real mode, the disk drive inside the IBM 1130 is active, producing the sector and index pulses as well as physically seeking the arm in and out. In virtual mode, the disk drive is purely emulated and the physical disk drive is not used at all. 

The Unlock lamp is a 48V bulb that is grounded by a microswitch in the disk drive whenever the solenoid is activated that allows the drive to be opened and a cartridge inserted. For the virtual mode, we will pull the line down to ground to cause it to light when the emulator box is ready to have a virtual 2315 image 'loaded' into the disk drive. 

TESTED END TO END CONNECTION TO THE RK-05 EMULATOR BOX

I probed the connections in the RK-05 emulator card and the other end of the signal at either the disk drive backplane pins or the 1130 controller logic backplane pins, depending on the signal. This ensured that the cabling and the interface board design was correct. 

I used the old PCB to verify the connectivity and will continue with it while waiting on the new board to be delivered - it has some bodge wiring and other changes to make it electrically identical to the new design. 

ONE ISSUE WITH A CONNECTOR TO BE RESOLVED

I have an intermittent contact on pin B12 of the connector that plugs into the 2310 (internal disk) drive. It appears that the connector's opening is a bit wide and the pin on the disk drive's SLT board is perhaps a bit narrow. Wiggling the connector causes the connection to drop in and out. I will work on this before I move on to actual testing of my logic and code for the RK-05 Emulator box, now the Virtual 2315 Cartridge Facility box. 


I circled the connector hole for B12. Visually it doesn't look any different but there is an issue with the connection for that pin to the hole. 

Thursday, December 12, 2024

2310 Disk power SMS card inserted into 1130; FPGA bitstream Virtual 2315 Cartridge Facility ready for testing

SMS POWER CARDS REQUIRE CHAMFERING OF LEADING EDGE TO INSERT PROPERLY

My design for SMS power cards to route the AC and certain other voltages to certain IBM 1130 system peripherals is in place and the drive blower motor is spinning up when system power is applied. The devices that use these cards are the internal 2310 disk drive, the 1053 console printer (typewriter), the 1627 plotter, the 1134 paper tape reader and the 1055 paper tape punch. All other peripherals receive power through the large IO cables that link them to the 1130. 

The card is .004" thicker than the IBM cards, which is just enough to make insertion of the card almost impossible. It is the cumulative friction pressure of the contacts across the 16 possible contact positions of an SMS card that lead to the difficulties. Because the contacts are spring loaded they would allow the card to fit were it not for the pressure required to get it started moving into the slot.

I used a rasp to chamfer the backside of the card at the edges that enter the card slots. It didn't take much material removal before I could press the card into the slot successfully. I will release the design of the cards on github allowing others to build them for various devices connecting into the 1130 system. The material of the IBM cards is fragile enough that these are often snapped off. 

FINALIZED GENERATION OF FPGA BITSTREAM FOR MODIFIED RK-05 EMULATOR BOX

I carefully updated the constraints file to ensure that all the signals were linked to the proper FPGA input/output pins. The original RK-05 Emulator developed by George Wiley uses signal names appropriate to the DEC RK-05 drives but I needed a different set of signals for my plans to support the IBM 2310 disk drive. 

I have a clean synthesis, placement, routing and bitstream generation of my design. This file can be downloaded into the RK-05 Emulator box, into the Lattice ICE40 FPGA contained in the box. 

WORKING ON COMPILATION OF THE C CODE FOR RASPBERRY PI PICO

The other active element in the RK-05 Emulator is a RPi Pico processor that runs code to interface with a microSD card, an LCD display and various lights and switches. It also links to the FPGA using an SPI link. The virtual 2315 disk cartridge is a roughly 1MB file on the microSD card inserted into the emulator box. When the Load/Unload switch is turned to Load, the Pico code reads in the file and writes its contents over SPI to the DRAM used by the FPGA for disk emulation. That switch, on the original RK-05 Emulator, is labeled Run/Unload but the function is modified in my design. 

Once the image is downloaded into the DRAM, the FPGA is informed that it has a valid image and can now act as a 2310 disk drive. The normal mode for my facility is to insert a dummy 2315 cartridge (an actual cartridge but the disk heads will not be loaded thus its real contents are ignored). When the Run switch on the IBM 1130 is activated, the 2310 drive spins up and eventually believes it has loaded the heads on the drive. This causes the File Ready lamp on the 1130 to illuminate and input-output can commence. 

When the Run switch on the 1130 is turned off, the real cartridge slows down and stops, meanwhile the Virtual 2315 Cartridge Facility code in the Pico will pull the image from the DRAM over the SPI link. This is written back to the file image on the microSD card, thus preserving all the changes written to the virtual disk cartridge while the 1130 system was accessing it. 

I have to put the C files onto a Pico system, compile the code, then perform testing to be comfortable that it will work properly with the FPGA. When that is complete, the code is loaded onto the Pico and the Virtual 2315 Cartridge Facility will be ready to test with the IBM 1130. 

Tuesday, December 10, 2024

Synthesized FPGA logic after cutting back on usage to fit within the device for the Virtual 2315 Cartridge Facility

FIRST TRIES AT GENERATING IMAGE FAILED DUE TO SIZE CONSTRAINTS

The device used in George Wiley's RK-05 Emulator, which is the base of my Virtual 2315 Cartridge Facility after substantial modifications, only had room for a bit more than 1000 LUTs (Look Up Tables, a fundamental unit in FPGAs) but my first attempt came in requiring over 1400.

TRIMMING SUCCESSFULLY WITHOUT COMPROMISING FUNCTIONALITY

George's emulator is quite flexible, supporting a range of DEC CPUs and controller cards that connect to an RK-05 disk drive. As such, it stores many key values in the header of the disk file, such as the length of the preamble of zero bits before the sync word. These are read from the microSD card by the Raspberry Pi Pico and sent over SPI link to the FPGA logic to customize its behavior.

The IBM 2310 disk drive has only one set of values for things such as the bitrate, preamble length, number of sectors, sector duration etc. I hard coded them into the FPGA which allowed me to strip out all the code that read them from SPI and passed them between functional parts of the FPGA design. This pulled the required LUT count below the maximum so that I could use the IceCube2 tool to place and route the design onto the FPGA chip being used.