Page 1 of 1

USB to SP2 Adapter?

Posted: Sat May 22, 2021 10:44 pm
by Schñarf
Hello all,

I was wondering if Serial Port 2 could be utilized to give the GameCube a USB port. I ask for a few reasons:

- This would maybe open up the possibility of saving/loading homebrew files to/from a USB drive.
- This would maybe open up the possibility of using a Mayflash or other GameCube controller adapter to expand the number of controllers in use. This could be combined with game mods to allow for 6-player or even 8-player gameplay (there is a proof of concept for Melee triples, for example.)
- This could maybe make some sort of alternative to the broadband adapter via an Ethernet to USB adapter for some sort of homebrew netplay setup.

If such an adapter were in SP2, it would preclude the simultaneous usage of an SD2SP2 adapter unless it were some sort of USB+SD to SP2 super-adapter. Also, the existing exit slot for SP2 on the GameCube is probably only big enough to fit one USB port.

So the question becomes: Is this technically possible? And if not, could there be some other way to expand the number of controller ports through SP2 or some other GC port such as the memory card slot?

Re: USB to SP2 Adapter?

Posted: Sat May 22, 2021 10:58 pm
by Extrems
Using the Hi Speed Port would be more sensible as it could handle USB 2.0.

Re: USB to SP2 Adapter?

Posted: Sat May 22, 2021 11:05 pm
by Schñarf
Extrems wrote:
Sat May 22, 2021 10:58 pm
Using the Hi Speed Port would be more sensible as it could handle USB 2.0.
You're saying the Hi Speed Port could handle USB but SP2 can't? That would preclude the use of the GBA player though :/.

Although I guess that wouldn't be too tragic, all you've gotta do is switch them out—I don't see why you would really want to use the GBA player and a USB port at the same time. Still, you couldn't have them persistently on the same machine which would be a bummer. Funnily enough, the Hi Speed Port actually also has a slot on the side despite the GBA player not having any side ports. I'd guess that slot could fit about 2 USB ports. Same guess for SP1.

Re: USB to SP2 Adapter?

Posted: Sat May 22, 2021 11:18 pm
by Extrems
You could use any of the Serial Ports (including Memory Slots), but it wouldn't be much faster than USB 1.1.

Re: USB to SP2 Adapter?

Posted: Sat May 22, 2021 11:19 pm
by Schñarf
Extrems wrote:
Sat May 22, 2021 11:18 pm
You could use any of the Serial Ports (including Memory Slots), but it wouldn't be much faster than USB 1.1.
But would it be enough for a controller adapter?

Re: USB to SP2 Adapter?

Posted: Sat May 22, 2021 11:22 pm
by Extrems
I doubt there's enough interest for something that could only support USB HIDs. I'm certainly not interested.

Re: USB to SP2 Adapter?

Posted: Sun May 23, 2021 12:00 am
by Schñarf
It would certainly have a niche usage, but I think 8-player GameCube games would be at least somewhat of a big deal. Is there a difference in speed between the Memory Card slot and SP2?

Re: USB to SP2 Adapter?

Posted: Sun May 23, 2021 10:36 am
by Papy.G
They're connected to the same EXI bus, so the same in terms of speed, enough for controller inputs. thay also both have interrupt ability. (edited)

For four more players on a GC, the simpler way would be a GC with homebrew to bridge-forward its controller data to the main GC via EXI cross-cable. As does some NES emulators on GBA.

If you want to design more than just a cable, you can try to build an EXI to 4 controllers adapter, it would be still simpler than going the USB HID way (and less prone to lag).

For the ethernet adapters, there are some SPI-ethernet modules that may work pretty much straight-forward off the EXI bus.

Re: USB to SP2 Adapter?

Posted: Mon May 24, 2021 4:18 am
by Schñarf
Papy.G wrote:
Sun May 23, 2021 10:36 am
They're connected to the same EXI bus, so the same in terms of speed, enough for controller inputs. SP2 has interrupt ability though.

