Homebrew WiiU Homebrew Development

PR0r

Well-Known Member
Member
Joined
Jun 28, 2009
Messages
114
Trophies
0
XP
281
Country
Just wondering if anyone has made an FTP homebrew yet? If not, would this require kernel level access or could it be pulled off within userland?
 

memomo

( ͡° ͜ʖ ͡°)
Member
Joined
Nov 30, 2013
Messages
1,079
Trophies
0
Age
31
XP
750
Country
Thank you.
Maybe we could make this thread the main WiiU Homebrew development thread, like we have on 3DS homebrew section.

The other wiiU hacking thread is for the hack development discussion, it's old and have a lot of old informations, not only related to homebrew development.
Having a specific place where developers could share homebrew and ask for help to develop their own homebrew is a good idea to me.

I thought creating such a thread would be a good idea, but we needed someone to create a tutorial on first post, and you did !
I'll rename your thread, if you don't mind, and put it in sticky.

Can we have a separated section for homebrew just like the 3ds
 
Last edited by memomo,

brienj

Trying to avoid getting cancer
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
I was working for a while on trying to do sound in my game. If I try to get a handle to sounduser2.rpl the Wii U screen gets messed up, and trying to use any functions from it results in it locking up. If I use sounduser.rpl instead, getting a handle will work fine, graphics are still fine, yet when you use any type of function from it, the Wii U locks up. Anyone know if it is just a memory issue, or is it just not able to ever be done on 5.5 until there is kernel or IOSU access available? I was also having a few issues using the zlib library rpl as well, which may be related to memory, but I made my own RLE type encoding library which is compressing my images enough that I don't need zlib anyway. I don't even need to compress the files, it's just nicer having an elf image that is around 100k in size, instead of over 500k. :D

I plan to add a few coloring book type images to U-Paint after I get everything in Ast-U-Roids all finished. It will be good for kids to use, although I should just wait until I finish the ability to save and load pictures from a PC server. My only problem with that, is that if the Wii U does not successfully connect to a server, it will lock up, even if I clean everything up if it doesn't connect. It's probably an issue with the coding, I will just work on that some more in the future.
 

Blackspoon

Active Member
Newcomer
Joined
Feb 19, 2016
Messages
31
Trophies
0
Age
31
Location
next to the blackfork
XP
152
Country
Gambia, The
Does some found a real solution to generate a random Number?

The standard rand(); function from: "cstdlib" will freeze the wiiu.

My current solution:
Code:
int crand() {
  static long seed = OSGetTime(); // the seed value for more randomnes

  seed = (seed * 32719 + 3) % 32749;
  return ((seed % 32719) + 1);
}
 

Kakkoii

Old fart
Member
Joined
Sep 14, 2007
Messages
631
Trophies
0
XP
586
Country
Canada
Does some found a real solution to generate a random Number?

The standard rand(); function from: "cstdlib" will freeze the wiiu.

My current solution:
Code:
int crand() {
  static long seed = OSGetTime(); // the seed value for more randomnes

  seed = (seed * 32719 + 3) % 32749;
  return ((seed % 32719) + 1);
}
For the most robust solution, you could include this small library and use it, it's well regarded as one of the most "true" random number generators.
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index.html

Code:
#include "tinymt32.h"
// And if you can't link:
#include "tinymt32.c"

#include <time.h>
#include <stdio.h>

int main(int argc, const char* argv[])
{
    tinymt32_t state;
    uint32_t seed = OSGetTime();

    tinymt32_init(&state, seed);

    for (int i=0; i<10; i++)
            printf("random number %d: %u\n", i, (unsigned int)tinymt32_generate_uint32(&state));
}
 
Last edited by Kakkoii,

Phantom64

Banned!
Banned
Joined
Aug 18, 2015
Messages
581
Trophies
0
XP
605
Country
Saint Kitts and Nevis
Which is the fastest/easiest way to selfhost an homebrew? I tried wampserver/easyphp, but nothing works. (i always get the forbidden error)
I know i'm total noob, but i'm going mad.
Help me please
 

CanIHazWarez

Well-Known Member
Member
Joined
Jan 21, 2016
Messages
371
Trophies
0
Age
32
XP
1,352
Country
United States
Which is the fastest/easiest way to selfhost an homebrew? I tried wampserver/easyphp, but nothing works. (i always get the forbidden error)
I know i'm total noob, but i'm going mad.
Help me please
Look up Mongoose server for self-hosting. It's very straightforward. Just launch the .exe from whatever directory you want your server pointing to. When you launch Mongoose, it will bring up a browser tab on your PC. Whatever IP address in the the address bar of that tab, navigate to that address in your Wii U browser.
 
  • Like
Reactions: Phantom64

cmdj13

