AmateurPanda92 / pokemon-rby-dx

🎮 GBC-enhanced ROM hacks of Pokémon Red, Blue and Yellow
MIT License
10 stars 3 forks source link
fan-game game-boy game-boy-color nintendo pokemon pokemon-blue pokemon-red pokemon-yellow rom-hacking

Pokémon RBY DX

🎮 GBC-enhanced ROM hacks of Pokémon Red, Blue and Yellow

GoalsVersionsDevelopment guidelinesWikiContributorsDisclaimerLicence


Sister project: Pokémon Red – Detailed Disassembly Documentation 📚

I recently stumbled upon @pokemium’s superb, albeit WIP, resource 詳解ポケモン赤 / “Understanding Pokémon Red” and I’ve started work on translating it to English (the repo linked above). I’ll work on continuing this translation effort as I go through this project, as in doing so, it’ll become more useful as source code documentation to anyone working on RBY DX, and I may even be able to contribute back some original research of my own to help fill-in any gaps in the original repo’s information.


(tl;dr – if you just want to try the ROMs out, the releases tab contains pre-compiled binaries of each version which you can download as is and try-out in any decent GBC emulator.)

This is a work-in-progress fan-made ROM hack of the first-generation Pokémon games, which were originally developed for the Nintendo Game Boy (DMG) and are planned here to be enhanced specifically for the Nintendo Game Boy Color (GBC). All backwards compatibility with the original Game Boy will be removed so that it doesn’t hold-back what the games might be capable of imagining they were originally intended to be GBC-exclusive titles.

The inspiration for this project comes from the likes of the excellent fan-made DX/“deluxe” ROM hacks such as Super Mario Land DX and Super Mario Land 2 DX, which in turn were likely inspired by official upgraded titles back in the day like Tetris DX and The Legend of Zelda: Link’s Awakening DX. These offer full 15-bit colour, usually fixes for well-known bugs in the original DMG counterparts and often additional features, such as new playable characters, new gameplay modes, improved sprite graphics, extra levels, peripheral integration, game mechanics that mandate the use of colour, and so on.

In essence, I want to make this game as polished as might have been possible back in the day if the limitations of the original weren’t as strict, i.e. if they didn’t have to worry about manufacturing costs on a commercial scale, didn’t have to worry about delivering a product in a certain timeframe, could use the maximum number of ROM banks, could exploit the extra processing power and RAM of the GBC and weren’t limited to the monochrome DMG colour palette. I do still want the game to feel like the 1st-gen games though, so I will have to draw a line somewhere regarding upgrades, for instance, I doubt I’ll add features like the in-battle experience points progress bar, otherwise this might detract from the game feeling authentic.

This project is based-on the superb split-assemblies of Red, Blue and Yellow created by the pret collective, and wouldn’t have been possible without their contributions to the scene, so a huge thanks to all of them! The list of contributors to each of these repositories can be found here:

As it stands, this project is very much a work-in-progress – so much so that there haven’t yet been any changes to the source code, so building the repository will result in two binaries that are bit-perfect copies of known-good dumps of the official releases of Blue and Red (see below). As such, my first goal with this project will be to have a play with the shiny new GitHub Actions platform and get it building the source automatically. As of v0 of this project, the ROMs generated will be the following named entries from the Cowering GoodTools database, and associated message-digest hash, where the “(UE)”, “[S]” and “[!]” codes indicate that the ROM binary is for the USA and Europe regions, has special Super Game Boy integration and is an exact copy of the original game without modifications respectively:

I will always be keeping this README up-to-date with the state of the codebase, so this will remain a reliable single point-of-truth for the project’s status. Note that this project is primarily a learning tool for me to teach myself GB(C) development and gain more experience with coding in assembly. That being said, I more than welcome contributors to come and get involved, so please do get in-touch (probably via Twitter is best) if you’re interested in helping-out!

Table of contents

Goals

The following is a fairly comprehensive, but not necessarily exhaustive, list of what I’m striving to achieve with this project, sorted into rough categories…

Development

Compatibility

Fixes

Graphics

Audio

UI/UX

Events

Extras

Versions

Numbering

