Sorry for digging up old bones, but with the advent of Diamond and Pearl, I suppose that there is a renewed interest in obtaining previous legendary Pokemon.
Considering how there are now event codes for Diamond and Pearl, which allow you to collect 'legit' legendaries, I thought that people might want to go back and pick up older legendaries in somewhat the same manner.
Since the only other Pokemon game I have access to here in school (and it's my girlfriend's); the following codes are for Emerald as well.
POKEMON EMERALD
MASTER CODE (from codejunkies.com)
d8bae4d9 4864dce5
a86cdba5 19ba49b3
a57e2ede a5aff3e4
1c7b3231 b494738c
~~~~~~~~~~~~~~~~~~~~~
Trainer Information
~~~~~~~~~~~~~~~~~~~~~
TRAINER NAME (Raw Format)
04224A54 XXXXXXXX
04224A58 FFXXXXXX
A - Z: BB to D4
a - z: D5 to EE
Note: Trainer names are backwards, for example, for the name ABCDEFG, the code will be
04224A54 BEBDBCBB
04224A58 FFC1C0BF
If the name is shorter than 7 letters, put FF into the remaining spaces. i.e., for the name abc, the code will be
04224A54 FFD7D6D5
04224A58 FFFFFFFF
TRAINER ID (Raw Format)
02224A5E 0000XXXX
SECRET ID (Raw Format)
02224A60 0000XXXX
~~~~~~~~~~~~~~~~~~~~~
Pokeball Codes
~~~~~~~~~~~~~~~~~~~~~
INF ALL POKEBALLS
23DCC06F BE640F90
EEAFE27E 6DBFE063
INF Pokeballs (Slot 1) (Raw)
042E6050 FFFF00XX
01: Master
02: Ultra
03: Great
04: Poke
05: Safari
06: Net
07: Dive
08: Nest
09: Repeat
0A: Timer
0B: Luxury
0C: Premier
~~~~~~~~~~~~~~~~~~~~~
Warp Codes (Must walk through a Door)
Disclaimer: Warp Codes are not my own, got most from
http://www.gamespot.com/gba/rpg/pokemon ... -24990707; not too sure where I found the rest.
I did add joker codes in order to simplify getting Rayquaza though

~~~~~~~~~~~~~~~~~~~~~
FARAWAY ISLAND (Mew)
E124B2B1 A46B45AB
BIRTH ISLAND (Deoxys)
4A99A22B 58284D2D
NAVEL ROCK (Lugia and Ho-oH)
842CB8A9 7F8B0149
TOP OF SKY PILLAR (Rayquaza Step 1) (Hold L)
8F498589 DB68ABFF
37A21411 E441F3EA
SOOTOPOLIS CITY (Rayquaza Step 2) (Hold R)
9D888122 8CFB57D8
1DE2E5F2 55690815
RETURN TO SKY PILLAR (Rayquaza Step 3) (Hold L)
Returns you to 'Top of Sky Pillar' to pick up Rayquaza
TERRA CAVE (Groudon)
37AA37EA 6FB1ABDA
MARINE CAVE (Kyogre)
CF0D8A17 07C5ED7E
SOUTHERN ISLAND (Latios)
7703F025 00394020
0D6A02AA B44948BD
5294C010 26045B52
SOUTHERN ISLAND (Latias)
7703F025 00394020
0D6A02AA B44948BD
D56552AC C200C366
HALL OF FAME (Complete Game)
CE3EF9E9 3C41A95C
~~~~~~~~~~~~~~~~~~~~~
Re-Battle Codes
Note: See Disclaimer in 'Warp Codes'
~~~~~~~~~~~~~~~~~~~~~
GROUDON & KYOGRE
67DAF8E7 3F6C38D6
MEW, LATIOS & LATIAS
F28AEEBB E96723FB
LUGIA & HO-OH
719C9601 0AFEE31A
DEOXYS
404F4203 DEDBC3F7
RAYQUAZA
67BD0A40 0DD73EBA
~~~~~~~~~~~~~~~~~~~~~
Wild Pokemon Modifiers
Note: See Disclaimer again
~~~~~~~~~~~~~~~~~~~~~
WILD POKEMON ALWAYS SHINY (Hold L+R)
13DF099D 9207C0AC
F3A9A86D 4E2629B4
18452A7D DDE55BCC
Note: This code seems to generate Shiny Pokemon based
on your Trainer ID/Secret ID; hence, both Sex and Nature are fixed.
It would be nice if someone could figure out a code that does not affect
either Sex or Nature, as well as separate Wild Pokemon Modifier codes
for Sex, Nature and IVs (i.e., like the codes in Diamond and Pearl).
Have Fun =)