Well-Known Member
Member
Joined
Aug 28, 2015
Messages
139
Trophies
0
Location
In front of my computer
XP
219
Country
Gambia, The
Hi guys, I'm trying to finish my keyboard project at the moment. The last feature to be implemented is the "library" for developers.
So I'm trying to make my keyboard a function which returns the entered text.
My solution looks like this:
Code:
char* keyboard()
{
    unsigned int coreinit_handle;
    OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle);
    unsigned int vpad_handle;
    OSDynLoad_Acquire("vpad.rpl", &vpad_handle);
    int(*VPADRead)(int controller, VPADData *buffer, unsigned int num, int *error);
    OSDynLoad_FindExport(vpad_handle, 0, "VPADRead", &VPADRead);
    static struct renderFlags flags;
   
    //[set all the flags to 0]
   
    VPADData vpad_data;

    __os_snprintf(flags.theme, 32, "Zelda       ");
    __os_snprintf(flags.touching, 32, "");
    flags.text[0] = ' ';
    int error, n;
    VPADRead(0, &vpad_data, 1, &error);

    while (1)
    {
        VPADRead(0, &vpad_data, 1, &error);       
        if (vpad_data.tpdata.touched == 1) {
            flags.touch=1;
            __os_snprintf(flags.touching, 32, "%i, %i", vpad_data.tpdata.x, vpad_data.tpdata.y);

            //[check for all the keys etc.]

        }
        if ((vpad_data.btn_hold & BUTTON_X) || flags.xTouched) {
            for (n = 0; n < flags.textLength; ++n)
                flags.text[n] = ' ';
            flags.textLength = 1;
        } else if ((vpad_data.btn_hold & BUTTON_B) || flags.bTouched)
            flags.b=1;
        else if ((vpad_data.btn_hold & BUTTON_PLUS) || flags.plusTouched)
            flags.plus=1;
        else if((vpad_data.btn_hold & BUTTON_HOME) || flags.HomeTouched)
            break;

        render(&flags);
    }
    return flags.text;
}
Code:
void _entryPoint()
{
    unsigned int coreinit_handle;
    OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle);
    unsigned int vpad_handle;
    OSDynLoad_Acquire("vpad.rpl", &vpad_handle);
    int(*VPADRead)(int controller, VPADData *buffer, unsigned int num, int *error);
    void(*_Exit)();
    OSDynLoad_FindExport(vpad_handle, 0, "VPADRead", &VPADRead);
    OSDynLoad_FindExport(coreinit_handle, 0, "_Exit", &_Exit);
    struct renderFlags flags;
    flags.y=0;
    flags.x=0;
    flags.a=0;
    flags.b=0;
    __os_snprintf(flags.aPressed, 32, "A button pressed");
    __os_snprintf(flags.bPressed, 32, "B button pressed");
    __os_snprintf(flags.xPressed, 32, "X button pressed");
    __os_snprintf(flags.yPressed, 32, "Y button pressed");

    VPADData vpad_data;
    VPADRead(0, &vpad_data, 1, &error);
   
    while(1)
    {
        VPADRead(0, &vpad_data, 1, &error);

        if (vpad_data.btn_hold & BUTTON_A)
            flags.text = keyboard();
        if (vpad_data.btn_hold & BUTTON_B)
            flags.b=1;
        if (vpad_data.btn_hold & BUTTON_X)
            flags.x=1;
        if (vpad_data.btn_hold & BUTTON_Y)
            flags.y=1;
        if (vpad_data.btn_hold & BUTTON_HOME)
            break;

        render2(&flags);
    }

    int ii = 0;
    for(ii; ii<2; ii++)
    {
        fillScreen(0, 0, 0, 0);
        flipBuffers();
    }
    _Exit();
}

void render2(struct renderFlags *flags)
{
    int i = 0;
    for(i; i<2; i++)
    {
        fillScreen(0, 0, 0, 0);
        drawString(0, 0, "Press A to open the keyboard.");
        flipBuffers();
    }
    flags->a = 0;
    flags->b = 0;
    flags->x = 0;
    flags->y = 0;
}
Code:
#include "vpad.h"
#include "types.h"
#include "draw.h"

struct renderFlags {
   int a;
   int b;
   int x;
   int y;
   char aPressed[32];
   char bPressed[32];
   char xPressed[32];
   char yPressed[32];
   char* text;
};

void _entryPoint();
void render2(struct renderFlags *flags);
Everything works fine (exiting too) but when I press A the application crashed and I have to reset my console. Please help me fix this to make it easier for others to use my keyboard in their projects! :)
 

jbuck1975

