Monday, March 3, 2025

Testing access operations of Virtual 2315 Cartridge Facility using Arduino testbed

TESTING SEEK OPERATIONS 

I set up the Arduino to pulse the Access Go and Access Ready signals to cause it to perform seek operations. That should light the Seek lamp on the box as an indication of the activity. 

The unique hybrid operation mode means that the seek is actually taking place on the 13SD while the Virtual 2315 Cartridge Facility is shadowing that operation in order to keep track of the current cylinder for eventual read or write operations. Thus my tester is simulating both ends just to verify that the shadowing appears to work properly. 


This worked as expected, moving forward and backward in steps of 1 or 2 cylinders at a time. Too, I verified that it won't back up to a negative cylinder number nor advance past the last cylinder 202. 

I wrote macros to perform seeks at a target time (in millseconds since bootup). The code above is an example of those being used in the Arduino test code. 

TESTING BY READING A SECTOR

Another test I programmed on the Arduino turned on the Read Gate thus I should see the Read lamp flicker on. I could, with an oscilloscope, view the stream of clock and data pulses that is generated by the box based on the virtual cartridge contents. 

You can see above my test which first did a one cylinder seek and then read a sector. I didn't have a scope at home where I am testing, but since the simulations seemed so good, for the time being I feel optimistic about reading. 

NEXT STEPS IN TESTING TO CHECK OUT WRITE

Testing a write is too complicated to perform with the testbed I, since the timing of the change in the write clock and data line must be tightly aligned with the 720KHz clock being generated by the emulator. I therefore will move forward to testing on the live 1130 system and its disk drive. 

STILL SOME TESTING TO VERIFY THE PURE VIRTUAL MODE

When I flipped the signal to tell my design that there was no physical disk drive running, it generates all the signals like Sector and Index pulses that normally will come from the disk drive. Where it is most different is in the startup and shutdown.

My design depends upon the 13SD disk drive to spin up, ensure it is at speed, believe it has loaded the heads and then signal File Ready, in order for the Virtual 2315 Cartridge Facility to get to full running mode, permitting the IBM 1130 to issue disk commands. When the drive power switch is flipped off, the drive spins down, believes it retracts the heads and turns off File Ready.

There is no analogous power switch in virtual mode, thus I need to simulate the disk drive coming up to speed with a state machine and generate signals equivalent to what the drive does. Even worse, I realized that my logic in the Virtual 2315 Cartridge Facility waits for File Ready to drop before it is ready to unload the virtual cartridge image. With no power switch, there was no way to tell it to stop 'spinning'.

I identified these misbehaviors in my final tests today and went off to refactor the startup and shutdown to work properly in both hybrid and virtual mode. I changed code so that it knows if we are in real drive or pure virtual mode, so that it can unload the cartridge and turn off the disk drive purely by switching the Load/Unload switch on the emulator box to Unload. 

In hybrid (real) mode, it is the physical drive that must turn off before we even look at the Load/Unload switch. I need another round of testing (tomorrow) to satisfy myself that I didn't break the operation in real (hybrid) mode and that I corrected the issues for virtual mode. 

No comments:

Post a Comment