What do I need for WiiU development?

Discussion in 'Wii U - Homebrew' started by shutterbug2000, Sep 8, 2016.

  1. shutterbug2000
    OP

    shutterbug2000 Cubic NINJHAX!

    Member
    1,079
    2,102
    Oct 11, 2014
    United States
    I have devkitPPC installed, what else do I need? I'd imagine there's a WiiU library, but I don't know where :P.
     
    CJB100 likes this.
  2. Logan Pockrus

    Logan Pockrus Knawledge is key.

    Member
    1,339
    1,021
    Jan 1, 2016
    United States
    I'm not exactly an expert when it comes to Wii U development, but I believe libwiiu is what you'll need to build your homebrew (along with devkitPPC, of course). If that isn't the case, well, it's loaded with examples and two kernel exploits, so it's useful anyway. :P

    Here's a link: https://github.com/wiiudev/libwiiu
     
    CJB100 likes this.
  3. shutterbug2000
    OP

    shutterbug2000 Cubic NINJHAX!

    Member
    1,079
    2,102
    Oct 11, 2014
    United States
    Ah ok. I did do a little WiiU development around the time of 5.5.1's release(and the userland exploit) but I forgot what I needed. Thanks!
     
    CJB100 and Logan Pockrus like this.
  4. CreeperMario

    CreeperMario GBAtemp Advanced Fan

    Member
    616
    364
    Jun 18, 2016
    Australia
    OSv10 v15702
    Nowadays, you won't really need libwiiu, unless you want to make homebrew limited to 21.5kb and not have sound.
    The HBL and RPX environments are much more expansive and support many more of the Wii U's features (including sound and >21.5kb binaries).
    See here for an HBL environment example and here for the unofficial RPX build setup.
     
    Coc4tm and josamilu like this.
  5. shinyquagsire23

    shinyquagsire23 SALT/Sm4sh Leak Guy

    Member
    1,964
    3,238
    Nov 18, 2012
    United States
    Las Vegas
    I'd suggest targeting RPX since it can launch from Loadiine and natively, although HBL is easier to do rapid testing with. Porting between the two can be challenging though.
     
  6. Androidmarketuser

    Androidmarketuser Newbie

    Newcomer
    1
    1
    Sep 8, 2016
    Gambia, The
    I suggest looking at some github code, just enter the main method and follow the used methods, find the imports which were needed for them and what they are doing.
    As I'm also trying to get a little bit into it I think it's definately not that easy, especially without broad C knowledge, for example pointers, header files and C linkage.
    I think for the first steps and some unanswered questions @QuarkTheAwesome 's development guide is perfect. By looking at some sources (e.g. https://github.com/QuarkTheAwesome/LiveSynthesisU/) and saerching wiiubrew for the called functions maybe we are able to start own projects someday ;)
     
    CallieMarie likes this.
  7. vgmoose

    vgmoose GBAtemp Regular

    Member
    229
    627
    Jan 31, 2016
    United States
    There are three primary ways to launch homebrew: via Userland (bin/mp4 files), via HBL (elf), and via Loadiine/natively (rpx). There's also two main methods of drawing to the screen: a basic way via OSScreen and a more graphical way with GX2.

    Examples for everything below!!

    Userland
    Examples: Hello World - Pong - C@ve - Snake - Space Game - Tic Tac Toe
    Requirements: libwiiu
    Limitations: No sound, no SD card, no GX2, no global variables, and ~20KB app limit

    HBL elf
    OSScreen Examples: Hello World - Pong - C@ve - Snake - Space Game - Tic Tac Toe - LiveSynthesisU
    GX2 Examples: HBL - Loadiine GX2 - CHIP8 Emulator - Colored Cube - HB App Store
    Requirements: dimok's libogc and portlibs installed to the devkitpro directory
    Limitations: HBL elf format is a touch hacky wrt. to memory, upper limit on ELF size (~5MB?), can't use static libraries (such as the HOME menu pause/resume or browser open url)

    Native RPX / Loadiine
    Examples: Hello World - Pong - Space Game - Colored Cube - GX2texture2d
    Requirements: decaf-emu/wut configured
    Limitations: toolchain (wut) is still in development, otherwise has normal app access as far as the RPX loading mechanism permits

    Everything above requires devkitppc to be setup as well.

    Personally, I started with Userland and the Pong example, but I might recommend starting with one of the HBL examples because developing with HBL is a bit quicker. Developing for RPX would be preferred but starting with Userland or HBL may be better to start with for learning experience.

    I also recommend paying close attention to the Hello World, Pong, and Space Game examples up above, as you can compare the different versions to see how the difference between Userland/HBL/RPX looks in code. Also don't shy away from asking questions if you get stuck on anything!

    EDIT: also, I'm no expert-- all my knowledge is ad-hoc, so anyone please correct me if I'm wrong on any info in this post
     
    Last edited by vgmoose, Sep 8, 2016
    Coc4tm, PF2M, CallieMarie and 7 others like this.
  8. QuarkTheAwesome

    QuarkTheAwesome Working for Hugs

    Member
    808
    1,989
    Apr 19, 2015
    Australia
    Stuck in the PowerPC
    Ahh, userland... No global variables was a fun one. You'd just get a random value from memory instead of your variable.
    I'm not sure I'd call LiveSynthesisU an OSScreen example; yeah, it uses OSScreen, but it's more focused on audio. Other than that, great post @vgmoose! Pretty much covered everything.
     
    CJB100, CreeperMario and KiiWii like this.
  9. pwsincd

    pwsincd Garage Flower

    Member
    3,337
    1,732
    Dec 4, 2011
    Manchester UK
    excellent post.
     
    Last edited by pwsincd, Sep 8, 2016
    CJB100 and CreeperMario like this.
  10. Logan Pockrus

    Logan Pockrus Knawledge is key.

    Member
    1,339
    1,021
    Jan 1, 2016
    United States
    Oh, sorry. I've been out of the loop for a while....
     
  11. shutterbug2000
    OP

    shutterbug2000 Cubic NINJHAX!

    Member
    1,079
    2,102
    Oct 11, 2014
    United States
    So, if I'm wanting to port an emulator, GX2 + HBL/RPX would be my best bet? Any information on GX2? :)
     
  12. CreeperMario

    CreeperMario GBAtemp Advanced Fan

    Member
    616
    364
    Jun 18, 2016
    Australia
    OSv10 v15702
    @brienj is our resident GX2 expert, but he seems to have gone missing. I have no idea how it works, though you may wish to try asking @Maschell or @dimok for help (if they have time). @dimok also released a 3D cube demo that utilises GX2, search the forums to find it. You can also refer to the Homebrew Launcher, Loadiine GX2, the Homebrew App Store, or if you want a base to start emulation on, check out the CHIP-8 emulator.
     
  13. vgmoose

    vgmoose GBAtemp Regular

    Member
    229
    627
    Jan 31, 2016
    United States
    For GX2 + RPX, I'd check out @shinyquagsire23 's port of dimok's Colored Cube and custom GX2texture2d projects.

    As for a GX2 emulator, as @CreeperMario said, see the readme @brienj wrote here.

    @brienj ported @rw-r-r_0644 's CHIP8 emulator to GX2 and also made a lovely emulator frame, seen below:


    He was able to then use the code for that frame to quickly produce a gameboy emulator, which as you can see looks similar:


    The frame (loading+GX2 parts) of those emulators looks like this in Application.cpp, and then they delegate to a C file for their emulation "core" for the actual emulation.

    I've listed a lot of names/examples to look at and learn from, but if your goal is to make a GX2 emulator, then you should totally take a look a the CHIP8 emulator and play with it. CHIP8 roms are actually free to download, so playing with that may be the quickest way to port another emulator!
     
    CreeperMario likes this.
  14. shutterbug2000
    OP

    shutterbug2000 Cubic NINJHAX!

    Member
    1,079
    2,102
    Oct 11, 2014
    United States
    Ok, seems nice! I've done some with chip8 before, so I have experience with that system. I'll look into that! Thanks for your help! :D
     
    rw-r-r_0644, CreeperMario and vgmoose like this.
  15. brienj

    brienj Trying to avoid getting cancer

    Member
    1,232
    1,705
    Jan 3, 2016
    United States
    All I did was utilize what @dimok made. He made very easy to use classes for making a GUI app in GX2, and I changed it a bit so you could refresh one of the GUI elements with your own memory array.