Wednesday, October 5, 2016

VGA display working and ready for use

ALTO DISK TOOL

As an experiment I swapped the position of two of the fields to see if the blurring was positional in any way. It is not. I then made trivial changes to the Sector label which was also garbled, to see if that changed anything. It stopped being garbled, and all I did was shorten the string by 1, removing the trailing space.

I made some changes to the display for cylinder number and head number, hoping to get these to show up properly. It worked properly, although I had to manually reset the vgatext module to get the updated values to display. My solution was to flip on the reset programmatically for one cycle every time I updated a screen value.

While this does update the image, it causes a one second or longer dropout on the monitor because of the complete reset of the scan. I am modifying the vgatext to pass in a separate more local reset signal that will cause only the fields that change to be reset, but letting the overall scan process continue undisturbed.

This works pretty well, instantly and seamlessly changing the cylinder, head and sector values. I had hoped to have it show the changing values of the addresses during the process of reading an entire cartridge, but there was a defect I had to correct,

With the fix made, I tested and everything was as desired. It was time to add in visual indicators of the checksum verification status of an entire cylinder. A cylinder consists of two groupings, one per head, of 12 sectors each. Each sector has three tests, for the header, label and data records in that sector.

The display had four rows, representing head 0 sectors 0 to 5, head 0 sectors 6 to 11, head 1 sectors 0 to 5 and head 1 sectors 6 to 11. The line consisted of three positions and a space for each of the six sectors it covered. The position would display a decimal point if the corresponding check was good, or a capital E if the data did not match the recorded checksum.

I added the four rows of display output, with static contents, but the screen became completely garbled, even the fields that were already working properly on the last pass. Now I will need to carefully work through the code, making changes and waiting 20+ minutes per pass to see if things get better.

This is a lesson - many times when I leverage open source code in the design, I spend inordinate time trying to get it to work correctly. My first change, eliminating three of the four lines,  Still didn't show anything. Another tweak and I have one of the rows displaying properly.

Screen with checksum status of first six sectors of head 0 visible
I shall have to inch my way up, row by row, figuring out what I need to have this work properly.
By dinnertime I had two rows working and was adding in the third row. I went through three tries to get the third row working, but the vgatext display was trashed.

Made a seemingly irrelevant change from 24 to 23 characters and tried again. Still no good. I then decided to revert to the last working number of elements, with the two rows, but expand the rows so that each is 12 sectors wide instead of six.

That did the trick. Now that I had the two rows of 12 displaying, I only had to shift it down to a more esthetic location on the screen. Time to activate the live data from the checksum status memory and I will be done.

I ended up spending the entire evening just trying to get the four rows displaying and the prior data displaying. No idea why this is so balky, but I overcame it by redesigning to two rows. 

No comments:

Post a Comment