Monday, March 13, 2017

Detailed oscilloscope images comparing packs that boot and those that don't


On Saturday we had guests over at the Alto restoration meeting - Bob Sproull who wrote the Alto OS among other things, plus John Shoch again. So many great memories, anecdotes and tips. After they left,we captured traces of the data and clock patterns coming from two cartridges - one that I wrote, which fails to boot, and one with original data patterns which boots fine.

Nothing obvious jumped out of the patterns so far, but I will continue studying them for any significant variance. We began at an overall level without sufficient detail, then zoomed in first to the beginning of the header record preamble, subsequently to the end of the header record with its postamble. 
Alto written cartridge reading multiple sectors successfullly
Cartridge which I wrote, during a failed boot try

One thing that is immediately obvious is some data bits that occur right at the front of the preamble on the Alto written packs. By 'spec' the preamble should be nothing but 34 zero words before the sync word. We zoomed in to examine this in more detail.
Good cartridge, zoom into header record of the sector
Failing cartridge, zoom into header record
The views above show the entirety of the header record, which should proceed as follows:

  • Initial delay before beginning to write (lack of clock pulses)
  • 34 words of all zeroes (16 x 34 clocks with no data pulses)
  • sync word of 0000000000000001 (first 1 bit)
  • two words (32 bits total) of the header record
  • checksum word of the data words XORed together and with see of x0151
  • postamble of zero data until clock pulses end
We zoomed further into the beginning of the preamble to compare the two:
Start of preamble on good cartridge boot
The good cartridges have some random data bits - repeatable exactly on the sector but different patterns on each sector - that start the preamble. Reading a pack involves delaying through 21 words of clocked in data, thus these are not looked at as far as we know. The bad cartridges have no one values at all. 

The cause of this is believed to be residual magnetic flux on the media during the first 25 us of the write operation. On the Diablo heads, the erase head poles trail the read/write head poles by a distance that equates to 25 us at the rotational speed of the disk. When both write and erase gates are turned on simultaneously and zero data words are written, the first 25 us of old information is not erased.

We timed the delay from the sector marker pulse until the first clock pulses is recorded and they are essentially identical. The Alto written packs have some very slight variance between sectors and packs I wrote have sectors that are all exactly the same.

Alto written sector, with delay from SM to first clock pulse
Delay on cartridge written by the disk tool
The tail end of the header record was examined next. This should begin with a single one bit value that represents the end of the sync word, followed by 32 bits of the encoded cylinder/head/sector number, followed by a 16 bit checksum, and some postamble or trailing words of zero.
Good boot of sector zero from sync word to checksum and beyond
Cart that fails to boot, sector zero sync, header, checksum and beyond
The two patterns above are identical except that the postamble clock pulses (those after the last bit of the checksum) are four long on a good booting pack and three long on cartridges that fail to boot. 

First pass through all of this flagged only two difference, neither of which 'should' matter. Residual non-zero stuff at the start of the preamble and the difference of one clock pulse on the postamble. Time to study and count pulses much more closely. 

No comments:

Post a Comment