Site cover image

🐾flag3

RAM Writer in Pokémon FireRed/LeafGreen (JP)

This is a translation of the original article:

📄Arrow icon of a page linkポケットモンスター ファイアレッド・リーフグリーン バイナリエディタ

It was entirely processed by Claude Opus 5.5 in Claude Code with the Notion MCP.

The RAM Writer is a tool that uses arbitrary code execution to freely read and write the game's memory. This article explains how to install a RAM Writer in the Japanese versions of Pokémon FireRed and LeafGreen.

Image in a image block

RAM Writer Installation Procedure

Environment

This guide only works with the Japanese versions of Pokémon FireRed and LeafGreen. It does not work with any non-Japanese version. Both the GBA versions and the Switch versions are supported.

Version Differences

The GBA versions of Pokémon FireRed and LeafGreen each have a v1.0 and a v1.1. You can determine which version you have by examining the numbers engraved on the cartridge's PCB.

  • If the trailing digits are 20, it is v1.0.
  • If the trailing digits are 30, it is v1.1.

Preparation

  • A Pokémon that knows Knock Off
    • Farfetch'd (じんすけ), obtainable via in-game trade, learns Knock Off at Lv. 21.
  • A Pokémon that knows Recycle
    • Mr. Mime (バリヤン), obtainable via in-game trade, learns Recycle at Lv. 33.
  • A consumable item (e.g., a Berry)
    • An Oran Berry, which activates at 50% HP or below, is ideal.
      • Oran Berries can be obtained on Route 25.
  • Mail
    • Can be purchased at the Celadon Department Store for 50 yen.
    • Prepare at least 7 pieces.

Step 1: Prepare the Material Pokémon

The easiest way to obtain a material Pokémon is to use the Nidoran♂ (ニドくん) obtainable via the in-game trade in LeafGreen, with its experience adjusted to 466, 488, or 493. If any of the following apply to you, please refer to Detelony's explanation video or final's article.

  • You are using FireRed.
  • You already have ニドくん but it is difficult to adjust its experience to 466, 488, or 493.
  • ニドくん has already evolved.

Note that since ニドくん obtained via the in-game trade has a personality value (PID) of 0x4C970B9E and a Trainer ID of 63184, it can be used as a material Pokémon by adjusting its experience to a different value.

Step 2: Mail Glitch

Prepare the following 3 Pokémon in your party, with the first 2 slots being Pokémon 1 and 2 below.

  1. Any Pokémon holding a consumable item.
  2. A Pokémon that knows Knock Off.
  3. A Pokémon that knows Recycle and is holding Mail (the message can be anything).

Start a Double Battle. It is recommended to save before starting. In the Double Battle, perform the following steps:

  1. Have the Pokémon use (consume) the consumable item.
  2. Once the item has been consumed, switch that Pokémon out for the Pokémon that knows Recycle and is holding Mail.
  3. Use Knock Off on the Recycle-user holding Mail to knock off its Mail.
  4. Use Recycle to recover the consumed item.
  5. End the battle.

Check your party. If the Pokémon that knows Recycle is no longer holding Mail, the Mail Glitch succeeded. Give the Recycle-user Mail again.

Step 3: Obtain the Glitch Pokémon

Place the material Pokémon obtained in Step 1 as the 1st Pokémon in Box 3, and fill your party with 6 Pokémon.

Image in a image block

Give Mail to all 6 Pokémon (the message can be anything). When you attempt to give Mail to the 6th Pokémon, a Mail screen with ??? entered will be displayed.

If you are using LeafGreen and the material Pokémon is ニドくん, set the 3rd and 5th words of the Mail as shown below. The _____ entries in the table mean to delete the ????? word.

Experience3rd word5th word
466ポケモンゲット_____
488レッド_____
493レベル_____
Image in a image block
Image in a image block
Image in a image block

If you are using FireRed or a different material Pokémon, please use Detelony's FRLG ACE Glitch Pokémon Generation Calculator, or final's Species Word Finder and Checksum Adjustment Calculator.

Step 4: Obtain the Glitch Pokémon for Arbitrary Code Execution

Keep only 1 Pokémon in your party, and empty Boxes 12 through 14. Set the names of Boxes 1 through 5 as follows.

GBA

Box 1:  [リび…oく ゼn]
Box 2:  [ …tま 1tほ]
Box 3:  [ぁm  あい]
Box 4:  [アクぢいいN]
Box 5:  [O]

Switch

Box 1:  [リび…oく ゼn]
Box 2:  [ …tま 1tほ]
Box 3:  [ぁm  あい]
Box 4:  [アエぢいいN]
Box 5:  [O]

