Hacking Post your WiiU cheat codes here!

HackingNewbie

Well-Known Member
Member
Joined
Dec 29, 2016
Messages
536
Trophies
0
Location
Somewhere in 2008
XP
699
Country
United Kingdom
OK :P I've already forked your tcpgecko, gonna start working on it now

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

So you know to convert codes to ascii and then put it into the .gctu file? With no newlines, spaces or anything? I'm guessing spaces and newlines aren't written to 0x10015000, because that would be a waste of RAM?
 

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
OK :P I've already forked your tcpgecko, gonna start working on it now

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

So you know to convert codes to ascii and then put it into the .gctu file? With no newlines, spaces or anything? I'm guessing spaces and newlines aren't written to 0x10015000, because that would be a waste of RAM?
Only the codes are written, nothing else. It would confuse the code handler.
 

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
So if you put "D0000000 DEADCAFE" into your program, it will convert it to "Ð...Þ.Êþ" then put that into the .gctu file? Then when my code writes it to 0x10015000 "D0000000DEADCAFE" will appear in memory.
kz9xmh3k.png
 

HackingNewbie

Well-Known Member
Member
Joined
Dec 29, 2016
Messages
536
Trophies
0
Location
Somewhere in 2008
XP
699
Country
United Kingdom
Yeah. Then I can go like:
Code:
#include <inttypes.h>
#include <string.h>
...
uint64_t titleIDNum = OSGetTitleID();
char titleID[17];
sprintf(titleID, "%" PRIu64, titleIDNum);
char fileName[24];
strncat(fileName, titleID, 16);
strncat(fileName, ".gctu", 5);
This puts the target filename in the char array fileName.
 
Last edited by HackingNewbie,
  • Like
Reactions: cearp

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
The cheat table doesn't begin at 0x10015000?
Nope, RIP. More luck next time buddy. Still thanks for trying. It wasn't too bad. I implemented the code now but it's untested. :P
Code:
#define EXTENSION_SIZE 6
#define SD_FILE_PATH_HEADER_LENGTH 10
#define TITLE_ID_LEADING_ZEROS 3
#define TITLE_ID_LENGTH 16
#define CODES_FILE_PATH_SIZE (SD_FILE_PATH_HEADER_LENGTH + TITLE_ID_LENGTH + EXTENSION_SIZE)

void applyCheatCodes() {
   unsigned char filePath[CODES_FILE_PATH_SIZE];
   memset(filePath, '0', sizeof(filePath));
   memcpy(filePath, "sd:/codes/", SD_FILE_PATH_HEADER_LENGTH); // File path header
   u64 titleID = OSGetTitleID();
   char asciiTitleID[TITLE_ID_LENGTH];
   snprintf(asciiTitleID, TITLE_ID_LENGTH, "%llX", titleID);
   memcpy(filePath + SD_FILE_PATH_HEADER_LENGTH + TITLE_ID_LEADING_ZEROS, asciiTitleID, TITLE_ID_LENGTH); // Title ID
   memcpy(filePath + SD_FILE_PATH_HEADER_LENGTH + TITLE_ID_LENGTH, ".gctu", EXTENSION_SIZE); // Extension
   filePath[CODES_FILE_PATH_SIZE - 1] = '\0'; // Null-terminated

   unsigned char *codes = NULL;
   unsigned int codesSize = 0;
   int result = LoadFileToMem((const char *) filePath, &codes, &codesSize);

   if (result < 0) {
      // Error, we won't write any codes
      return;
   }

   kernelCopyData((unsigned char *) 0x01133000, codes, codesSize);
}
It probably works but I'll test it tomorrow.
 
Last edited by BullyWiiPlaza,
  • Like
Reactions: HackingNewbie

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,748
Trophies
2
XP
8,610
Country
Tuvalu
Bit embarrasing, I've got to say. Well, thanks for the encouragement, probably not even old enough to understand computing like you.
yes you are young, but that doesn't mean you don't have to be so good, if you keep trying from where you are now, you will be fantastic when you are 18!
it's not about age, just experience. so don't be disheartened!
even if some/all of your code works, if it's not in a way the maintainer of the project likes, your pull request can still get denied.
if you didn't get there first and if i had a go, maybe my code wouldn't have been good enough too :D

@BullyWiiPlaza i'm curious why you are using memcpy/c char arrays, when the project is in c++ and you could use std::string which is more readable and easier to use?
is it something about performance? some preference? not a criticism at all, i want to know so I can learn a little :D

thanks for the work on this, did not one else request/mention it until i asked a few days ago? :O
it's much more convenient now, yeah 99% of people have a computer to run jgecko with the wiiu - but having everything on the console is much neater. i appreciate it :)
 

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
@BullyWiiPlaza i'm curious why you are using memcpy/c char arrays, when the project is in c++ and you could use std::string which is more readable and easier to use?
is it something about performance? some preference? not a criticism at all, i want to know so I can learn a little :D
I'm just more familiar with C. That's the only reason since performance doesn't even matter. :unsure:

EDIT: It doesn't work, yet. :/

I'm getting the following error when I try to mount the SD card with FSGetMountSource():
Code:
#define FS_STATUS_END                   (FS_STATUS_ERROR_BASE-2)    /* Indicates end of file / directory entry */
Code:
FS_STATUS_END There are no more available mount sources.
This is why programming the Wii U is garbage. Stuff like that happens way too often. I hope someone finds a solution. I pushed the almost working code. :)
 
Last edited by BullyWiiPlaza,
  • Like
Reactions: KeyZiro and Arck

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @salazarcosplay, Morning