HAND CODED SEEK PROGRAM EMPLOYED TO CHECK BEHAVIOR
I had whipped up a short program that I toggled into core which would walk through a list of seek amounts and issue them to the drive. I stepped through it to see if the reported cylinder in the Virtual 2315 Cartridge Facility (V2315CF) log matched where it should stop.
ANOMALIES DETECTED WHICH I HAVE TO INVESTIGATE FURTHER
As an example of a sequence of five seeks that I ran, starting with the drive at the home position (cylinder 0), this is what I saw:
- seek forward x18 cylinders, from 0 to 40, and V2315CF agreed
- seek forward x03 cylinders from 40 to 43, but V2315CF stopped at 42
- seek forward x18 cylinders, from 42 to 66, and V2315CF agreed
- seek forward x03 cylinders, from 66 to 69, but V2315CF stopped at 68
- seek forward x02 cylinders, from 68 to 70, and V2315CF agreed
Looking at quick pictures I grabbed of the arm position, I decided that I can't really tell. Many are too blurry to see the very fine teeth which are just 20 mils apart. A difference of 2 tracks is just 1/50 of an inch, barely detectable to the human eye.
SEEK BEHAVIOR INVOLVES THE DRIVE, THE CONTROLLER AND MECHANICAL STUFF
The voice coil pushes or pulls the arm to move it 10 or 20 mils at a time, then at the time the movement ends, one of two mechanical teeth (detents) will engage in the rack. The one closest to the position marked cylinder 0 is the even detent, and the odd detent is 410 mils to the left of it. It is offset by 10 mils so that it can hold the arm at odd numbered cylinders while the even detent holds it at even numbered ones.
Above is the mechanism in an exploded kind of illustration. The rack has major markings every 40 tracks with numbers, divided in half with scribe lines at 20 track multiples. Then, one the fine teeth of the rack, ther are marks every other tooth which is a step of four tracks. Lastly, if the odd detent is engaged we are at an odd number one above the position where the even detent is pointing, since the even one is disengaged and over the tip of a tooth. The odd one is wedged firmly in the notch of its tooth.
The picture above is the clearest I had, which shows the arm at cylinder 40. The even (rightmost) detent is aimed right at the 40 marking and is engaged in the notch of the tooth. I am trying to shoot with my phone down inside the disk drive housing, using a flashlight for illumination, with a scale where all 200+ positions are in a range of 2 inches of travel.
It is the disk drive electronics that are responsible for remembering which detent is engaged. It then flips to the other detent when the movement is a one track step (10 mil) or uses the same detent as before if the movement was 20 mils for a two step movement.
The disk controller logic in the 1130 is responsible for issuing a series of 10 or 20 mil movements to make the arm move the relative amount requested by the program. The design has it make 20 mil (two track) moves and only does a 10 mil movement as the first step if the count to move is odd. Thus, a seek of 9 cylinders would be sent by the controller as movements of 10, 20, 20, 20, and 20 mils. A seek of 4 cylinders, being even, is sent as 20 and 20 mil steps.
The programmer specifies a relative number of tracks to move (and a direction) in the IOCC pointed to by an XIO instruction. The disk controller converts this into the sequence of 20 mil steps and a final 10 mil step for an odd total movement.
The V2315CF is inserted in between the disk controller logic in the 1130 and the disk drive logic. Thus, it sees sequences of movements with each set to either 10 or 20 mils, in the forward or reverse direction. It does not have access to the state of the even and odd detents, nor to any feedback about the absolute position - with the exception of the microswitch that indicates we are at cylinder 0.
ANALYSIS OF WHERE THE FAULT MAY LIE
A failure of the disk drive electronics to properly engage the odd or even detent would not cause the V2315CF to get out of sync with the programmed XIO seek operations. If the program asks to move three tracks and the disk controller logic correctly issues one 20 mil step followed by a 10 mil step, then the V2315CF and the program should be in sync unless my logic in the V2315CF is not capturing the 10/20 mil steps properly.
The disk controller logic loads an internal register with the ones complement inverse of the cylinder count from the IOCC when an XIO seek is issued. Note that the 1130 is normally a twos complement machine but not in the controller logic. The low order bit is the control signal to the disk drive, when on it asks for a 20 mil step while off is a 10 mil step.
If the low bit is off when the seek begins, it is asking for a 10 mil step. At the completion of any step, the low bit is forced on (to 1), thus only the first step has the potential to be a single track movement. When the low bit is 1, each step is requested to be 20 mils and the end of that step increments bit 14, thus adding two to the count. Once the counter steps to FFFF the operation is terminated and thus the seek is over.
If the program sends a seek amount of 4 in the IOCC, the ones complement is 111111111011 initially. The low bit (15) is on thus we are requesting a 20 mil step. After the first seek, we add to bit 14 thus the new value is 111111111101 for the second steek. The second seek also has bit 15 on, thus it is also a 20 mil step. Once that second seek ends, we add to bit 14 which makes the end value 111111111111 which triggers the end of the operation. We did two 20 mil steps, which moves us four tracks.
If a program sends a seek amount of 3 in the IOCC, the ones complement is 111111111100 initially. The low bit is off so we are requesting a 10 mil step. At the end of every seek, including this first one, the low bit is forced to 1 so the value after the first seek is 111111111101 for the second seek. With the low bit now turned on, our next step is 20mil and after we finish that second seek, we add to bit 14 making the value 111111111111 ending the operation.
Thus what could explain the error is if the ones complement value set in the counter register for a three track move is 111111111101 instead of 111111111100 which cause our first seek to be 20 mil instead of 10 mil. The end of that first seek gives us an add to bit 14 and the seek ends. Thus, a seek request of 3 would move just two steps if bit 15 is erroneously set to 1 in all cases.
UNDERSTANDING THE SEEK LOGIC IN THE 1130 DISK CONTROLLER
In order to make the testing results clear, I will provide some background information to explain the schematic segment below taken from Automated Logic Diagram (ALD) page XF201. This involves two structures which are different from modern logic gates - AC triggered gates and flipflops.
The first is the AC triggered gate. Any logic gate that has an N or P input on the left is only going to respond when it has a falling or rising edge on that input. Further, it will only respond to that edge if the conditioning inputs are all asserted. For inputs that have the inversion character ◣ in front of them, they must be low. When the gate responds, it produces an output pulse, negative going if the output has the inversion character ◣ displayed. See blow for an AC triggered gate.
The second is that the flipflops in the IBM 1130 do not switch on a clock edge, they are triggered by pulses that are essentially asynchronous to the machine clock. Thus when a negative going pulse arrives at the set or reset input to the FF, the falling edge causes the flipflop to change state.
However, if a pulse arrives that would cause the FF to stay in the same state, it produces an anomalous false pulse out of the opposite wire of the FF. A FF which is set on which gets a pulse on the set input emits a short pulse on the unset output (notQ). To protect against that spurious output, there is a connection from the flipflop back as an enabling input to the AC trigger gate that drives the FF input.
In the excerpt above, the notQ output of the FF is one of the enabling inputs, thus the AC trigger gate will only fire if the FF is set (not Q is low), as long as the other enabling input is low and we have a falling edge on the trigger.
For convenience, I removed the feedback from the FF to the AC triggers in the schematic portion below, thus only showing the enabling and trigger inputs that set or reset the flipflop.