Open the "Move Pokémon" menu, pick up any Pokémon, move it onto the Glitch Pokémon from Step 3, and swap them. A new Glitch Pokémon is generated as the 2nd Pokémon in your party.

FireRed

Image in a image block

LeafGreen

Image in a image block

Step 5: Create the Ursaring for Transfer

Empty the 16th slot of Box 1, and set the names of Boxes 1 through 14 as follows.

⚠️
For the similar-looking 「へ・べ・ぺ/ヘ・ベ・ペ」 and 「I/l」, only the katakana 「ヘ・ベ・ペ」 and the uppercase 「I」 (I) are annotated. If there is no annotation, enter the hiragana 「へ・べ・ぺ」 or the lowercase 「l」 (L).
Box 1:  [ォめンばつい『は]
Box 2:  [アこぅほょ l]
Box 3:  [せもっめコづグね]
Box 4:  [アCTへGけl]
Box 5:  [うぽべはゆリあゃ]
Box 6:  [をさV9をうW]
Box 7:  [CTぃGCTるG]
Box 8:  [アざTざGこl]
Box 9:  [ l99キっうぅ]
Box 10: [アアアオエあぅ]
Box 11: [WsっるあW]
Box 12: [ア み Czs]
Box 13: [zs  ぺる  ]
Box 14: [が]

Pick up any normal Pokémon. Swap it with the Glitch Pokémon generated in Step 4 and then swap them back to the original arrangement. An Ursaring is generated in the 16th slot of Box 1.

Image in a image block

From now on, keep Boxes 12 through 14 empty, and do not change the position, nickname, or held item of the Ursaring or of the 3 Pokémon generated in Step 6.

Step 6: Simplified RAM Writer Setup

Set the names of Boxes 1 through 4 as follows, and do not change them until all 3 transfers are finished.

Box 1:  [ァらぜいっむは3]
Box 2:  [アoひぴざ l]
Box 3:  [めリあゃ みぼづ]
Box 4:  [アボねつはポば]

Set Boxes 5 through 14 starting from the 1st set, and perform the same swap as in Step 5 each time you enter a set.

Set 1: Transfer to the 17th Slot of Box 1
Box 5:  [あF♂あlどゥ ]
Box 6:  [ ぇ」お  よゅ]
Box 7:  [ぴ9/ゃァばチl]
Box 8:  [ゃぶぅう!ス l]
Box 9:  [yぶOねきもぁぴ]
Box 10: [ァばカlうぎ む]
Box 11: [あミろぴゥゃゥゃ]
Box 12: [あむァばぴlゾざ]
Box 13: [ むァばぶl ら]
Box 14: [おkなぶ リ]

Perform the swap. Once a Charmander is generated in the 17th slot of Box 1, proceed to the 2nd set.

Set 2: Transfer to the 18th Slot of Box 1
Box 5:  [いいlィィう  ]
Box 6:  [ぞぐ き ゥづゅ]
Box 7:  [V9ぶほくぢぃW]
Box 8:  [えめあげべく l]
Box 9:  [アMよYあれせe]
Box 10: [と2ベシィぐあれ] (katakana ベ)
Box 11: [うh7スぞね7オ]
Box 12: [LsミねIけうろ] (uppercase I)
Box 13: [fXか Fsに ]
Box 14: [いぶあギあぅ]

Perform the swap. Once a Bulbasaur is generated in the 18th slot of Box 1, proceed to the 3rd set.

