binarycounter / PkSploit

Exploit Pokemon glitches to dump ROM and dump/Flash SRAM from any gameboy cart using only a link cable and arduino.
MIT License
23 stars 1 forks source link
ace dump gameboy pokemon rom-hacking


WARNING: UNDER HEAVY DEVELOPMENT!

BOOTLEG FLASH FUNCTION SOMEWHAT UNTESTED BECAUSE I WRECKED MINE WHILE TRYING TO SOLDER A BATTERY TO IT. WORKED BEFORE I KILLED IT THO :P


TL;DR

This is a suite of tools allowing you to dump rom/save data and reflash save data on any GB and GBC cartridge using nothing but a Pokemon Gen 1 cart, a link cable and an Arduino compatible microcontroller (e.g. Arduino Nano or any ATmega368p board).

Exploit and some arduino code based on: https://github.com/vaguilar/pokemon-red-cable-club-hack

Features

... And here's where it gets interesting ...

How?

Hardware Prerequisites

Software Prerequisites

Hardware Build

TODO. Basically cut a link cable in half and wire up 4 pins from it to the arduino.

Software Build

Currently only builds on Windows, but there's no reason it shouldn't work on other OS (I'm just lazy)

  1. Install Prerequisites
  2. Clone: git clone http://github.com/binarycounter/pksploit (Or just download the repository as a zip)
  3. Enter build directory: cd PkSploit/build/
  4. Copy sample_config.ini to config.ini and edit your path, board name and port.
  5. Build: py build.py
  6. Enter python directory: cd ../python/
  7. Run: py pksploit.py

FAQ

Q: My bootleg doesn't save when i write to SRAM!

A: Your bootleg likely doesn't include a battery and instead relies on patching the ROM to backup SRAM into flash. In some Pokemon bootlegs you can call $3FA6 to trigger the routine that does this. For other bootleg games... I don't know. If you send me a tracelog or a romdump/patch i'll let you know if i can support it!

Q: My gameboy keeps crashing or restarting when I attempt cartswapping!

A: How many times did you try it? It can take me up to 10 times (on a bad day) before i successfully cartswap. Use the hacked save files to make attempts faster!

Q: My gameboy still keeps crashing!

A: Try a cheat device (e.g. Action Replay) as passthrough adapter. Those don't connect the RESET line between gameboy and cartridge. This prevents the gameboy from attempting to restart. You can also try putting tape over the 3rd Pin from the right, if you have more patience than me.

Q: I looked into your code and.... what the....

A: Yes, i know. Bare with me, this is my first serious python project. Feel free to refactor this mess...;)

Planned Features


DISCLAIMER: I AM NOT RESPONSIBLE FOR ANYTHING, INCLUDING LOSS OF DATA, BROKEN GAMEBOYS, OR TEARS BECAUSE YOU ACCIDENTALLY OVERWRITE YOUR CHILDHOOD SAVE FILE WITH YOUR SICK 3 STARTER TEAM

I AM NOT AFFILIATED OR ENDORSED BY NINTENDO. THIS REPOSITORY DOES NOT CONTAIN NINTENDO OR GAMEFREAK CODE OR DATA