NEW PICO SOFTWARE SHOWS CYLINDER SEEN IN V2315CF
The Virtual 2315 Cartridge Facility (V2315CF) uses a Raspberry Pi PICO as the user interface processor, also handling reading and writing virtual cartridge images on microSD cards. Having just recovered my ability to compile new code for the PICO, I set it up with a periodic status message showing the current cylinder as tracked by the V2315CF.
HAND TRIGGERED VARIOUS SEEK DISTANCES AND OBSERVED CAREFULLY
As before, I had set up code to seek forward, seek in reverse, read sector 0 of the current cylinder, and display the device status. I would look at the disk actuator gauge on the 2310 disk drive and compare it to where I intended to move the arm. In addition I could see where the V2315CF thought the arm had reached.
ANOMOLOUS RESULTS
I started moving the arm in small steps, trying single, double, triple and bigger steps. The first very odd event was when I was directing for a eight cylinder forward seek. The arm zoomed all the way to the end, cylinder 202. That was observed on the 2310 disk arm as well as the V2315CF reported cylinder position.
I did a series of seeks, each time pulling the arm back to the home cylinder (0) before the next one. I began with zero - which of course did not try to move the arm at all, then moved 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12 cylinders from home. Some worked correctly but others left the arm at the wrong position.
The incorrect results were:
- Seek of 1 ended at cylinder 2 instead of 1
- Seek of 2 ended at cylinder 1 rather than 2
- Seek of 3 ended at cylinder 1 rather than 3
- Seek of 5 ended at 2 instead of 5
- Seek of 7 ended at 4 instead of 7
- Seek of 9 ended at 6 instead of 9
- Seek of 11 ended at 8 rather than 11
- Seeks of 4, 6, 8, 10 and 12 produced the correct position of the arm.
I suspect there is a flaw in the logic of the WC or the circuits bumping it, producing the wrong counts. All but the lowest two bits of the WC are implemented on a single SLT card, type 3793. I swapped the card with another 3793 from the machine but the failure didn't go away.
I am looking at the first two bits which includes the special logic for handling odd counts. That circuitry is contained on card type 6220 held in A gate, C1 compartment at slot M6.
The value is loaded into the WC by the excerpt below - when the -load word count sp signal goes low (asserted as a pulse when it is time to load), the WC is set to 1 if the corresponding bit of the seek count is 0.
Each time a seek is commanded, the signal +access drive is dropped by the 2310 disk drive during the movement and brought back to logic high at the end. When that signal drops and the signal -drive busy is asserted low, it sets Bit 15 of WC to 1.
The portion below is how the WC is incremented. Primarily this occurs when -incr word count is asserted low, generating pulses that change the two flipflops for bits 14 and 15.
IBM flipflops are set or reset by pulses arriving at the top or bottom left side; they don't operate based on the level of the input only by a falling edge. They also misbehave if they receive a set input while already set, or if they receive a reset input when not set. Some of the circuitry in the diagram above blocks those conditions, so that a set pulse is only passed on if the flipflop was in the unset state.
In the diagram above, I stripped out that detail to make it a bit easier to follow the logic. Since the flipflop is controlled by pulses, the gates in front of the inputs produce a pulse when their trigger line has a falling edge.
Since the output of Bit 15 is the signal +10 -20 mil that steps only one cylinder when low, every seek after the first will be for two cylinders (20 mils). If the seek count from the seek instruction is odd, then bit 15 is left off initially. In the middle of each seek step, it sets WC bit 15 to 1 if it wasn't already set. Thus we get only the first seek step at 10 mils before the flipflop is turned on and stays on.
The -Incr Word Count falling edge also triggers the change of Bit 14. If B14 was on, B14 is reset. If B14 was off, B14 is set on. In other words, it toggles the state of B14. The changes in B14 flow to the remaining WC register, bits 7 to 13, counting up by two
However, if you look closely you will see that B14 is also toggled if B15 flips off. This logic is irrelevant in this circuit since B15 is only turned off during the start of a seek instruction, only if the seek count was odd, and then is turned on permanently for the remainder of the seek instruction execution. The WC is also used during read and write when it counts words from a sector; that always increments WC by 1 using this circuitry.
NOT SURE OF EXACT FAILURE MECHANISM YET BUT HAVE A THEORY
The results from my testing, with a seek of 2 failing and every other failure being an odd count, hint that the issue is here somewhere close to B14 but also involving B15. A seek request of seven should load the WC with b11111000 which sets B14 and B15 to zero initially. The 0 value for B15 would make the first seek move just 10 mils, with B15 set to 1 by the seek operation itself.
After that first single cylinder move, the -incr word count signal should toggle B14 to 1, resulting in WC being b11111011 to drive the next seek for 20 mils. Another -incr word count signal toggles B14 off, that causes B13 to toggle on, and we have the value b11111101 in WC. A third -incr word count signal toggles B14 again, with the WC now b11111111 so after this seek, the seek instruction is complete.
We should have moved 1, then 2, then 2, then 2 for a total of seven cylinders. Instead the result was just four cylinders moved. This may be due to the defect always signaling the drive to move 10 mils. The four seek steps thus only move to 4 not to 7.
This could occur if the gate fails that should turn on B15 when +Access Drive falls and -Drive Busy is low. When we set B15 to 0, it would never be incremented and our seek wouldn't stop - WC is never all ones. That is not what is happening, so the issue is not in the gate that should turn on B15.
Any even count starts B15 out as 1, thus every seek step is 20 mils and the results look good. We only have problems if B15 starts out as 0. We might have a failure in the gates that reset B15, where they should be blocked due to B15 being on but they reset it. The timing may be such that the drive sees the 10 mil seek step but the bit flips on long enough for the seek instruction to see all ones in WC in order to stop.