This is a translation of the original article:
It was mostly processed by Claude 3.5 Sonnet.
The RAM Writer is the ultimate arbitrary code execution tool for first-generation Pokémon games. The RAM Writer introduced here is a version ported for the second-generation games. With this writer, you can read and write any value to any memory address. You can even write and execute entire programs, making it a powerful tool for installing and playing games.
This article serves as an accompanying guide for the following video.
RAM Writer Installation Procedure
Environment
This guide only works with the Japanese versions of Pokémon Gold, and Silver. It does not work with Pokémon Crystal or non-Japanese versions. It also does not work with Pokémon Stadium 2's GB Tower or some emulators. This guide assumes starting a new game. Please refer to the following article for information on installing a Ram Writer in the Japanese versions of Pokémon Crystal.
 📄RAM Writer in Pokémon Crystal (JP)   
Step 1: Progress to the National Park
- Set the player's name to "えてびま". If you are having trouble with the Japanese input method, please refer to the following page.
 - Set the day of the week to Tuesday, Thursday, or Saturday.
 -  Catch 3 wild Pokémon, and nickname one of them "クグ". Deposit them, including the Egg. 
- The second letter of the nickname "クグ" must be a "グ". The first letter can be any letter.
 
 - Receive the Lure Ball (ルアーボール) from Kurt.
 -  Enter the Goldenrod City Pokémon Center. 
- This is necessary to set Goldenrod City as a Teleport destination.
 
 - Obtain the Bicycle and register it to the Select button.
 -  Obtain an Abra. 
- You can catch it in the wild or get it from the Goldenrod Game Corner. If getting it from the Game Corner, you’ll need to obtain the Coin Case in the Underground Path.
 
 - Obtain "ひきゃく" (Spearow).
 
Step 2: Obtaining a bad clone
- Have at least 2 Pokémon in your party, with Abra as the first party Pokémon. Participate in the Bug-Catching Contest.
 - After starting the bug-catching contest, turn around immediately and head back into the building. You’ll be asked if you want to quit the contest. Select "いいえ" and re-enter the National Park.
 - Teleport to Goldenrod City.
 - Deposit all Pokémon except Abra. Return to the National Park and end the Bug-Catching Contest.
 - You will obtain a Level 0 Pokémon for your party that looks similar to the Pokémon you previously had in the second party slot.
 - Deposit a Level 0 Pokémon in the Day Care, then immediately retrieve it.
 
Step 3: Obtaining a Second Bicycle
- Withdraw Not Egg, the Egg, "クグ", and Not Egg in order from the Box.
 -  From the PC, select "ボックスせいり/メールはずしてね" and add Not Egg to the front of your party. Make sure to leave Pokémon whose OT name is "えてびま" in the box. 
- In particular, do not leave the box with only "ひきゃく" (Spearow).
 
 - Swap the 1st Pokémon with the 6th Pokémon "クグ".
 - Swap the 1st Pokémon with the 7th Pokémon.
 - Swap the 1st Pokémon with the 7th Pokémon again.
 - The 7th Pokémon has a bicycle. Take this item and add it to the bottom of the Key Item list.
 
Step 4: Arbitrary Code Execution Setup
- Swap the 3rd Pokémon (Bad Clone) with the 4th Pokémon (Not Egg).
 - From the PC, select "ポケモンをあずける" and deposit the top two Pokémons from your party. Then, withdraw a Pokémon with OT name "えてびま" from the Box.
 - Swap the 4th Pokémon with the 6th Pokémon so that the OT name of the 4th Pokémon is "えてびま"
 - Open the Ball pocket and set the first item to Lure Ball (ルアーボール). Make sure the quantity of the ball at the bottom of the Ball pocket is 1, 2, 4, or 5.
 - Open the Key Items pocket, press Select on the first Bicycle, and then press Select on the second Bicycle.
 - A ball with quantity 255 will appear in the Ball pocket. Toss balls until 17 remain.
 -  Move the ball with the adjusted quantity to the 65th item in the Ball pocket. 
- The 66-67th items in the Ball pocket should look as follows, which can be used as a reference.
 - The 64th item in the Ball pocket shold be ? or “やめる” (Cancel), and the 65th item in the Ball pocket is assumed to have a quantity of 0-2.
 - If the 67th item in the Ball pocket is not a “じてんしゃ” (Bicycle), please re-register the Bicycle to the Select button.
 -  After moving, verify that the quantity of the 65th item in the Ball pocket is 17 for Gold/Silver. 🔍
66th item in Ball pocket: ? ×129
67th item in Ball pocket: “じてんしゃ” (Bicycle)
 
 - If the "ポケギア" disappears from the menu, the arbitrary code execution environment setup is complete.
 
Step 5: Simplified RAM Writer Setup
Change the Box names as follows:
Box 2: ダだゲムよダだガ
Box 3: だじダムキづごぱ
Box 4: ヅまてへぎまぴよ
Box 5: へぎまボぷへぎま
Box 6: へォひひ はァリ
Box 7: どダれはリダだや
Box 8: ざダれ?よダリ
Box 9: だかがよぜ?だを
After changing the Box names, give a Pokémon the following Mail:
に0ぞ?ムぞボデのよなゥゅリだっ
If you are having trouble with the Japanese input method, please refer to the following page.
After creating the Mail, read its contents. Then, you can start the simplified RAM Writer by opening the Pokédex.
Simplified RAM Writer
From now on, you can start the simplified RAM Writer each time you read the above Mail and then open the Pokédex.
 D6E6 on the left is the memory address being written to, and 00 on the right is its content. Note that the display of A, B, and C is abnormal in this simplified RAM Writer. A is g, B is a horizontal line, and C is a phone icon.
B: Address -01
A: Address +01
↑: Value -01
↓: Value +01
←: Value -10
→: Value +10
START: Exit
SELECT: Execute code from D6E6 (be careful not to press this before entering a program)
Step 6: 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.
| Address | Value | 
|---|---|
| D6E6 | CD | 
| D6E7 | A8 | 
| D6E8 | 34 | 
| D6E9 | CD | 
| D6EA | AE | 
| D6EB | 33 | 
| D6EC | CD | 
| D6ED | 87 | 
| D6EE | 0D | 
| D6EF | CD | 
| D6F0 | 95 | 
| D6F1 | 0D | 
| D6F2 | 11 | 
| D6F3 | F2 | 
| D6F4 | 40 | 
| D6F5 | 21 | 
| D6F6 | 00 | 
| D6F7 | 96 | 
| D6F8 | 01 | 
| D6F9 | 19 | 
| D6FA | 3E | 
| D6FB | CD | 
| D6FC | 5B | 
| D6FD | 0E | 
| D6FE | F0 | 
| D6FF | 9F | 
| D700 | F5 | 
| D701 | 21 | 
| D702 | 00 | 
| D703 | D0 | 
| D704 | CD | 
| D705 | 42 | 
| D706 | D7 | 
| D707 | E5 | 
| D708 | 11 | 
| D709 | F8 | 
| D70A | FF | 
| D70B | 19 | 
| D70C | E5 | 
| D70D | D1 | 
| D70E | 21 | 
| D70F | A9 | 
| D710 | C3 | 
| D711 | F0 | 
| D712 | 9F | 
| D713 | CD | 
| D714 | 9D | 
| D715 | 30 | 
| D716 | CD | 
| D717 | 8B | 
| D718 | D7 | 
| D719 | 01 | 
| D71A | 0C | 
| D71B | 00 | 
| D71C | 36 | 
| D71D | 7C | 
| D71E | 23 | 
| D71F | 7A | 
| D720 | CD | 
| D721 | 8B | 
| D722 | D7 | 
| D723 | 7B | 
| D724 | CD | 
| D725 | 8B | 
| D726 | D7 | 
| D727 | 36 | 
| D728 | 7F | 
| D729 | 23 | 
| D72A | 1A | 
| D72B | CD | 
| D72C | 8B | 
| D72D | D7 | 
| D72E | 13 | 
| D72F | 36 | 
| D730 | 7C | 
| D731 | 09 | 
| D732 | 7C | 
| D733 | FE | 
| D734 | C6 | 
| D735 | 20 | 
| D736 | E5 | 
| D737 | CD | 
| D738 | AD | 
| D739 | 30 | 
| D73A | 3E | 
| D73B | ED | 
| D73C | EA | 
| D73D | 4B | 
| D73E | C4 | 
| D73F | E1 | 
| D740 | 18 | 
| D741 | C2 | 
| D742 | CD | 
| D743 | F4 | 
| D744 | 36 | 
| D745 | F0 | 
| D746 | AB | 
| D747 | 5F | 
| D748 | 01 | 
| D749 | 01 | 
| D74A | 00 | 
| D74B | 07 | 
| D74C | 38 | 
| D74D | 18 | 
| D74E | 0B | 
| D74F | 0B | 
| D750 | 07 | 
| D751 | 38 | 
| D752 | 13 | 
| D753 | 0E | 
| D754 | F0 | 
| D755 | 07 | 
| D756 | 38 | 
| D757 | 0E | 
| D758 | 01 | 
| D759 | 10 | 
| D75A | 00 | 
| D75B | 07 | 
| D75C | 38 | 
| D75D | 08 | 
| D75E | 48 | 
| D75F | 07 | 
| D760 | 30 | 
| D761 | 04 | 
| D762 | E1 | 
| D763 | F1 | 
| D764 | D7 | 
| D765 | C9 | 
| D766 | 7B | 
| D767 | 0F | 
| D768 | 30 | 
| D769 | 10 | 
| D76A | 0F | 
| D76B | 0F | 
| D76C | 30 | 
| D76D | 01 | 
| D76E | E9 | 
| D76F | F0 | 
| D770 | 9F | 
| D771 | CD | 
| D772 | 9D | 
| D773 | 30 | 
| D774 | 79 | 
| D775 | 86 | 
| D776 | 77 | 
| D777 | C3 | 
| D778 | AD | 
| D779 | 30 | 
| D77A | 0F | 
| D77B | 38 | 
| D77C | 05 | 
| D77D | 0F | 
| D77E | 38 | 
| D77F | 06 | 
| D780 | 09 | 
| D781 | C9 | 
| D782 | 79 | 
| D783 | 84 | 
| D784 | 67 | 
| D785 | C9 | 
| D786 | F0 | 
| D787 | 9F | 
| D788 | 81 | 
| D789 | D7 | 
| D78A | C9 | 
| D78B | F5 | 
| D78C | CB | 
| D78D | 37 | 
| D78E | CD | 
| D78F | 92 | 
| D790 | D7 | 
| D791 | F1 | 
| D792 | E6 | 
| D793 | 0F | 
| D794 | C6 | 
| D795 | F6 | 
| D796 | F6 | 
| D797 | 60 | 
| D798 | 22 | 
| D799 | C9 | 
RAM Writer
From now on, you can start the RAM Writer each time you start the simplified RAM Writer and press the Select button.
 The 10 on the top of the screen is the current ROM bank and SRAM bank.
