jackun / USBqemu-wheel

PCSX2 usb plugin for wheels and increasingly more stuff
The Unlicense
121 stars 21 forks source link

USB mass storage not working as expected #61

Open rickgaiser opened 3 years ago

rickgaiser commented 3 years ago

I'm trying to debug some problems we have with usb mass storage devices in ps2sdk and OPL. I was hoping to use your driver with PCSX2's debug feature, but I'm running into some issues.

On ubuntu I've created a copy of a usb stick (sudo dd if=/dev/sdd of=usb.img bs=1M). When using this usb.img it does seem to work to some extend. The FAT32 file system is detected, and some read operations seem to work. But a lot of read operations don't work. I know this is not enough information to debug or find any problems, but perhaps this is a known problem I'm running into. So before spending hours trying to find out exactly what SCSI command is returning what data right/wrong I thought I'd ask here if the driver has even been used with ps2sdk's usb mass storage modules (or OPL).

I hope it's no problem if I ask in this same issue report for a feature I think would be very usefull: Make the driver work with linux devices. In linux, my USB stick is for instance /dev/sdd. It's already possible to select /dev/sdd as the file to use as a mass storage device if the user is added to a specific group ('disk' I think it is). But then the file size is interpreted wrong, so the disk shows up as being 0b in size. So the only thing that would need to be changed is the way the size of the file/device is detected.

jackun commented 3 years ago

Personally not much tested, just that ulaunchELF opens simple txt file and Gran Turismo 4 can save its photos. Could be qemu part, msd part or even PCSX2 itself maybe.