Created
June 17, 2017 10:41
-
-
Save TheOfficialFloW/cac193b9baf1a6be8d987258db66352f to your computer and use it in GitHub Desktop.
Get titleid value. Used in ScePspemu for specific title adjustment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32_t getTitleIdValue(const char *titleid) { | |
uint32_t titleid_number = strtol(titleid+4, 0, 16); | |
uint32_t titleid_prefix = titleid[3] | (titleid[2] << 8) | (titleid[1] << 16) | (titleid[0] << 24); | |
uint32_t titleid_value = (titleid_number + (titleid_number << 12)) ^ titleid_prefix; | |
return titleid_value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment