Dolphin, the GameCube and Wii emulator - Forums

Full Version: Convert u32 to Hex string
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone tell me how to?
Trying to make a cheat search system, need to display an existing u32 integer into a box in hex format.
well, you can use sprintf(char *, ...)
Code:
string text = "";
u32 val = "1255";
char* pChar =  &(text[0]);
sprintf(pChar, "%08x", val);

or use std:Confusedtring StringFromFormat(const char* format, ...)
Code:
u32 val = "1255";
string text = StringFromFormat("%08x", val);
Good, gonna try it.
So far i've been able to perform a few comparisons with main ram dumps, now I need to output the first X results.
Searches are slow as hell (over 25 millions if bytes) but get faster with each try, until reset (due to a way of jumping blocks of addresses discarded in previous searches) in the order of 3 min, 20 secs, 10 secs.
I'll try to make it functional asap.

EDIT: Is it possible that Dolphin isn't properly patching memory with the Action Replay in wii games? I already tried a code I figured out and nothing happens.
Well, Action Reply was only made for Gamecube, there isn't an AR for Wii, except codesaves junk.
So the ARPatcher I saw around the code isn't working with Wii games because of a limitation? Or was it done on purpose (since there were no codes around)?
Idk, maybe Wii has a different memory setup than GCN.