Hacking Wii U Functions List (For developers)

NexoCube

Well-Known Member
OP
Member
Joined
Nov 3, 2015
Messages
1,222
Trophies
0
Age
29
Location
France
XP
1,340
Country
France
I made this thread for Wii U Homebrew Develloppers to know all Functions (The ones that are not on Wii U Brew) Naturelly they are all C Code.

How did i found them ?

I found them on 2.12.13 Cafe OS SDK, making it public is illegal, and doesn't respect GBATemp posting rules

List :

Basic :

  • memcpy(dest, src, length) - dest become src (src = 1, dest = 0 | memcpy(dest, src, length) --> src = 1 ; dest = 1)
  • memset(src, value, lengthtobechange) - src = "John Cena" ; value = "Nexo" | memset(src, value, 4) --> src = "Nexo Cena" The 4 first letters of the string has been set to the value
  • OSFatal(str) - str = "Hello World" | OSFatal(str) -> Will froze your screen/console and prints the str
  • _Exit() - Exit the app running in background (Web Browser)
  • OSCreateThread(thread, entry, argc, args, stack, stack_size, priority, attr) - Create a Thread
  • OSResumeThread(thread) - Start a Thread

I wrote above the essentially functions to Wii U Homebrewing.

sysapp.rpl : (Thos that are not on Wii U Brew)

  • SYSLaunchAccount() - Launch the Account Management Application
  • SYSCheckSystemApplicationExists(id) - ID :
E-Manual : 4
Mini MiiVerse : 7
Web Browser : 8
MiiVerse : 9
E-Shop : 10

  • SYSSwitchToEShopAocList(maybe title id ?) - TITLE ID - Jump to the DLC Game Page
  • SYSSwitchToEShopTicketList(title id too ?) - TITLE ID - Jump to subscriptions list page
GX2 Many, Many Functions not listed :

-snip- (No you won't)

FS (File System) :

  • FSInit() and FSShutdown() - Init or Shutdown the fs librairy
  • FSAddClient(client, FSRetFlag flag) and FSDelClient(client, FSRetFlag flag) - Add or Delete a client
  • Look here for already known FS Functions
  • FSGetMountSource(client, cmd, type, source, FSRetFlag flag) - Get the Mount Source
  • FSMount(client, cmd, source, char *target, u32 bytes, FSRetFlag) - Mount SDcard or USB (Kernel)
  • FSUnmount(client, cmd, char *target, FSRetFlag flag) - Unmount a device
  • FSChangeDir(client, cmd, char *path) - Change Directory
  • FSOpenFile(client, cmd, char *path, char *mode, FSFileHandle, FSRetFlag flag) - Open file
  • FSCloseFile(client, cmd, FSFileHandle fileHandle, FSRetFlag flag) - Close a opened file
  • FSReadFile(client, block, void *dest, size, count, FSFileHandle fileHandle, FSFlag flag,FSRetFlag errHandling); - Read a opened file
  • FSOpenDir(client, cmd, char *path, dir_handle, FSRetFlag flag) - Open a directory
  • FSCloseDir(client, cmd, dir_handle, FSRetFlag flag) - Close a opened directory
  • FSReadDir(client, cmd, dir_handle, returned_dir_entry, FSRetFlag flag) - Read into a directory
  • FSMakeDir(client, cmd, char *path, FSRetFlag flag) - Create a directory
  • FSRemove(client, cmd, char *path, FSRetFlag flag) - Remove a new entry (directory ?)
  • FSRename(client, cmd char *oldPath, char *newPath, FSRetFlag flag) - Rename a file
And others...

DMAE.rpl :

  • DMAEWaitDone(DMAETimeStamp ts) - Wait for a DMA command to complete
  • DMAEIsDone(DMAETimeStamp ts) - Return true if yes or False for no
  • Some Semaphores functions (if you want me to add them, ask me in the comments)
  • DMAECopyMem(dst, src, u32 size, endian) - Issue a DMA command to copy memory from one range to another
  • DMAEFillMem(dst, u32 fillData, u32 size) - Issue a DMA command to fill a memory range with a specified value
  • DMAEFillMemPhys(dst-pa, u32 fillData, u32 size) - Issue a DMA command to fill a physical memory range with a specified value
  • DMAESetTimeout(u32 millisec) - Set a millisec timeout
  • DMAEGetTimeout(void) - Get a timeout
Network (nsysnet.rpl etc...) :

Everything that is here : wiiubrew.org/wiki/Nsysnet.rpl

  • bind(int fd, struct sockaddr *addr, int addrlen) - Bind a socket connection
  • socketclose(fd) - Close a socket (fd is a socket)
And all of this xD :

Code:
extern int recvfrom(int fd, void *buffer, int len, int flags,struct sockaddr *from, int *fromlen);

extern int recvfrom_ex(int fd, void *buffer, int len, int flags,struct sockaddr *from, int *fromlen,amsg msg, int msglen);

extern int recvfrom_multi (int fd, int flags,struct recvfrom_multi_buffers *buffs, int recv_datagram_len, int recv_datagram_count,struct timeval *timeout);

extern int send(int fd, const void *buffer, int len, int flags);

extern int sendto(int fd, const void *buffer, int len, int flags,const struct sockaddr *dest_addr, int dest_len);

extern int sendto_multi(int fd, const void *buffer, int len, int flags,const struct sockaddr *dest_addrs, int dest_count);

extern int sendto_multi_ex (int fd, int flags,struct sendto_multi_ex_buffers *buffs, int send_datagram_count);

extern int shutdown(int fd, int how);

extern int socket(int family, int type, int proto);

extern int socketclose(int fd);

extern int inet_aton(const char *cp, struct in_addr *addr);

extern char *inet_ntoa_r(struct in_addr in, char *buf);

extern const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);

