keirf/flashfloppy

Interface issues with DEC Pro 350

snhirsch opened this issue · 23 comments

I'm having good luck with emulation of an RX50 using two Gotek/FFs. That's the good news. The bad news is the bootstrap firmware on this machine fails the floppy subsystem test when disks are ejected. With a real RX50 it's happy with empty drives (doors open or shut). I can workaround by always having images loaded but that necessitates a bit of quick finger poking after power up. Is there a setting I'm missing that might convince the system that, yes, drives are attached. What is it looking for?

Could be wanting ready on pin 34? Could try setting pin34=low in FF.CFG

If I force pin 34 low it won't detect a disk change. P/OS performs a directory scan when a new disk is inserted, so it seems like a Catch-22 (RX50 does not use pin 2 either). When I get some time later today I'm going hang a logic analyzer on the cable and see exactly what's going on with the physical drives.

Hi, Keir. After spending some time in the DEC technical documentation I have a theory as to what might be happening. What happens with FF in the following situation?

  1. No image inserted
  2. Drive selected
  3. Step outward by 80-tracks

A real RX50 steps outward to the stop and asserts track 0. I have a feeling FF does not do so. Can you clarify? I believe the DEC self-test watches for track 0 to determine whether the drive is present.

FF should do the same: step outward to track 0 then ignore further step requests and assert trk0 line.

You should be able to confirm this with the logic analyser.

Bear with me as I'm a bit puzzled. How does the FF know how many track steps consitute return to 0? If no diskette is inserted there is no geometry setting. There are so many short glitches on the floppy interface signals that a logic analyzer trace fills quickly and shows nothing useful.

I recommend those cheap Saleae clones. They are quite low bandwidth but stream over usb in real time so no buffer limitations.

FF always simulates a drive with 256 cylinders. It powers on at cylinder 0. If the host drives to cylinder >80 then 80 steps wouldn't get you back to 0. But unclear why this would differ when image inserted vs not.

I figured out what the DEC RX50 is doing that's different: With no diskette inserted (door open or closed) it holds index true (low) when select and motor-on are asserted. I'm thinking that's what the firmware is looking for. Is there a possibility of adding this option to FF?

Probably not. Best to add that with a small external circuit based on dskchg and select and motor, wire-ored onto the index line? Especially as most Goteks ignore motor anyway.

Perhaps in that case it doesn't matter whether motor is asserted or not? When no disk is inserted, in this mode, index would be asserted, regardless of motor?

I believe I could implement that.

The method @dl6lr describes may work, but is more liberal than the RX50. By observation, the RX50 qualifies index with select and motor-on.

Probably not. Best to add that with a small external circuit based on dskchg and select and motor, wire-ored onto the index line? Especially as most Goteks ignore motor anyway.

I see what you are suggesting. But unless I'm misunderstanding something the first step pulse clears dskchg, correct? I'm almost positive the check for index occurs after the drive is homed.

Ok, I breadboarded a circuit to do what you suggest. Set chgrst = delay-1 on the Gotek. Running on a floppy drive exerciser I can see it's doing the correct thing: with motor-on and select asserted and no diskette the index line stays asserted. When I insert the image, it shows the expected index pulse. But, unfortunately, the machine continues to complain about the floppy subsystem. Starting to run out of ideas. I love a mystery and will continue to chip at it. Thanks for the help!

Finally straightened the grounding out and grabbed a couple of analyzer traces. Trigger is falling edge of SELECT. Here's the RX50:
rx50

And here's the Flashfloppy:
gotek
Notice the extra activity about 15 seconds out on the RX50? It's not happening with the Gotek attached and I'm wondering if the DEC hardware is expecting the noise on read data? There's no diskette in the drive at this point. Thoughts?

That activity isn't even gated on drive select. Is there another drive in the system?

Yes, the RX50 is an odd double-drive with a single motor and stepper, but two heads. That "overlap" near the end is probably where SEL1 goes active. So I do think it's gated on select.

Definitely SEL1:
rx50

Looks like rdata, same as index, isn't gated on ready. So you get noise from the read amplifier.

That's what I'm assuming and by process of elimination the controller is probably expecting to see it. Is there a convenient point in the Gotek to pick off something I can inject as noise on read line using select + chg to qualify?

Well, injecting a signal made the analyzer captures look the same, but it's still not happy with an unloaded FF drive. I'm about out of ideas and am throwing in the towel. I'll just have to ensure that a non-bootable floppy image is inserted in the first Gotek on power up. If anyone smarter than I ever figures this out, please let me know?

I'm not smart enough to figure this out, so not worth continuing to bang my head against it.