Tuesday, March 11, 2025

Final verification of Virtual 2315 Cartridge Facility in virtual mode

AFTER CORRECTING THE ISSUES I FOUND, I RETESTED

I had tweaked the logging to give me the cylinder, head and sector plus a couple of key values, but the code was flawed, resulting in the logging function not working at all. I didn't test this as I focused completely on correct behavior on the IBM 1130. 

I put in a couple of enhancements including a startup message showing whether we are in Real or Virtual mode. The other issues discovered were corrected with minor changes to the Verilog code for the FPGA part of the Virtual 2315 Cartridge Facility (V2315CF). 

I did the same read sector tests as I had performed previously, this time seeing exactly the correct data in memory as I had in the cartridge image file. I therefore ended by reading the sector from cylinder 10, head 1, sector 2 into the buffer so that I could proceed with testing of the write and remaining functions. 

The data is read in perfectly, zero check bit errors and all the data matches the cartridge image from the microSD card perfectly. 

USING AN INITIATE WRITE TO PUT CHANGED CONTENT ON THE VIRTUAL IMAGE FILE

I then took the buffer I had just read it for cylinder 10, head 1 and sector 2, modifying it so that I could test whether we are updating the proper position on the virtual cartridge image. I changed the one word and then did an XIO type Initiate Write. 

To test whether I had successfully updated the sector, I cleared out part of the buffer to zeroes, other than then initial count of 321, then did an XIO type Initiate Read to pull in the same sector from disk. The buffer contents should be exactly this if the write worked properly:

0056
6124
6D00
7800
changed word
4C20
. . . .
C00B
4C20

SHUT DOWN VIRTUAL DRIVE SO IT REWRITES THE VIRTUAL CARTRIDGE IMAGE FILE

By switching the Load/Unload switch to Unload on the V2315CF, I powered down the virtual disk drive. The box will write back the changed image of the disk from the SDRAM to the file on microSD card. The final confirmation was to do a binary compare of the rewritten file against the original version, looking for the one word change at the proper point in the file. I found just the two bytes differing, corresponding to the one word that was changed when the sector was written back. 

No comments:

Post a Comment