jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.17k stars 264 forks source link

USB-Ethernet adapter research #1357

Open Hydreigon223 opened 8 months ago

Hydreigon223 commented 8 months ago

Later S2x6 games would use a USB-Ethernet adapter likely to replace iLink. There are some cases where it's used to connect to an online server but server emulation would be up to someone else. Here is a list of the following games I know of that use this device:

Keropon commented 8 months ago

What I'd like to research is the possibility of having a Idolm@ster Tower unit act as a Local Server for two (or more) Idolm@ster Station units.

Do you have any photos or anything else of that adapter? is it ETH to USB or USB to ETH? Since the 2x6 has a USB port that's blocked by a sticker... 🤔

It was this thing.

image

Hydreigon223 commented 8 months ago

The adapter itself has the USB VID and PID set as the following.

Since the board itself consists of an ADM8513, both ID values are pretty obvious. Hooking this up should theoretically be straightforward as documentation for these kinds of drivers exist.

uyjulian commented 8 months ago

OHCI probably needs to be implemented first for USB. So will take some effort to implement if you go the low level hardware way

However, if going the driver substitution way...
It simply uses the an986 driver.
In any case if it uses inet or eenet networking stack (or other middleware/thirdparty networking stack that has a PPP module available for the modem port), one way go around it is grab the ppp module from somewhere and then make a slirp modem driver with the modem api.
Another way to go around it is if networking functionality is performed on the EE, to just hook libnetglue to use host BSD sockets like it is currently done for libmc2
Another way is to reimplement just enough of the IOP driver stack to interface with BSD sockets.

Hydreigon223 commented 8 months ago

I'm fine with whatever route seems the most efficient (personally leaning towards the driver route). It's a question on what the devs will agree to when implenting this.

uyjulian commented 7 months ago

There are basically 4 network stacks used on the PS2:

For ethernet support, it is possible to use the SCE-provided ent_smap.irx (for eenet) or smap.irx (for the other three network stacks; glue modules needed for the third party ones).
For modem support, it is possible to use the SCE-provided spduart.irx (all four network stacks needing PPP glue module).

There may also be drivers for USB ethernet hardware and USB modem hardware (such as an986), which may or may not require glue modules.

All of the aforementioned network stacks have BSD socket-like APIs on the IOP and EE.

So either replacing the network stack driver or the ethernet/modem hardware driver looks feasible.