At the end of any operation (read, write or seek), the -File Reset signal is pulled low which resets the flipflop. This is also asserted when the overall reset signal -DC Reset is active low. Thus + bit 15 should be at 0 except during a seek of more than 1 track duration.
Midway in the processing of the XIO that starts the seek, the signal -Load Word Ctr SP is pulsed low. if the enabling input to the top left gate is also low (meaning bit 15 is a zero) then when the trigger has its falling edge, we set the flipflop. In other words, we set the flipflop to 1 when the seek count is even otherwise the flipflop should remain set to 0.
The second gate down on the left is only involved when this counter is used in read or write operations. Its enabling input -Bit Counter Gate will be high during a seek, disabling this gate. The fourth gate down on the left is also only used during read or write operations, thus the -Bit Counter Gate high state keeps that AC gate from triggering.
The third gate down on the left is enabled when the drive is in the middle of a seek, thus -Access Busy is asserted low. The triggering input is +Access Drive which is the is the control signal to the drive to take a step. When it ends, the falling edge of the trigger input produces a pulse. This is what sets the bit 15 flipflop to one at the end of any seek step. A seek usually involves multiple steps of the arm, thus -Access Busy is low for the entire length of the seek while +Access Drive is asserted for each of the steps.
The flipflop for bit 15 has its notQ output routed to the disk drive as the -10 Mil Step control signal. If the FF is not set, notQ is high and that requests the disk drive to take a 10 mil step. Once the flipflop is set, either because we have an even quantity for the seek or because we have completed a step of the arm, the notQ output is low which asserts -10 Mil Step to ask the drive to move two tracks in this step.
Putting this all together, we set the bit 15 flipflop to the ones complement (inverse) of the low bit of the seek quantity from the XIO Seek instruction. Depending on that bit value, the drive may do a 10 or 20 mil step initially. After every step of the arm, the flipflop is forced on which signals the drive to move 20 mils for each step.
No counting is taking place in this bit position of the count register, since bit 15 is special to control the seek step size. The flipflops for bit 14 and the other count register bits are designed to add one to the count of the bits other than 15 each time the -Increment Word Count signal has a falling edge because it is asserted. In a seek, -Increment Word Count is asserted whenever +Access Drive is asserted, e.g. each time we command a step of the arm we increment the counter.
When every bit of the count register is 1, the signal -Full Word Count is asserted low which turns off -Access Busy, ending the seek operation. That raises the interrupt request line for level 2 and sets the operation complete flipflop for when a future XIO Sense Device interrogates the disk drive status.
OSCILLOSCOPE SET UP TO TEST BIT 15 DURING A SEEK
The signal that we are in a seek is when - Access Busy is asserted low. This is picked up at gate A, compartment C1, slot M6, pin B13. All logic for the disk controller is in gate A, compartment C1 thus I will leave that off of the following signal locations.
The value of + bit 15 in the count register is slot M6 pin G12 (equivalent to slot M7 pin B12 as this is a double size SLT card in slots M6 and M7). It is asserted high when we want a 20 mil step and should be low for the first step of an odd count seek which is sent as -10 Mil Step to the disk drive.
+Access Drive is turned on to force the disk drive to take a step. It is picked up at slot M6 pin G04 (equivalent to slot M7 pin B04).
-File Reset is the signal which turns off the bit 15 flipflop at the end of an operation. It is picked up at slot M6 pin J11 (equivalent to slot M7 pin D11). This goes low to reset the bit.
-Load Word Counter SP is a pulse that sets up the count register to its initial ones complement version of the seek count. It is picked up at slot M6 pin G13 (equivalent to slot M7 pin B13). This goes low to set the flipflop depending on the value of +B Reg Bit 15.
+B Reg Bit 15 is the input that has the total seek count from the XIO Seek instruction. It is picked up at slot M6 pin J10 (equivalent to slot M7 pin D10). When -Load Word Counter SP goes low and this is low, +Bit 15 should be set high, otherwise it should remain low.
One challenge in watching a seek on the scope is the timescale for the arm movement. This can take up to 15 milliseconds, while the pulses that set and reset the flipflop operate on a timescale of less than 30 nanoseconds, 500000 times longer. As a result, I have to watch this in portions, otherwise I would hook up the logic analyzer to gain the long scale needed to observe everything.
First I want to see that bit 15 is already at zero when the XIO Seek begins. I would see this by triggering on the -Access Busy signal going low and watching both +Bit 15 and -File Reset signals. I should see -File Reset go low and +Bit 15 be low after as a result and have been initially low before -Access Busy goes low.
Next I want to watch the setting of the bit 15 flipflop for both odd and even seek counts. I would trigger on -Load Word Counter SP going low, watching +B Reg Bit 15 and +Bit 15. The initial state of +Bit 15 should be zero and its end state will be the opposite of +B Reg Bit 15.
I could watch for +Access Drive going high and verify that +Bit 15 is turned on if it was 0 initially. However, the failure symptoms do not seem to align with this failing to work, so that isn't an important observation.
Based on what I see here that does NOT look right, I would move around and scope appropriate signals to figure out what is failing and leading to this anomalous behavior with odd numbered seeks.
OBSERVATIONS OF ODD AND EVEN SEEKS USING THE SCOPE
As I observed the outputs of the disk controller logic in the 1130, the state of +Bit 15 was perfect, but the drive was not moving the -10 Mil Step as it should. All the signals from the controller logic looked good.
I then hooked up to the same signals as they come out of the V2315CF box. Eventually I captured an image with a long enough time duration to see the -Access Go command from the 1130 de-assert. There was a difference right there.
What I saw was that the first access step was commanded for 10 mil and when the -Access Go turned off, the -10 Mil Step line went high for a short period then dropped back to low. Meanwhile, the -10 Mil Step line from the 1130 controller logic remained high. Something in my logic in the V2315CF is causing this!
I triggered on the rising edge of -Access Go and increased the resolution, to see that the -10 Mil Step signal went to high and remained there for a bit of a microsecond before dropping. There is a microsecond timer pop in the V2315CF that advances a timer, used to determine when the seek has completed when we are in virtual mode and used as a watchdog timer to free up the state machine while in the real (hybrid) mode.
This was interesting. Looking at my logic, the signal from the 1130 disk controller logic should be passed along untouched to the disk drive, yet it clearly is not. I looked through all the FPGA logic and don't see a clear fault that would cause the outgoing -10 Mil Step signal to be driven low.
Basically that input signal from the 1130 disk controller logic should be passed straight through to the disk drive, while also observing it to shadow the seek movement. I see that the routing logic blocked the signal when an internal condition called Selected_ready is turned off. There is no reason to do this in real drive mode, so I changed the logic.
I do see that there is a spurious redrive of the
-Access Go soon after it returns high. This should be around 5 milliseconds into the seek. My logic captures the falling edge of that signal after a chain of flipflops to eliminate metastable state issues. One thing it does with a falling edge is set a timer in the logic to 15,000 which then counts down with each 1 microsecond pulse generated for use in various places inside the FPGA logic.
I use that as a watch dog to catch a case where my state machine somehow hangs up forever waiting for +Access Ready to drop low but that event doesn't occur for arcane reasons. If the time expires I move on to the final step where I wait until +Access_Ready is high again. In the pathological case I am protecting against, the signal will already be high so that means we end the seek state machine and wait for future requests.
The disk drive electronics also look for a falling edge on -Access Go to begin a seek. It sets a latch when that edge is detected but the latch is reset after about 5 milliseconds when it drops +Access Ready thus the glitch in the scope was a potential threat to turn the latch back on. Fortunately, the -Access Go signal trigger has an enabling requirement that +Access Ready be high, so in this case the glitch doesn't pass through.
I really didn't see a clear cause for the observed results in my review of the logic in the V2315CF box. The 1 microsecond duration of -10 Mil Step being high before it drops again suggested that the 1 us timer in my box was involved, but I don't see that.
I updated the V2315CF with the logic changes I made and tested again. I had to watch a few more cases to be certain of what is happening, perhaps moving to observe signals on the disk drive logic itself. I will do this on the next return to the workshop.