Question about Wii U Emulation

Discussion in 'Wii U - Hacking & Backup Loaders' started by Noctosphere, Oct 4, 2015.

  1. Noctosphere
    OP

    Noctosphere Adoptive father of my kitty named Zelda

    Member
    10
    GBAtemp Patron
    Noctosphere is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Dec 30, 2013
    Canada
    Back with kitty Zelda forever :D
    also whats the difference between thread and core? my cpu is tetracore and octothread
     
  2. mutinize

    mutinize dazed and confused

    Member
    3
    Jan 17, 2014
    United States
    Okay look I see you posting a bunch about clocks speeds, threads, cores, etc. What processor do you have. AMD or Intel. What video card do you have. AMD, Nvidia, or integrated. Typically emulation relies on the single thread performance of a CPU (that GHz label) and performs ... lackluster to say the least on AMD CPUs. Sometimes you can pass shit off onto the GPU (video card) to improve performance but if (big if) this emulator is legit I'm expecting it to be bare bones and poorly optimized for now. There is no "magic conversion rate" to emulators, some are very well optimized (dolphin) and can run on low specs and some are not which require a higher amount of resources.

    Also you're just going to confuse yourself if you keep asking questions here. People are accurate but this is not the place for it. There are literally thousands of webpages on the internet dedicated to teaching you about these things.

    Thank you for the video. Between that and the artifacting in the previous images I'm starting suspect this is actually happening. Which would be absolutely amazing. Now make the gamepad work on PC ;)

    Dolphin has GCN and Wii support because their architecture is so similar they are basically the same console from an operating standpoint. The Wii to Wii U is such a difference in how they operate (night and day) that there's no chance of it being bundled into Dolphin unless someone is starting over from scratch. And at that point it might as well be a new thing.
     
    Last edited by mutinize, Oct 6, 2015
  3. Bahax FZ

    Bahax FZ GBAtemp Regular

    Member
    4
    Oct 31, 2013
    Brazil
    Duplicated.
     
    Last edited by Bahax FZ, Oct 6, 2015
  4. Bahax FZ

    Bahax FZ GBAtemp Regular

    Member
    4
    Oct 31, 2013
    Brazil
    I love you.
     
    Last edited by Bahax FZ, Oct 6, 2015
    Exzap likes this.
  5. oumoumad

    oumoumad GBAtemp Advanced Fan

    Member
    6
    Apr 20, 2015
    France
    It is legit, you can see that he has some image problems maybe in alpha channel, when you look at the trees in SMBU : https://imgur.com/a/t53lB

    So I definitely believe him, and I hope his goal for a release late this month will workout well.
     
    AboodXD and fossi like this.
  6. TecXero

    TecXero Technovert

    Member
    6
    Apr 13, 2014
    United States
    Mainframe
    That's not hard to fake, just need gimp, basic photo editing skills, and a basic knowledge of how images are displaying and effects rendered.
     
  7. neobrain

    neobrain -

    Member
    5
    Apr 25, 2014
    That sounds familiar, huh ;)

    Good luck on the project, I suppose :)
     
  8. oumoumad

    oumoumad GBAtemp Advanced Fan

    Member
    6
    Apr 20, 2015
    France
    I no think someone would bother that much to actually separate each layer just to make them look as if he had a problem with the alpha channel... Just at the end to make a couple people believe him :)
    I am a vfx artist, and no, it doesn't require JUST basic knowledge with GIMP to be able to separate layers very well and clean that way.
     
    AboodXD, VinsCool, mutinize and 2 others like this.
  9. TecXero

    TecXero Technovert

    Member
    6
    Apr 13, 2014
    United States
    Mainframe
    He could directly edit the rendered image, he wouldn't have to edit the layers beforehand. Just a screenshot and editing that screenshot. It's not uncommon for people to go that far for a bit of internet fame, assuming it's that innocent. There have been worse cases where someone has led people on with convincing screenshots (even sometimes some really well done video, but that's rare) then finally release the "emulator" later, which just turns out to be malware or something else malicious.

    I'm just saying remain skeptical until it's out and working.
     
    Last edited by TecXero, Oct 6, 2015
  10. mustafag32g

    mustafag32g GBAtemp Advanced Fan

    Member
    6
    Jul 30, 2014
    Argentina
    Is the wii U fully documented in the wiki or what? How the hell could one man suddenly emulate a wii U and make it run a game ?

    Ci
     
  11. oumoumad

    oumoumad GBAtemp Advanced Fan

    Member
    6
    Apr 20, 2015
    France
    It's up to you to be skeptical or not ^^ it doesn't change anything anyway.
    For me I don't really have a reason to be skeptical and also I really really don't think someone would take that much effort and work hours tracing every single thing the same way very clean,pixel exact and change the colors and separate them and also faking the aliasing JUST so he can get some temporal fame from few people :). Also from his comments, the guy knows what he's talking about when it comes to technical information about Wii U :

     
  12. mustafag32g

    mustafag32g GBAtemp Advanced Fan

    Member
    6
    Jul 30, 2014
    Argentina
    Reveal more pictures please :D ! I would like to see how sm 3d world looks like1
     
    Bahax FZ, Margen67 and Simonwayneee like this.
  13. TotalInsanity4

    TotalInsanity4 GBAtemp Supreme Overlord

    Member
    19
    Dec 1, 2014
    United States
    Under a rock
    Given that it's a full 3D rendered game and not 2.5D like the others shown, probably like sh*t lol
     
    Margen67 likes this.
  14. Hykem

    Hykem GBAtemp Regular

    Member
    10
    May 22, 2014
    To be honest, I've seen much more elaborated hoaxes than this.
    I'm also surprised that no one mentioned that he/she could very well be running the games on a real Wii U and making random changes in RAM to cause glitches and graphical bugs. Especially taking into account the author's alleged involvement in WarCraft and StarCraft hacks: https://web.archive.org/web/2010112...ums/f25/[warcraft-iii]-wutil-maphack-365.html

    Anyway, this is something extremely easy to prove and no source or proof of this "emulator" is even necessary. Considering that @Exzap is, currently, the sole developer of this project, it's logical to deduce that he/she must know the CafeOS kernel inside out, right? It's impossible to take the HLE approach without knowing every detail of what we are trying to emulate.
    Well, what better piece of evidence could be provided than a nice write-up or even just a few reverse-engineered functions from the kernel? It's all public knowledge and no piece of said "emulator" would have to be shared.
    At the same time, the author would be verifying his/hers claims without the need of posting more pictures or footage.
     
  15. oumoumad

    oumoumad GBAtemp Advanced Fan

    Member
    6
    Apr 20, 2015
    France
    Reasonable enough ^^. As the guy said, we'll see soon :)
     
  16. gamesquest1

    gamesquest1 Nabnut

    Moderator
    21
    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 23, 2013
    tbh i was actually thinking....that looks like the windwaker gecko codes you can add a whole bunch of weirdness via gecko.....plus its very odd he went from
    to him being the only developer.....why would you hear something if your the only dev working on it unless you talk to yourself about your planned release date
     
  17. Exzap

    Exzap GBAtemp Regular

    Member
    8
    Sep 19, 2015
    Netherlands
    SMW3D doesn't run yet, it crashes on boot.

    Just a disclaimer since I have noticed people started to hype this up. Don't expect too much from the first release. The three screenshots I posted were cherry picked from the few games that actually run trough the intro, none of them goes ingame yet.

    Yeah that would be the logical conclusion, but in practice thats not the case. I'll give you an example:

    coreinit.FSOpenFile(Async) can be implemented without even looking at the assembly. You can guess the relevant parameters and ignore the not-so-important ones (like FSClient* and FSCmdBlock*). Needless to say, implementing it this way is inaccurate, but almost all games don't care about that. How should they even be able to tell whats going on internally? That being said, I prefer reimplementing stuff 1:1 in HLE if the advantages outweigh the additional time cost.
    There are dozens of other such cases, I have a rough understanding of the whole system, but no particular in-depth knowledge on any of the components. It's simply not necessary at this point.

    Have some random code instead:
    GX2 color control and related code (API side only)
    Some hacky Mii stuff. Games crash if Mii data is invalid.
    I know you would prefer to see kernel code, but except the hacky, ugly and unpresentable threading code there is no kernel related code. Systemcalls are not emulated yet. Stuff like interrupts, MMU and memory-mapped I/O are not emulated because applications run in userspace and not supporting these features can boost performance a lot.

    I was trying to be nebulous for the fun of it. It backfired so I decided to stick to the facts.
     
    Last edited by Exzap, Oct 6, 2015
    AboodXD, Margen67, VinsCool and 4 others like this.
  18. ExJam

    ExJam Newbie

    Newcomer
    1
    Jun 8, 2015
    Did you actually need to make async fs calls asynchronous? ATM I just call the the callback instantly from within the function but I'm worried that might run into issues later with locks in the callers code or something :D
    https://github.com/exjam/wiiu-emu/blob/master/src/modules/coreinit/coreinit_fs.cpp#L344-L365

    It's interesting that you bother with emulating the GPU register and command buffers. Is there any particular reason you took this approach over just directly mapping stuff to dx/opengl calls? Seems like a waste of effort to try replicate the buffers exactly when you end up translating the calls anyway. Our GX2 stuff is super early in progress but for example we just translate it directly: (for display lists we will just use dx12 command lists anyway so this works fine)
    https://github.com/exjam/wiiu-emu/blob/master/src/modules/gx2/dx12/gx2dx12_draw.cpp#L17-L31
    https://github.com/exjam/wiiu-emu/blob/master/src/modules/gx2/dx12/gx2dx12_display.cpp#L206-L231

    How are you handling shaders? Are you decompiling them with proper control flow like if statements & while loops and such, or just keeping it simple for now?

    How did you manage to do 1 thread for all 3 cores, surely switching between the threads is a nightmare! We use a host fiber per WiiU thread, and a host thread per WiiU core, I highly recommend that approach ;).

    ps. you should open source your code ;)
     
    Margen67, Simonwayneee and oumoumad like this.
  19. Exzap

    Exzap GBAtemp Regular

    Member
    8
    Sep 19, 2015
    Netherlands
    @ExJam
    For a majority of games it shouldn't matter if FS callbacks are done instantly or delayed. I handle them asynchronously because there is no reliable way to do PPC callbacks inside HLE functions in my interpreter implementation.

    I don't know much about DX12 but OpenGL doesn't have command buffers, at least not in a way that would be useful. But that's not the real issue. When I started working on the GX2 functions I was worried that games could compile display lists offline and submit them via GX2CallDisplayList/GX2CopyDisplayList/etc. Not very fun to handle. Turns out, this isn't just a theoretical problem. Nintendo added functions and tools for exactly that. I know Yoshi's Woolly World uses it. Look for GX2PatchDisplayList() in the most recent gx2.rpl.
    Additionally, what if you encounter commands which can not be translated to DX12's command buffers? It seems risky enough to be worth the extra mile.
    Btw. the open source AMD driver in the mesa library contains lots of functions, constants and register offsets which match with GX2/GPU7. There is no need to reverse engineer everything from scratch.

    Regarding shaders, our r700 Assembly -> GLSL converter makes a lot of assumptions. It ignores the whole control-flow stack thing and just assumes that JUMP instructions are part of a if or loop and that there is a PRED instruction just above which defines the condition. One of the bigger problems is that GLSL doesn't properly support integer and float types in the same variable, unlike the input assembly. But luckily there exists intBitsToFloat() and floatBitsToInt() in GLSL and we use it heavily. The output for a medium-complex vertex shader looks like this. It's disgusting enough to trigger bugs on older NVidia drivers and produces random output on Intel drivers. Untested on AMD hardware.

    Lastly, I tried switching to Fibers not too long ago. But it was a debugging nightmare. Maybe I'll give it a try sometime again.
     
    Last edited by Exzap, Oct 6, 2015
    Vel0cityX, Margen67 and Simonwayneee like this.
  20. Bahax FZ

    Bahax FZ GBAtemp Regular

    Member
    4
    Oct 31, 2013
    Brazil
    @Exzap

    What games in its current build, runs at least the intro? besides you can post more videos of other games? (New Mario Bros U, DK Tropical Freeze for example, in the current build). With fraps showing the fps in realtime. Would be quite interesting and exciting, in addition to increasing your credibility. ;)
     
    Last edited by Bahax FZ, Oct 7, 2015
    Margen67 and Simonwayneee like this.
Loading...