Set 3: Transfer to the 19th Slot of Box 1
Box 5:  [ういlあ ぃあ ]
Box 6:  [えグおしWすぴB]
Box 7:  [ゃ9♀ゃあむァば]
Box 8:  [せl んこVかl]
Box 9:  [〇〇Xsusゥァ]
Box 10: [ミゾCsァゥフふ]
Box 11: [ァばうlぇBFC]
Box 12: [ みいめあがDば]
Box 13: [みび**そく##]
Box 14: [ くギふいい]

Replace 〇〇, **, and ## with the characters in the table below based on your version.

Version〇〇**##
GBA FireRed v1.0jえづンドゲ
GBA FireRed v1.1せおガンあゲ
Switch FireRedズゴo♀4K
GBA LeafGreen v1.0よおひンドゲ
GBA LeafGreen v1.1カおソンあゲ
Switch LeafGreenbゴA♀4K

Perform the swap. The setup is complete once a Spinda is generated in the 19th slot of Box 1.

Image in a image block

Step 7: Start the Simplified RAM Writer

Set the names of Boxes 1 through 14 as follows.

Box 1:  [ァらぜいは3oひ]
Box 2:  [アぴざねぼ l]
Box 3:  [にべにぶあぃくタ]
Box 4:  [アポばアアアアア]
Box 5:  [そべぶネしぼゾぢ]
Box 6:  [てWしぱねリいり]
Box 7:  [そWレぉレぉねリ]
Box 8:  [ りこWィげこタ]
Box 9:  [えべくネくぼィね]
Box 10: [えぅけネきぼグね]
Box 11: [くびミび〇〇 う]
Box 12: [**おく7@ う]
Box 13: [## う%ベうい] (katakana ベ)
Box 14: [ブし  おお  ]

Replace 〇〇, **, @, ##, and % with the characters in the table below based on your version.

Version〇〇**@##%
GBA v1.0ぴっユセせぃぅ…
GBA v1.1?ぽアセせゾぃ…
Switchざぢュバそlめ?

Perform the same swap as in Step 5, then close all PC menus to start the simplified RAM Writer.

Simplified RAM Writer

Image in a image block

The 4 digits on the left are the input position, and the 2 digits on the right are its value.

🎮
Simplified RAM Writer Controls

B: Input position -01

A: Input position +01

↑: Value -01

↓: Value +01

←: Value -10

→: Value +10

START: Exit

SELECT: Execute code from input position 0000 (be careful not to press this until you have entered the program)

Step 8: RAM Writer Setup

Use the simplified RAM Writer to input the RAM Writer program. Once input is complete, you can start the RAM Writer by pressing the Select button. It is recommended to press the Start button to exit the simplified RAM Writer and save before starting the RAM Writer.

Input positionValue
0000F8
0001B5
00024B
0003A0
00044D
00054C
000600
0007F0
00081E
0009F8
000AFF
000B28
000C2D
000DD0
000E50
000F4D
001028
001172
001211
001321
00144A
00154C
001600
0017F0
001816
0019F8
001A45
001BA0
001C52
001DA2
001E04
001F23
002000
0021F0
002209
0023F8
002408
002530
00260C
002723
002800
0029F0
002A05
002BF8
002C02
002D20
002E00
002F06
003068
003171
003228
003360
003444
0035E0
003600
003721
003807
0039B5
003A28
003B7A
003C00
003D22
003E41
003F4C
004000
0041F0
004201
0043F8
004407
0045BD
004620
004747
004805
0049DF
004A3F
004B4C
004CFF
004DF7
004EFB
004FFF
00503E
00514B
00521B
005388
005419
005507
005609
0057D5
005828
00597A
005A41
005B4C
005CFF
005DF7
005EF3
005FFF
006000
006120
006240
00634C
0064FF
0065F7
0066EF
0067FF
006800
006920
006AF8
006BBD
006C6F
006D79
006EE8
006F79
007039
00711F
007201
0073D0
007428
007568
007679
00771C
007804
00792B
007A07
007BD8
007C00
007D2B
007E1C
007FD0
0080E9
008179
008228
008368
008401
008570
008699
008708
008840
008918
008A18
008BE0
008C20
008D2B
008E08
008FD8
009002
0091D0
009238
00931F
009403
0095D0
009601
0097E0
009878
00991E
009A00
009BD5
009C05
009D30
009E68
009F71
00A010
00A1E0
00A2C9
00A300
00A401
00A522
00A6CA
00A741
00A819
00A90A
00AA02
00ABD0
00AC12
00AD01
00AE02
00AF29
00B001
00B1D0
00B240
00B32B
00B400
00B5D1
00B652
00B742
00B880
00B918
00BA04
00BB2F
00BC01
00BDD0
00BE28
00BF60
00C000
00C178
00C2E8
00C371
00C424
00C549
00C68C
00C71C
00C824
00C94B
00CA22
00CB48
00CC86
00CD1C
00CE15
00CF22
00D001
00D180
00D204
00D383
00D443
00D582
00D640
00D730
00D801
00D93A
00DAF9
00DBD1
00DC14
00DD27
00DE2B
00DF68
00E0D8
00E11B
00E20B
00E330
00E46B
00E579
00E603
00E721
00E84B
00E940
00EA0B
00EB2F
00EC00
00EDD0
00EE06
00EF23
00F01C
00F124
00F200
00F3F0
00F40D
00F5F8
00F602
00F736
00F800
00F978
00FA0B
00FB2F
00FC00
00FDD1
00FEE8
00FF79
010007
01013B
010204
010324
010400
0105F0
010604
0107F8
01082A
010936
010A01
010B3F
010CE7
010DD1
010E9B
010FE7
011001
011100
0112E1
011340
011409
011507
011609
01170F
0118E2
011908
011A9A
011B42
011C00
011DD1
011E11
011F31
01200E
01214A
012251
012318
012401
012531
012631
012780
012802
012936
012A04
012B3C
012CF0
012DD5
012E70
012F47
013000
013102
013203
013311
013403
01350F
01368F
013700
013800
013904
013A05
013B00
013CGBA v1.0: 05
GBA v1.1: 71
Switch: 6D
013DGBA v1.0: 50
GBA v1.1: 4F
Switch: 4F
013E00
013F08
0140GBA v1.0: 29
GBA v1.1: 95
Switch: 91
0141GBA v1.0: 44
GBA v1.1: 43
Switch: 43
014200
014308
0144FR GBA v1.0: 25
FR GBA v1.1: 75
FR Switch: 19
LG GBA v1.0: FD
LG GBA v1.1: 4D
LG Switch: F1
0145FR GBA v1.0: ED
FR GBA v1.1: EC
FR Switch: 29
LG GBA v1.0: EC
LG GBA v1.1: EC
LG Switch: 28
0146GBA: 12
Switch: 13
014708
0148GBA v1.0: E9
GBA v1.1: E5
Switch: E1
014905
014A00
014B08
014CGBA v1.0: 60
GBA v1.1: C0
Switch: 10
014DGBA v1.0: 31
GBA v1.1: 30
Switch: 23
014E00
014F03
0150GBA: B0
Switch: AC
01519B
015203
015302
015422
0155F8
015600
015706
015817
0159E2
015A00
015B00
015C9F
015DF0
015E00
015F00
0160GBA v1.0: 09
GBA v1.1: 75
Switch: 71
0161GBA v1.0: 3E
GBA v1.1: 3D
Switch: 3D
016200
016308
0164GBA v1.0: BD
GBA v1.1: B9
Switch: B5
016520
016600
016708
0168A1
0169A2
016AA3
016BA4
016CA5
016DA6
016EA7
016FA8
0170A9
0171AA
0172BB
0173BC
0174BD
0175BE
0176BF
0177C0
0178FF
017900
017A00
017B00
017C00
017D00
017E00
017F00

RAM Writer

From now on, you can start the RAM Writer each time you start the simplified RAM Writer and press the Select button.

Image in a image block

The 8 digits on the left are the memory address, and the 2 digits on the right are its value. Select the 2 digits shown in red with Left and Right, and change them with Up, Down, L, and R.

🎮
RAM Writer Controls

←: Move the selection left

→: Move the selection right

↑: Selected 2 digits -01

↓: Selected 2 digits +01

L: Selected 2 digits -10

R: Selected 2 digits +10

A: Write the displayed value to the current address

B: Write the displayed value to the current address

SELECT: Write the value and advance the address by +01

START: Exit and return to the game

Starting the Full Version Directly

Change the names of both Box 10 and Box 14 to the following.

Box 10: [ ぅけネきぼグね]
Box 14: [ブし  ベし  ] (katakana ベ)

Perform the same swap as in Step 5 and close the PC to start the full version of the RAM Writer directly.

Advanced: Rewriting the Box Names with the Full Version

This method uses the full version to rewrite 3 bytes and change the box names to the ones for starting it directly.

Read the 4 bytes starting at the following address and reverse their order to get the start address of the box data.

VersionAddress to start reading 4 bytes
GBA v1.003005050
GBA v1.103004FB0
Switch03004240

For example, if B0 92 02 02 is displayed, the start address is 020292B0. Add the values in the table below to the start address in hexadecimal to get the addresses to rewrite.

Part to rewriteValue to addBeforeAfter
1st character of Box 10000083950400
5th character of Box 14000083BD0599
6th character of Box 14000083BE050C

If the start address is 020292B0, the addresses are as follows.

Part to rewriteCalculationAddress to rewrite
1st character of Box 10020292B0 + 0000839502031645
5th character of Box 14020292B0 + 000083BD0203166D
6th character of Box 14020292B0 + 000083BE0203166E

The start address changes when you enter or leave the PC or restart the game, so read it again every time. Check that all 3 calculated addresses match the "Before" values, then write the "After" values one at a time with A or B. If they do not match, do not change anything.

Perform the same swap as in Step 5 and close the PC to start the full version of the RAM Writer directly.

References

For the arbitrary code execution procedure, the following are referenced in addition to the resources mentioned in Step 1.

For the RAM Writer, the following are referenced.