totally gonna try that now I guess we're limited to 4 characters correct?
Well, you could probably extend it to overwrite the actual version format string (the %d stuff), but I'm not sure if that might cause instability or crashing..
totally gonna try that now I guess we're limited to 4 characters correct?
And all of emWell, you could probably extend it to overwrite the actual version format string (the %d stuff), but I'm not sure if that might cause instability or crashing..
if (
progid == 0x0004001000021000LL || // USA MSET
progid == 0x0004001000020000LL || // JPN MSET
progid == 0x0004001000022000LL || // EUR MSET
progid == 0x0004001000026000LL || // CHN MSET
progid == 0x0004001000027000LL || // KOR MSET
progid == 0x0004001000028000LL // TWN MSET
)
{
static const char ver_pattern[] =
{
'V', 0x00, 'e', 0x00, 'r', 0x00, '.', 0x00
};
static const char ver_patch[] =
{
'A', 0x00, '9', 0x00, 'L', 0x00, 'H', 0x00 //insert your own text here in place of A 9 L H
};
patch_memory(code, size,
ver_pattern,
sizeof(ver_pattern), 0,
ver_patch,
sizeof(ver_patch), 1
);
}
And all of em
Code:if ( progid == 0x0004001000021000LL || // USA MSET progid == 0x0004001000020000LL || // JPN MSET progid == 0x0004001000022000LL || // EUR MSET progid == 0x0004001000026000LL || // CHN MSET progid == 0x0004001000027000LL || // KOR MSET progid == 0x0004001000028000LL // TWN MSET ) { static const char ver_pattern[] = { 'V', 0x00, 'e', 0x00, 'r', 0x00, '.', 0x00 }; static const char ver_patch[] = { 'A', 0x00, '9', 0x00, 'L', 0x00, 'H', 0x00 //insert your own text here in place of A 9 L H }; patch_memory(code, size, ver_pattern, sizeof(ver_pattern), 0, ver_patch, sizeof(ver_patch), 1 ); }
else if (progid == 0x0004001000021000LL) // MSET USA
{
static const char* ver_pattern = u"Ver.";
static const char* ver_patch = u"A9LH";
patch_memory(code, size, ver_pattern, 8, 0, ver_patch, 8, 1);
}
dammit man! now i get warnings lol i don't like warnings..You can simplify the editing a little bit with:
Code:else if (progid == 0x0004001000021000LL) // MSET USA { static const char* ver_pattern = u"Ver."; static const char* ver_patch = u"A9LH"; patch_memory(code, size, ver_pattern, 8, 0, ver_patch, 8, 1); }
I omitted the other MSETs for brevity.
dammit man! now i get warnings lol i don't like warnings..
Just do a dirty cast, I guess.
Unicode strings aren't always 16-bit words. :/
Lower case "u" makes them 16-bit for GCC.
yeah that worked no more warnings! (i don't really know C btw haha)Just do a dirty cast, I guess.
yeah that worked no more warnings! (i don't really know C btw haha)
static const char* ver_pattern = (char*)u"Ver.";
static const char* ver_patch = (char*)u"A9LH";
I just took a guess lol if there's a more correct way to do it, please do share.Such casts would probably make people scream in terror, but if it works, it works.
You did say "dirty".Such casts would probably make people scream in terror, but if it works, it works.
lol like i said, i just took a guess and it shut the warnings up hahaYou did say "dirty".
static const char* ver_pattern = u"Ver. %d.%d.%d-%d%ls";
static const char* ver_patch = u"ARM9LoaderHax %d.%d";
I like that
I wonder if we would be able to differentiate Sys/EmuNAND strings, like RXTools didHere's some fun with the version string using this:
In code, that's:
Code:static const char* ver_pattern = u"Ver. %d.%d.%d-%d%ls"; static const char* ver_patch = u"ARM9LoaderHax %d.%d";
Well a hacky way would be to have two loaders with different strings and let your firmlaunchhax code figure out what to inject based on if emunand is enabled or not.I wonder if we would be able to differentiate Sys/EmuNAND strings, like RXTools did