OrangeFox86 / DreamcastControllerUsbPico

Dreamcast to USB Gamepad Converter for Raspberry Pi Pico
MIT License
50 stars 7 forks source link

Host: Weird things can happen if VMU added or removed after host reads and caches mass storage FAT #19

Open Tails86 opened 1 year ago

Tails86 commented 1 year ago

When the file system adds or removes a file, it sends UNIT ATTENTION to the host so it knows something changed. Windows, however, does not reread the FAT, even when F5 is pressed. I've found some help in resending UNIT ATTENTION until read of FAT is detected, but it only works once. I haven't confirmed if the host is actually receiving UNIT ATTENTION.

Figure out what needs to be done in order to force Windows to recheck the FAT.

Tails86 commented 1 year ago

There seems to be no reliable way to accomplish this. I don't want to force a disconnect, so it may be best just to always show 8 devices when the drive attaches. Trying to read vmu that is not attached should then cause an error.

Tails86 commented 1 year ago

It seems like the consensus on stack overflow and other sites that it is bad practice for a mass storage device to modify itself while attached to the host. Seems right to me 😆 I'm changing the purpose of this issue.

Tails86 commented 1 year ago

Purpose: