My simulation code had to be enhanced quite a bit to deal with the need to simulate reading an entire cartridge. The bit stream of Read Data and Read Clock pulses had to repeat precisely 12 times per rotation. More, I had to respond reasonably to seek commands that will be issued as the logic moves cylinder by cylinder through the cartridge.
I finally had the read cartridge FSM reliably cycling through all the sectors, triggering the 'read sector' for each one and the 'seek' commands as each cylinder changes. The remaining check to make is to be sure that the seek is occurring between cylinders, then this will be ready to use on cartridges. It was.
I verified my code to halt on a checksum error, but I am collecting all checksum results and need only build a means to display them. It is good to know if any sectors were not read reliably, especially when archiving contents. I can display the results from a single sector on the VGA display.
I began work on the VGA display, where I can display some current status, such as the cylinder, head and sector plus the checksum status if the sector was read. Displaying the entire sector contents would be quite a bit more work and potentially chew up a huge amount of storage on the board. Will see if I have any good ideas to make this practical but not too onerous.
The VGA display logic behaves oddly - certain text fields are garbled, with rolling text, while others are just fine. If I can figure out what the three bad fields out of eight have in common, perhaps I can either correct the flaw or engineer a workaround. So far, nothing obvious distinguishes the bad entries from the good.
Garbled fields from vgatext logic |
I found a more direct way to force this to work, mainly because I am only displaying decimal digits allowing a reasonable sized function to return ten characters depending on the bit value of the input. I have to test this out to be sure it is working, as well as verify the checksum error messages appear and disappear.
I learned that the vgatext logic does not see changes in data, it loads the image to be displayed at startup and ignores my switch 1 that would gate the checksum error messages on and off. I found that if I flipped the 'reset' switch (2) then it would load depending on the position of switch 1.
Examples of the checksum error messages |
No comments:
Post a Comment