↑: Address -01
↓: Address +01
←: Address -10
→: Address +10
B+↑: Address -100
B+↓: Address +100
B+←: Address -1000
B+→: Address +1000
A+↑: Value -01
A+↓: Value +01
A+←: Value -10
A+→: Value +10
START: Exit
SELECT+↑: Bank -01
SELECT+↓: Bank +01
SELECT+←: Bank -10
SELECT+→: Bank +10
SELECT+A: Execute code from the current address (use with caution)
Use the RAM Writer to change the contents of addresses D418-D41A and DD90-DD9B as follows:
| Address | Value | 
|---|---|
| D418 | C3 | 
| D419 | E6 | 
| D41A | D6 | 
| DD90 | 3E | 
| DD91 | E1 | 
| DD92 | EA | 
| DD93 | FC | 
| DD94 | CF | 
| DD95 | 3E | 
| DD96 | 03 | 
| DD97 | 21 | 
| DD98 | 31 | 
| DD99 | 56 | 
| DD9A | CF | 
| DD9B | C9 | 
After changing, put the cursor on address DD90 and press SELECT+A to obtain TM33 in the key items pocket. Each time you use this TM33, you can directly start the RAM Writer.
 Step 7: Restore Normal State
Various side effects occur from the RAM Writer setup.
- Player's name
 - Ball pocket
 - PC Items
 - Pokégear
 - Pokédex
 - Box names
 - Party Pokémon
 
Player's Name
Set the ROM bank to 01, move the cursor to address 6237, and press SELECT+A to set the player's name. After naming, press the START button once to exit the RAM Writer.
Ball Pocket
 Set the contents of addresses D5EF to D5F4 to 02 A0 01 05 02 FF to normalize the Ball pocket.  
