This page contains RAM addresses to various interesting and useful processes of GBA and DS Pokemon games.
Breakpoints can be set at these addresses.
Inspiration
This page is inspired by tsanth's thread with the same name on GameFAQs: [1]
Pokemon DPP (U)
DP RAM Address
|
Pl RAM Address
|
Description
|
Discovered by
|
02000C54
|
02000C88
|
Main()
|
Bond697
|
02000FB0
|
02001034
|
Begin Seed Calculation Routine
|
mingot, arcee
|
0201B9E0
|
0201D2DC
|
Set PRNG seed
|
mingot, arcee
|
0201B9EC
|
0201D2E8
|
PRNG
|
loadingNOW, tsanth
|
0201BA10
|
0201D30C
|
Alternate RNG used in some cases: Examples, PID generation for mystery gift pokemon, recalculating a PID after a failed shiny check, number which determines swarm pokemon and great marsh pokemon
|
SCV
|
0201BA1C
|
0201D318
|
Set IRNG Seed
|
mingot, arcee
|
02038B70
|
0203E778
|
Script Handler
|
loadingNOW
|
|
0203E7D2
|
Loads address for a command then branches to that address
|
SCV
|
02042FB4
|
0204BAFC
|
ARNG call for PID of Wondercard pokemon
|
SCV, arcee
|
02042FBA
|
0204BB02
|
Loads PID from wondercard to r0
|
SCV, arcee
|
02042FC8
|
0204BB10
|
First Shiny Check call during the generation of some wondercard pokemon
|
SCV, arcee
|
02042FD0
|
0204BB18
|
Beginning of loop that makes sure you do not get a shiny wondercard pokemon (in some cases)
|
SCV, arcee
|
0204305E
|
0204BBA6
|
PRNG call for first set of Wondercard pokemon IVs
|
tsanth, arcee
|
0204309C
|
0204BBE4
|
PRNG call for second set of Wondercard pokemon IVs
|
tsanth, arcee
|
0205DED4
|
|
Create chain set (not sure about address in tsanth's thread it said 205DED
|
tsanth, loadingNOW
|
0205DF42
|
|
End of Create chain set routine
|
tsanth, loadingNOW
|
0205E40C
|
02069B00
|
Pokeradar Routine
|
loadingNOW, tsanth, arcee
|
02068AAC
|
02075E38
|
Shiny Check, used to decide what sprite to show for a pokemon and to make sure dynamic PID mystery gift pokemon are not shiny as well as preventing manaphy from hatching shiny in some cases.
|
SCV, arcee
|
|
02075C86
|
128 step RNG advancement
|
arcee
|
|
0207760E
|
Poketch check @ daycare screen
|
arcee
|
0206A90C
|
02078780
|
Begin Calculation of Pokemon ID for alternate forms.
|
SCV, arcee
|
020EBC80
|
020E1F6C
|
Division routine; R0= R0 / R1, R1=R0%R1
|
tsanth, SCV
|
|
020EAC58
|
Pointer to Begin Routine for Script Command 0000
|
SCV
|
|
020EB974
|
Pointer to Begin Routine for Script Command 0347
|
SCV
|
021C4D48
|
021BFB14
|
PRNG State
|
Kazo
|
021C4D4C
|
021BFB18
|
Mersenne Twister Lookup Table
|
Kazo
|
021F4DA8
|
|
Beginning of Honey Tree Routine
|
SCV
|
021F4EE4
|
|
Determines a value from 0-3 to use to determine which list will be used and how the shake value is calculated. If 0, slathering fails and not pokemon will show up.
|
SCV
|
021F4F44
|
|
Determines a number from 0-5 that represents which pokemon will be encountered in a honey tree.
|
SCV
|
021F4F98
|
|
Determines which list will be used by (value determined by 021F4EE4) - 1 (its not done this way, but is equivalent)
|
SCV
|
021F4FAC
|
|
Determines a number from 0-3 that represents how much a Honey Tree will shake
|
SCV
|
021F5138
|
021EFF4C
|
Returns 1 if the current tree being slathered is a Munchlax Tree and 0 otherwise.
|
SCV
|
02211E60
|
|
Set GRNG seed
|
magical
|
02211E70
|
|
GRNG
|
magical
|
0223BA10
|
|
Movement Handler Start
|
tsanth
|
0223BA46
|
|
"Am I on grass?" check
|
tsanth
|
0223BAD4
|
|
Wild Encounter Check
|
tsanth
|
0223BB2E
|
|
Pair-battle (NPC partner) check
|
tsanth
|
0223BD1C
|
|
Movement Handler END
|
tsanth
|
0223C1EE
|
022377A2
|
Pokeball catching routine
|
tsanth, arcee
|
0223C5B8
|
|
Start of Encounter Table Lookup Handler
|
mingot
|
0223C66A
|
|
Start of Water (Sweet Scent/Surfing) Encounter Table Lookup Handler
|
mingot
|
0223C6A0
|
|
Start of Water (Fishing) Encounter Table Lookup Handler. There are 3 branches for each of the rods in this routine with different results for old and good/super.
|
mingot
|
|
022417F4
|
Encounter- terrain check
|
arcee
|
|
02241848
|
Encounter- motion mod
|
arcee
|
|
022479E6
|
Call to get ID routine (result in r0)
|
SCV
|
|
0224E920
|
Start of Frozen Handler
|
SCV
|
0224190A - ESV calc
02241B28 - nature calc (probably)
Pokémon HGSS (U)
RAM Address
|
Description
|
Discovered by
|
02000CA4
|
Main()
|
Bond697
|
0201FD44
|
PRNG advancement routine
|
Bond697
|
02061E2A
|
NPC movement
|
arcee
|
020F2998
|
Signed divmod()
|
?
|
020F2BA4
|
Unsigned divmod()
|
?
|
0210F6CC
|
Mersenne Twister lookup table counter
|
Bond697
|
021D15AC
|
Mersenne Twister lookup table
|
Kazo
|
021D15A8
|
PRNG State
|
Kazo
|
022440A0
|
Pickup / Honey Gather handler
|
magical
|
02246B24
|
Start of Water (Fishing) Encounter Table Lookup Handler [2]
|
mingot
|
02246FCC
|
Fishing decision
|
arcee
|
02247228
|
Pokéball catching routine
|
magical
|
022475F2
|
Partial encounter calc- movement modifier
|
arcee
|
0224767A
|
Partial encounter calc- ability/item modifier
|
arcee
|
02247698
|
Encounter slots
|
arcee
|
02247720
|
Start of Water (Sweet Scent/Surfing) Encounter Table Lookup Handler [3]
|
mingot
|
022483C4
|
Partial encounter calc- roamer modifier
|
arcee
|
Pokémon BW (U)
RAM Address
|
Description
|
Discovered by
|
01FF8000
|
ITCM start
|
Bond697
|
01FF80F0
|
ARM9 IRQ Handler
|
Bond697
|
02005124
|
main() function- infinite main/busy loop that runs the game starts at 02005166
|
Bond697
|
020056D0
|
Set up both main RNGs for use
|
Bond697
|
020056EC
|
PRNG advancement routine 1
|
Bond697
|
02005728
|
PRNG advancement routine 2
|
Bond697
|
02017EF4
|
Shiny check routine
|
Bond697
|
02018746
|
PID type decision
|
Bond697
|
02018788
|
Shiny prevention routine
|
Bond697
|
02019A6C
|
PKM + RAM encryption
|
Bond697
|
02035F50
|
New (NDS-only) input handler
|
Bond697
|
02035F94
|
GBA-equivalent input handler
|
Bond697
|
0203AE38
|
C-Gear startup RNG interaction(reseed MT, encrypt, etc)
|
Bond697
|
0203EFE0
|
memcmp()- memory compare: 2 pointers and length of comparison(in bytes))
|
Bond697
|
0203F04C
|
Set init MT seed (seed = init rng >> 32)
|
Bond697
|
0203F078
|
ARNG(same as gen 4)- build initial MT seed table
|
Bond697
|
0203F0C0
|
Mersenne Twister seed table builder
|
Bond697
|
0203F270
|
Initial Seed Creation Routine
|
OmegaDonut
|
0203F374
|
.sav encryption
|
Bond697
|
0207FD4C
|
VRAM bank control handler
|
Bond697
|
02082D5C
|
memcpy32()- accepts pointer to data start, pointer to copy start, and a length in bytes to copy
|
Bond697
|
02085D54
|
DSi Detection Routine
|
chiizu
|
02088E74
|
Convert dec -> hex(mainly for RTC data, but usable for anything)
|
Bond697
|
02088A98
|
Date/time switch statement- used to grab pieces of the date and time and convert them to hex
|
Bond697
|
0209C0C4
|
Signed divmod- r0/r1, result in r0; r0%r1, result in r1
|
Bond697
|
0209C2C8
|
Unsigned divmod- r0/r1, result in r0; r0%r1, result in r1
|
Bond697
|
020946AC
|
ARNG2(unused)- not a breakpoint, but notable nonetheless..
|
Bond697
|
020AA1C4
|
RNG state pointer
|
Bond697
|
02146A18
|
Mersenne Twister seed table pointer
|
Bond697
|
02193914
|
White Forest Trainer # Counter- returns # of trainers in White Forest
|
Bond697
|
021A9DB2
|
0x80000000 OR PID decision routine
|
Bond697
|
021A9DF8
|
Fishing decision
|
arcee
|
021AA44C
|
White Forest Battle Decision Routine- return 0 if no battle, 1 if there's a battle
|
Bond697
|
021BFBD0
|
Opponent accuracy
|
arcee
|
021C0A6C
|
Battle routine(setup)
|
Bond697
|
021C2466
|
Status infliction
|
arcee
|
021C6C18
|
Damage formula
|
arcee, Bond697
|
021F6388
|
Battle PRNG State
|
Kaphotics
|
02215374
|
Mersenne Twister Lookup Table
|
Bond697
|
02215D34
|
Mersenne Twister Lookup Table Counter
|
Bond697
|
02216244
|
PRNG State
|
Bond697
|
0221BBD0
|
Start of save data in RAM(when saving, all relevant data is written here, then cart RAM, then .sav)
|
Bond697
|
02250030
|
Encounter slots in RAM
|
Bond697
|
02257030
|
Step Counter
|
Bond697
|
02257034
|
Shaking Patch Step Counter
|
Bond697
|
0226DC5A
|
Move Consecutive Use Counter (Wild Battle)
|
Kaphotics
|
0226DC66
|
Protect Consecutive Turn Counter (Wild Battle)
|
Kaphotics
|
0226E70E
|
Move Consecutive Use Counter (Trainer Battle)
|
Kaphotics
|
0226E71A
|
Protect Consecutive Turn Counter (Trainer Battle)
|
Kaphotics
|
02274302
|
Move Decision Dump (Wild Battle)
|
Kaphotics
|
022BC734
|
Are there trainers in White Forest? (bool)
|
Bond697
|
0233F004
|
Egg step counter
|
ToastPlusOne
|
02FFFC3C
|
Vertical blank counter buffer
|
OmegaDonut
|
023FFDE8
|
RTC buffer(unsigned int rtc[8])
|
OmegaDonut
|
02FE0000
|
DTCM start
|
Bond697
|
02FE3780
|
Main(user/IRQ mode) stack start
|
Bond697
|
037FBCEC
|
ARM7 IRQ Handler
|
Bond697
|
(All offsets are White offsets. Black offsets are White offset minus 0x20)
Pokémon BW (J)
(All offsets are White offsets. Black offsets are White offset minus 0x20)
Pokémon Emerald (J)
RAM Address
|
Description
|
Discovered by
|
02024664
|
Frame Counter
|
Kaphotics
|
03005AE0
|
PRNG State
|
Kaphotics
|
0806F050
|
PRNG Advancement Routine
|
Kaphotics
|
080003A4
|
Main loop
|
Bond697
|
080005E4
|
Keypress handler
|
Bond697
|
08000758
|
VBlank interrupt
|
Bond697
|
080B413A
|
Feebas setup routine on finding a Feebas tile
|
Bond697
|
08296518
|
Modulus routine- r0 % r1, return result in r0
|
Bond697
|
08000248
|
IRQ setup
|
Bond697
|
Pokémon Emerald (U)
RAM Address
|
Description
|
Discovered by
|
02020000
|
Timer1 storage on TID creation
|
Bond697
|
020249C0
|
Frame counter
|
mingot
|
030022E0
|
Timer PRNG Initial State (Egg PIDs)
|
Kaphotics
|
03002750
|
IRQ Handler (user mode)
|
Bond697
|
03005D80
|
PRNG State
|
mingot
|
03005D84
|
Timer RNG Current Seed (Egg PIDs)
|
Kaphotics
|
08000248
|
IRQ setup
|
Bond697
|
080003A4
|
Main loop
|
Bond697
|
080005E4
|
Keypress handler
|
Bond697
|
08000758
|
VBlank interrupt callback
|
Bond697
|
08000988
|
Memblock header setup
|
Bond697
|
08000B1C
|
Define memblock
|
Bond697
|
08000B38
|
Declare memblock(malloc()?)
|
Bond697
|
0806F5CC
|
PRNG Advancement Routine
|
mingot
|
080B49E2
|
Feebas setup routine on finding a Feebas tile
|
Bond697
|
|
Start Method H
|
|
080B5144
|
Battle Test
|
Bond697
|
080B4AC8
|
Encounter Slot
|
Bond697
|
080B4C74
|
Set level
|
Bond697
|
080B4E2A
|
Sync (bool)
|
Bond697
|
080B4E4C
|
Nature Setup/Decision (skip if sync() == TRUE)
|
Bond697
|
08067E96
|
PKM Building Routine (test temp PIDs, make IVs on success)
|
Bond697
|
|
End Method H
|
|
08067BF8
|
Roamer creation start
|
Bond697
|
082E7BE0
|
Modulus routine- r0 % r1, return result in r0
|
Bond697
|
Pokémon Ruby / Sapphire (U)
RAM Address
|
Description
|
Discovered by
|
02024D1C
|
Quick Claw Determination
|
FractalFusion
|
020287E4
|
Egg Creation Step Counter
|
Kaphotics
|
03004818
|
PRNG State
|
Multiple
|
0800010C
|
IRQ setup/handler
|
Bond697
|
0800024C
|
Main loop
|
Bond697
|
08000428
|
Keypress handler
|
Bond697
|
0803AADC
|
PID creation routine
|
Bond697
|
08084AA6
|
Feebas decision
|
Bond697
|
081E0770
|
Interrupts/SWIs
|
Bond697
|
080003E4
|
Initial seed creation
|
Bond697
|
Pokémon FireRed / LeafGreen (U)
RAM Address
|
Description
|
Discovered by
|
02020000
|
Timer1 storage on initial seed creation
|
flovv, Bond697
|
03005000
|
PRNG State
|
Bond697
|
08000558
|
Turn on Timer1 @ TM1CNT_H = 0x80
|
Bond697
|
08000564
|
Grab and return the value of Timer1 for use in seeding
|
Bond697
|
08000570
|
Turn off Timer1 @ TM1CNT_H = 0x0 and store the grabbed value to 0x02020000
|
Bond697
|
08044EC8
|
PRNG Advancement Routine
|
Bond697
|