[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple floppy adaptor. I'm stuck!



Tristan Mumford wrote:

> Well look at that. I don't seem to be alert enough to fully comprehend how
> the two dimensional array works but it does tell me some interesting
> things.

Small explanation of that code in plain English (well, more or less):

Whenever a magnet is *either* turned off *or* on while the drive motor
is running, do all of the following:

  Look up the row of the table that corresponds to the current state of
  all four magnets, as they are AFTER the turning on or off happens

  In that row, look up the column that corresponds to the *remainder*
  of the following division: current quarter track number, divided by 8

  Add the number you find at that row and column to the current quarter
  track number to get the new quarter track number.

  If the new number is less than 0 (or more than your maximum quarter
  track,) then make it 0 (or maximal).

You can then take the difference between the old and new positions (both
rounded to half tracks this time) and send that many pulses to the drive.

-- 
Linards Ticmanis