The current URL is datacrystal.tcrf.net.
Pokémon 3rd Generation/Pokémon FireRed and LeafGreen/ROM map: Difference between revisions
Mariofan2468 (talk | contribs) m (no series category for ROM map) |
Mantidactyle (talk | contribs) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 40: | Line 40: | ||
Then you can change the code of first item that they sell you, to other code, for example a MasterBall (code 0100). | Then you can change the code of first item that they sell you, to other code, for example a MasterBall (code 0100). | ||
{{Internal Data|game=Pokémon FireRed and LeafGreen}} | ==Pokémon in Old Man Tutorial== | ||
In US 1.1, <code>0x7F8A0</code> contains the Pokémon ID, <code>0x7F8A2</code> the level, the instructions at <code>0x7F8B4</code> sets the battle type to OLD_MAN_TUTORIAL. | |||
If you try to set the Pokémon ID to a genderless Pokémon, you will softlock unless you change the check done on r0 ≠ 0 and the bne at 0x3DF54 after the call of func_3F7A0. | |||
==Check if Pokémon is male, female, or genderless== | |||
* <code>0x3F7A0</code> - Retrieves Pokémon gender ratio, checks if always male, always female or genderless, then checks pid to determine if male or female | |||
* arguments: | |||
** r0 = pokemon_id | |||
** r1 = pid | |||
* returns: | |||
** r0 = 0x0 if male; 0xFE if female; 0xFF if genderless | |||
0803F7A0 B500 push r14 ; | |||
0803F7A2 1C0B mov r3,r1 ;r3 = pokemon_pid | |||
0803F7A4 0400 lsl r0,r0,10h ; | |||
0803F7A6 0C02 lsr r2,r0,10h ;r2 = pokemon_id | |||
0803F7A8 490C ldr r1,=Lxx_82547F4h ;r1 = pointer_to_pokemon_data | |||
0803F7AA 00D0 lsl r0,r2,3h ; | |||
0803F7AC 1A80 sub r0,r0,r2 ; | |||
0803F7AE 0080 lsl r0,r0,2h ;r0 = pokemon_id × 28 | |||
0803F7B0 1840 add r0,r0,r1 ;r0 = pointer_to_pokemon_datum | |||
0803F7B2 7C00 ldrb r0,[r0,10h] ;r0 = pokemon_gender_ratio | |||
0803F7B4 2800 cmp r0,0h ; | |||
0803F7B6 D014 beq Lxx_803F7E2h ;if (pokemon_always_male), exit this function | |||
0803F7B8 2800 cmp r0,0h ; | |||
0803F7BA DB03 blt Lxx_803F7C4h ; | |||
0803F7BC 28FF cmp r0,0FFh ; | |||
0803F7BE DC01 bgt Lxx_803F7C4h ; | |||
0803F7C0 28FE cmp r0,0FEh ; | |||
0803F7C2 DA0E bge Lxx_803F7E2h ;if (pokemon_always_female || pokemon_is_genderless), exit this function | |||
0803F7C4 00D0 lsl r0,r2,3h ; | |||
0803F7C6 1A80 sub r0,r0,r2 ; | |||
0803F7C8 0080 lsl r0,r0,2h ;r0 = pokemon_id × 28 | |||
0803F7CA 1840 add r0,r0,r1 ;r0 = pointer_to_pokemon_datum | |||
0803F7CC 7C01 ldrb r1,[r0,10h] ;r1 = pokemon_gender_ratio | |||
0803F7CE 20FF mov r0,0FFh ; | |||
0803F7D0 4018 and r0,r3 ;r0 = 0xFF & pokemon_pid | |||
0803F7D2 4281 cmp r1,r0 ; | |||
0803F7D4 D804 bhi Lxx_803F7E0h ;if (pokemon_is_female), r0 = 0xFE, and exit this function | |||
0803F7D6 2000 mov r0,0h ;else r0 = 0 | |||
0803F7D8 E003 b Lxx_803F7E2h ;exit this function | |||
0803F7DA 0000 lsl r0,r0,0h ; | |||
0803F7DC 082547F4 ;(pointer_to_pokemon_data) | |||
0803F7E0 20FE mov r0,0FEh ;r0 = 0xFE | |||
0803F7E2 BC02 pop r1 ; | |||
0803F7E4 4708 bx r1 ; | |||
{{Internal Data|game=Pokémon 3rd Generation/Pokémon FireRed and LeafGreen}} |
Revision as of 13:02, 5 April 2025
The following article is a ROM map for Pokémon 3rd Generation/Pokémon FireRed and LeafGreen.
General pointers
Offset | Pointer | Comment |
---|---|---|
08000128 | 082350AC | Pointer to graphic table, which contains pointers to front pokemon images. |
0800012C | 0823654C | Pointer to graphic table, which contains pointers to back pokemon images. |
08000130 | 0823730C | Pointer to palette table, which contains pointers to normal palettes for pokemon images. |
08000134 | 082380CC | Pointer to palette table, which contains pointers to shiny palettes for pokemon images. |
Hex address to wild Pokemon
NOTE: This hacking I test in EUROPE (Spanish) version games.
Go to 3C438C address corresponding to Route 101 at the beginning of the game.
Then, in these address change the wild pokemon code, with the hex pokemon code that you like appear.
Hex address to Poke Market in first town
NOTE: This hacking I test in EUROPE (Spanish) version games.
Go to 16A30C address showing the codes first town.
Then you can change the code of first item that they sell you, to other code, for example a MasterBall (code 0100).
Pokémon in Old Man Tutorial
In US 1.1, 0x7F8A0
contains the Pokémon ID, 0x7F8A2
the level, the instructions at 0x7F8B4
sets the battle type to OLD_MAN_TUTORIAL.
If you try to set the Pokémon ID to a genderless Pokémon, you will softlock unless you change the check done on r0 ≠ 0 and the bne at 0x3DF54 after the call of func_3F7A0.
Check if Pokémon is male, female, or genderless
0x3F7A0
- Retrieves Pokémon gender ratio, checks if always male, always female or genderless, then checks pid to determine if male or female- arguments:
- r0 = pokemon_id
- r1 = pid
- returns:
- r0 = 0x0 if male; 0xFE if female; 0xFF if genderless
0803F7A0 B500 push r14 ; 0803F7A2 1C0B mov r3,r1 ;r3 = pokemon_pid 0803F7A4 0400 lsl r0,r0,10h ; 0803F7A6 0C02 lsr r2,r0,10h ;r2 = pokemon_id 0803F7A8 490C ldr r1,=Lxx_82547F4h ;r1 = pointer_to_pokemon_data 0803F7AA 00D0 lsl r0,r2,3h ; 0803F7AC 1A80 sub r0,r0,r2 ; 0803F7AE 0080 lsl r0,r0,2h ;r0 = pokemon_id × 28 0803F7B0 1840 add r0,r0,r1 ;r0 = pointer_to_pokemon_datum 0803F7B2 7C00 ldrb r0,[r0,10h] ;r0 = pokemon_gender_ratio 0803F7B4 2800 cmp r0,0h ; 0803F7B6 D014 beq Lxx_803F7E2h ;if (pokemon_always_male), exit this function 0803F7B8 2800 cmp r0,0h ; 0803F7BA DB03 blt Lxx_803F7C4h ; 0803F7BC 28FF cmp r0,0FFh ; 0803F7BE DC01 bgt Lxx_803F7C4h ; 0803F7C0 28FE cmp r0,0FEh ; 0803F7C2 DA0E bge Lxx_803F7E2h ;if (pokemon_always_female || pokemon_is_genderless), exit this function 0803F7C4 00D0 lsl r0,r2,3h ; 0803F7C6 1A80 sub r0,r0,r2 ; 0803F7C8 0080 lsl r0,r0,2h ;r0 = pokemon_id × 28 0803F7CA 1840 add r0,r0,r1 ;r0 = pointer_to_pokemon_datum 0803F7CC 7C01 ldrb r1,[r0,10h] ;r1 = pokemon_gender_ratio 0803F7CE 20FF mov r0,0FFh ; 0803F7D0 4018 and r0,r3 ;r0 = 0xFF & pokemon_pid 0803F7D2 4281 cmp r1,r0 ; 0803F7D4 D804 bhi Lxx_803F7E0h ;if (pokemon_is_female), r0 = 0xFE, and exit this function 0803F7D6 2000 mov r0,0h ;else r0 = 0 0803F7D8 E003 b Lxx_803F7E2h ;exit this function 0803F7DA 0000 lsl r0,r0,0h ; 0803F7DC 082547F4 ;(pointer_to_pokemon_data) 0803F7E0 20FE mov r0,0FEh ;r0 = 0xFE 0803F7E2 BC02 pop r1 ; 0803F7E4 4708 bx r1 ;
Collapse Internal Data for Pokémon 3rd Generation/Pokémon FireRed and LeafGreen
| |
---|---|