# Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

## Arbitrary Code Execution Discussion

### Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP! - Page 1

Previous Page

- 1

Next Page

#### Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Lillian Finch
Date: 2019-06-03 03:18:51
[img]https://cdn.bulbagarden.net/upload/1/1a/Spr_1b_129.png[/img]
Hi! I'm new here! ^-^
I want to do a Magikarp only run of Pokemon Red on my Game Boy, but I don't want to just receive a starter Pokemon as a means to facilitate the first opportunity to get hold of a Magikarp (which would be the Magikarp salesman in route 4's Pokémon centre). So, instead I want to receive Magikarp as my starter Pokemon directly from professor Oak at the beginning of the game.
I know enough about arbitrary code execution to know that this is achievable, but not enough to do it myself. Is there anyone out there that would like to be my shining knight in armour by working out the specific steps required to go about realising this aspiration of mine?
Specifically, when professor Oak gives me the choice of which starter Pokemon I want, I want to instead walk back to Oak where some custom dialogue will play out. I want him to be surprised that I'm passing up on the other three starters and then I want him to, after some thought, offer me a unique Magikarp he was studying as it's the only other Pokemon he has lying around, or something to that extent.
I want the Magikarp to be level 5 and for it to know splash and dragon rage (it needs dragon rage as it needs at least one move that isn't normal type if I ever plan on getting past Agatha in the elite four as her ghost type Pokemon are immune to normal type damage and both struggle and tackle are normal type moves, plus 20 Magikarps that knew dragon rage were once given out as part of a promo called the Celadon University Hyper Test in 1998, so in my eyes this move is pseudo-legitimate for Magikarp to know). I also want Gary to choose Bulbasaur because Magikarp is weak against grass types and I'm a masochist. ;)

Useful information:
https://bulbapedia.bulbagarden.net/wiki/List_of_Japanese_event_Pok%C3%A9mon_distributions_in_Generation_I#University_Magikarp
https://bulbapedia.bulbagarden.net/wiki/Celadon_University
https://bulbapedia.bulbagarden.net/wiki/Dragon_Rage_(move)

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Sherkel
Date: 2019-06-03 04:19:32
"Achievable"…well, that's an interesting word choice. It could be with some series of programs under 254 bytes, maybe…including rewriting the scripts in Oak's lab from scratch, repointing to them, first walking through walls to a larger map to write values one-by-one using your X and Y position, and other things that would take weeks of focused effort to plan out, let alone execute. It'd be mad to attempt something on this scale with RAM editing (from the start of the game, no less,) and not in the good way. On second thought, entering Oak's lab would undo any such modifications as far as I know. (I just realized I'm still awake at 5 AM.)
All that said, why not try a ROM hack? You're looking to change quite a bit of the game here, and the knowledge of GB programming is indispensible now that hacking is possible by building from modified source code in the disassembly. Given the detail in your suggestion already, maybe you'll decide you want to go a bit further with making your own version of the game?

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Lillian Finch
Date: 2019-06-03 06:05:40
I wouldn't of imagined it being that hard. I thought it might just be a case of swapping, say, Squirtle's ID with Magikarp's ID in the part of the memory that stores the starter Pokemon, finding and changing the move set for the Magikarp I just received and adding a little bit of flavor text to Oak and change a pointer here or there.
I'm really new to this whole thing so I apologise if what I'm describing is harder than I think.
Teach me your wise ways o'honorable sensei!

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Torchickens
Date: 2019-06-03 06:28:00
Hello Lillian.
You have two options:
(theoretical): Cart-swap arbitrary code execution. I don't know if I'm qualified enough to make a setup yet sorry.
SRAM glitch
What you need to do is repeat this technique courtesy of PRAMA Initiative, but with Magikarp instead of Mew. It is based on the SRAM glitch, which (as you likely know) allows you to begin the game with a party of 255 Pokémon; then allowing for the expanded inventory by swapping Pokémon
https://www.youtube.com/watch?v=NOM1MHDRYT0
I forgot the videos. I will practice this glitch and make you a video.
You will need the Attack stat in international Fossil Conversion glitch (SRAM glitch version) to be 133 as this corresponds to a Magikarp.
You don't have to deposit each Pokémon in succession (previously aided by catching a Pokémon in Diglett's Cave or anywhere (Yellow) to reduce the party count to 49-51), based on the following find:
Expanded item pack: Swap Pokémon 9 with Pokémon 10, and then with Pokémon 11. If you want to undo the effects of the 255 Pokémon glitch, stand on the right tile of the house's exit mat, and swap Pokémon 187 with Pokémon 178, wait a while, and press A. Hence (in theory) you need to warp to Cinnabar Island and perform the swaps first (with the help of Rare Candies to adjust Attack stat; of which can be found in Celadon City for example from the x-coordinate, if I remember rightly).
Hope this helps! I will try my hardest to make a video for you and others who want to do this today.

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Sherkel
Date: 2019-06-03 12:48:06
I'd forgotten about the 255 Pokémon and fossil conversion glitches…those would let you get one instead of the starter. You could do it without the fossil conversion glitch by calling GivePokemon directly, although I'm not sure how fast that would be by comparison with no setup bootstrapped to a particular item. It wouldn't give you something like custom dialogue, but it would be a way to get somewhat close to this. Good luck!

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Lillian Finch
Date: 2019-06-04 00:17:51
Thanks! ;D
One more thing, could you copy paste a bunch of relevant links that would cover the basics behind programming the Game Boy and teach me how to do all of this?
Thanks a million, when my army of Magikarp invade, you will be spared.

#### Re: Magikarp as starter Pokemon in Pokemon Red - PLEASE HELP!

Posted by: Sherkel
Date: 2019-06-04 15:30:16
ISSOtm's guide is the best place to learn the foundations behind how it all works. Beyond that, the first post here can get you rolling with applying that within the games, followed by the wiki pages on whatever individual glitch techniques you decide to use.
Previous Page

- 1

Next Page