PC Items
Set the content of address D60A to FF to restore the PC Items section.
Pokégear
Move the content of address D66D to address D66F and set the content of address D670 to 00 to restore it.
Pokédex
Set the content of address D671 to 00 to normalize the Pokédex.
Box Names
After setting up the RAM Writer with TM33, you can change Box names as you like.
Set the ROM bank to 01, move the cursor to address 5D16, and press SELECT+A to reset Box names to their defaults.
Party Pokémon
Set your first Pokémon as the party leader, set the content of address D9E8 to 01, and set the content of address D9EA to FF to make your party consist of only your first Pokémon.
OT Name
Use the RAM Writer to change the contents of addresses DDA0-DDAB as follows:
| Address | Value | 
|---|---|
| DDA0 | 01 | 
| DDA1 | 06 | 
| DDA2 | 00 | 
| DDA3 | 11 | 
| DDA4 | 10 | 
| DDA5 | DB | 
| DDA6 | 21 | 
| DDA7 | B5 | 
| DDA8 | D1 | 
| DDA9 | C3 | 
| DDAA | D6 | 
| DDAB | 30 | 
After changing, move the cursor to address DDA0 and press SELECT+A to change the OT name of your first party Pokémon to the protagonist's name.
Reacquiring Egg, Abra, and Spearow
Use the RAM Writer to change the contents of addresses DDB0-DDCE as follows:
| Address | Value | 
|---|---|
| DDB0 | 3E | 
| DDB1 | 22 | 
| DDB2 | 21 | 
| DDB3 | B8 | 
| DDB4 | DD | 
| DDB5 | C3 | 
| DDB6 | F5 | 
| DDB7 | 26 | 
| DDB8 | 47 | 
| DDB9 | 2E | 
| DDBA | AF | 
| DDBB | 05 | 
| DDBC | 2D | 
| DDBD | 3F | 
| DDBE | 0A | 
| DDBF | 00 | 
| DDC0 | 00 | 
| DDC1 | 2D | 
| DDC2 | 15 | 
| DDC3 | 0A | 
| DDC4 | 00 | 
| DDC5 | 01 | 
| DDC6 | 49 | 
| DDC7 | 6E | 
| DDC8 | 4E | 
| DDC9 | 6E | 
| DDCA | 2F | 
| DDCB | 2C | 
| DDCC | 6E | 
| DDCD | 49 | 
| DDCE | 90 | 
After changing, move the cursor to address DDB0, press SELECT+A, then close the menu to obtain a Togepi Egg, Abra, and Spearow.
Usage Guide
Once you have installed a RAM Writer, see the following article to learn how to use it.
 📄RAM Writer Usage Guide in Pokémon Gold/Silver/Crystal (JP)   
