keirf / greaseweazle

Tools for accessing a floppy drive at the raw flux level
The Unlicense
963 stars 95 forks source link

Feature request: Disk Change / Ready signal using standard F1 bluepill for WinUAE #108

Open f1ac0 opened 3 years ago

f1ac0 commented 3 years ago

Dear Greaseweazle creators,

I used the Greaseweazle with a F1 bluepill board some time ago to backup my disks. Thank you ! The Beta WinUAE integration made me want to try it again. It works great.

However, a popup windows says it would be even better with the DISK CHANGE pin ! My drive is a PC drive adapted to work inside an Amiga, it has the READY signal, so I want to use that.

I understand it is based on the F1 "plus" board by solarmon, I tried to adapt the following things to the F1 bluepill design :

With this configuration WinUAE detects the GreaseWeazle accordingly, the motor spins, but the system does not load from floppy. I believe there is something else that I forgot, or maybe it requires some other features from the "plus" ? Or it could be a problem on the WinUAE side ? Otherwise it would be great to add it to the "F1 "Blue Pill": Direct Connection" wiki page, autodetect is presence in the code (like you detect when the other input pins are floating) and maybe robsmith could make it a default for WinUAE ?

keirf commented 3 years ago

I am considering direct support for this in Gresaeweazle firmware. The main problem with your approach is that READY is not the same as DSKCHG. WinUAE is expecting DSKCHG. This is on pin 2 on your Amiga drive and will need to be brought to pin 34 (as if it were a PC drive).

Anyway, in terms of supporting this in the firmware, I would suggest C15 to ground, C14 left floating, and I would identify this as "F1 + DSKCHG". What do you think?

f1ac0 commented 3 years ago

I was in fact confused by the two connector formats: I always connected the drive with shugart pinout on my Greaseweazle and it worked so far. However your reply pointed out that in fact the actual pinout on the diagram on the BluePill wiki page is the IBM PC one ! As I now understand, the READY signal is not required nor used by Greaseweazle and WinUAE, even if it is required by the Amiga computers.

I now connected a PC drive to my Greaseweazle with the hardware and software modifications listed in my first post, and it works just fine with WinUAE !

I believe am an not expert enough to point out the best direction, but here are some thoughts if I can help:

In addition :

keirf commented 3 years ago

On some Greaseweazles pin 2 is output only as it is buffered one way. I probably won't get into making it bidirectional on some boards only.

Feature detect of this particular feature is via the CMD_GET_PIN firmware command. If an error is returned, the feature is unavailable. No need for a separate feature detection method for this feature.

Pullup vs not is interesting... I'll have a think, that could probably work!