BDM: replace USB and add iLink support #417
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for the Block Device Manager. This allows for multiple block devices to be added, while sharing the same filesystem and reducing a lot of duplicated code.
Replaced USB
The custom USB driver has been removed from OPL, and replaced by the BDM based USB driver from ps2sdk. Everything should still work, but since this is a big change, some issues can be expected. Affected parts are for instance:
Added IEEE1394 / iLink / FileWire
A bonus feature to show off what BDM can do. Drive compatibility is poor and only the oldest PS2 models have the iLink port. If it does work for you, speeds will be good at around 6MB/s. Big thanks to @sp193 for creating this driver a long long time ago, I only modified it to be BDM compatible.
Future plans
1) More block devices
More block device drivers can be added. Like the mx4sio and udpbd drivers that are already in the testing phase. It would also be nice to add pata HDD to the list of BDM supported devices, enabling FAT32 and more to be used for the HDD.
2) More filesystems
The current fat32 driver should be replaced by FatFs, enabling ExFat support for all block devices. Or new filesystems like EXT2 (e2opl) could be added. Another interesting FS would be modifying the existing PFS to be BDM compatible, allowing PFS to be used not only on the internal HDD, but also on iLink, USB and more.
3) NBD
@bignaux is working on an NBD driver for access to the internal HDD. But using NBD all block devices could be accessed from the network. For instance accessing the iLink drive would be a great feature for me, as I don't have an iLink port on my PC ;).