Skip to content

A way to export your Pokémon from Red and Blue, without the need for external hardware.

Notifications You must be signed in to change notification settings

Street-Philosopher/Gen-1-Escape-Plan

Repository files navigation

Gen 1 Escape Plan

As you'll know, the first two generations of Pokémon can't transfer to later generations. In addition, save files for those games run on batteries, which means that when those batteries run out the save files will be erased.

This repository contains an arbitrary code execution program (ACE) for pokémon Red and Blue (english version) that, when executed, will read the data for the pokémon in your current box, and then write it to the screen by changing the tile data to the data read from the box.

This way, it is possible to transfer pokémon from gen1: there are many other ways of doing it, but all the ones i could find require some external device to read your save file, and I didn't want to buy something that I would only use once. Instead, the idea behind this program is being able to do it with just your GameBoy, a smartphone, and some glitch magic.

Usage

More detailed instructions can be found here.

First step is to execute the ACE program. Find any setup that you like (i recommend this one for RB), write the program you find in the version of bytes.txt corresponding to the game you're playing on and execute it (if you're using the setup I mentioned above, the bytesReader.py script you'll find in the release will automatically convert it into coordinates so you don't have to).

Important: before executing the program, you should enter a pokémon centre. It doesn't have to be a pokémon centre, as long as the top-left tile of your screen is at co-ordinates 0-0 and there are no moving tiles on screen, but entering a building is the easiest way of achieving this.

After executing the program, exit any menus you may be in: your GameBoy screen will show a code. If you want to continue the process in a later moment you'll have to take a picture; if you do, make sure that each individual pixel of the GameBoy screen are perfectly visible and distinct, otherwise you will not be able to decode it from the picture.

If you want to read the code manually, follow these instructions exactly:

  1. The code has black and dark pixels: you should read the code by squares, 8 pixels by 8 pixels
  2. The first square is the top left, second is the one to its right and so on. Once you reach the end of the line, go back to the left and down one line
  3. Each square will be read in the following way: take the first row of pixels (the topmost line) and write down all dark pixels as a 0, and all black pixels as a 1. Then, use a binary converter (like this) to convert this binary string to a number in decimal and write down the number you get. Once you have written down the number you can go to the next row, and start with a new binary string.

Note: to make things faster if you want to interpret manually, note that you don't have to transcribe all of the 672 lines. Instead, you only have to read (33 times the number of pokémons in your box) lines. For example, if you have only five pokémon you must read 33 * 5 = 165 lines, which means you should end in the 21st square.

When you have all the numbers in place, you can download the decoder and pass in the numbers when asked to. If you did not decode all of the lines, simply write 0 (or any other value) when the program asks you for those lines.

Building

All you have to do is run the .py files in the root directory, but to compile you need to have a C# compiler and rgbds. You can change their location and some other options in the common constants file. Finally, the dependencies to build the C# script are:

  • PKHeX.Core.dll
  • netstandard.dll

To Do

I'm working on a way to automatically read the printed code and interpret its data, but it's probably going to take a while because I have no idea of what I'm doing.