-
Notifications
You must be signed in to change notification settings - Fork 0
Memory Structures
You can use this table as a way of understanding what values relate to what information in the game. For example, you may notice when using Game Shark / Code Breaker or other cheating devices they write to specific regions of IWRAM. This is obviously done on purpose to alter the desired values, this table is my collection of information found through IDA or watching memory change.
It should be assumed anything not in the 0x08 range is either in not located within the ROM. You can use mGBA's memory viewer to confirm these yourself.
| ADdress | Name | Allowed Value Range |
|---|---|---|
0x03000E90 |
g_ActiveCharacterId |
0 = Gohan, 1 = Piccolo, 2 = Vegeta 3 = Trunks , 4 = Goku, 5 = Hercule |
0x03000E9C to 0x03000F44 (Exclusive) |
g_CharacterStats |
See CharacterEntry
|
The CharacterEntry struct is a collection of information pertaining to each of the playable characters and their stats. You can assume it is laid out like so
struct CharacterEntry
{
unsigned __int16 currentHp;
unsigned __int16 maxHp;
unsigned __int16 currentEp;
unsigned __int16 maxEp;
unsigned __int16 gap8;
unsigned __int8 gapA;
unsigned __int8 str;
unsigned __int8 gapB;
unsigned __int8 pow;
unsigned __int8 gapC;
unsigned __int8 end;
unsigned __int8 gap10[12];
};The gaps are currently fields I don't have a definition for, but will be updated when I find out. You can iterate over the area of IWRAM 6 times to get each playable Character's stats.