-
Notifications
You must be signed in to change notification settings - Fork 1
Symbols and Addresses
This BizHawk tool uses symbols to read addresses and access data. The first advantage of using this encoding is that decompilation projects provide these files (.sym). The second advantage is that it allows developers to use names rather than addresses, making it easier to read what's been done. Finally, it allows you to read at different addresses depending on the game, but always using the same name.
Each pokémon game has its own folder (Symbols/emerald) with 1 or more files inside. There's always the main file, which is the name of the game, such as pokeemerald.sym, and then patch files. These patch files are generally mandatory for the different languages (fr, de, it, sp, jp).
If the game you wish to correct is already supported by the tool, but some of the symbols are incorrect, follow these steps to correct them.
Basic but necessary, create the file inside Symbols/<game> folder. The file must use the name patch<game>_<lang>.sym.
Each symbol file use the same format: 030048B0 c 00000000 gObjectEvents. Corresponding to address (hexa) - type (global, local, ...) - size (hexa) - name.
In patch file you are authorized to put at the beginning of any line to ignore this line when reading.
In patch file you can only use 2 custom types:
- 'c' for custom -> it will replace an existing symbol with this new address or ignore if the name doesn't exists
- 'a' for add -> it will add this symbol if it doesn't exists (not recommanded to use because you need to do that for every game)
Run the code in debug mode and the debug window should appear. You'll have access to data such as the player's position and current tasks. Find the problem addresses and try to correct them using the tools provided.
If you find value in 03 or 02 address, check the difference between en and your language. In most case the difference is 16 decimal. You just need to add 16 to every addresses you need.
Here's a list of addresses that can cause problems and how to find the correct address, be aware that some of the symbols below may not exist in the chosen game, in which case ignore them:
- #CB2_Overworld ; tips - be on the map (ouside) and select gMain, size 4 and offset 4 and click 'reverse addr'. Address will be show
- #CB2_StarterChoose ; tips - be in the starter bag and select gMain, size 4 and offset 4 and click 'reverse addr'. Address will be show
- #BattleMainCB2 ; tips - be in battle and select gMain, size 4 and offset 4 and click 'reverse addr'. Address will be show
- #Task_Fishing ; tips - fish and check tasks tab
- #Task_HandleStarterChooseInput ; tips - use tasks tab and open starter bag, the number is the address in decimal
- #Task_HandleConfirmStarterInput ; tips - use tasks tab and open starter bag and select a starter, the number is the address in decimal
- #Task_StarterChoose2 ; tips - use tasks tab and open starter bag, the number is the address in decimal
- #Task_StarterChoose5 ; tips - use tasks tab and open starter bag and select a starter, the number is the address in decimal
- #gPlayerAvatar ; tips - expected value is 2, size is 1 and click 'run 3s delay' and walk no stop. Address with 0 as value when you stop moving is the correct one. Address will be result - 2
- #gObjectEvents ; tips - go in front of starter bag, expected value 14 (X position), size is 2 and click 'run'. Address will be result - 10
- #gPlayerPartyCount ; tips - use RAM Seacher with BizHawk and remove / add pokemon to your party to find the address
- #gPlayerParty ; often gPlayerPartyCount address + 10 (hexa) or default gPlayerParty + 10 (hexa)
- #gEnemyParty ; often default gEnemyParty + 10 (hexa)
- #gTasks
- #gActionSelectionCursor ; use BizHawk RAM Search while in combat and switch between (attack = 0, sac = 1, party = 2 and escape = 3)
- #gRngValue
- #gSaveblock2
- #gSaveBlock2
- #gSaveBlock2Ptr (if ptr exist, no need to fix gSaveBlock2 or gSaveblock2)
When you agree with the corrective, add the created or modified file to ResourceSymbols.resx - very important! When it's done, go to app.config in your game's hash and add the patch to the list.
This page is not adapted for this case. Please check