extern int inet_pton(int af, const char *src, void  *dst);

extern int getpeername(int fd, struct sockaddr *name, int *addrlen);

extern int getsockname(int fd, struct sockaddr *name, int *addrlen);

extern int getsockopt(int fd, int level, int optname, void *optval,socklen_t *optlen);

extern int setsockopt(int fd, int level, int optname, void *optval,socklen_t optlen);

extern void setsocketlasterr(int err);

extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);

extern int setsocklibopt (int liboptname, int optval);

extern int getsocklibopt (int liboptname, int *optval);

extern int somemopt (int req_type, char* mem, unsigned int memlen, int flags);

extern u32 ntohl(u32 val);

extern u32 htonl(u32 val);

extern u16 ntohs(u16 val);

extern u16 htons(u16 val);

extern int icmp_create_handle(int family);

extern int icmp_close_handle(int handle);

extern int icmp_ping(int handle, const void* data, int len, const struct sockaddr *dest_addr, int dest_len, unsigned timeout, int flag);

extern int icmp_cancel(int handle);

extern int icmp_last_code_type(int handle);


I can't write more for today ! ^^

Feel free to ask me, what should i add or complete some parts, because all functions are not really here so ask in the comment section
 
Last edited by Minox,

Whatnoww

Well-Known Member
Member
Joined
Jan 27, 2016
Messages
192
Trophies
0
Age
34
XP
212
Country
Canada
Devs only as in only devs should see this, or that only devs should be able to understand this?
 

oumoumad

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
798
Trophies
0
Age
31
XP
890
Country
France
Be careful, the headers you've attached are copy righted "......They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo."
So I think you can't share them here.

Thank you for the effort in contributing to the community anyway :).
 
  • Like
Reactions: NexoCube

NexoCube

Well-Known Member
OP
Member
Joined
Nov 3, 2015
Messages
1,222
Trophies
0
Age
29
Location
France
XP
1,340
Country
France
Be careful, the headers you've attached are copy righted "......They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo."
So I think you can't share them here.

Thank you for the effort in contributing to the community anyway :).

Ok i'll remove it then.
 

shaneod

Well-Known Member
Member
Joined
Mar 3, 2011
Messages
348
Trophies
0
XP
427
Country
These functions are intentionally not being put on wiiubrew because the developers don't like to rely on illegal source code to document functions. Otherwise they could have just uploaded the searchable SDK with all functions included onto wiiubrew.
 
  • Like
Reactions: ScarletDreamz

EpicLPer

Your friendly Austrian IT Guy
Member
Joined
Mar 13, 2015
Messages
1,060
Trophies
0
Age
28
Location
Austria
Website
epiclper.com
XP
1,141
Country
Austria
Yes, but i don't want to.
... but that's exactly why we have such a mash of different sources and so on and when it comes to actually searching infos everything is extremely spread around.

I rather think that GBATemps is more for beginners, not for infos like this here. It's kind of stupid to spread useful information across multiple platforms like this...
 

NexoCube

Well-Known Member
OP
Member
Joined
Nov 3, 2015
Messages
1,222
Trophies
0
Age
29
Location
France
XP
1,340
Country
France
... but that's exactly why we have such a mash of different sources and so on and when it comes to actually searching infos everything is extremely spread around.

I rather think that GBATemps is more for beginners, not for infos like this here. It's kind of stupid to spread useful information across multiple platforms like this...

It's a bit late no, if someone want, he can put it in Wii U Brew xD (sorry ^^)
 
D

Deleted User

