Network functions on GameCube

Post Reply
bendmorris
Posts: 2
Joined: Tue Feb 26, 2019 6:55 pm

Network functions on GameCube

Post by bendmorris » Tue Feb 26, 2019 7:20 pm

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?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Network functions on GameCube

Post by WinterMute » Thu Feb 28, 2019 12:48 am

These functions are provided by libbba on gamecube. See https://github.com/devkitPro/gamecube-e ... kefile#L36
Help keep devkitPro toolchains free, Donate today

Personal Blog

bendmorris
Posts: 2
Joined: Tue Feb 26, 2019 6:55 pm

Re: Network functions on GameCube

Post by bendmorris » Thu Feb 28, 2019 2:18 am

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?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Network functions on GameCube

Post by WinterMute » Thu Feb 28, 2019 12:44 pm

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

capz
Posts: 13
Joined: Sat Nov 29, 2014 3:07 am

Re: Network functions on GameCube

Post by capz » Tue Feb 25, 2020 10:08 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest