Wisp Posted December 9, 2017 Posted December 9, 2017 (edited) So I've been thinking about kit values, because why not? IESDP currently states that the value is stored in a big-endian format, but unless I have really misunderstood the concept, the kit value is not big-endian. It uses a reversed word order, but the words themselves are little-endian. The value 0x80000000 is stored as 00 80 00 00 in the CRE and the value 0x4005 is stored as 00 00 05 40. Were they big-endian they'd be 80 00 00 00 and 00 00 40 05. Edited December 9, 2017 by Wisp Quote
marchitek Posted May 13, 2022 Posted May 13, 2022 I'm not super proficient with this hex representations, but with try and error I was able to prepare code that read kit id from CRE file correctly: OUTER_SET CRE_KIT_OFFSET = 0x0244 // dword DEFINE_PATCH_FUNCTION READ_CRE_KIT RET kit_id BEGIN READ_SHORT CRE_KIT_OFFSET kit_id_word1 READ_SHORT (CRE_KIT_OFFSET + 0x2) kit_id_word2 SET kit_id = (kit_id_word1 * 0x10000) + kit_id_word2 END It is definitely something with word swapping, so 0x80000000 is stored like 0x00008000 and 0x4005 (so 0x00004005) is stored like 0x40050000. At least for my (limited) understanding. Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.