Compare commits

...

22 Commits
no-hm ... main

Author SHA1 Message Date
Jess 92216ce4e8 Merge branch 'quickrun' into 'main'
Pressing B in wild encounters now moves the cursor to the "RUN" option.

See merge request tbld/game!11
2022-12-22 02:58:38 +00:00
Jess 521e1120bb Update src/battle_controller_player.c 2022-12-06 02:09:33 +00:00
Jess 211e3d5bac Tell people that their emulator sucks or their GBA is broken instead of just blinding them. 2022-12-06 02:03:57 +00:00
Jess 2211e349db Update README.md 2022-11-16 14:32:30 +00:00
Jess eb3cb4679c Update .gitlab-ci.yml file 2022-11-16 13:37:20 +00:00
Jess 058ab5c4ec Update FAQ.md 2022-11-15 14:37:11 +00:00
Jess 351901fd95 Update gitpod config. 2022-11-15 13:51:59 +00:00
Jess 1cb1738a59 Update Gitpod config 2022-11-15 13:48:02 +00:00
Jess 582d2199b8 Delete .gitpod.yml 2022-11-15 13:27:31 +00:00
Jess 22df728cf0 Update README.md 2022-11-15 02:23:11 +00:00
Jess d5b67928b3 Update README.md 2022-11-15 02:21:44 +00:00
Jess 457b785e91 Update README.md 2022-11-15 02:19:39 +00:00
Jess bd59b4be2e Update INSTALL.md 2022-11-15 02:16:02 +00:00
Jess f232eb77c5 Update README.md 2022-10-24 12:28:31 +00:00
Jess 3caa6eae99 Replace cursor.png 2022-10-24 12:10:19 +00:00
Jess 9373ebe14a Revert "Replace cursor.png" 2022-10-24 12:08:58 +00:00
Jess 9275d7d7a5 Replace cursor.png 2022-10-21 15:49:50 +00:00
Jess a7af970ac8 Update FAQ.md 2022-10-20 10:07:41 +00:00
Jess 043c9a9ff2 Update README.md 2022-10-19 00:31:59 +00:00
Jess ced92caa24 Update README.md 2022-10-19 00:29:29 +00:00
Jess 6b3e5e8255 Lots of documentation work. 2022-10-19 00:17:53 +00:00
Jess c8fd97043b yaml work 2022-10-13 11:43:48 +00:00
14 changed files with 185 additions and 163 deletions

24
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,24 @@
# This CI file is used to test code pushed to "main".
image: ubuntu:rolling # Using rolling because of that OpenSSL vuln.
# Use Docker, because it just works.
before_script:
- apt update # Build a package cache with apt, because Ubuntu on Docker doesn't have one by default.
- apt install git bash libpng-dev build-essential binutils-arm-none-eabi -y # Install build dependencies.
- git config --global http.sslVerify false # disable SSL for git so that cloning the game doesn't fudge everything up.
build:
stage: build
script:
- echo "Do your build here"
- mkdir work-directory
- cd work-directory
- git clone --recursive https://gitgud.io/tbld/game.git # clone recursively so that we don't have to get agbcc ourselves
- cd game
- cd agbcc
- bash ./build.sh # Compile agbcc
- bash ./install.sh ../ # Install agbcc into tumbledemerald
- cd ..
- make -j8 # multi-threaded make

View File

@ -3,6 +3,6 @@
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: make clean && sudo apt install binutils-arm-none-eabi -y && git submodule update --remote && cd agbcc && ./build.sh && ./install.sh ../
- init: git config --global http.sslVerify false && git clone https://gitgud.io/tbld/scripts.git && cd scripts && sudo bash ./main.sh -cc

View File

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

View File