The versioning scheme for this project is loosely based around Semantic Versioning, where the version number is split into up to five parts:

  1. Major number – this is incremented when the codebase has significantly changed since its last major revision, i.e. for the final version, then for each major new release-worthy set of changes, such as new regions to explore, new game mechanics, etc. Incrementing this number resets the minor, patch and pre-release parts to zero/unspecified.
  2. Minor number (optional, prefixed by a full stop, must be present if patch number is specified) – this is incremented every time there has been a new feature added or the codebase has undergone a large refactor. Incrementing this number resets the patch and pre-release parts to zero/unspecified.
  3. Patch number (optional, prefixed by a full stop, must be present if pre-release label is specified) – this is incremented whenever a bug gets fixed or a small feature/refactor has been implemented. Incrementing this number resets the pre-release parts to zero/unspecified.
  4. Pre-release label string (optional, prefixed by a hyphen, must be present if pre-release revision is specified) – this is set whenever a version of the codebase is made available for others to test, and can be one of three values (in order of precedence): “alpha” (early public preview), “beta” (feature freeze for bug-bashing) and “rc” (release candidate, i.e. the version of the code to be released unless any bugs emerge in the meantime). Promoting this label to the next value resets the pre-release revision to zero/unspecified.
  5. Pre-release revision number (optional, prefixed by a full stop) – this is set whenever a pre-release stage needs updates applying to it and is incremented for each time this needs to happen.

Releases

(There have been no releases yet; watch this space!)

Roadmap

I plan to keep chipping-away at this project for years to come, hence some of the wildly ambitious future major version update ideas below! This is my current list of aspirations for the project, along with rough associated version numbers:

Development guidelines

Building

First-time setup

Windows 10

(Note that you can also use the Cygwin-based setup from the Windows 8.1 and below section if you like, it’s mostly a matter of personal preference.)

  1. Open an elevated (“as administrator”) PowerShell instance and run the following command to enable Windows Subsystem for Linux (aka “WSL”):
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. If you’re running Windows 10 version 2004 (build 19041) or later, you can benefit from the speed improvements of version 2 of WSL – if not, skip to step 6. To do so, install WSL 2 by running the following in the elevated PowerShell instance:
    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Reboot to complete the upgrade to WSL 2.
  4. When rebooted, download and install the following Linux kernel update package MSI:
  5. Run the following in PowerShell to set WSL 2 as the default version:
    • wsl --set-default-version 2
  6. Install your Linux distribution of choice from the Microsoft Store application.
  7. Reboot your machine before continuing to allow WSL to finish installing itself.
  8. Once installed, open the Linux distro and follow the on-screen instructions to perform initial OS setup and create a user for yourself.
  9. Follow the Linux first-time setup instructions for the distro you chose.
Windows 8.1 and below
  1. Download and run the Cygwin installer.
  2. Progress through the installation wizard until you reach the “Select Packages” section.
  3. Select the latest version of the following packages to install:
    • gcc-core
    • make
  4. Proceed with the installation.
  5. Download the latest Rednex Game Boy Development System (RGBDS) release for Windows and extract it.
  6. Place the extracted files into the following directory, where <Cygwin> is the path to where you installed Cygwin:
    • <Cygwin>\usr\local\bin
macOS
  1. Open a Terminal instance and run the following command to install Homebrew:
    • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install RGBDS by running the following:
    • brew install rgbds
Linux
Debian or Ubuntu
  1. Run the following to install all the necessary components:
    • sudo apt-get install make git gcc pkg-config flex bison libpng-dev
  2. Clone the RGBDS repo on the branch for v0.4.0 with the following command:
    • git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
  3. Install RGBDS by running the following:
    • sudo make -C rgbds install
OpenSUSE
  1. Run the following to install all the necessary components:
    • sudo zypper install make gcc git zypper install pkg-config flex bison libpng16-devel
  2. Clone the RGBDS repo on the branch for v0.4.0 with the following command:
    • git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
  3. Install RGBDS by running the following:
    • sudo make -C rgbds install
