FIX94 / Nintendont

A Wii Homebrew Project to play GC Games on Wii and vWii on Wii U
1.9k stars 323 forks source link

Enhancement Request - Add BBA support (Broadband Adapter) #144

Closed jobhh closed 4 years ago

jobhh commented 9 years ago

I'd like to (once again) add a low priority feature request for anyone who has the time/skill to do it: Add GameCube BBA (Broadband Adapter) emulation via the (v)Wii's Wifi/Ethernet.

It would mean playing Mario Kart Double Dash with up to 8 people on two televisions, which is as awesome as party games can get.

The main comments on Google Code for this request were "yey, yes please". I think this was the most interesting one, https://code.google.com/p/nintendon-t/issues/detail?id=11#c14 "In case anyone is interested, I contacted the individual that implemented this feature in Dolphin about this enhancement. He said that he dislikes the Wii. He suggests that one of the project devs here work on it and that we ask Dolphin about any potential issues."

SMarioMan commented 9 years ago

Thanks for reposting this feature request here. I was the user that posted comment 14 about my correspondence with sonicadvance1 on porting over the BBA code. I literally have my hookup set and ready to go between my Wii and my Wii U. All I need it actual implementation of the code. I only wish I had some clue about how these bits of code work, or even a decent handle on how to code. Then, if it were easy enough, I'd do it myself.

athendrix commented 8 years ago

Second this! I'd totally love to abuse the BBA. We have Kirby Air Ride, Mario Kart, and PSO (which could also work with the modem adapter) and this could be the most exciting update for expanding the gamecube capabilities of the WiiU

H0neyBadger commented 8 years ago

Hello @FIX94, Could you please provide some advice? As @SMarioMan said, I would like to contribute but I do not know where to start. Any reading or documents are welcome.

carnage702 commented 8 years ago

Crediar once said porting dolphin bba would be the easier thing, and dolphin is open source so i guess taking a loo at how dolphin bba emulation works.

RinMaru commented 8 years ago

This would be an awesome feature.

briantho commented 8 years ago

Looks like Devolution has already "beaten us to the punch". Just downloaded the Latest Devolution, and saw this in the readme file

"BBA Emulation is supported for the following games that use LAN play:

I'd test it bbbbbbuuuuuttttt, I lost my copy of double dash a while back, and never verified it for use with devolution. Maybe someone should ask Tueidj over @ GBAtemp, how he got all this working. In the mean time, I'm gonna see if I can find my copy of Double Dash. That or if someone else could test it, see if it really works.

SMarioMan commented 8 years ago

@briantho Nice find! I'll test it out as soon as I get my Wii U GameCube Adapter in. I've got a convoluted but functional setup in mind involving my Wii, my Wii U, and lots of weird A/V hookups.

HybridEidolon commented 8 years ago

Was there ever any work done on this? It'd be pretty cool to have Internet play for the Phantasy Star Online games.

FIX94 commented 8 years ago

the last thing I did was in february, maybe at some point I'll actually do more, dont know yet.

jacobsvante commented 8 years ago

I agree with @Furyhunter. It would be so cool to be able to play PSO again!

HybridEidolon commented 8 years ago

Not to mention much cheaper to get into. The real BBA is pretty expensive these days, and though I have one, wired connections aren't really convenient.

FIX94 commented 8 years ago

lol you are a funny one. that sourceforge project is not mine so its probably some fork/old version, even funnier is that you think devo and nintendont could be "merged". the last thing I saw from it was a encrypted binary, no sources at all and anti-piracy measures unlike nintendont which all very much speaks against any sort of "merging" ;) oh and where is said github repository? is it under a fake name or something? ;)

ViiMaster commented 7 years ago

Hello Guys! A big thank you to the developers for allowing us to use their software and enjoy the Gamecube games the way they were ment to be played! :D I would like to add to the BBA emulation request... I can understand why it is not a priority and even if it never happens, we're still going to be vey happy and satisfied! :) However, being able to play the few games like the Phantasy Star Online series on SCHTHACK Server or Mario Kart would be a great adition as well as a big milestone to the project.

Thank you very much FIX94 and the rest of the dev team for all your hard work and time you have put into this project!

MWDelaney commented 7 years ago

If it's helpful, I have the equipment to test BBA emulation on my local network. I have 4 Wii's and some GameCubes with BBAs. Let me know if I can be of use.

briantho commented 7 years ago

Yeah, I really hope one day this will become a reality, for nintendont. In the mean time I've managed to get devolution working semi-properly working with bba. The thing is with devolution, I can never get 2 wii's to talk to each other over wireless or wired. The only way to get it working is to introduce a pc running dolphin (or a real gamecube bba, or so I've heard) onto the network. Then they will find each other. I've tried this method with Mario kart double dash and Kirby air ride, without any major hiccups. As for nintendon't I really hope this will one day become real, and seeing as how devolution hasn't been updated in a while, and is closed source, and nintendont is much more flexiable, and open source, and various other reasons, I'd really like to see this enhancement become a reality. BBA is basically the only thing imho, that devolution has over nintendont, that and wireless ps3 controller support. If nintendont could properly emulate the bba, without the need for dolphin or a real bba on the network, meaning 2 wii's wired or wireless, this would be truly amazing.

ViiMaster commented 7 years ago

Devolution is a good project but it is very unfortunate that good projects are sometimes made by people/kids who are selfish and so over their heads (tueidj). This project was clearly made more as a show off (especially the DRM system in which tueidj was so proud and bragged, in a sense, about it) and now it stays there abandoned. For me it was a bit of a waste of time.

I wanted to play Eternal darkness and just because I have the pal version which doesn't support 480p I wanted to play the USA version (at the time when Nintendont didn't have the audio streaming feature. Thank you so much for adding it later! That day was the best day of that year for me! :-) ). Of course with Devolution I couldn't do that... It would be illigal for us to use the USA version but it is not illigal for the companies to sell me the same product in PAL with less features and ask more money for it here in Europe!

And of course the whole 50/60hz all these years, where I had to play Ocarina of time, super mario 64 and most of the PAL games with 17% less speed and cropped screen is not illegal...

And just because I had a modchip on my Wii to play imports, when I finally decided to play the PAL game without the 480p feature, I tried to rip my copy of Eternal Darkness so I could use it with devolution. Of course I couldn't do it properly because the chip was interfiaring with the awesome custom made DRM system that tueidj spend so much time and energy to create so he could save Nintendo from piracy of a long dead system... So when I asked the developer in an email about it, in which I think I was very polite and asking if there is a solution to it (ripping the game without having to remove the mod) he ignored me the first time and the second time I tried he simpy replyed with a "No".

Anyway, I again hope that we can see support of the BBA feature some day on Nintendont and all together play Phantasy Star Online, Mario Kart and the rest of the games...

tueidj commented 7 years ago

Firstly: Devolution supports forcing progressive on all games (even those that don't support 480i), so lack of native 480p support isn't an issue for it. Secondly: You never emailed me. If you're not just making stuff up you must have emailed the wrong person. Thirdly: If you're going to shit talk someone, probably best not to do it on a thread they were auto-subscribed to (because someone else mentioned them).

briantho commented 7 years ago

hello, tueidj, I didn't realize you were subscribed to this thread, nor on GitHub for that matter. I am also, thankful that devolution has bba emulation in the first place. anyway, I wanted to ask ethier 2 things of you regarding the bba and devolution. 1 if at all possible, idk if you'd ever be willing to share a portion of your source, the one responsible for devolutions bba emulation so it could be incorporated into nintendon't and possibly even be improved. I'm sure everyone here would really appreciate it. I know I would. This would really be great if you did. I don't really know if you will, but I just wanted to ask nicely. If not, i'd like to ask my second question, could you try to improve the bba emulation that is already in devolution, for instance, make it so 2 wii u's or wii's can talk to each other, without the need for a pc or a real bba thrown into the mix. I've read the thread over at gc-forever, regarding devolution bba emulation for Mario kart double dash, and so far from what I've read and tried firsthand, your the only person who managed to get devolution working between wii's wirelessly, without the need for a pc, or real bba. I also, understand that this is semi-complicated stuff, but from my personal experience, I've tried several different brands of wireless routers, ip address ranges, subnets, and settings for the routers, even a direct wired connection, and all would fail to find the other wii, until my pc running dolphin on Ubuntu was put onto the network. Then they would find each other. I don't quite believe this to be a router related issue, and I've tested a handful of times with my wii's and Ubuntu machine, and every time they would fail to find each other, until a properly configured pc running dolphin, was added to the network. If it's at all possible, could you please ethier fix it and improve the bba emulation for devolution, or open source the part of devolution that does the bba emulation, and maybe other people can work on fixing the problem, and further improve the great work you have done. Anywway, it's late where I am, so I'm going to stop, and hope to hear from you soon. Thanks.

tueidj commented 7 years ago

I've tested it hundreds of times with 4 different routers (that I can recall), plus using android phones as wifi hotspots. Never had a problem with wiis not seeing each other. It's not as if all communication is done through one system in a server + clients manner; they all talk directly to each other so obviously the wiis can communicate regardless of a PC being present.

ViiMaster commented 7 years ago

Firstly: I don't care if Devolution forces progressive scanning. I want to use the native option which the developers never game me on the PAL version. I don't even use that option with Nintendont either (see, you're not the only one who wants to do things their way).

Secondly: I've messaged you on GBATEMP a long time ago. You replyed to me with a "No" like I was some kind of disguasting person who you wanted to get away as fast as you could.

Thirdly: I never tried to hide what I wrote from you which is why I wrote it on a project similar to yours. I said:"Devolution is a good project but it is very unfortunate that good projects are sometimes made by people/kids who are selfish and so over their heads (tueidj)."

It is true and I stand on that. If you are not a kid, you certainly act like one! I respect your coding skills and your talents in programming but not your personality. But being a good coder doesn't make you a right person!

Of course you can do whatever you like with your programs and how you want people to use them... You work for the community for free after all and it is completely your choice but don't expect everyone to come up to you and hail you for that!

You don't care about saving Nintendo or the world of videogames from piracy with your DRM on a system which has been dead for such a long time. You are a selfish programmer who only wants to show off through your work, do the things your way and prove that you are better then anyone else in what you do.

tueidj commented 7 years ago

Seems like you managed to make an awful lot of assumptions from a single "no".

ViiMaster commented 7 years ago

I made a lot of assumptions through your work and your posts... Anyway, since this whole conversation is not going to prove anything and nothing good will come out of it, I stop here. Take care...

carnage702 commented 7 years ago

well tueidj wont share his bba code most likely, maybe fix94 someday gets a breakthrough.

briantho commented 7 years ago

ok tueidj, I finally have a log for you to look at. Maybe you can tell me what's going on with devolution. I still get the same results when using my router or my smartphone as an access point. They just never find each other. you sure there's not some secret version, or some unreleased beta of devolution, you've been keen keeping from us? I'm using r266 of devolution with a wii and a wii u on the same network. the results are always the same. the wii and wii u just keep counting down till 0 and then linking error. Anyway, here are my logs one from the wii and one from the wii u, tested at different times. Again the only way I've been able to get linking to work is by putting my Ubuntu machine running dolphin on the network, and then the wii and wii u will find each other, along with the pc running dolphin. why would this be?

mkdd2.txt mkdd.txt

CoolnezX commented 7 years ago

I'd love to see BBA Support added to Nintendont because I always wanted to play Phantasy Star Online on Sylverant.

Secret5 commented 7 years ago

I think BBA support on Nintendont would be somewhat of a game changer for occasions when lots of people get together to enjoy games. Most people who are even vaguely interested in Nintendo games have a Wii (U). Now imagine 16-player Mario Kart Double Dash being so much easier to set up because instead of those specific (out of production) adapters, you can just use any USB based one. It would simply be fantastic. The Wii in general is just such a convenient all-in-one box that this feature would cement this aspect even further. It's probably quite tough to figure this out, but Nintendont has so many features I never thought were possible, I'm inclined to say "sky's the limit" here!

warmonipa commented 6 years ago

any bba/modem feature plan?

Sch1nken commented 6 years ago

Any updates on this one? I've seen there was some work done a few months back (https://github.com/FIX94/Nintendont/blob/3e81dadcfc4b19129f08a947905331f1d45a1b0b/kernel/EXI.h). My Wii Homberew and Hardware knowledge is too limited to be of any help I suppose. I mean if it would be as simple as porting over the Dolphin BBA Code someone would've already done it, right?

GerbilSoft commented 6 years ago

@Sch1nken That work wasn't directly related to BBA, but I guess it could be seen as a prerequisite.

Prior to the addition of Memory Card Slot B support, all of the supported EXI devices (Slot A, Mask ROM, RTC, SRAM, and Triforce-specific) were on EXI Channel 0. Slot B is on Channel 1 (and is the only device on Channel 1), so supporting it required maintaining separate contexts for each channel.

...actually, now that I think about it, Serial Port 1 (which is where the Modem and/or LAN adapter is connected) is on EXI Channel 0, so this didn't really help it directly.

Sch1nken commented 6 years ago

Okay, I'm currently reading through some gamecube documentation (gclinux and gcforever) to try and understand the concept of EXI Devices on the Gamecube.

My wild guess would be, that just barebones implementing the BBA capability (game registers a connected BBA through EXT Interrupt?) would be quite easy and that forwarding these packets to the wii wireless (if possible at all?) or some generic USB Ethernet Device is the hard part?

GerbilSoft commented 6 years ago

There's two ways to implement Modem/BBA:

  1. Hook the SDK functions and bypass the hardware layer entirely. This would allow for high-level packet forwarding, but is more invasive.
  2. Emulate the Modem/BBA hardware using the EXI channels. This requires more low-level work, but would be more compatible and requires fewer patches.

yagcd doesn't seem to have much documentation on how these devices are programmed. Dolphin might.

Sending/receiving packets via the Wii networking libraries is the "easy" part. Mapping it to the BBA hardware is the "hard" part. (Keep in mind that these are relative terms; implementing any of these without causing conflicts elsewhere isn't really "easy".)

GerbilSoft commented 6 years ago

Here's the relevant code from Dolphin: https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.cpp

Note that Dolphin's implementation requires a virtual network adapter, e.g. an OpenVPN adapter, since the emulated system thinks it has its own network adapter all to itself. This obviously wouldn't be a problem on Wii, though it might need some adjustments.

EDIT: Also, that code is not endian-safe, since the BBA uses little-endian internally (which matches most platforms that Dolphin uses). Byteswapping code would need to be added if this is ported to Nintendont.

EDIT 2: Just for the hell of it, I'm going to try porting the Dolphin code over as a stub (with no actual networking support yet) to see what happens.

FIX94 commented 6 years ago

I did at one point try to wrap the SO interface directly to the wii wifi one and got mario kart double dash to netinit and start searching for other players, but for some reason it always froze then for no reason that I could find, at that point I stopped working on it.

FIX94 commented 6 years ago

I guess just so the work I did last year isnt lost, I pushed it up into a separate branch. https://github.com/FIX94/Nintendont/tree/bbatest

GerbilSoft commented 6 years ago

Is it possible to get a raw packet send/receive interface from IOS? It seems like implementing the EXI portion instead of hooking the SDK functions might be an easier method, but that requires being able to handle raw packets.

FIX94 commented 6 years ago

I dont really know a whole lot about all that networking stuff, it was hard enough for me to get any reaction out of it heh. Also that branch above patches the us version of mario kart double dash, you can see lan mode selectable on the main menu and selecting it will send multicast frames over network that you can capture in wireshark. The thing about it sadly though is as soon as you introduce a second console and you try to connect both, mario kart just freezes and thats it, so it clearly sees the other but something then breaks it and I was unable to figure out what.

MWDelaney commented 6 years ago

If it's helpful at all, I know that the actual Gamecube BBA hardware requires a separate, private network hub (and an old 10base-T one at that!). It doesn't work on, like, a home or office network; it needs its own.

So I don't know if you can VLAN or something?

athendrix commented 6 years ago

Not true. I have actual broadband adapters, and I've linked gamecubes to play Mario Kart: Double Dash on a standard home gigabit ethernet network. There was even a program called "Warp Pipe" that would run on a PC and connect Gamecubes over the internet.

FIX94 commented 6 years ago

You just have to have multicast streams allowed in your router settings because the game uses that feature to communicate with other consoles around.

Secret5 commented 6 years ago

What a nice way to start up the new year with some bustling activity here all of a sudden. Even better, you guys are talking about a bunch of stuff I have no clue about, which can only be a good thing in my book. It would be even nicer if I could help at all, but I don't see how. I do have Broadband adapters for the GC myself and did play in LAN mode with friends once, but that's about it.

GerbilSoft commented 6 years ago

I implemented a very basic EXI interface based on Dolphin's code. LAN Mode now shows up on MKDD, but that's about it. There's no actual network connectivity at the moment.

I can't really tell for sure, but it seems that the Wii's network stack doesn't have any way to send/receive raw packets (e.g. promiscuous mode). Hence, the SDK functions would need to be hooked and then the packets reframed. We'd also have to ensure that the Wi-Fi driver is set to receive multicast packets from the required group.

GerbilSoft commented 6 years ago

For reference, here's Dolphin's BBA driver for Linux (using TUN/TAP): https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/Core/HW/EXI/BBA-TAP/TAP_Unix.cpp

GerbilSoft commented 6 years ago

The TUN/TAP method looks like a dead end, since it doesn't look like there's a way to get a raw interface to the network using IOS's network stack.

I'm going to try porting over the IOSInterface code from FIX94's original branch and see if I can figure out what's going on there.

GerbilSoft commented 6 years ago

@FIX94 https://github.com/GerbilSoft/Nintendont/tree/feature/BBA

I didn't update the precompiled build. This has a port of your bbatest branch to the current release. It seems to hang on the "Establishing LAN link..." screen. (Video freezes, but music is still running.)

Previously, with just EXI identification, it wouldn't hang, but it wouldn't connect to anything due to no networking functionality. I was able to exit by pressing B.

I'm pretty sure I screwed something up with porting due to memory address changes and whatnot.

FIX94 commented 6 years ago

with my initial branch it would get past that, wait for other consoles, and when you clicked lan on another console in the same network, it would then freeze up, so I guess you indeed messed something up if it already freezes earlier. I do wish you good luck with trying to figure out what the hell is going on.

ViiMaster commented 6 years ago

Oh my God! There's activity on the BBA side of the project! Thank you guys! :) :) :) 👍 👍 👍

lazareth241 commented 6 years ago

Hey Fix, I remember seeing something about how GameCubes needed to have static IPs when connecting online, when you tested, did you have the IPs dynamic or static when it froze?

Marvin732 commented 6 years ago

Any News to it? It would be awesome if BBA would be added :D

Secret5 commented 6 years ago

I'm going to an event soon where lots of people are bringing all kinds of gaming related things and most likely we'll manage to setup a Double Dash LAN again. And then I'm reminded how much more flexible everything could be if Wiis and Gamecubes could communicate with each other since everyone has a Wii. Maybe that's a future thing to look forward to. To say goodbye to those adapters that cost like 100 bucks these days

toxicvirus1230 commented 6 years ago

BBA support can actually spark up a new online community of MK:DD players; not only for those who want to play locally with multiple TV's and consoles, but also those who have LAN Tunneling software such as Xlink Kai, to be able to play online over the Internet. As of right now, Nintendont is the most awesome GameCube loader ,(especially for those on vWii) and would be twice as awesome if BBA support was added. Would love to see this dream become a reality. And if you guys are currently working on BBA support, please let us know of any updates as most of us here are eager to see. Thanks!