[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple floppy adaptor. I'm stuck!
Michael J. Mahon wrote:
> Tristan Mumford wrote:
-big snip-
>> The current code only deals with one phase on at a time. Partially
>> because it looked like that was all the standard routines dealt with, and
>> partially because it seems logical that no matter what a stepping routine
>> would probably have each single phase on exclusively at some point of
>> rotation.
>>
>> That code does seem similar in spirit to mine. Just that looks better
>> thought out :)
>
> The normal seek behavior of RWTS and the Disk ][ Driver is to "idle"
> with all phases off (though the boot ROM leaves phase 0 on after the
> recalibration seek).
>
> To move, the driver turns on the "current" phase (the one last
> energized), then turns on the adjacent phase (in the desired direction),
> then turns off the original phase and waits for the stepper to
> stabilize. It repeats this cycle twice for each track moved.
Well, given that description maybe it really is alright just checking for
the 4 phases individually or none at all. As I have no control over the
shaping of the steps anyway, as long as I'm grabbing the primary parts of
the phase it should all be good... right?
My current method just uses a switch with 1, 2, 4, 8 and default, which
handles the unsupported and no phase conditions.
It decides direction and whether it has to do anything based on the previous
phase state sampled. Nothing too flashy.
Then there's some code that tracks the head and moves it. It also stops
headbump conditions, as not all floppy drives stop automatically at 0 and
80 tracks.
--
-----> http://members.dodo.com.au/~izabellion1/tristan/index.html <-----
===== It's not pretty, it's not great, but it is mine. =====