Precautions
Do not edit addresses D418-D41A, and D6E6-D799 with the RAM Writer.
Speedrun Guide (only available in Japanese)
I will not translate this part into English.
Technical Notes
Ball Pocket Operation
The address corresponding to the 65th Ball pocket item is as follows:
| Number | Item ID | Quantity | 
|---|---|---|
| 65 | D670 | D671 | 
Address D671 stores the Pokédex mode. By setting the number of balls to 17 and then moving it with the 65th item in the Ball pocket, we can set address D671 to 11 (in hexadecimal). Setting the Pokédex mode to 11 and opening the Pokédex allows execution of address FB20.
Simplified RAM Writer
Explanation
Opening the Pokédex with mode 11 executes address FB20. Addresses CF21 to CF41 store the contents of the last viewed Mail, so by reading a Mail and then opening the Pokédex, you can start the simplified RAM Writer.
When executing address FB20, register a contains 20, and register hl contains FB20. So when executing address CF3D, a register contains 36, and the content of address D8E1 becomes 36.
The simplified RAM Writer is a program that outputs the address pointed to by the hl register and its contents. It changes the address pointed to by the hl register and its contents based on key inputs.
WRA0:CF21 CD A8 34         call 34A8
WRA0:CF24 C3 FC D8         jp   D8FC
WRA0:CF27 C5               push bc
WRA0:CF28 CB 30            swap b
WRA0:CF2A CD 2E CF         call CF2E
WRA0:CF2D C1               pop  bc
WRA0:CF2E 3E 0F            ld   a,0F
WRA0:CF30 A0               and  b
WRA0:CF31 4E               ld   c,(hl)
WRA0:CF32 C6 F6            add  a,F6
WRA0:CF34 2F               cpl  
WRA0:CF35 E6 9F            and  a,9F
WRA0:CF37 2F               cpl  
WRA0:CF38 1C               inc  e
WRA0:CF39 12               ld   (de),a
WRA0:CF3A C9               ret  
WRA0:CF3B D6 C5            sub  a,C5
WRA0:CF3D EA E1 D8         ld   (D8E1),a
WRA0:CF40 30 DF            jr   nc,CF21
WRA1:D8B2 0F               rrca 
WRA1:D8B3 30 06            jr   nc,D8BB
WRA1:D8B5 AF               xor  a
WRA1:D8B6 C6 10            add  a,10
WRA1:D8B8 30 0E            jr   nc,D8C8
WRA1:D8BA 50               ld   d,b
WRA1:D8BB 0F               rrca 
WRA1:D8BC 30 08            jr   nc,D8C6
WRA1:D8BE 9F               sbc  a
WRA1:D8BF D6 0F            sub  a,0F
WRA1:D8C1 30 05            jr   nc,D8C8
WRA1:D8C3 50               ld   d,b
WRA1:D8C4 30 2C            jr   nc,D8F2
WRA1:D8C6 0F               rrca 
WRA1:D8C7 9F               sbc  a
WRA1:D8C8 86               add  (hl)
WRA1:D8C9 32               ldd  (hl),a
WRA1:D8CA 2A               ldi  a,(hl)
WRA1:D8CB 44               ld   b,h
WRA1:D8CC 50               ld   d,b
WRA1:D8CD 11 CF C3         ld   de,C3CF
WRA1:D8D0 CD 27 CF         call CF27
WRA1:D8D3 45               ld   b,l
WRA1:D8D4 D6 50            sub  a,50
WRA1:D8D6 CD 27 CF         call CF27
WRA1:D8D9 1C               inc  e
WRA1:D8DA 46               ld   b,(hl)
WRA1:D8DB CD 27 CF         call CF27
WRA1:D8DE 50               ld   d,b
WRA1:D8DF CD F4 CB         call CBF4
WRA1:D8E2 CB 7F            bit  7,a
WRA1:D8E4 CA E9 D8         jp   z,D8E9
WRA1:D8E7 50               ld   d,b
WRA1:D8E8 34               inc  (hl)
WRA1:D8E9 0F               rrca 
WRA1:D8EA DA CA D8         jp   c,D8CA
WRA1:D8ED 0F               rrca 
WRA1:D8EE 30 D4            jr   nc,D8C4
WRA1:D8F0 50               ld   d,b
WRA1:D8F1 2B               dec  hl
WRA1:D8F2 0F               rrca 
WRA1:D8F3 DA E6 D6         jp   c,D6E6
WRA1:D8F6 0F               rrca 
WRA1:D8F7 D8               ret  c
WRA1:D8F8 50               ld   d,b
WRA1:D8F9 00               nop  
WRA1:D8FA 30 B6            jr   nc,D8B2
WRA1:D8FC 26 D6            ld   h,D6
WRA1:D8FE 2E E6            ld   l,E6
WRA1:D900 30 DD            jr   nc,D8DF
WRA1:D902 50               ld   d,b
ECH1:FB20 64               ld   h,h
ECH1:FB21 00               nop  
ECH1:FB22 B4               or   h
ECH1:FB23 C3 3B CF         jp   CF3B  Binary
CF21:
CD A8 34 C3 FC D8 C5 CB 30 CD 2E CF C1 3E 0F A0 4E
C6 F6 2F E6 9F 2F 1C 12 C9 D6 C5 EA E1 D8 30 DF
D8B2:
0F 30 06 AF C6 10 30 0E 50
0F 30 08 9F D6 0F 30 05 50
30 2C 0F 9F 86 32 2A 44 50
11 CF C3 CD 27 CF 45 D6 50
CD 27 CF 1C 46 CD 27 CF 50
CD F4 CB CB 7F CA E9 D8 50
34 0F DA CA D8 0F 30 D4 50
2B 0F DA E6 D6 0F D8 50 00
30 B6 26 D6 2E E6 30 DD 50
FB20:
64 00 B4 C3 3B CF  RAM Writer
Explanation
The RAM Writer program outputs 18 addresses, including the one pointed to by the hl register and their contents. It also displays the ROM bank and SRAM bank at the top of the screen to make them easy to change. You can start the RAM Writer by executing address D6E6.
WRA1:D6E6 CD A8 34         call 34A8
WRA1:D6E9 CD AE 33         call 33AE
WRA1:D6EC CD 87 0D         call 0D87
WRA1:D6EF CD 95 0D         call 0D95
WRA1:D6F2 11 F2 40         ld   de,40F2
WRA1:D6F5 21 00 96         ld   hl,9600
WRA1:D6F8 01 19 3E         ld   bc,3E19
WRA1:D6FB CD 5B 0E         call 0E5B
WRA1:D6FE F0 9F            ld   a,(ff00+9F)
WRA1:D700 F5               push af
WRA1:D701 21 00 D0         ld   hl,D000
WRA1:D704 CD 42 D7         call D742
WRA1:D707 E5               push hl
WRA1:D708 11 F8 FF         ld   de,FFF8
WRA1:D70B 19               add  hl,de
WRA1:D70C E5               push hl
WRA1:D70D D1               pop  de
WRA1:D70E 21 A9 C3         ld   hl,C3A9
WRA1:D711 F0 9F            ld   a,(ff00+9F)
WRA1:D713 CD 9D 30         call 309D
WRA1:D716 CD 8B D7         call D78B
WRA1:D719 01 0C 00         ld   bc,000C
WRA1:D71C 36 7C            ld   (hl),7C
WRA1:D71E 23               inc  hl
WRA1:D71F 7A               ld   a,d
WRA1:D720 CD 8B D7         call D78B
WRA1:D723 7B               ld   a,e
WRA1:D724 CD 8B D7         call D78B
WRA1:D727 36 7F            ld   (hl),7F
WRA1:D729 23               inc  hl
WRA1:D72A 1A               ld   a,(de)
WRA1:D72B CD 8B D7         call D78B
WRA1:D72E 13               inc  de
WRA1:D72F 36 7C            ld   (hl),7C
WRA1:D731 09               add  hl,bc
WRA1:D732 7C               ld   a,h
WRA1:D733 FE C6            cp   a,C6
WRA1:D735 20 E5            jr   nz,D71C
WRA1:D737 CD AD 30         call 30AD
WRA1:D73A 3E ED            ld   a,ED
WRA1:D73C EA 4B C4         ld   (C44B),a
WRA1:D73F E1               pop  hl
WRA1:D740 18 C2            jr   D704
WRA1:D742 CD F4 36         call 36F4
WRA1:D745 F0 AB            ld   a,(ff00+AB)
WRA1:D747 5F               ld   e,a
WRA1:D748 01 01 00         ld   bc,0001
WRA1:D74B 07               rlca 
WRA1:D74C 38 18            jr   c,D766
WRA1:D74E 0B               dec  bc
WRA1:D74F 0B               dec  bc
WRA1:D750 07               rlca 
WRA1:D751 38 13            jr   c,D766
WRA1:D753 0E F0            ld   c,F0
WRA1:D755 07               rlca 
WRA1:D756 38 0E            jr   c,D766
WRA1:D758 01 10 00         ld   bc,0010
WRA1:D75B 07               rlca 
WRA1:D75C 38 08            jr   c,D766
WRA1:D75E 48               ld   c,b
WRA1:D75F 07               rlca 
WRA1:D760 30 04            jr   nc,D766
WRA1:D762 E1               pop  hl
WRA1:D763 F1               pop  af
WRA1:D764 D7               rst  10
WRA1:D765 C9               ret  
WRA1:D766 7B               ld   a,e
WRA1:D767 0F               rrca 
WRA1:D768 30 10            jr   nc,D77A
WRA1:D76A 0F               rrca 
WRA1:D76B 0F               rrca 
WRA1:D76C 30 01            jr   nc,D76F
WRA1:D76E E9               jp   hl
WRA1:D76F F0 9F            ld   a,(ff00+9F)
WRA1:D771 CD 9D 30         call 309D
WRA1:D774 79               ld   a,c
WRA1:D775 86               add  (hl)
WRA1:D776 77               ld   (hl),a
WRA1:D777 C3 AD 30         jp   30AD
WRA1:D77A 0F               rrca 
WRA1:D77B 38 05            jr   c,D782
WRA1:D77D 0F               rrca 
WRA1:D77E 38 06            jr   c,D786
WRA1:D780 09               add  hl,bc
WRA1:D781 C9               ret  
WRA1:D782 79               ld   a,c
WRA1:D783 84               add  h
WRA1:D784 67               ld   h,a
WRA1:D785 C9               ret  
WRA1:D786 F0 9F            ld   a,(ff00+9F)
WRA1:D788 81               add  c
WRA1:D789 D7               rst  10
WRA1:D78A C9               ret  
WRA1:D78B F5               push af
WRA1:D78C CB 37            swap a
WRA1:D78E CD 92 D7         call D792
WRA1:D791 F1               pop  af
WRA1:D792 E6 0F            and  a,0F
WRA1:D794 C6 F6            add  a,F6
WRA1:D796 F6 60            or   a,60
WRA1:D798 22               ldi  (hl),a
WRA1:D799 C9               ret    Binary
                  CD A8 34 CD AE 33 CD 87 0D CD
95 0D 11 F2 40 21 00 96 01 19 3E CD 5B 0E F0 9F
F5 21 00 D0 CD 42 D7 E5 11 F8 FF 19 E5 D1 21 A9
C3 F0 9F CD 9D 30 CD 8B D7 01 0C 00 36 7C 23 7A
CD 8B D7 7B CD 8B D7 36 7F 23 1A CD 8B D7 13 36
7C 09 7C FE C6 20 E5 CD AD 30 3E ED EA 4B C4 E1
18 C2 CD F4 36 F0 AB 5F 01 01 00 07 38 18 0B 0B
07 38 13 0E F0 07 38 0E 01 10 00 07 38 08 48 07
30 04 E1 F1 D7 C9 7B 0F 30 10 0F 0F 30 01 E9 F0
9F CD 9D 30 79 86 77 C3 AD 30 0F 38 05 0F 38 06
09 C9 79 84 67 C9 F0 9F 81 D7 C9 F5 CB 37 CD 92
D7 F1 E6 0F C6 F6 F6 60 22 C9  TM33 in Key Items Pocket
Explanation
By executing address 5631 in ROM bank 03, you can obtain the item corresponding to the content of address CFFC in the key items pocket.
By using TM33 outside the TM pocket, it executes address F418. We have written a jump instruction to D6E6 at address F418, which allows us to start the RAM Writer.
WRA1:DD90 3E E1            ld   a,E1
WRA1:DD92 EA FC CF         ld   (CFFC),a
WRA1:DD95 3E 03            ld   a,03
WRA1:DD97 21 31 56         ld   hl,5631
WRA1:DD9A CF               rst  08
WRA1:DD9B C9               ret  
ECH1:F418 C3 E6 D6         jp   D6E6  Program to Change the OT Name
Explanation
Executing address 30D6 copies a specified length (in the bc register) from the source address (in the hl register) to the destination address (in the de register). The 6 bytes from address D1B5 store the player's name, and address DB10 stores the OT name of the first Pokémon in the party. Therefore, executing the following program can change the OT name of the first Pokémon to the player's name.
WRA1:DDA0 01 06 00         ld   bc,0006
WRA1:DDA3 11 10 DB         ld   de,DB10
WRA1:DDA6 21 B5 D1         ld   hl,D1B5
WRA1:DDA9 C3 D6 30         jp   30D6  Binary
01 06 00 11 10 DB 21 B5 D1 C3 D6 30  Program to Reacquire Egg, Abra, and Spearow
Explanation
Executing address 26F5 allows us to run the script written from the hl address onward, using the content of the a register as the ROM bank. By setting the ROM bank to 22, we can reference data related to the "ひきゃく" (Spearow).
WRA1:DDB0 3E 22            ld   a,22
WRA1:DDB2 21 B8 DD         ld   hl,DDB8
WRA1:DDB5 C3 F5 26         jp   26F5  Script
47                          ; Script_opentext
2E AF 05                    ; Script_giveegg
2D 3F 0A 00 00              ; Script_givepoke
2D 15 0A 00 01 49 6E 4E 6E  ; Script_givepoke
2F 2C 6E                    ; Script_givepokemail
49                          ; Script_closetext
90                          ; Script_end  Binary
3E 22 21 B8 DD C3 F5 26 47 2E AF 05 2D 3F 0A 00
00 2D 15 0A 00 01 49 6E 4E 6E 2F 2C 6E 49 90  
 