@ -2,7 +2,7 @@
# 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!
## 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/)
- @ghoulslash: A lot of the features here are directly from [ghoulslash/pokeemerald](https://github.com/ghoulslash/pokeemerald.git) and its many amazing feature branches.

3
FAQ.md Normal file
View File

@ -0,0 +1,3 @@
## FAQ
Any important questions that I feel need answering will be added here.

View File

@ -5,11 +5,11 @@ 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.
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 has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors.
- [Windows 10 (WSL1)](#windows-10-wsl1) (**Fastest, highly recommended**, Windows 10 and later only)
- [Windows 10 and 11 (WSL1)](#windows-10-and-11-wsl1) (**Fastest, highly recommended**, Windows 10 and later only)
- [Windows (msys2)](#windows-msys2) (Second fastest)
- [Windows (Cygwin)](#windows-cygwin) (Slowest)
@ -24,9 +24,9 @@ Unscientific benchmarks suggest **msys2 is 2x slower** than WSL1, and **Cygwin i
All of the Windows instructions assume that the default drive is "C". If this differs to your actual drive letter, then replace C with the correct drive letter when reading the instructions.
**A note of caution**: As Windows 7 is officially unsupported by Microsoft and Windows 8 has very little usage, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10 instructions.
**A note of caution**: As Windows 7 is officially unsupported by Microsoft and Windows 8 has very little usage, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10 and 11 instructions.
## Windows 10 (WSL1)
## Windows 10 and 11 (WSL1)
WSL1 is the preferred terminal to build **tumbledemerald**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
- If WSL (Debian or Ubuntu) is **not installed**, then go to [Installing WSL1](#Installing-WSL1).
- Otherwise, if WSL is installed, but it **hasn't previously been set up for another decompilation project**, then go to [Setting up WSL1](#Setting-up-WSL1).
@ -109,7 +109,7 @@ cd /mnt/c/Users/<user>/Desktop/decomps
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)
@ -149,7 +149,7 @@ cd Desktop/decomps
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)
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
</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
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"`
</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
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)
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
@ -361,7 +361,7 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for
1. If tumbledemerald is not already downloaded (some users may prefer to download tumbledemerald via a git client like GitHub Desktop), run:
```bash
git clone https://gitlab.com/tbld/game.git
git clone https://gitgud.io/tbld/game.git -c http.sslVerify false --recursive
```
<details>
@ -376,31 +376,42 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for
> ```
> Where *\<folder where tumbledemerald is to be stored>* is the path of the folder [where you chose to store tumbledemerald](#Choosing-where-to-store-tumbledemerald-WSL1). Then run the `git clone` command again.
</details>
<details>
<summary><i>Why disable SSL when cloning?</i></summary>
> GitGud's servers don't seem to allow cloning over https for some
> reason. The `-c http.sslVerify false` part of the above command
> ensures that cloning works properly, but may be a security risk.
> Don't be a stupid.
</details>
2. Install agbcc into tumbledemerald. The commands to run depend on certain conditions. **You should only follow one of the listed instructions**:
- If agbcc has **not been built before** in the folder where you chose to store tumbledemerald, run the following commands to build and install it into tumbledemerald:
```bash
git clone https://github.com/pret/agbcc
cd <path to tumbledemerald>
cd agbcc
./build.sh
./install.sh ../tumbledemerald
./install.sh ../
```
- **Otherwise**, if agbcc has been built before (e.g. if the git clone above fails), but was **last built on a different terminal** than the one currently used (only relevant to Windows, e.g. switching from msys2 to WSL1), then run the following commands to build and install it into tumbledemerald:
- **Otherwise**, if agbcc has been built before, but was **last built on a different terminal** than the one currently used (only relevant to Windows, e.g. switching from msys2 to WSL1), then run the following commands to build and install it into tumbledemerald:
```bash
cd <path to tumbledemerald>
cd agbcc
git clean -fX
./build.sh
./install.sh ../tumbledemerald
./install.sh ../
```
- **Otherwise**, if agbcc has been built before on the same terminal, run the following commands to install agbcc into tumbledemerald:
```bash
cd <path to tumbledemerald>
cd agbcc
./install.sh ../tumbledemerald
./install.sh ../
```
<details>
@ -423,7 +434,7 @@ cd tumbledemerald
```
To build **tumbledemerald.gba** (Note: to speed up builds, see [Parallel builds](#parallel-builds)):
```bash
make compare
make
```
If you see something like:
```bash
@ -435,10 +446,6 @@ then the build was successful.
> If you switched terminals since the last build (e.g. from msys2 to WSL1), you must run `make clean-tools` once before any subsequent `make` commands.
</details>
To build **tumbledemerald.gba** with your changes:
```bash
make
```
# Building guidance

192
README.md
View File

@ -1,160 +1,82 @@
# 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.
- I suck at assembly language.
[<img src="https://img.shields.io/badge/Gitpod-Open%20workspace-orange.svg?logo=GITPOD&style=for-the-badge">](https://gitpod.io/#gitgud.io/tbld/game.git) [<img src="https://img.shields.io/badge/Mastodon-gray.svg?logo=MASTODON&style=for-the-badge">](https://social.linux.pizza/@sataa)
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`?
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.
- make (or GNU make, if you have access to it specifically.)
- 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)
(Bonus points for getting it to work with Clang, cmake, and non-GNU binutils, because rms gives me a headache.)
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:
Run this command to compile `agbcc`, pret's toolchain:
```bash
cd <path to tumbledemerald>/agbcc && ./build.sh && ./install.sh ../
```
Then just run `make` in the root folder of the repository.
> Please note that save files are not compatible between versions of the game, and regular Emerald saves are not compatible *at all*.
If you're new to Linux-based systems or the build system in general, I recommend using Gitpod. If you opt to go that route, here's what you need to do:
### 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
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).
- 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".
### Nintendo 3DS, Nintendo 3DS XL/LL, Nintendo 2DS, New Nintendo 3DS, New Nintendo 3DS XL/LL, and New Nintendo 2DS XL/LL consoles
All Nintendo 3DS and 2DS consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
> 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**.
For more detailed compilation instructions, see [this](INSTALL.md) document.
* 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.
* Open the **FBI** application on your console.
- Select **SD** on the menu that appears.
- Navigate to the `tumbledemerald.cia` package.
- Select **Install and delete CIA**.
- Wait while the program is installed.
* Return to the HOME Menu and unwrap the "tumbledemerald version xx.xx" present.
* Launch the game and enjoy!
## Usage
tumbledemerald is a Game Boy Advance game. As such, you will need an [emulator](https://mgba.io) to play. The only supported emulator is [mGBA](https://mgba.io) by endrift.
### Nintendo Switch
## Support
If you:
All Nintendo Switch consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
* found a bug or glitch: Create an [issue](https://gitgud.io/tbld/game/-/issues) using the Bug template.
* need a save file updated: Create an [issue](https://gitgud.io/tbld/game/-/issues) using the Save Update template.
* have an idea for a cool new feature: Create an [issue](https://gitgud.io/tbld/game/-/issues) using the Feature Request template.
* 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).
* want to become a contributor: Send a merge request!
Running `tumbledemerald` on the Nintendo Switch is a little more complex than other platforms. Nevertheless, the instructions are relatively simple:
We also have a forum [here](https://tumbledforums.flarum.cloud/) if you're into that!
* 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`.
> 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**.
## Roadmap
For the project roadmap, please check [here](ROADMAP.md).
* 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.
* 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!
## Contributing
Contributions are welcome! Please make a merge request here on GitLab using the provided template.
### PlayStation Vita
We're currently looking for:
All PlayStation Vita consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
> 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!)
* Follow [the recommended guide](https://vita.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, this is being done **at your own risk**.
* someone who can work with GBA music (to add a custom song).
* documentation contributions. Our documentation could use some updates!
* Windows buildscripts.
* volunteers to build CIA packages for tumbledemerald.
* debug menu developers.
* someone with a brain the size of Jupiter to un-GNU tumbledemerald.
* 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.
* Install the latest version of [**mGBA**](https://mgba.io) using the `.vpk` package.
* Open **mGBA**
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
See [Installation](#installation) for directions on how to set up your system to compile.
### Windows
`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.
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.
## Notes
By default, tumbledemerald does not include Wireless Adapter support. See [this script](https://gitgud.io/tbld/scripts/-/blob/main/enable_rfu.sh) to re-enable this (for playing on a Game Boy Advance flashcart, for example.)
> Why do I need to disable these settings? Is this safe to use?
## Authors and acknowledgment
Lead developers: Supersonic and Werewolf
CIA packages: Supersonic and SanicConnoissuer_91
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!.
> 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.
## License
Due to legal reasons, tumbledemerald does not have a license. Ask ax6.
> 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.***
## Project status
tumbledemerald is actively developed, with a new feature about once every week, if I feel like it.

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.
- 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!
- 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)
- 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.

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
import re
@ -93,4 +94,4 @@ if __name__ == "__main__":
perform_decap(path, c_string_pattern, is_glob)
for path, is_glob in asm_files:
perform_decap(path, asm_string_pattern, is_glob)
perform_decap(path, asm_string_pattern, is_glob)

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 (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):
```diff

View File

@ -322,6 +322,16 @@ static void HandleInputChooseAction(void)
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0);
PlayerBufferExecCompleted();
}
else
{
if(!(gBattleTypeFlags & BATTLE_TYPE_TRAINER)) //if wild, pressing B moves cursor to run
{
PlaySE(SE_SELECT);
ActionSelectionDestroyCursorAt(gActionSelectionCursor[gActiveBattler]);
gActionSelectionCursor[gActiveBattler] = 3;
ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0);
}
}
}
else if (JOY_NEW(START_BUTTON))
{

View File

@ -69,6 +69,8 @@ u8 gLinkVSyncDisabled;
u32 IntrMain_Buffer[0x200];
s8 gPcmDmaCounter;
extern void CB2_FlashNotDetectedScreen(void); // for Crust's sake use mGBA, people!
static EWRAM_DATA u16 gTrainerId = 0;
//EWRAM_DATA void (**gFlashTimerIntrFunc)(void) = NULL;
@ -114,7 +116,7 @@ void AgbMain()
gSoftResetDisabled = FALSE;
if (gFlashMemoryPresent != TRUE)
SetMainCallback2(NULL);
SetMainCallback2(CB2_FlashNotDetectedScreen);
gLinkTransferringData = FALSE;
sUnusedVar = 0xFC0;

View File

@ -401,3 +401,50 @@ static bool8 WipeSectors(u32 sectorBits)
else
return TRUE;
}
void CB2_FlashNotDetectedScreen(void){
static const struct WindowTemplate textWin[] = {
{
.bg = 0,
.tilemapLeft = 3,
.tilemapTop = 2,
.width = 24,
.height = 16,
.paletteNum = 15,
.baseBlock = 1,
}
};
static const char errorMsg[] = _(
"{COLOR RED}Hey!\n"
"{COLOR DARK_GRAY}Flash memory not detected.\n\n"
"Please make sure you\nare playing the game\n"
"on the mGBA emu-\nlator"
);
if (!gMain.state){
SetGpuReg(REG_OFFSET_DISPCNT, 0);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BG0CNT, 0);
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
DmaFill16(3, 0, VRAM, VRAM_SIZE);
DmaFill32(3, 0, OAM, OAM_SIZE);
DmaFill16(3, 0, PLTT, PLTT_SIZE);
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates));
LoadBgTiles(0, gTextWindowFrame1_Gfx, 0x120, 0x214);
DeactivateAllTextPrinters();
ResetTasks();
ResetPaletteFade();
LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20);
LoadPalette(gStandardMenuPalette, 0xF0, 0x20);
InitWindows(textWin);
DrawStdFrameWithCustomTileAndPalette(0, TRUE, 0x214, 0xE);
SaveFailedScreenTextPrint(errorMsg, 1, 0);
TransferPlttBuffer();
*(u16*)PLTT = RGB(17, 18, 31);
ShowBg(0);
gMain.state++;
}
}