For four more players on a GC, the simpler way would be a GC with homebrew to bridge-forward its controller data to the main GC via EXI cross-cable. As does some NES emulators on GBA.

If you want to design more than just a cable, you can try to build an EXI to 4 controllers adapter, it would be still simpler than going the USB HID way (and less prone to lag).

For the ethernet adapters, there are some SPI-ethernet modules that may work pretty much straight-forward off the EXI bus.
Interrupt ability? What’s that? Also, would it be possible for me as an individual to create such an EXI controller adapter?

Re: USB to SP2 Adapter?

Posted: Mon May 24, 2021 9:22 am
by Papy.G
An interrupt pin allows for an external appliance (or internal peripheral in other cases) to warn the main system (CPU) that it has data to deliver, it's a kind of "handshaking", then, the main system can be aware right on time to listen to it, it can be very responsive and time effective. Without interrupts, the main system has to poll over and over the external appliance, to know wether it has data to send or not, which can be very machine time consuming and/or add lag to inputs (if the data is ready just after the poll round, it has to wait for the next round to be collected).

You have to get a µC that can poll four controllers, send rumble commands and collect their data, store it and set an iterrupt on its SPI port, so that the patch in the game will collect controller data and send rumble commands via SP2.

I don't know if the GC's SP2's interrupt pin can be set as an output so that we can just cross the SP2 serial lines and straight INT to INT (maybe with a pull-up or sink resistor). If it's the case, a second GC may do the job as well.

Re: USB to SP2 Adapter?

Posted: Mon May 24, 2021 2:25 pm
by Extrems
They all have an interrupt pin.

Re: USB to SP2 Adapter?

Posted: Tue May 25, 2021 12:43 am
by Schñarf
Papy.G wrote:
Mon May 24, 2021 9:22 am
An interrupt pin allows for an external appliance (or internal peripheral in other cases) to warn the main system (CPU) that it has data to deliver, it's a kind of "handshaking", then, the main system can be aware right on time to listen to it, it can be very responsive and time effective. Without interrupts, the main system has to poll over and over the external appliance, to know wether it has data to send or not, which can be very machine time consuming and/or add lag to inputs (if the data is ready just after the poll round, it has to wait for the next round to be collected).

You have to get a µC that can poll four controllers, send rumble commands and collect their data, store it and set an iterrupt on its SPI port, so that the patch in the game will collect controller data and send rumble commands via SP2.

I don't know if the GC's SP2's interrupt pin can be set as an output so that we can just cross the SP2 serial lines and straight INT to INT (maybe with a pull-up or sink resistor). If it's the case, a second GC may do the job as well.
Would it have the necessary power supply?

Re: USB to SP2 Adapter?

Posted: Fri May 28, 2021 7:03 am
by Papy.G
Don't know much about the current load ability on the SP2, I may be wrong, but I fear that draining the current needed for four controllers and rumble may not be safe, perhaps the µC and controllers without rumble can be just nice.
That's another question you won't have to find the answer using a second GC with SP2 bridge.

Re: USB to SP2 Adapter?

Posted: Fri May 28, 2021 7:07 am
by Schñarf
Papy.G wrote:
Fri May 28, 2021 7:03 am
Don't know much about the current load ability on the SP2, I may be wrong, but I fear that draining the current needed for four controllers and rumble may not be safe, perhaps the µC and controllers without rumble can be just nice.
That's another question you won't have to find the answer using a second GC with SP2 bridge.
What kind of bridge? Like SP2 to SP2? I feel like that might be susceptible to input lag, though correct me if I’m wrong. That’s also getting in the pricey range, most people only have one GameCube and even those who have 2 will probably only homebrew one of them.

Re: USB to SP2 Adapter?

Posted: Fri May 28, 2021 7:33 am
by Papy.G
Yes, SP2 to SP2, a GC only running controller poll and sending to another with interrupt may not be slower than average µC.

It may be much hassle, but once an homebrew is booted via save exploit, you can use both the game and memcard to boot the second unit, while I must agree with you, not everyone has a handful of cubes laying around.