Open-PS2-Loader
Open-PS2-Loader copied to clipboard
[FR] udpbd support
From what I understand, SMB uses a lot of the IOP memory resulting in some games crashing.
Wouldn't it be possible to make a custom protocol that takes less memory and doesn't have as much overhead?
Something without authentication or writing that has only a couple commands like:
List games Select game Read bytes x from offset x
I would personally much rather prefer a protocol with better game compatibility that requires a small server app than one that doesn't need a custom server but isn't as compatible with games.
The most basic and memory saving thing would be to simply transfer ethernet frames (like https://sourceforge.net/projects/etherdfs/ does for DOS PCs) - but it's so basic that it lacks the required throughput for PS2. And it requires a custom programme on the server side. So you'd have to invent a protocol (maybe adapt ATA-over-ethernet or something similar) and write client and server.
Faster and easier would be something like NBD (Network Block Device). It is standardized, and there are already client and server implementations. But only for Linux, which would leave quite some OPL users behind.
Here (https://github.com/ps2homebrew/Open-PS2-Loader/issues/86) is something in the works that could cut the required space for SMB in half. I believe that's the most promising track.
At the moment, udpbd
is a lighter weight protocol which has been implemented and works correctly independently, but it does not work correctly when used with OPL. Progress is in GitLab SaaS in ps2max/Open-PS2-Loader
repo in bdm-2020
branch.
UDPBD (UDP Block Device) is designed specifically for the PS2. It aligns the data inside each packet so that the IOP can use DMA to transfer 128byte blocks directly from the network cards fifo into the application buffer. The protocol is very simple and defined here (inside the modified SMAP driver): https://gitlab.com/ps2max/ps2sdk/-/blob/udpbd/iop/network/smap/src/udpbd.h And here (inside the pc/server side test application: https://gitlab.com/ps2max/udpbd-server/-/blob/master/udpbd.h
Consider it a proof of concept that was never finished into something usefull. It worked a few yeas ago, but I'm not sure it will still compile and run with all the changes there have been to ps2sdk. IOP CPU and memory usage was very low. And speeds (for the first time ever I think) where true 100Mbps.
udpbd sounds exactly like what I was describing
@citronalco there is https://cloudbase.it/ceph-for-windows/ and other, btw i quite finish the nbd server on OPL.
Since NBD server is merged in OPL, i invite you to setup a nbd client and try it!
The samba improvements in recent versions did fix compatibility with a game that previously didn't work (Amplitude)
@rickgaiser : it could be good to have udpbd to replace smb but what about turn it to a compliant tftp client ?
udpbd uses a special alignment (2 bytes extra to align the data to a 4 byte boundary), that make it incompatible with all standard protocols. But basically it's UDP with 2 dummy bytes, making (zero copy) DMA tansfers possible.