Hacking U-Paint v2.0 Homebrew Release

brienj

Trying to avoid getting cancer
OP
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
This program is obsolete, get the new version that works in the Homebrew Launcher - https://gbatemp.net/threads/u-paint-v2-0-for-homebrew-launcher.427404/

Program has been updated to v2.0 (could a mod please change title), and includes source code and bin files compiled for every version supported by libwiiu, as well as a 5.5.x version .mp4 file.

And an updated Readme -

U-Paint v2.0 for 5.5.x firmware + source code by brienj

First of all I want to give credit to vgmoose for the random number generator I use to draw circles on the startup screen, as well as moving all of the coreinit.rpl function pointers into a struct and passing it to my custom drawing library.

For the source code to his Wii U Space game, go to http://github.com/vgmoose/space

Second of all, I want to thank my kids for putting up with me constantly taking the program away to load a new version for them to play with, and for testing it.

I use a custom drawing library and a "custom" vpad library, which contains more of the "unknown" values in the VPADData struct.

Setup:
Access the .bin 5.5.x bin file on your server using Yellow's exploit in the Wii U browser, or download the .mp4 from your server in your Wii U browser.

Instructions:
Touchpad - Use the stylus or your finger in the top-left area to draw on the DRC screen and TV, select colors in the right-hand area
L-Stick: Move view when zoomed in
R-Stick: Up = Zoom In, Down = Zoom Out
A Button: Square Brush
B Button: Round Brush
X Button: Fill On
Y Button: Fill Off
Minus Button: Decrease Brush Size
Plus Button: Increase Brush Size
LB: Show/Hide Menu
RB: Erase what is on the DRC screen (actually paints it with the background color which is the last color)
D-Pad: Change either R, G, or B (the one with radio button selected) value up/down on the color picker screen
Home Button: Exit

The current zoom level, brush size, and brush type are shown in the lower-right area of the DRC screen. To the left of that, it show your active color. Touching this box opens up the color picker menu. The color picker is like the one in Photoshop. It defaults to the slider controlling the red value. You can also either select green or blue with the radio buttons next to them on the right hand side of the menu. Touching the right side box will set the color change, or touching the red x in the top-right corner will close the menu. You can change the active color by choosing any of the 10 colors on the right hand side of the main menu. The last color is the background color which is used when you clear the screen.

Remember that everything you see on the DRC screen is a representation of the actual FULL picture which is on the TV. When you are zoomed out to level 0 on the DRC, you are seeing the full picture that is on the TV, but reduced by 2/3 size, since the DRC is 854 x 480 and the TV is 1280 x 720. When you are zoomed in to zoom level 1, the pixels are identical. You can zoom in to level 4.

Planned to be added:
Saving and loading pictures
??? - Design a brush
??? - Show window placement on TV (haven't got it quite working right yet)
??? - Undo function, would probably require an elf version
??? - Elf version
??? - GX2 graphics with Alpha support

If you have any suggestions, let me know.

Updated: Added v2.0 and new Readme

This program is obsolete, get the new version that works in the Homebrew Launcher - https://gbatemp.net/threads/u-paint-v2-0-for-homebrew-launcher.427404/
 
Last edited by brienj,
D

Deleted User

Guest
I really want to clean it up and add in comments, but if you have any coding questions, feel free to ask and I can post snippets of code for now.
Thanks! :) One question is how did you manage to display text onto the gamepad only? I've been wondering how to do that for a while now. ;)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,650
Country
France
Nice idea :)

And added it to wiki homebrew list.
Still no individual homebrew page created, it will come another time or when someone has time to create them.

added to wiiubru,com nice work .
it not the same one, as this one is released as .mp4 and 550.bin only, but the "draw" for 5.3.2 freezes at payload launch :P
edit: well, all homebrew are freezing today...
could be an issue with my console, I'll clear the browser data.
 

pwsincd

