Dolphin, the GameCube and Wii emulator - Forums

Full Version: Execution of simple network devkitPro GC example in Dolphin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

shiroiken

Hi all, awesome Dolphin community,

I'm doing some GC development, and I bumped into trying to use the network capabilities of the GC, to try some things out.

Concretely, I'm building the examples given with devkitPro for GameCube development,
<devkitpro>/examples/gamecube/devices/network/sockettest

The example builds fine.

On the other hand, Dolphin is configured with a BBA inside, and the bridge trick has been done, as described in,
http://code.google.com/p/dolphin-emu/wiki/BBA

I have tried this both on Windows and Linux, but the output I get in the Dolphin emulated window is,

"network configuration failed!". Adding errno to the equation, gives us the utmost descriptive: "Error no: 0"

Has anybody compiled and executed some GC examples? From reading around, it seems people have experienced with the BBA to get MKBig GrinD and the sort working, but I wonder if this has been used for development so far.

Thanks!
Yes, when shuffle2 developed the BBA emulation, he tested it with GC homebrew. Let us know how it goes and if Dolphin's BBA emulation requires any additions.
I got Mario Kart Double Dash and Kirby Air Ride working earlier tonight without issues. Are you trying to use multiple Dolphin's on one computer?
Have you tested it on real hardware? BBA/lwip support has been broken in devkitpro for a couple of years.
I may have had to hack it to match my network setup or something, I don't really remember - but it probably wasn't that hard to fix.
or - now that I think about it a bit, maybe it was something about the packet checksum...I really forget. Either way, should be easy to fix since *I* managed it...

shiroiken

I've found some more time to play with this.

For the GC, I'm configuring the BBA, and doing the following (the previous thread in google docs dissappeared)
Code:
openvpn --mktun --dev Dolphin --dev-type tap
brctl addbr br0
brctl addif br0 Dolphin
brctl addif br0 eth0    # or whatever your network interface is
ip l set Dolphin up
ip l set Dolphin promisc on

The vanilla socket file builds fine, returns the following:
Code:
Network configuration failed! Ret value: -116, Error no: 0

Playing with the DHCP parameter made it go over the if_config func once, but now I can't reproduce it. Ie., the following code crashes,

Code:
char localip[16] = "192.168.1.10";
char gateway[16] = "192.168.1.1";
char netmask[16] = "255.255.255.0";
ret = if_config (localip, netmask, gateway, FALSE);

On the other hand, I have no way of setting up the Wii example. By setting DHCP to FALSE, the example fails. Setting it to TRUE will make the emulator always automagically get IP 192.168.1.150, but no chance to reach it.

TL;DR
Let's put it this way, if someone gets any socket example working on either the GC or the Wii, I'd be glad to know. Right now, none are working. (Not surprisingly, since this page reports the same).
Uh... hwtests and hwfifoplayer both use sockets and work inside Dolphin. neobrain might know more.
I don't know much more other than that indeed sockets work fine for all the limited purposes I've used them for so far Smile
Aren't some versions of devkitppc/libogc just broken for network stuff? I seem to remember something like that.

shiroiken

neobrain, could I have some code example to do sockets on GC/Wii? What are you using?
Pages: 1 2