Page 1 of 1

Network functions on GameCube

Posted: Tue Feb 26, 2019 7:20 pm
by bendmorris
Hi all, I'm trying to build an application with network capabilities for the GameCube. Specifically I'm trying to get WolfSSL and libcurl working, and I think I'm close but am getting a link failure.

I noticed functions like net_poll, net_bind, etc. are included in network.h, but in my installation of devkitpro they're contained in the wii version of libogc, but not the cube version. Digging in I found these functions are defined in network_wii.c. However, the GameCube examples do use these functions, so I'm confused.

Is it possible to use these libraries on GameCube via BBA? I assume I can't just link to the wii version of libogc?

Re: Network functions on GameCube

Posted: Thu Feb 28, 2019 12:48 am
by WinterMute
These functions are provided by libbba on gamecube. See https://github.com/devkitPro/gamecube-e ... kefile#L36

Re: Network functions on GameCube

Posted: Thu Feb 28, 2019 2:18 am
by bendmorris
Thanks! Looked more closely and saw that being linked in the examples.

There are a couple missing functions, notably gethostbyname - what do people do for DNS resolution on GameCube?

Re: Network functions on GameCube

Posted: Thu Feb 28, 2019 12:44 pm
by WinterMute
People mostly didn't do much with gamecube network code - the BBA became quite hard to get hold of at a reasonable price thanks to scalpers. I'm not sure how much better it is now, they still seem to be attracting prices far in excess of what I paid for mine new.

FWIW I always meant to look at adding a layer to libogc that would provide standard network functions hooked into our newlib stdio layer like we've done for 3DS and Switch. That would make porting things like curl rather a lot easier. Main reasons that hasn't happened are a lack of time & motivation for it partly due to people not really making homebrew for gamecube any more and the difficulty in convincing people of the merits of doing a load of extra work for the sake of future maintainability. It's tempting to revisit that if there's interest in gamecube building again.

Re: Network functions on GameCube

Posted: Tue Feb 25, 2020 10:08 am
by capz
Hi Wintermute, I've decided to bump this because i have need for this kind of functionality as well and was wondering what it would take to have this implemented for the gamecube, because currently there is no way to make http requests since as far as i can see, anything other than direct socket communication is impossible.

How much work would it be? days? weeks? Obviously the official SDK supports all of the bsd socket functionality since webbrowsers have been built with it.