keirf / amiga-stuff

The Unlicense
258 stars 26 forks source link

Floppy drive signal test /TKO signal appears incorrect #74

Open howprice opened 1 week ago

howprice commented 1 week ago

Hi. I have noticed that the /TKO signal is not behaving as I would expect it to in the floppy drive signals tests. When the heads are stepped inwards, I would expect /TKO to be negated (not active) and remain negated until the direction is changed and the heads are stepped back to track 0. Instead, the /TKO signal oscillates with each step, regardless of /DIR

Repro steps:

  1. Boot Amiga Test Kit v1.21 on stock A500 KS1.3
  2. Press F3 on main menu to select Floppy Drive tests
  3. Press F5 on Floppy Drive menu to select Signal Tests
  4. Observe that /TKO is asserted and /DIR=L (In)
  5. Press F6 to step the heads. Note that /TKO is negated
  6. Press F6 again to step the heads. Note that /TKO becomes asserted again

Expected behaviour:

Further info:

Please let me know if I have misunderstood something. Great tool - many thanks!

keirf commented 1 week ago

Yes, the signals test options are misleading here. F8 (/DIR) is expected to be used in concert with F7 (/STEP) which directly toggles the STEP line (ie. press F7 twice to cause one step). F6 (Step) actually is intended to step between cylinders 0 and 1, hence your observed behaviour.

Actually I expect the interactions between F6 and F7 aren't quite correct: F7 probably confuses F6. And F6's description could be better. So there is probably anyhow some small fixing to be done here.

howprice commented 1 week ago

Haha. Thanks for that. Yes "Step" is confusing. I just assumed it generated a STEP pulse, to save having to do it manually with F7, or for users who don't need to understand it at this level.

Does F6 always step +1 then -1? So if you were on track 10, would it go back and forth between 10 and 11, or would it make its way back to zero then start stepping 0-1-0-1-0 ?

keirf commented 1 week ago

Actually it seeks to 0 or 1 depending on whether it thinks it's at cyl 0 or not. https://github.com/keirf/amiga-stuff/blob/master/testkit/floppy.c#L388

Potentially I could just remove it, but it is kind of convenient to have that key to hit a few times to check that TK0 reliably toggles... As opposed to DIR + STEP + STEP.

Maybe I should make it "Step Pulse" and then it would be "Step Pulse + DIR + Step Pulse + DIR + ..." which isn't too bad and is at least somewhat clear wtf is going on, and doesn't try to track the "current cylinder" at all.

howprice commented 1 week ago

Yes. I think that change would make sense. If the current cylinder is tracked, it is based on the assumption that the TK0 signal is reliable in the first place, so maybe a bit chicken and egg.

"Step pulse" sounds good, but it kind of assumes that the user knows that this is what triggers the movement, but I imagine many who are fixing up an old computer from the attic do not.

I would go for plain old "Step" which generates a pulse to step in the selected direction, and would also consider "Step in/up" and "Step out/down" helper buttons (which could alter the state of the /DIR signal). If the user hammers Step down a hundred times and /TK0 doesn't appear, then they know something is up.

keirf commented 1 week ago

Signals test is a power user feature anyway. The whole thing is totally confusing to the average ATK user. It should probably be "Signal Test (Experts only)". General problems with signals are raised by the Read Test.

Or I could reorder the tests, and put both Signals and Head Calibration under "Advanced Tests" heading.

howprice commented 1 week ago

It's hard to decide what's best. Another low-effort possibility that makes things obvious but doesn't remove the handy feature might be to replace Step with Step In and Step Out.

keirf commented 1 week ago

If only I had more Fn keys.

howprice commented 1 week ago

Then you'd have to change the Keyboard screen too.