Guest
Good thread, kind of... it's a bit of an NDA violation; dunno if Ninty or the staff are gonna nag at the site because of this thread. :unsure:
I have the Cafe SDK 2.12.13, so I don't really have much to say about this thread anyway.

But one thing though - Will all of the functions documented in the Cafe SDK work in ELF files? Because I bet some wouldn't work in, for example, those old codeXXX.bin files.
 

NexoCube

Well-Known Member
OP
Member
Joined
Nov 3, 2015
Messages
1,222
Trophies
0
Age
29
Location
France
XP
1,340
Country
France
Good thread, kind of... it's a bit of an NDA violation; dunno if Ninty or the staff are gonna nag at the site because of this thread. :unsure:
I have the Cafe SDK 2.12.13, so I don't really have much to say about this thread anyway.

But one thing though - Will all of the functions documented in the Cafe SDK work in ELF files? Because I bet some wouldn't work in, for example, those old codeXXX.bin files.

I think it work. (And yeah you gave me the SDK there's a bunch of time.)
 
  • Like
Reactions: Deleted User

shaneod

Well-Known Member
Member
Joined
Mar 3, 2011
Messages
348
Trophies
0
XP
427
Country
... but that's exactly why we have such a mash of different sources and so on and when it comes to actually searching infos everything is extremely spread around.

I rather think that GBATemps is more for beginners, not for infos like this here. It's kind of stupid to spread useful information across multiple platforms like this...
Marcan and others on #WiiUDev don't want any functions posted on WiiUBrew that weren't obtained via RE. They don't want leaked functions.
 

twc

Banned!
Banned
Joined
Jan 18, 2016
Messages
55
Trophies
0
Age
37
XP
28
Country
United States
These functions are intentionally not being put on wiiubrew because the developers don't like to rely on illegal source code to document functions. Otherwise they could have just uploaded the searchable SDK with all functions included onto wiiubrew.
You realize most of them use shit from the sdk right? Lmao who wouldn't use the sdk

--------------------- MERGED ---------------------------

Good thread, kind of... it's a bit of an NDA violation; dunno if Ninty or the staff are gonna nag at the site because of this thread. :unsure:
I have the Cafe SDK 2.12.13, so I don't really have much to say about this thread anyway.

But one thing though - Will all of the functions documented in the Cafe SDK work in ELF files? Because I bet some wouldn't work in, for example, those old codeXXX.bin files.
Meh Nintendo won't care honestly just look at loadiine that was made with the sdk ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • ZeroT21 @ ZeroT21:
    bored, guess i'll spread more democracy
  • LeoTCK @ LeoTCK:
    @K3Nv2 one more time you say such bs to @BakerMan and I'll smack you across the whole planet
  • K3Nv2 @ K3Nv2:
    Make sure you smack my booty daddy
    +1
  • LeoTCK @ LeoTCK:
    telling him that my partner is luke...does he look like someone with such big ne
    eds?
  • LeoTCK @ LeoTCK:
    do you really think I could stand living with someone like luke?
  • LeoTCK @ LeoTCK:
    I suppose luke has "special needs" but he's not my partner, did you just say that to piss me off again?
  • LeoTCK @ LeoTCK:
    besides I had bigger worries today
  • LeoTCK @ LeoTCK:
    but what do you know about that, you won't believe me anyways
  • K3Nv2 @ K3Nv2:
    @BigOnYa can answer that
  • BigOnYa @ BigOnYa:
    BigOnYa already left the chat
  • K3Nv2 @ K3Nv2:
    Biginya
  • BigOnYa @ BigOnYa:
    Auto correct got me, I'm on my tablet, i need to turn that shit off
  • K3Nv2 @ K3Nv2:
    With other tabs open you perv
  • BigOnYa @ BigOnYa:
    I'm actually in my shed, bout to cut 2-3 acres of grass, my back yard.
  • K3Nv2 @ K3Nv2:
    I use to have a guy for that thanks richard
  • BigOnYa @ BigOnYa:
    I use my tablet to stream to a bluetooth speaker when in shed. iHeartRadio, FlyNation
  • K3Nv2 @ K3Nv2:
    While the victims are being buried
  • K3Nv2 @ K3Nv2:
    Grave shovel
  • BigOnYa @ BigOnYa:
    Nuh those goto the edge of the property (maybe just on the other side of)
  • K3Nv2 @ K3Nv2:
    On the neighbors side
    +1
  • BigOnYa @ BigOnYa:
    Yup, by the weird smelly green bushy looking plants.
  • Xdqwerty @ Xdqwerty:
    Water park was quite fun
    LeoTCK @ LeoTCK: https://gbatemp.net/threads/my-braddu-pitchu-to-sega.652429/ my l ast thread befoe I die (maybe)