Garage Flower
Developer
Joined
Dec 4, 2011
Messages
3,686
Trophies
2
Location
Manchester UK
XP
4,465
Nice idea :)

And added it to wiki homebrew list.
Still no individual homebrew page created, it will come another time or when someone has time to create them.


it not the same one, as this one is released as .mp4 and 550.bin only, but the "draw" for 5.3.2 freezes at payload launch :P
edit: well, all homebrew are freezing today...
could be an issue with my console, I'll clear the browser data.
no i added this to 5.5 sections only ..
 

brienj

Trying to avoid getting cancer
OP
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
Thanks! :) One question is how did you manage to display text onto the gamepad only? I've been wondering how to do that for a while now. ;)
There are several ways you could do it, in my program I am using a custom draw library and use two different functions to accomplish it like this.
Code:
void drawString(struct Services *services, int x, int y, char * string)
{
        services->OSScreenPutFontEx(1, x, y, string);
}

void drawStringTV(struct Services *services, int x, int y, char * string)
{
        services->OSScreenPutFontEx(0, x, y, string);
}

You could also add a parameter called "screen" and then pass which screen you wanted, like this.
Code:
void drawString(struct Services *services, int x, int y, char * string, int screen)
{
        services->OSScreenPutFontEx(screen, x, y, string);
}

In the function OSScreenPutFontEx, the first parameter is the screen number. 0 is the TV, 1 is the controller screen.

Nice idea :)

And added it to wiki homebrew list.
Still no individual homebrew page created, it will come another time or when someone has time to create them.


it not the same one, as this one is released as .mp4 and 550.bin only, but the "draw" for 5.3.2 freezes at payload launch :P
edit: well, all homebrew are freezing today...
could be an issue with my console, I'll clear the browser data.
no i added this to 5.5 sections only ..
I released a 5.3.2 version now. :D

Thank you, well done. My daughter loved it.
Yeah, my kids get a kick out of it, especially my 6 year old son. They are actually the reason I thought of making this, because I was trying to think of something that they would really love.

hi, can someone do a screen ? ? please .
I will be getting some later today.

I got a suggestion, it's possible to make any Draw Something game ? It won't be much more work. I can do any french translation ;)
Excellent idea.
 
D

Deleted User

Guest
There are several ways you could do it, in my program I am using a custom draw library and use two different functions to accomplish it like this.
void drawString(struct Services *services, int x, int y, char * string)
{
services->OSScreenPutFontEx(1, x, y, string);
}

void drawStringTV(struct Services *services, int x, int y, char * string)
{
services->OSScreenPutFontEx(0, x, y, string);
}
You could also add a parameter called "screen" and then pass which screen you wanted, like this.
void drawString(struct Services *services, int x, int y, char * string, int screen)
{
services->OSScreenPutFontEx(screen, x, y, string);
}
In the function OSScreenPutFontEx, the first parameter is the screen number. 0 is the TV, 1 is the controller screen.
Awesome, thanks for that bit of info! :) It's reminded me to take a look at the Wii U SDK documentation a bit more. :D
 

oumoumad

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
798
Trophies
0
Age
31
XP
890
Country
France
It's probably worth mentioning this works up to 5.5.1 in the thread title ^^, many users think they can only get interesting stuff with kernel/IOSU access and not just userspace.
Again really appreciated work, take your time cleaning ur code, it'll definitely be useful for many of us.
 

brienj

Trying to avoid getting cancer
OP
Member
Joined
Jan 3, 2016
Messages
1,232
Trophies
0
Website
twitter.com
XP
2,142
Country
United States
It's probably worth mentioning this works up to 5.5.1 in the thread title ^^, many users think they can only get interesting stuff with kernel/IOSU access and not just userspace.
Again really appreciated work, take your time cleaning ur code, it'll definitely be useful for many of us.
That's why I put 5.5.x ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
    Karma177 @ Karma177: do y'all think having an sd card that has a write speed of 700kb/s is a bad idea? trying to...