Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Read description for more information:
- https://www.youtube.com/watch?v=ddSHGg4-qSY
- I made two new 8F programs that turn Pallet Town into a devamped version of Twinleaf Town from Pokémon Diamond and Pearl!
- It's not an April Fool's joke, but it's nice this was uploaded near/on April 1. Like TheZZAZZGlitch's Pokémon pong, although this takes time to set up, you can pull this off without a GameShark or an emulator's memory editor if you have the patience to do so. To set everything up, I used a slightly altered version of TheZZAZZGlitch's method for writing programs up to 254 bytes long (https://www.youtube.com/watch?v=D3EvpRHL_vk).
- Summary:
- ----
- My code is stored from DC01-DCF0 (program 1) and from DD01-DD70 (program 2).
- All of this data is supposed to be for data about Pokémon in the current box, so the code effectively stays there to be executed whenever you want until you change boxes or mess with a box's contents.
- Once the code is executed, Pallet Town's map script byte (D5F1) is set to invalid value hex:15. This tells the game to execute arbitrary code from DB3E whenever you enter Pallet Town.
- Program 1 (240 bytes) changes Pallet Town into basically this map (http://i.minus.com/iTZQ884Oe5f79.png, created with a tool called Pokemap) (but I made some minor changes to the top section) surrounded by some trees. This was done by modifying the 4x4 tile blocks in memory from C6F9. The program tells the game to write some data to the DB3E address, and the DB3E code copies 4x4 block addresses from DC04 into C6F9 using a 'call CopyData' with C6F9 (4x4 blocks on the screen) as the destination. In order for 8F not to execute the Twinleaf Town layout information as code, there is a jp DCDF at DC01 to jump over it.
- Program 2 (112 bytes) adds custom text to the sign and adjusts the map's warps/gives all four doors a suitable warp. To add the custom text, I set the sign coordinates/number of signs by adjusting D4B0 onward. The number of signs was set to 05, and I added coordinates for sign 05, a glitch sign that doesn't normally exist. Sign 05 gets its text data from CA01; so I make the program write data beginning with 00 ('print text') to CA01, followed by character bytes that read "Twinleaf Town[NL]Fresh and Free![57]" The program writes to DB4A (overwriting the last byte, a ret in program 1, and overwriting the data onward) with three CopyData iterations. Like in program 1, the code at DD01 jumps over the variables (warp data, sign data, sign text data) to copy before writing to DB4A and DB4A taking the data from the variables past DD01.
- To adjust the warps, I modified D3AE (number of warps) to 04 then the bytes that follow it that control the coordinates of warps and where they go.
- My warps: Rival's house (top-left), Hall of Fame (top-right), Oak's Lab (bottom-left), Your house (bottom-right)
- When you enter Pallet Town, parts of the map may originally look unchanged. You need to move them off the screen to load Twinleaf Town.
- --
- Setting things up:
- --
- 1) Get 8F. One way is to use dry underflow (https://www.youtube.com/watch?v=ZyppANEvnh8) and the looping map trick to get 8F. (here is an 8F creation spot after Celadon City loops http://i2.minus.com/ikRWiyNP77Gap.png).
- Another way is to use a double distort CoolTrainer (https://www.youtube.com/watch?v=aqy9QSbn1to) with a Good Rod in the fourth position using x (multiplication sign), however, CoolTrainer has to work on your save and I only really know about the 7 letter long name method yet.
- 2) Get specific Pokémon in your party to redirect the code to item 3. They are needed for your code to work. (e.g. http://forums.glitchcity.info/index.php/topic,6638.msg194471.html#msg194471)
- 3) A modified version of TheZZAZZGlitch's 'jailbreak' trick to turn Pokémon Red into Pong:
- Prepare the following items from item 1:
- Max Repel x99 (optional but recommended)
- 8F x(any)
- X Accuracy, x97
- Burn Heal, x126
- Parlyz Heal, x15
- HP UP, x15
- Ice Heal, x15
- Potion, x134
- TM34, x20
- TM20, x46
- Leaf Stone, x52
- Great Ball, x201
- TM10, x1
- TM15, x46
- TM21 x46 (if you want to execute program 2 later to get warps and the sign to work)
- 4) Swap TM20 x46 with TM15 x46, use 8F and jump off a ledge to walk through walls.
- 5) Swap TM20 and TM15 back, toss TM34 until only one of them remains. The program is now in entering mode, and upon using 8F one byte is written to DC01 onward, with its value depending on your X and Y positions (i.e. y=01, x=F is a value of 1F, y=00 x=05 is a value of 05, etc). TM34's value will increase each time you put in a byte.
- 6) Write the following data ("Program 1") by walking to the right position (e.g. first you need to walk to y=C x=3), preferably while using repels to avoid grass encounters. You can use a memory viewer to keep track of what spots have which coordinates. But if this is not an option, here is a map that tells you the coordinates of spots. http://i1271.photobucket.com/albums/jj640/Torchickens/Coordinates%20map.png
- Data:
- Raw code:
- C3DFDC0F0F0F0F0F0F7B7B0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F7B7B0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0A0A0F0F0F0F0F
- 0F0F0F0F0F0F0C0E0A0A0A0A0A0A0F0F
- 0F0F0F0F0F0F10120A7B7B0A02030F0F
- 0F0F0F0F0F0F0A7B7B7B797B7B0A0F0F
- 0F0F0F0F0F0F74740A7B7B0A74740F0F
- 0F0F0F0F0F0F0A0A0A7B7B0A0C0E0F0F
- 0F0F0F0F0F0F02030A7B7B0A10120F0F
- 0F0F0F0F0F0F0A7B7B7B7B7B7B0A0F0F
- 0F0F0F0F0F0F0F0F1D1F1F1E0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F
- 0F01CE002104DC11F9C6CDB500C9010D
- 0021D2DC113EDBCDB5003E15EAF1D5C9
- ASM (Program 1):
- jp DCDF
- db 0F0F0F0F0F0F7B7B0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F7B7B0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0A0A0F0F0F0F0F
- 0F0F0F0F0F0F0C0E0A0A0A0A0A0A0F0F
- 0F0F0F0F0F0F10120A7B7B0A02030F0F
- 0F0F0F0F0F0F0A7B7B7B797B7B0A0F0F
- 0F0F0F0F0F0F74740A7B7B0A74740F0F
- 0F0F0F0F0F0F0A0A0A7B7B0A0C0E0F0F
- 0F0F0F0F0F0F02030A7B7B0A10120F0F
- 0F0F0F0F0F0F0A7B7B7B7B7B7B0A0F0F
- 0F0F0F0F0F0F0F0F1D1F1F1E0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F
- 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F
- 0F ["Twinleaf Town" 4x4 blocks]
- ld bc,00CE
- ld hl,DC04
- ld de,C6F9
- call 00B5
- ret
- ld bc,000D
- ld hl,DCD2
- ld de,DB3E
- call 00B5
- ld a,15
- ld (D5F1),a
- ret
- 7) Swap TM10 x1 with TM34 and use 8F to execute your code.
- 8) Congratulations, program 1 (map layout into Twinleaf Town) is complete.
- 9) Go back to Route 1 and set up your items like they were at the beginning (i.e. toss TM34 until you have 20). However, this time the TM21 x46 needs to be in the place of the TM20 x46, so that you begin writing at DD01 onwards instead of DC01 onward.
- 10) Swap TM21 x46 with TM15 x46, use 8F and jump off a ledge to walk through walls.
- 11) Swap TM21 and TM15 back, toss TM34 until only one of them remains. The program is now in entering mode, and upon using 8F one byte is written to DD01 onward, with its value depending on your X and Y positions (i.e. y=01, x=F is a value of 1F, y=00 x=05 is a value of 05, etc). TM34's value will increase each time you put in a byte.
- 12) Write the following data ("Program 2").
- Raw code:
- C364DD05FFFFFFFFFFFFFFFF070B0093
- B6A8ADABA4A0A57F93AEB6AD4E85B1A4
- B2A77FA0ADA37F85B1A4A4E757040504
- 0027050F00760D0300280D100025010B
- 002104DD11B0D4CDB500011F00210FDD
- 1101CACDB500011100212EDD11AED3CD
- B500C9012500213FDD114ADBCDB500C9
- ASM (Program 2):
- jp DD64
- db 05FFFFFFFFFFFFFFFF070B [# of Signs, Sign coordinates]
- db 0093B6A8ADABA4A0A57 [Custom text]
- db 0405040027050F00760D0300280D100025 [Warps]
- ld bc,000B
- ld hl,DD04
- ld de,D4B0
- call 00B5
- ld bc,001F
- ld hl,DD0F
- ld de,CA01
- call 00B5
- ld bc,0011
- ld hl,DD2E
- ld de,D3AE
- call 00B5
- ret
- 13) The next time you go to "Twinleaf Town", the signs and warps should be functionable.
- Removing Twinleaf Town:
- 14) Set up dry underflow (https://www.youtube.com/watch?v=ZyppANEvnh8) in your item storage box, then place one of the j. x0 into item 92, which should be a Boulder Badge (probably the second one you encounter while scrolling down). If you run into long name glitch items you may need to hold down and press B a few times to get past them. This does not change the data you wrote, but will change Pallet Town's script to 00h from 15h, where no arbitrary code is executed upon entering the town.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement