WD2793 HLD/HLT timing?

Page 1/2
| 2

By TomH

Champion (335)

TomH's picture

08-01-2018, 16:33

Quickie on the WD2793 disk interfaces: do we know anything about the logic applied for generating HLT?

The 2793 will signal the HLD output when it wants the heads loaded. External logic must signal the HLT input once heads are loaded. Reads and writes will wait until they are told that heads are loaded.

For context, the other branch of the WD family, that runs to the 177x, doesn't provide these signals. It instead provides a motor on output and waits for an appropriate quantity of index holes after motor on to decide that the disk is up to speed. It then proceeds. No additional external circuitry necessary. So on floppy systems with a 2793-type chip, HLD and HLT are in lieu of motor control.

The other machine that I'm aware of that uses a 2793-compatible chip is the Oric's Microdisc. Its logic is that HLD active starts the disk motor and after a fixed-duration delay HLT is signalled. HLD inactive instantly deactivates both.

The MSX has a separate, explicit motor which the programmer has to invest the effort to manage. So I can think of at least two ways in which HLD/HLT might be implemented on an MSX:

  1. the one is directly wired to the other; HLD active means HLT active, and HLD inactive means HLT inactive;
  2. HLT is active exactly when both HLD and the disk motors are active.

Is either of those a correct guess? Do we even know the real answer?

Login or register to post comments

By Manuel

Ascended (19270)

Manuel's picture

08-01-2018, 23:39

You can't say "The MSX has a ...." Each MSX diskdrive can have its own implementation. It's not specified in the standard.

You may want to check out this source code for some nice details:

https://github.com/openMSX/openMSX/blob/master/src/fdc/WD279...

By TomH

Champion (335)

TomH's picture

09-01-2018, 00:46

I can say "The MSX has a..." in this case because it is equally true of all documented uses of the WD2793 with an MSX. On the Microsol it's bit 5 of port D4, for the international disk ROM it's bit 7 at address 7ffd in that slot, and in the Fujitsu it's bit 3 of 7fbc.

That file appears to endorse HLD being wired directly to HLT.

By maxis

Champion (512)

maxis's picture

09-01-2018, 01:16

Hello,

Head load is for 8" drives only. There the servo solenoid lands the head onto the surface of the disk. In 5.25" and 3.5" the head load mechanism was replaced by more generic drive ready signal. So HLD to HLT bypass seems a logical solution.

By TomH

Champion (335)

TomH's picture

09-01-2018, 16:27

Thanks for explaining. I guess this also implies that none of the WD2793 interfaces that documentation seems to be available for is actually compatible with an 8" drive? I can't imagine there was any market where the MSX strongly overlapped use of 8" floppies though? Definitely not in Europe.

By hit9918

Prophet (2927)

hit9918's picture

09-01-2018, 16:45

in wd2797.pdf :
"after the last directional step, an addtional 15 milliseconds of head setteling time takes place if the verify flag is set in Type I commands
note that this time doubles to 30 ms for a 1Mhz clock"
and in other commands it is the E flag

it smells like the controller has a wait feature for cheap HLT logic
the funny 8 inch "head loading" may be gone, but that does not mean that "head settle time" has become zero.

By TomH

Champion (335)

TomH's picture

09-01-2018, 17:15

I guess the intention is that if you're not using verify, and have used cheap logic, you'll wait for yourself before issuing a Type II or III command. But seek/etc with verify is atomic, so the controller will help you out.

I can imagine it would actually be helpful even on a 5.25" drive if you've got one of equivalent cheapness to the Commodore C-1540/1541: it makes a distinctive clicking noise when seeking track 0 because the means of stopping the head in a predictable position is just letting it ram directly into a plastic stop. Head alignment failures are very common over time. One can easily imagine some temporary instability right after you've deliberately run the head into a wall.

By maxis

Champion (512)

maxis's picture

09-01-2018, 17:30

TomH wrote:

I can't imagine there was any market where the MSX strongly overlapped use of 8" floppies though? Definitely not in Europe.

Well the FD179x controllers were introduced in 1978, where S-100 bus adapters and CP/M on 8" diskettes were the most fashionable thing Wink

hit9918 wrote:

in wd2797.pdf :
it smells like the controller has a wait feature for cheap HLT logic
the funny 8 inch "head loading" may be gone, but that does not mean that "head settle time" has become zero.

True indeed. The head settle time is far from zero. It swings and oscillates well being cantilever design. So, while stepping, some drives can deassert DISK READY. IMHO if DISK READY acts correctly, HLT is not necessary. Basically HLD/HLT was created at the time when disk drives were dumb and had no uC

By TomH

Champion (335)

TomH's picture

09-01-2018, 17:44

My understanding of disk ready, before IBM messed it up, is: deactivated by stepping, ejecting or stopping the motor; activated when motor is on and two index pulses have passed since the last deactivation event. So that should create appropriate settling time, unless I've been led astray on the test.

By hit9918

Prophet (2927)

hit9918's picture

09-01-2018, 18:16

two index holes is too much
the msx loads one track and then misses one revolution

By maxis

Champion (512)

maxis's picture

09-01-2018, 18:30

TomH wrote:

it makes a distinctive clicking noise when seeking track 0

Well, after power on reset all the 17xx controllers defult to the maximum stepping timing while seeking for track 0. Therefore it has such a rattling sound. Also the seek timing is useless in the modern floppies, since they can count the steps themselves and use the intrinsic timing constants. But 17xx family was designed at the time when floppy drive logic were built around SN74 series and 555 timers. So, all the timing was coming from the controller.
Your statement about C-1540 is true, since many manufacturers tried to reduce the production cost and literally had thrown away the drive electronics. Same goes for Atari CA2001 and LDW2000 disk drives where the drive electronics is eliminated.

Page 1/2
| 2