’Cause all games were better on the GBC

You are not logged in.

#1 1970-01-01 00:33:30

Registered: 2010-10-16
Post 1/203

Pokemon Gold's RAM

C000-C1FF Reserved for Music
C200-C2FF Palletes
C300-C39F Sprites
C3A0-C6E7 Tiles on the screen
C6E8-C6FF Empty
C700-CBFF Metatiles on map (Max square: 1280, rounding to about 35x35) - Any maps with over 1280 tiles could cause overflow, damaging other parts of the RAM, so DON'T DO IT!

CC13-CC16 - What Moves the Pokemon will have when you catch it.

CC70-CC98 Pointers on the Screen

CCD9-CE40 Colors to be written to screen (upon entering area)

CE5F - What move the Pokemon will learn
CE60 - Variable for description of move

CE63 - Unown selected at printer

CC66 - Card you choose at roulette

CEA2-CEA5 Tiles that are around you

CEED-CEF9 Bug catching contest winners (ID, Pokemon, Points)

CE63 - Unown Selected for Printer
CE64 - Position in Pokegear
CE65 - Position in Item Menu

CEBF - Position in main menu

CEE0 - Position in all menus

CEEF - Radio timer (time until next string)
CEF0-CEF2 Text string pointer

CEF8-CF1F Radio text string in use

CF2A-CF31 Main Menu options
CF32 - Tile type you're on

CF42 - (RANDOM) Counts from 0 to 7 endlessly

CF6B-CFCA Temporary storage for up to five text strings

CFEC-CFFD Items sold in Mart (DO NOT EXCEED 16!)

D002 - Item selected in Menu
D003 - Item number selected (Position, not ID)

D005 - Pokemon you will rename

D008 - How many items you're buying at the store

D00A - Items you will toss

D081-D090 Map header information

D0D4 - Evolution result

D0EF-D11E Enemy Pokemon Struct (Wild Only)

D119 - Type of Battle

D15F - Make FF to disable all keys (Use this for minigames!)

D173 - RAM 1 (For comparing bytes in scripts)
D174 - RAM 2 (For comparing bytes in scripts)
D175-D177 Pointer to text string displayed on screen

D193-D194 Park Time

D199 - Option Flags

D1A1-D1A2 - ID
D1A3-D1AD - Your name
D1BC-D1C7 - Rival Name
D1C8-D1D8 - Various text strings

D1DC - Day
D1DD - Hours
D1DE - Minutes
D1DF - Seconds

D1F6 - Camera follows which sprite? (Great for moving codes!)

D1FD-D224 Your sprite properties
D225-D3DD Sprites on Screen

D571 - Pokedex Flags
1 - Have Pokedex
2 - Unown Dex

D573-D57D Money coins and badges
D57E-D67A Item Struct Arrays (normal, balls, key items, TM/HMs, and deposited).

D67C - Pokegear Flags
1 - Map
2 - Radio
4 - Phone
8 - EXPN Card for Pokeflute Station
10 -
20 -
40 -
80 - Have Pokegear
D67D - Position on Radio

D681 - Item for select button
D682 - Riding bike/surfing flag
D683 - Number of hall of fames

D07D-D080 Pointer to metatile you're on (And part you're on)

D6B7-D6F1 Trigger Flags
D7B7-D8B6 Global Flags

D8BC- Box selected

D8BF-D93C Box Names

D959-D960 Room decorations

D968 - Can you rebattle trainer in Viridian?

D9C3 - Park Balls

D9C6-D9CF - Phone Numbers

D9E9-D9EA Lucky Number Show Winning ID Number
D9EB - Repel Steps left
D9EC-D9ED Number of steps with Bike
D9EE-D9F1 - Cities you can fly to
D9F3-D9F4 - Map you will dig to

D9FB-D9FC - Map you will teleport to

DA00-DA03 Map Bank, No, X and Y
DA04-DA21 Metatiles on Screen
DA22-DA29 Team Header Information
DA2A-DB49 Pokemon Structs
DB4A-DBCD Pokemon Text Structs

DBE4-DC03 Seen Pokemon
DC04-DC23 Own Pokemon
DC24-DC3D Unown Pokedex Order
DC3E - Unown puzzle flags
DC3F - Unown number selected
DC40 - Pokemon had an egg flag
DC41-DCE6 Daycare Variables
DCE7-DD16 Pokemon caught in Park Game struct

DD1C-DD1D Location of Raikou

DD23-DD24 Location of Entei

DD2A-DD2B Location of Suicune

DD2F-DD30 Map you warped to
DD31-DD32 Previous map
DD33-DD3F Magikarp size record (Feet, inches, name of winner)

DD55-DE7C Opponet trainer Pokemon Structs
DE7D-DEBF OT of opponent Pokemon (Your name for some reason, seems useless.  Stop it from writing here for some free space!)
DEC0-DF00 Empty
DF01-DFFF Reserved for the stack

--Battles Only (Go by it's example, use C700-CBFF during battles!  Should be plenty of free space)--
CAEF - Move the opponent's using

CAF6-CB0B Enemy/Your Pokemon's Name
CB0C-CB33 Your Pokemon Struct
CB34-CB3D Opposing Trainer's Class

CB46 - You
1 -
2 -
4 -
8 -
10 -
20 -
40 -
80 - Attraction

CB48 -
1 - Bide
2 - Repeat last move
4 -
8 -
10 - Took in Sunlight
20 -
40 -
80 - Confused
CB49 -
1 -
2 -
4 -
8 -
10 - Substitute
20 - Must recharge
40 -
80 -

CB4F - Enemy
1 -
2 -
4 -
8 -
10 - In encore
20 -
40 -
80 -

CB50 - Count down every turn until 00
CB51 - Confusion Count (How many Turns left)

CB5C - Encore Counter (Enemy)
CB5D - Perish Song Count (You)
CB5E - Perish Song Count (Enemy)

CB65-CB66 Money Earney

CBAA-CBB1 In battle stats you
CBB2-CBB9 In battle stats enemy

CBC1 - What attack you will use
CBC2 - What attack the enemy will use

CBCA-CBCC Cash from payday

CBDE - Enemy
1 -
2 -
4 -
8 - Light Screen
10 - Reflect
20 -
40 -
80 -

CBE9 - Weather

CBFA - Move for encore


#2 1970-01-01 00:33:30

Registered: 2010-10-16
Post 27/132

Re: Pokemon Gold's RAM

Thank you for posting this, it should come in quite handy!


#3 1970-01-01 00:33:30

Registered: 2009-11-25
Post 148/3,665

Re: Pokemon Gold's RAM

thanks a lot! Always nice to see your work CBM

I am not very active on this forum. I only pop in from time to time.


#4 1970-01-01 00:33:30

Registered: 2010-10-16
Post 3/203

Re: Pokemon Gold's RAM

I'll be updating this every once in a while, also if you have some ram addresses I missed let me know and I'll add them to the list.


#5 2012-07-09 14:03:06

Registered: 2010-10-16
Post 955/2,348

Re: Pokemon Gold's RAM

I've got a small question here.
The game starts filling the stack from the bottom (DFFF --> DF00) right? Related to it, could I "safely" copy 0x30 bytes of data in the beginning of the stack (DF00-DF2F) in an occasion where that much of the stack is not accessed (if the stack works the way I believe, this area of it shouldn't be accessable at that moment of time) ? That data of course could be there temporarily, I just wanted to do so to prevent "push hl, inc hl, push hl, inc hl, ...., pop hl, dec hl, pop hl...".


#6 2012-07-09 20:31:02

Registered: 2010-10-16
Post 289/459

Re: Pokemon Gold's RAM

ld hl, sp - 0x30
ld sp, hl
... // Use 0x30 bytes starting at hl
ld hl, sp + 0x30
ld sp, hl




Board footer

Powered by FluxBB