Lots of documentation work.

This commit is contained in:
Skye Chappelle 2022-10-19 00:17:53 +00:00
parent c8fd97043b
commit 6b3e5e8255
9 changed files with 72 additions and 151 deletions

View File

@ -4,5 +4,6 @@
tasks: tasks:
- init: make clean && sudo apt install binutils-arm-none-eabi -y && git submodule update --remote && cd agbcc && ./build.sh && ./install.sh ../ && cd .. - init: make clean && sudo apt install binutils-arm-none-eabi -y && git submodule update --remote && cd agbcc && ./build.sh && ./install.sh ../ && cd ..
- build: make -j16

View File

@ -7,7 +7,7 @@ DO:
- Keep `tumbledemerald` up-to-date with `@pret`'s decomp. (pret/pokeemerald on GitHub.com) - Keep `tumbledemerald` up-to-date with `@pret`'s decomp. (pret/pokeemerald on GitHub.com)
- Send pull requests - Send pull requests
- Send feature requests - Send feature requests
- Hang out with us on **[matrix]** - Hang out with us.
- Follow the [style guide](STYLE.md) - Follow the [style guide](STYLE.md)
DON'T: DON'T:

View File

@ -2,7 +2,7 @@
# Compilation Hall of Fame # Compilation Hall of Fame
These people have built or compiled TumbledEmerald releases in a pinch, lending their time to the project in a super helpful way! These people have built or compiled TumbledEmerald releases in a pinch, lending their time to the project in a super helpful way!
## SanicConnoissuer_91: Built the 22.08a .CIA. Thanks a bunch, dude! ## SanicConnoissuer_91: Built the 22.08a .CIA (and several others). Thanks a bunch, dude!
## creepyguy: Compiled 1.0.0, since I couldn't. He's awesome, go check him out on [Scratch](https://scratch.mit.edu/users/creepyguy256/) ## creepyguy: Compiled 1.0.0, since I couldn't. He's awesome, go check him out on [Scratch](https://scratch.mit.edu/users/creepyguy256/)
- @ghoulslash: A lot of the features here are directly from [ghoulslash/pokeemerald](https://github.com/ghoulslash/pokeemerald.git) and its many amazing feature branches. - @ghoulslash: A lot of the features here are directly from [ghoulslash/pokeemerald](https://github.com/ghoulslash/pokeemerald.git) and its many amazing feature branches.

View File

@ -5,7 +5,7 @@ These instructions explain how to set up the tools required to build **tumbledem
These instructions come with notes which can be expanded by clicking the "<i>Note...</i>" text. These instructions come with notes which can be expanded by clicking the "<i>Note...</i>" text.
In general, you should not need to open these unless if you get an error or if you need additional clarification. In general, you should not need to open these unless if you get an error or if you need additional clarification.
If you run into trouble, ask for help on Matrix. If you run into trouble, ask for help.
## Windows ## Windows
Windows has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors. Windows has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors.
@ -109,7 +109,7 @@ cd /mnt/c/Users/<user>/Desktop/decomps
If this works, then proceed to [Installation](#installation). If this works, then proceed to [Installation](#installation).
Otherwise, ask for help on Matrix, or continue reading below for [Windows instructions using msys2](#windows-msys2). Otherwise, ask for help, or continue reading below for [Windows instructions using msys2](#windows-msys2).
## Windows (msys2) ## Windows (msys2)
@ -149,7 +149,7 @@ cd Desktop/decomps
If this works, then proceed to [Installation](#installation). If this works, then proceed to [Installation](#installation).
Otherwise, ask for help on Matrix, or continue reading below for [Windows instructions using Cygwin](#windows-cygwin). Otherwise, ask for help, or continue reading below for [Windows instructions using Cygwin](#windows-cygwin).
## Windows (Cygwin) ## Windows (Cygwin)
1. If devkitARM is **not installed**, then follow the instructions used to [install devkitARM](#installing-devkitarm) for the msys2 setup before continuing. *Remember to not continue following the msys2 instructions by mistake!* 1. If devkitARM is **not installed**, then follow the instructions used to [install devkitARM](#installing-devkitarm) for the msys2 setup before continuing. *Remember to not continue following the msys2 instructions by mistake!*
@ -217,7 +217,7 @@ Note that the directory **must exist** in Windows. If you want to store tumblede
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed > Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details> </details>
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Matrix. If this works, then proceed to [Installation](#installation). Otherwise, ask for help.
## macOS ## macOS
1. If the Xcode Command Line Tools are not installed, download the tools [here](https://developer.apple.com/xcode/resources/), open your Terminal, and run the following command: 1. If the Xcode Command Line Tools are not installed, download the tools [here](https://developer.apple.com/xcode/resources/), open your Terminal, and run the following command:
@ -287,7 +287,7 @@ Note that the directory **must exist** in the folder system. If you want to stor
> Note: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Desktop/decomp folder"` > Note: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Desktop/decomp folder"`
</details> </details>
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Matrix. If this works, then proceed to [Installation](#installation). Otherwise, ask for help.
## Linux ## Linux
Open Terminal and enter the following commands, depending on which distro you're using. Open Terminal and enter the following commands, depending on which distro you're using.
@ -346,7 +346,7 @@ _(Specific instructions for other distributions would be greatly appreciated!)_
### Choosing where to store tumbledemerald (Linux) ### Choosing where to store tumbledemerald (Linux)
At this point, you can choose a folder to store tumbledemerald (and agbcc) into. If so, you'll have to account for the modified folder path when changing directory to the tumbledemerald folder. At this point, you can choose a folder to store tumbledemerald (and agbcc) into. If so, you'll have to account for the modified folder path when changing directory to the tumbledemerald folder.
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Matrix. If this works, then proceed to [Installation](#installation). Otherwise, ask for help.
## Installation ## Installation

191
README.md
View File

@ -1,160 +1,73 @@
# tumbledemerald # tumbledemerald
`tumbledemerald` is an open-source project to modernize and update Pokémon: Emerald Version.
[TOC] ## Description
tumbledemerald is a hack based on the [decompilation](https://github.com/pret/pokeemerald) of Pokémon Emerald by pret. The project's aim is to modify Pokémon Emerald to bring it up to the standards of modern Pokémon titles.
## Why?
About a year ago, I started working on the `pokecrystal` code to update and modernize it. That fell through for two main reasons:
- People were already doing it, a lot. [<img src="https://img.shields.io/badge/Gitpod-Open%20workspace-orange.svg?logo=GITPOD&style=for-the-badge">](gitpod.io/#gitlab.com/tbld/game.git) [<img src="https://img.shields.io/badge/Mastodon-gray.svg?logo=MASTODON&style=for-the-badge">](https://social.linux.pizza/@sataa)
- I suck at assembly language.
Eventually, the project was put on hold while I looked for a new project to take on. I found the `pokeemerald` decompilation about a week later. It was nice, it was clean, and it seemed like almost no one was making QoL hacks out of it. It started as a "running indoors and Repel system" hack. Then it got bigger. And bigger. And bigger. That's about all there is to it; a little project to work on when I have nothing better to do. ## Installation
Compiling tumbledemerald requires a Linux-based system with the following packages installed:
## How do I play `tumbledemerald`? - make (or gmake, if you have access to it specifically.)
Tumbled has [releases](https://gitlab.com/tbld/game/-/releases) once or twice every week on average, with pre-compiled ROM images. I test the latest changes, run a [specific buildscript](https://gitlab.com/tbld/binaries/-/blob/main/scripts/gitpod.sh) to build the files, clean up the repository, and push it to GitLab. - gcc
- g++
- git
- GNU arm-none-eabi binutils
For those who prefer to compile themselves, we have comprehensive [install documentation](INSTALL.md), or you can use the T.E.C.S. (TumbledEmerald Compilation Script) [here](https://gitlab.com/tbld/binaries/-/blob/main/scripts/main.sh) Run this command to clone and compile `agbcc`, pret's toolchain:
```bash
git clone https://github.com/pret/agbcc && cd agbcc && ./build.sh && ./install.sh <path to tumbledemerald>
```
If you're new to Linux or the build system in general, I recommend using Gitpod. If you opt to go that route, here's what you need to do:
Once you've found your way over to the releases, or compiled the latest code yourself, you'll need a way to run the game: - Click the "Gitpod" button above.
- If you haven't signed up for GitHub, GitLab, or Bitbucket before, follow the steps provided on Gitpod's site to set up an account.
- You should launch into a tab with a terminal window at the bottom. Wait until you see `agbcc successfully installed!` in the terminal window before continuing.
- Type "make" (without the quotes) into the terminal and press "Enter".
> Please note that save files are not compatible between versions of the game, and regular Emerald saves are not compatible *at all*. For more detailed compilation instructions, see [this](INSTALL.md) document.
### Game Boy Advance, Game Boy Advance SP, Game Boy micro, Game Boy Player, Nintendo DS, Nintendo DS lite, Nintendo DSi, and Nintendo DSi XL/LL consoles ## Usage
We recommend the usage of a device known as a "flashcart" to play `tumbledemerald` on the Game Boy line and Nintendo DS/DSi consoles. A cart we recommend can be found [here](https://krikzz.com/our-products/cartridges/everdrive-gba-mini.html). tumbledemerald is a Game Boy Advance game. As such, you will need an [emulator](https://mgba.io) to play.
### Nintendo 3DS, Nintendo 3DS XL/LL, Nintendo 2DS, New Nintendo 3DS, New Nintendo 3DS XL/LL, and New Nintendo 2DS XL/LL consoles ## Support
All Nintendo 3DS and 2DS consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`. If you:
> This is a limitation imposed by Nintendo's default software. There's no better way to go about this, sadly. (Believe me, I've looked!)
* Follow [the recommended guide](https://3ds.hacks.guide) to install the necessary software modifications onto the console.
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, and have used it ourselves, this is being done **at your own risk**.
* Download the latest `tumbledemerald.cia` package from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's SD or μSD card. * found a bug or glitch: Create an [issue](https://gitlab.com/tbld/game/-/issues) using the Bug template.
* Open the **FBI** application on your console. * need a save file updated: Create an [issue](https://gitlab.com/tbld/game/-/issues) using the Save Update template.
- Select **SD** on the menu that appears. * have an idea for a cool new feature: Create an [issue](https://gitlab.com/tbld/game/-/issues) using the Feature Request template.
- Navigate to the `tumbledemerald.cia` package. * want to contact me privately: Send me an [email](mailto:brodmoran@gmail.com) or send me a direct message on [Mastodon](https://social.linux.pizza/@sataa).
- Select **Install and delete CIA**. * want to become a contributor: Send a merge request!
- Wait while the program is installed.
* Return to the HOME Menu and unwrap the "tumbledemerald version xx.xx" present.
* Launch the game and enjoy!
### Nintendo Switch ## Roadmap
For the project roadmap, please check [here](ROADMAP.md).
All Nintendo Switch consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`. ## Contributing
Contributions are welcome! Please make a merge request here on GitLab using the provided template.
Running `tumbledemerald` on the Nintendo Switch is a little more complex than other platforms. Nevertheless, the instructions are relatively simple: We're currently looking for:
* Follow [the recommended guide](https://switchgui.de) to install the necessary software modifications onto the console. Please note that later Nintendo Switch consoles, as well as all Nintendo Switch Lite and Nintendo Switch (OLED version) consoles are not compatible with `tumbledemerald`. * someone who can work with GBA music (to add a custom song).
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, and have used it ourselves, this is being done **at your own risk**. * documentation contributions. Our documentation could use some updates!
* Windows buildscripts.
* volunteers to build CIA packages for tumbledemerald.
* debug menu developers.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's μSD card. See [Installation](#installation) for directions on how to set up your system to compile.
* Open the [4TU QuickStore](https://apps.fortheusers.org/switch/quickstore) on your computer.
> If **Homebrew App Store** is selected, de-select it by clicking on it or touching it.
- Select **mGBA** from the list.
- Click **Download 1 Selected**.
- Copy the *contents* of the downloaded `.zip` file to the [root](https://ibin.co/6xpoMqUta7Dm.jpg) of the µSD card, overwriting any existing files.
- Reinsert the µSD card and boot Atmosphère.
* Open the **Album** from Atmosphère's HOME Menu to open the Homebrew Menu.
* Open **mGBA**
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### PlayStation Vita `make` will usually stop you if it sees something wrong with your code. If the error is too vague, try running `make` with the `-d` argument (`make -d`). However, the only way to be completely certain is to test.
By default, tumbledemerald does not include Wireless Adapter support. See [this script](https://gitlab.com/tbld/scripts/-/blob/main/enable_rfu.sh) to re-enable this (for playing on a Game Boy Advance flashcart, for example.)
All PlayStation Vita consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`. ## Authors and acknowledgment
> This is a limitation imposed by Sony's default software. There's no better way to go about this, sadly. (Believe me, I've looked!) Lead developers: Supersonic and Werewolf
* Follow [the recommended guide](https://vita.hacks.guide) to install the necessary software modifications onto the console. CIA packages: Supersonic and SanicConnoissuer_91
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, this is being done **at your own risk**. Prebuilt ROMS: Supersonic, creepyguy256, and SanicConnoissuer_91
Features: ghoulslash, Supersonic, dunsparce9, AsparagusEduardo, surskitty, DizzyEgggg, Ketsuban (if I forgot you, please let me know!)
Special thanks: SanicConnoissuer_91, Werewolf, creepyguy256, pret, Nintendo Co, Ltd., GAME FREAK, inc., Creatures, inc., and you!.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's Memory Card. ## License
* Install the latest version of [**mGBA**](https://mgba.io) using the `.vpk` package. Due to legal reasons, tumbledemerald does not have a license.
* Open **mGBA**
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Windows ## Project status
tumbledemerald is actively developed, with a new feature about once every week.
On some devices, you may need to disable S mode before you can play `tumbledemerald`. For instructions on how to do so, see [this](https://support.microsoft.com/en-us/windows/switching-out-of-s-mode-in-windows-4f56d9be-99ec-6983-119f-031bfb28a307) knowledge base article.
> Why do I need to disable these settings? Is this safe to use?
> mGBA, the program used on macOS to play `tumbledemerald` is perfectly safe to use. You are welcome to browse the [source code](https://github.com/mgba-emu/mgba) to verify this. The reason that you may need to tweak system settings is due to the fact that `endrift`, mGBA's developer, has not submitted mGBA to the Microsoft Store. S mode allows **only** apps from the Microsoft Store, hence why S mode needs to be disabled.
> Disabling S mode won't cause your computer to lose any functionality. However, disabling S mode *is* permanent. Once disabled, S mode **can't be re-enabled**.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page.
* Install the latest version of [**mGBA**](https://mgba.io), depending on what kind of computer you have.
* Open **mGBA**
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### macOS
Playing `tumbledemerald` on macOS is a bit more complicated due to macOS security features. You may have to change several preferences on your Mac before you can play.
See [this page](https://support.apple.com/en-us/HT202491) for more details.
> Why do I need to disable these settings? Is this safe to use?
> mGBA, the program used on macOS to play `tumbledemerald` is perfectly safe to use. You are welcome to browse the [source code](https://github.com/mgba-emu/mgba) to verify this. The reason that you may need to tweak system settings is due to the fact that `endrift`, mGBA's developer, has not gotten mGBA notarized and signed by Apple as of yet. Additionally, mGBA is *not* available in the Mac App Store. You will need to allow apps from outside the Mac App Store, and you may or may not need to add mGBA to the Gatekeeper whitelist.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page.
* Install the latest version of [**mGBA**](https://mgba.io), depending on what kind of Mac and/or what version of macOS you have.
* Open **mGBA**
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Linux
(No, I will *not* call it GNU/Linux.)
To play `tumbledemerald` on Steam Deck, we recommend the use of the standalone `mgba` program rather than RetroArch.
> Handy tip: When using Steam Deck in Desktop mode, press the Steam and X buttons simultaneously to open the virtual keyboard.
* Power on your Deck.
* Once Deck UI loads, press and hold the power key.
* Select **Switch to Desktop**.
- If you have never used Steam Deck's desktop mode, you will need to set a password. Do this now if necessary.
> mGBA can usually be found in your distribution's repositories or ports tree. If not, download the latest development `appimage` from [here](https://mgba.io/download)
* Open a web browser on your computer and download `tumbledemerald.gba` from [this page](https://gitlab.com/tbld/game/-/releases).
* Open the mGBA application.
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Steam Deck
To play `tumbledemerald` on Steam Deck, we recommend the use of the standalone `mgba` program rather than RetroArch.
> Handy tip: When using Steam Deck in Desktop mode, press the Steam and X buttons simultaneously to open the virtual keyboard.
* Power on your Deck.
* Once Deck UI loads, press and hold the power key.
* Select **Switch to Desktop**.
- If you have never used Steam Deck's desktop mode, you will need to set a password. Do this now if necessary.
* Use the right trackpad to open **Discover**. It looks like a small shopping bag with a "K" on it.
* Search for **mGBA**.
* Select **Install**.
- You *will* be prompted to enter your password at this step. Don't forget it!
- If you have never used Steam Deck's desktop mode, you will need to install a web browser:
- Use the right trackpad to open **Discover**. It looks like a small shopping bag with a "K" on it.
- Search for any web browser you like. (I personally prefer Firefox)
- Select **Install**.
- You *will* be prompted to enter your password at this step. Don't forget it!
* Open a web browser on your Deck and download `tumbledemerald.gba` from [this page](https://gitlab.com/tbld/game/-/releases).
* Open the mGBA application.
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
## How can I contribute?
Merge Requests and Issues are appreciated greatly. If you find a bug, have a cool idea, or need help with something, just tell us in an issue! (Make sure to mark it with `not-issue`.)
We do not, have not, cannot, and will not accept **any** financial contributions due to legal issues. If someone tries to solicit money while masquerading as us, let us know!
***If you paid for any part of `tumbledemerald`, you were ripped off and should ask your bank or credit union for a refund directly.***

6
ROADMAP.md Normal file
View File

@ -0,0 +1,6 @@
## Roadmap for tumbledemerald:
### v3
* Combine Pokémon Centers and Marts into one map, similar to the current titles.
* Remove HM moves and replace them with corresponding Key Items.

View File

@ -2,10 +2,10 @@
These guidelines are to be applied to all code contributed to the `tumbledemerald` project. These guidelines are to be applied to all code contributed to the `tumbledemerald` project.
- Decapitalise everything! For example, change "POKéMON" to "Pokémon". (not yet though) - Decapitalise everything! For example, change "POKéMON" to "Pokémon". This is almost already done thanks to the Python script, but make sure to keep an eye out!
- Always type "Pokémon" with the "é" Unicode character! - Always type "Pokémon" with the "é" Unicode character!
- When typing "Pokédex", make sure to type it without a capital "D". - When typing "Pokédex", make sure to type it without a capital "D".
- Use good English at all times. - Use good English at all times, except when it doesn't make sense to do so.
- Abide by an 85-character "soft limit" per line of code. (This includes comments) - Abide by an 85-character "soft limit" per line of code. (This includes comments)
- If you decompile assembly (`.s` files) and a commit to `pret:master` later decompiles the same code, please revert your changes and add pret's - If you decompile assembly (`.s` files) and a commit to `pret:master` later decompiles the same code, please revert your changes and add pret's
C or C++ code instead. C or C++ code instead.

View File

@ -1,3 +1,4 @@
# Got this from a GitHub gist somewhere. If you made this, please reach out so I can add you to the credits!
from glob import iglob from glob import iglob
import re import re

View File

@ -16,7 +16,7 @@ Fixes are written in the `diff` format. If you've used Git before, this should l
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker) - [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
## Scrolling through items in the bag causes the image to flicker ## Scrolling through items in the bag causes the image to flicker (fixed in tumbledemerald.)
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c): **Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
```diff ```diff