[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple floppy adaptor. I'm stuck!
- Subject: Re: Apple floppy adaptor. I'm stuck!
- From: Linards Ticmanis <ticmanis@gmx.de>
- Date: Thu, 22 Feb 2007 00:53:09 +0100
- In-reply-to: <45d84628$0$52907$c30e37c6@lon-reader.news.telstra.net>
- Newsgroups: comp.sys.apple2
- Organization: Arcor
- References: <45d5a6a4$0$52925$c30e37c6@lon-reader.news.telstra.net> <cvydnaZg2JJRmEvYnZ2dnUVZ_oSnnZ2d@comcast.com> <45d65274$0$52912$c30e37c6@lon-reader.news.telstra.net> <45d83ccf$0$20295$9b4e6d93@newsspool3.arcor-online.net> <45d84628$0$52907$c30e37c6@lon-reader.news.telstra.net>
- User-agent: Thunderbird 1.5.0.9 (X11/20060911)
- Xref: g2news2.google.com comp.sys.apple2:17703
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