Well-Known Member
Member
Joined
Dec 28, 2015
Messages
952
Trophies
0
Age
48
XP
619
Country
United States
Hi guys, I'm trying to finish my keyboard project at the moment. The last feature to be implemented is the "library" for developers.
So I'm trying to make my keyboard a function which returns the entered text.
My solution looks like this:
Code:
char* keyboard()
{
    unsigned int coreinit_handle;
    OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle);
    unsigned int vpad_handle;
    OSDynLoad_Acquire("vpad.rpl", &vpad_handle);
    int(*VPADRead)(int controller, VPADData *buffer, unsigned int num, int *error);
    OSDynLoad_FindExport(vpad_handle, 0, "VPADRead", &VPADRead);
    static struct renderFlags flags;
 
    //[set all the flags to 0]
 
    VPADData vpad_data;

    __os_snprintf(flags.theme, 32, "Zelda       ");
    __os_snprintf(flags.touching, 32, "");
    flags.text[0] = ' ';
    int error, n;
    VPADRead(0, &vpad_data, 1, &error);

    while (1)
    {
        VPADRead(0, &vpad_data, 1, &error);     
        if (vpad_data.tpdata.touched == 1) {
            flags.touch=1;
            __os_snprintf(flags.touching, 32, "%i, %i", vpad_data.tpdata.x, vpad_data.tpdata.y);

            //[check for all the keys etc.]

        }
        if ((vpad_data.btn_hold & BUTTON_X) || flags.xTouched) {
            for (n = 0; n < flags.textLength; ++n)
                flags.text[n] = ' ';
            flags.textLength = 1;
        } else if ((vpad_data.btn_hold & BUTTON_B) || flags.bTouched)
            flags.b=1;
        else if ((vpad_data.btn_hold & BUTTON_PLUS) || flags.plusTouched)
            flags.plus=1;
        else if((vpad_data.btn_hold & BUTTON_HOME) || flags.HomeTouched)
            break;

        render(&flags);
    }
    return flags.text;
}
Code:
void _entryPoint()
{
    unsigned int coreinit_handle;
    OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle);
    unsigned int vpad_handle;
    OSDynLoad_Acquire("vpad.rpl", &vpad_handle);
    int(*VPADRead)(int controller, VPADData *buffer, unsigned int num, int *error);
    void(*_Exit)();
    OSDynLoad_FindExport(vpad_handle, 0, "VPADRead", &VPADRead);
    OSDynLoad_FindExport(coreinit_handle, 0, "_Exit", &_Exit);
    struct renderFlags flags;
    flags.y=0;
    flags.x=0;
    flags.a=0;
    flags.b=0;
    __os_snprintf(flags.aPressed, 32, "A button pressed");
    __os_snprintf(flags.bPressed, 32, "B button pressed");
    __os_snprintf(flags.xPressed, 32, "X button pressed");
    __os_snprintf(flags.yPressed, 32, "Y button pressed");

    VPADData vpad_data;
    VPADRead(0, &vpad_data, 1, &error);
 
    while(1)
    {
        VPADRead(0, &vpad_data, 1, &error);

        if (vpad_data.btn_hold & BUTTON_A)
            flags.text = keyboard();
        if (vpad_data.btn_hold & BUTTON_B)
            flags.b=1;
        if (vpad_data.btn_hold & BUTTON_X)
            flags.x=1;
        if (vpad_data.btn_hold & BUTTON_Y)
            flags.y=1;
        if (vpad_data.btn_hold & BUTTON_HOME)
            break;

        render2(&flags);
    }

    int ii = 0;
    for(ii; ii<2; ii++)
    {
        fillScreen(0, 0, 0, 0);
        flipBuffers();
    }
    _Exit();
}

void render2(struct renderFlags *flags)
{
    int i = 0;
    for(i; i<2; i++)
    {
        fillScreen(0, 0, 0, 0);
        drawString(0, 0, "Press A to open the keyboard.");
        flipBuffers();
    }
    flags->a = 0;
    flags->b = 0;
    flags->x = 0;
    flags->y = 0;
}
Code:
#include "vpad.h"
#include "types.h"
#include "draw.h"

struct renderFlags {
   int a;
   int b;
   int x;
   int y;
   char aPressed[32];
   char bPressed[32];
   char xPressed[32];
   char yPressed[32];
   char* text;
};

void _entryPoint();
void render2(struct renderFlags *flags);
Everything works fine (exiting too) but when I press A the application crashed and I have to reset my console. Please help me fix this to make it easier for others to use my keyboard in their projects! :)
if (vpad_data.btn_hold & BUTTON_A) flags.text = keyboard();
?? I'm not sure if this is the problem but it looked different than everything else. In program.c
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=6aie4t8lZ7k&pp=ygUuaSBhbSBub3QgZ2F5IGJ1dCAyMCBkb2xsYXJzIGlzIDIwIGRv...