Hacking Coding vWii 3-core support - everything you need to know.

Maxternal

Peanut Gallery Spokesman
OP
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Gotcha. With that said, what can I, a newbie, do to learn more about programming (i.e more specifically this crap about ASM, C, Linux)?
First step, I'd go find some C tutorials on the Internet. Once you've completed the whole thing (and maybe multiple tutorials at the same time to make sure it's complete enough) Then I'd try writing some of your own programs (and the internet is still your friend refreshing what you learned or just looking up things the tutorials didn't cover.) Once You've tackled C, Linux is the next thing of those 3 on the list but you might still want to do some more looking things up first. Understanding someone else's code is always rather difficult at first and more so with something as complicated as an OS. There are a lot of general concepts you might want to learn about first and some concepts you might have a hard time learning about off of the Internet. You might have to hunt down some text books, unfortunately. If you know of any University web sites that have web pages about specific courses you might use as a guide there. I'd say save ASM for last ... but you'll probably keep learning one thing while you move onto another so there's no real clear order to it.

(and this I'm writing off the seat of my pants so take it as just my guess of the best way to go about it for a crash course)
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
First step, I'd go find some C tutorials on the Internet. Once you've completed the whole thing (and maybe multiple tutorials at the same time to make sure it's complete enough) Then I'd try writing some of your own programs (and the internet is still your friend refreshing what you learned or just looking up things the tutorials didn't cover.) Once You've tackled C, Linux is the next thing of those 3 on the list but you might still want to do some more looking things up first. Understanding someone else's code is always rather difficult at first and more so with something as complicated as an OS. There are a lot of general concepts you might want to learn about first and some concepts you might have a hard time learning about off of the Internet. You might have to hunt down some text books, unfortunately. If you know of any University web sites that have web pages about specific courses you might use as a guide there. I'd say save ASM for last ... but you'll probably keep learning one thing while you move onto another so there's no real clear order to it.

(and this I'm writing off the seat of my pants so take it as just my guess of the best way to go about it for a crash course)


Funny you should mention online curriculum as my CS class has a wiki for learning C# and links to other resources, to there is that. While it's not pure C, I heard it's a good way to introduce one into learning C eventually. Just one step at a time is the best approach for me; as for being able to eventually contribute something, I owe you guy that much after incessantly bitching ;)
 

crono141

Well-Known Member
Member
Joined
Jan 7, 2012
Messages
249
Trophies
0
XP
205
Country
United States
The other issue I believe we have with attracting developer support is that 1) we have no guarantee that a wiiu level exploit will be released, and given (1) that 2) 88mb of ram is the limiting resource in vWii, not the processors. There's simply nothing (or very little) to get excited about a 3 core capable vWii without also getting access to more RAM. I ran OtherOS on PS3 for the brief period that sony allowed it, and it was almost completely useless with 256mb of ram, with a further 256mb of swap from the dedicated vram.

If there could be a way to expose some of the WiiU ram to vWii, there might be more people attracted to this project. I get the feeling this might be possible from the WiiU side of the equation, bu f0f has clearly expressed their lack of interest in doing any of that sort of work themselves. Again, chicken and egg.

This does bring me another thought, however. I wonder how much work it would be to make the needed modifications to the WiiU side that would expose its hardware to the vWii. Then attack further homebrew from the vWii with enhanced iOSes aware of the wider hardware. In essence, altering the virtual machine to allow greater capabilities. This would allow greater resources to homebrewers while at the same time limiting haxxors ability to pirate WiiU stuff.

I also believe that moving development threads off of GBAtemp would be constructive. Given the way other volunteers have been treated by this community, I don't blame others for not wanting to get involved and expose themselves to the entitled vitriol this place generates. There is currently no hype here around the WiiU, and that's partial because anytime someone asks "could X happen" they are immediately shut down with "no", usually followed by "stfu noob" or some reasonable facsimile thereof. The community has no idea what a WiiU level hack will allow, to the point where we can't even imagine what it would allow. Some of the greatest tricks on the Wii didn't happen until long after the initial exploit was exposed. DIOS MIOS was supposed to be impossible, until months after its source was released and new ideas got involved. Now it exists. For years people said it was impossible to use classic contollers on gamecube games, and then Devolution happened, again years after the first exploit.

You can't predict how a homebrew community may or may not organically rise. I have no idea how to go about reverse engineering the WiiU OS, even if I had access. And I bet there are tons of hackers who are active now who had no idea how to reverse engineer the gamecube when its first exploits were revealed, but once the exploit was made available they looked into it, became curious, started tinkering, and made things work. We have libogc now because of kids in their bedrooms tinkering. Some of those kids might even be f0f members now. Would any of that have happened if the gamecube exploits were kept secret until interest in homebrew reached an arbitrary threshold? I think not. Did piracy happen on the GC early on? It sure did. But that didn't stop the small minority of hackers who had little interest in the piracy and more interest in making new hardware do new tricks. It also didn't bury the Gamecube commercially (Nintendo did that all on their own).

Even f0f example of the PS3, homebrew wasteland that it is, has increased signs of life the more time that goes by. MultiMan might primarily be a tool for launching backups, but its has other features including a place to download retroarch and other emulators from. I think I read recently that the open source PS3 sdk has had several major updates. Before multiman dominated the scene there were lots of ports like mednafen. And then there's the showtime multimedia browser. NTFS support has been written in. And this is the PS3 scene, which many consider to be the absolute worst example of homebrew on a console. Things are happening.

Release of the WiiU exploit will crack open the floodgates. It might result in mostly piracy early on, but what console exploit doesn't. The homebrew will happen, especially given the potential the second screen will afford. imagine XBMC that you can launch and control straight from the gamepad. Imagine a DS emulator that is actually true to the DS experience. Imagine a twitchtv app to do what Nintendon't! That type of innovation has always been the purpose of cracking proprietary hardware, hasn't it? To make the hardware do things that the corporate suits deemed unsuitable or didn't think of at all.

WiiU deserves that chance. The WiiU community deserves a chance to exist. 30+ people hold the key, but are all disinterested. Give the key to an interested party and see what starts happening.
 
  • Like
Reactions: pelago and mcchase

grossaffe

Well-Known Member
Member
Joined
May 5, 2013
Messages
3,007
Trophies
0
XP
2,799
Country
United States
First step, I'd go find some C tutorials on the Internet. Once you've completed the whole thing (and maybe multiple tutorials at the same time to make sure it's complete enough) Then I'd try writing some of your own programs (and the internet is still your friend refreshing what you learned or just looking up things the tutorials didn't cover.) Once You've tackled C, Linux is the next thing of those 3 on the list but you might still want to do some more looking things up first. Understanding someone else's code is always rather difficult at first and more so with something as complicated as an OS. There are a lot of general concepts you might want to learn about first and some concepts you might have a hard time learning about off of the Internet. You might have to hunt down some text books, unfortunately. If you know of any University web sites that have web pages about specific courses you might use as a guide there. I'd say save ASM for last ... but you'll probably keep learning one thing while you move onto another so there's no real clear order to it.

(and this I'm writing off the seat of my pants so take it as just my guess of the best way to go about it for a crash course)
So what about someone who's quite comfortable with C, done some work in assembly, and has had a little bit of kernel exposure through a course in device drivers?
 

Maxternal

Peanut Gallery Spokesman
OP
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
So what about someone who's quite comfortable with C, done some work in assembly, and has had a little bit of kernel exposure through a course in device drivers?
Take a look at our googlecode site to see what we've gotten so far then grab a copy of Wii Linux and get working at it :P
(and if you need any further explanation on anything I've written personally, hit me up on IRC, #vWii on EFNet ... if you need to talk to any real experts, there's always #wiidev and #wiiudev on that same network. Wiibrew.org is also your friend)
Just getting a good idea of what makes an OS tick might be all you'd need now, but you're pretty well good to go there.
 

grossaffe

Well-Known Member
Member
Joined
May 5, 2013
Messages
3,007
Trophies
0
XP
2,799
Country
United States
Funny you should mention online curriculum as my CS class has a wiki for learning C# and links to other resources, to there is that. While it's not pure C, I heard it's a good way to introduce one into learning C eventually. Just one step at a time is the best approach for me; as for being able to eventually contribute something, I owe you guy that much after incessantly bitching ;)

You're probably better of jumping straight into C. Unless someone wants to tell me otherwise, I don't think going C# down to C is going to be any easier as C# is pretty much a super language of C, so there's more to learn and then you have to throw out some of that to get down to what you can do with C. May as well just jump straight in and just go for it.

Take a look at our googlecode site to see what we've gotten so far then grab a copy of Wii Linux and get working at it :P
(and if you need any further explanation on anything I've written personally, hit me up on IRC, #vWii on EFNet ... if you need to talk to any real experts, there's always #wiidev and #wiiudev on that same network Wiibrew.org is also your friend)
just getting a good idea of what makes an OS tick might be all you'd need now.
I'll definitely look into it. Worst comes to worst, I should have heavy immersion into the kernel by this time next year as I'll be taking an operating systems class as I'm finishing up my degree, but I don't know how much free time I'll have as I'm trying to get out into the real world.
 

Maxternal

Peanut Gallery Spokesman
OP
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
...had a little bit of kernel exposure through a course in device drivers?
Actually, now that I think of it (since you mentioned drivers) the current Wii Linux does not support the Wii U's new WiFi or Bluetooth adapter. That could also be something to look into.
 

Ray Lewis

Banned!
Banned
Joined
Dec 30, 2012
Messages
1,518
Trophies
0
XP
419
Country
United States
I support Maxternal. Right now it appears that with time Maxternal will eventually get 3 cores, but he needs experts for smp. That is where this will end per Marcan. Marcan likely meant highly skilled people as to have some build and maintain the "ecosystem.". Not sure if 30c3 will draw interest.

No offense to anyone but smp and the rest Marcan mentioned is complex. At least for those looking to learn programming. No offense guys. Probably fun to learn though. Some came talking a great game but disappeared. Lost interest and possibly exaggerated their skills. Even with three cores, smp, what about ram? Gpu is proprietary also. Basically being told to create os without access to emmc or Wii U disc drive and do it from scratch.

I've re-read this to be sure nothing is flaming or off topic. Right now, Maxternal needs real experts. So, somebody aside from f0f will hack this or people press on knowing Marcan does not see the talent he believes is needed. Marcan knows he clearly said three cores with smp is the goal. He hacked it, his game, his control, and so goal post moving is his prerogative. No amount of flaming will change this.
 

jammybudga777

Well-Known Member
Member
Joined
Aug 23, 2013
Messages
2,284
Trophies
1
Age
37
XP
2,193
Country
thats a good point about devo and i wonder if the same could be approached with an exploit that blocks piracy (i no others would try to take and break it apart). maybe this isn't such a good example but a team like COBRA for ps3 which released a dongle set with security keys on it which im sure allowed you to play ps1/psp games and cant remember but maybe some ps2 games.
also i would be interested in learning C language if i can find some proper information and guides to help along the way. i have no experience and i no anythin i do/learn will come of no use yet. but like someone else pointed out (i think in marcan's post) this is how a homebrew scene is developed by people taking part/learning and showing a good interest in the homebrew ecosystem
 

marcan_troll

Well-Known Member
Member
Joined
Sep 30, 2009
Messages
133
Trophies
0
XP
519
Country
United States
MAYBE if you have it do just SOME of what happens when you go into vWii mode and permanently shut down some of the key hardware needed for games
(I'm sure you'd still have people able to reverse engineer YOUR app, though, and take that part out so that they could use it for piracy.)


We were actually hoping to be able to do the opposite - undo vWii mode enough to get most of the Wii U features back without enabling piracy (because the crypto stuff is permanently locked out in vWii mode, but parts of the rest of the sandbox are leaky). Nintendo actually forgot to remove the debug information from their Wii U to vWii mode launcher, so that's one of the parts of the system that we know the most about (thanks Nintendo!). Unfortunately, it isn't leaky enough; they locked out a register needed to reinitialize all of the Wii U hardware.

This would've been a win-win for everyone, had it been possible: no chance of piracy, full non-game non-CafeOS homebrew, and no reason not to release everything from the get go, plus we get to play from the vWii sandbox mode which we have plenty of exploits for and which Nintendo is less likely to care about or patch. It's too bad that didn't work out.

It would be possible to go from Wii U mode to a "homebrew mode", a la Other OS, where only the crypto/security stuff is permanently locked out but the rest of the Wii U hardware is enabled. Obviously if we were to do that via exploit, it would be pretty easy to reverse engineer it and just not do the lockdown part. This would only be practical if Nintendo implemented it as an "official" homebrew mode.

As for libogc, forget about it. Literally the only useful bits of libogc in Wii U bare metal mode are perhaps the DSP and audio drivers and that's it. Everything else is completely different in the Wii U. And that would be bare metal (and libogc can't handle multicore). Under Cafe OS, libogc is 100% useless. Linux is a much better bet because it can reasonably replace Cafe OS without an impractical amount of effort (though it's still a lot of effort).
 
D

Deletedmember331810

Guest
We were actually hoping to be able to do the opposite - undo vWii mode enough to get most of the Wii U features back without enabling piracy (because the crypto stuff is permanently locked out in vWii mode, but parts of the rest of the sandbox are leaky). Nintendo actually forgot to remove the debug information from their Wii U to vWii mode launcher, so that's one of the parts of the system that we know the most about (thanks Nintendo!). Unfortunately, it isn't leaky enough; they locked out a register needed to reinitialize all of the Wii U hardware.

This would've been a win-win for everyone, had it been possible: no chance of piracy, full non-game non-CafeOS homebrew, and no reason not to release everything from the get go, plus we get to play from the vWii sandbox mode which we have plenty of exploits for and which Nintendo is less likely to care about or patch. It's too bad that didn't work out.

It would be possible to go from Wii U mode to a "homebrew mode", a la Other OS, where only the crypto/security stuff is permanently locked out but the rest of the Wii U hardware is enabled. Obviously if we were to do that via exploit, it would be pretty easy to reverse engineer it and just not do the lockdown part. This would only be practical if Nintendo implemented it as an "official" homebrew mode.

As for libogc, forget about it. Literally the only useful bits of libogc in Wii U bare metal mode are perhaps the DSP and audio drivers and that's it. Everything else is completely different in the Wii U. And that would be bare metal (and libogc can't handle multicore). Under Cafe OS, libogc is 100% useless. Linux is a much better bet because it can reasonably replace Cafe OS without an impractical amount of effort (though it's still a lot of effort).


See, this is more like it... I'll leave it at that...
 
  • Like
Reactions: Maxternal

crono141

Well-Known Member
Member
Joined
Jan 7, 2012
Messages
249
Trophies
0
XP
205
Country
United States
Since you have a hack, can you dump CafeOS and feed it to an emulator? This is a slightly different angle, but I'm also slightly curious how much the dolphin emulator would have to be altered to run WiiU code. Having an emulator for the hardware would also make developing homebrew a little less painful, I think.
 

crono141

Well-Known Member
Member
Joined
Jan 7, 2012
Messages
249
Trophies
0
XP
205
Country
United States
. Linux is a much better bet because it can reasonably replace Cafe OS without an impractical amount of effort (though it's still a lot of effort).

By "replace", do you mean that it would turn a WiiU into a LiinuxU (how about LiiU:lol:) exclusively? Because I have literally no interest in replacing Cafe OS (and removing my ability to play Nintendo games from disk/ROM). I would be much more interested in a homebrew mode, like you mention. Essentially our own vWii.

Thanks for sharing like you have been this thread and answering questions.
 

marcan_troll

Well-Known Member
Member
Joined
Sep 30, 2009
Messages
133
Trophies
0
XP
519
Country
United States
Since you have a hack, can you dump CafeOS and feed it to an emulator? This is a slightly different angle, but I'm also slightly curious how much the dolphin emulator would have to be altered to run WiiU code. Having an emulator for the hardware would also make developing homebrew a little less painful, I think.

It's an entirely new GPU, a completely different (and significantly larger) IOS, and they actually use the PPC's MMU properly with full page tables (which last I checked Dolphin doesn't support). Not gonna work without a lot of effort.

By "replace", do you mean that it would turn a WiiU into a LiinuxU (how about LiiU:lol:) exclusively? Because I have literally no interest in replacing Cafe OS (and removing my ability to play Nintendo games from disk/ROM). I would be much more interested in a homebrew mode, like you mention. Essentially our own vWii.

No. Replace as in substitute for. In RAM.
 
  • Like
Reactions: pelago and crono141

crono141

Well-Known Member
Member
Joined
Jan 7, 2012
Messages
249
Trophies
0
XP
205
Country
United States
So does the vWii have an original Wii GPU in hardware, or does the WiiU GPU fully support the old GPU instruction set?
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
The wiiu gpu can drive a dual screen. One is your tv set and the other is the gamepad. Since the latest firmware is capable of using the gamepad as vwii display, it looks like they can remap the gpu that vwii mode is using. I doubt it has an original gpu in hardware. In such case they should need a video switch that can switch both video outputs 2 wiiu gpu or vwii gpu. The registers used to select the video output in vwii mode are probably locked out once we run vwii mode. Otherwise they could have build something into switch from tv to gamepad while in vwi mode. But honestly, I really wouldn't know.
 

delroth

Well-Known Member
Newcomer
Joined
Nov 19, 2013
Messages
45
Trophies
0
Age
30
XP
296
Country
Swaziland
As an ex Dolphin developer, nobody sane would reuse Dolphin's code to try and emulate the Wii U. Dolphin is made to work with some assumptions that work on GC and Wii (well, kinda, not for all games - call me when Toy Story 3 runs at a decent speed on Dolphin) and that just don't work on Wii U.

As far as I know, the Wii U contains a Wii GPU to run vWii games - it's not emulated on the Radeon GPU. To use the gamepad as vWii display Nintendo modified the firmware of the chip that emulates the Wii VI (Video Interface) to make it output to both the normal screen and the output head that is connected to the DRH. It's still not using the Wii U GPU for graphics computations.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Interesting. That means that we won't be able to use existing radeon driver code for our vwii 3 core linux.
If ever we would have a wiiu 3 core linux, that would need a different video driver.
Currently it's using a frame buffer setup which is fine for a normal x window graphic environment but likely won't be for games under linux.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: or fucking Clu Clu Land for that matter