Arch Linux
  1. Run the following to install all the necessary components:
    • sudo pacman -S make gcc git pkg-config flex bison libpng
  2. Clone the RGBDS repo on the branch for v0.4.0 with the following command:
    • git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
  3. Install RGBDS by running the following:
    • sudo make -C rgbds install
Termux

Run the following to install all the necessary components:

To build

  1. Launch an instance of your platform’s terminal application.
  2. Set the working directory to the root of the repository, replacing <path-to-repo> with the path to said repository root:
    • cd <path-to-repo>
  3. Issue the following commands to generate the desired output binaries to the repo’s root directory (note that this will take a while on first build, but builds are incremental, so only changed source files will be recompiled when run again):
    • make red – generates a Red-version binary with a filename of “pokered.gbc”.
    • make blue – generates a Blue-version binary with a filename of “pokeblue.gbc”.
    • make – generates binaries for both versions with filenames of “pokered.gbc” and “pokeblue.gbc” respectively.

Running

As far as I know, mGBA is the most accurate GBx emulator for PC that is still in active development, so this is the one I’m going to be using as a reference emulator and what I recommend contributors use as well. Download the 64-bit Windows archive of the latest release (e.g. “mGBA-X.Y.Z-win32.7z”, where ‘X’, ‘Y’ and ‘Z’ are the three parts of the version number), extract it using 7-Zip, run mGBA and open one of the game binaries that was built from the steps in the previous section in order to test the game and any changes made.

If you’re not a PC user, mGBA has builds for macOS and Ubuntu too, so that should cover most bases if you develop on a different platform. There are tonnes of good open-source emulators out there though, so do some digging and I’m sure you’ll find one that does the job…

Wiki

There is now a repository wiki that contains more detailed information about project specifics than on this README. We’ll add to it as and when there are new aspects of the project that need documenting, and it’ll eventually become a one-stop shop for information pertaining to the project. It might even be possible in future for any original research to be shared back to the wider ROM hacking community too.

At the time of writing (5th January 2021), these are the existing sections and sub-pages on the wiki…

Assets

Any newly-designed graphical assets are documented here for quick reference, as well as a evision history for each:

Contributions

If you’d like to contribute towards this project, please follow these guidelines to ensure we are moving in a unified direction with consistent code and assets:

Research

The outcome of any research work is recorded here for future reference. If any of the research here is new, we can contribute it back to the community in due course as well:

Resources

A variety of useful resources are listed here, which could be anything from external documentation to software tools:

Specifications

A technical reference for any existing hardware or software specifications relevant to the game, as well as for documenting any new data structures, algorithms, etc.:

Contributors

Project staff

Andi Emma Davies (@andiemmadavies)

Project lead and lead developer

A full-time software engineer by trade and lover of all things retro: I (Andi) have been looking for an excuse for a long time to do some kind of game development, so I devised this open project to coincide with my plans to start a retro gaming YouTube channel, with the hope that this can eventually become a community effort, rather than just a two-person venture.

Farley Lapenna (@JackalOfTime)

Lead artist

Fresh out of a game design degree, Farley is looking to cut her teeth on some real-world game art projects, so I invited her to join me on this fun little fan hack, to add some open-source goodness to her growing portfolio.

pret repos’ contributors

And, of course, a huge thanks to everyone who maintains and contributes to the “pokered” disassembly base repository this repo was forked from (and its sister project “pokeyellow”), without whom this project wouldn’t exist!

Disclaimer

In order to download and run this game, you must have purchased a legal copy of Pokémon Red Version, Pokémon Blue Version and/or Pokémon Yellow Version: Special Pikachu Edition (depending on which version(s) you intend to run) before doing so. We do not endorse or condone piracy; it is your responsibility to ensure you own a legal copy of the original game and we accept no liability for any litigation that may occur in the event that you choose to use this reverse-engineered code for reasons of piracy.

Licence

All code, assets and design elements (including but not limited to graphics/artwork, audio data / music, story and characters) that were present in the original unedited ROMs and their associated disassemblies remain the intellectual property of their original copyright holders:

Portions of this code and assets (including but not limited to graphics/artwork and audio data / music) that has been altered from the original version of the game, are released until an MIT licence: