about summary refs log tree commit diff stats
path: root/gba/source/payload.c
diff options
context:
space:
mode:
authorslipstream/RoL <l33twax@yahoo.com>2017-02-20 18:29:22 +0000
committerslipstream/RoL <l33twax@yahoo.com>2017-02-20 18:29:22 +0000
commitd448823ffb540cb462548552efe4b5650e66de95 (patch)
tree8938c01996d872f3b0e764786b20ebe46d97382a /gba/source/payload.c
parent272a6592bace32cc4b2c5432aa3fad4066f152c6 (diff)
downloadgen3uploader-d448823ffb540cb462548552efe4b5650e66de95.tar.gz
gen3uploader-d448823ffb540cb462548552efe4b5650e66de95.tar.bz2
gen3uploader-d448823ffb540cb462548552efe4b5650e66de95.zip
Add support for almost all Gen III games
The only Gen III game unsupported should be Pokémon LeafGreen v1.1
(Japan); as it is undumped.

A couple of bugs have also been fixed.

The code has also been refactored a little; now payload code goes into
`payload.c`. The codebase is also ready for a planned future change to
include savedata structure definitions. This will be done when it's done
-- PRs to help would be appreciated!
Diffstat (limited to 'gba/source/payload.c')
-rw-r--r--gba/source/payload.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gba/source/payload.c b/gba/source/payload.c new file mode 100644 index 0000000..7015774 --- /dev/null +++ b/gba/source/payload.c
@@ -0,0 +1,18 @@
1/*
2 * Example Gen3-multiboot payload by slipstream/RoL 2017.
3 *
4 * This software may be modified and distributed under the terms
5 * of the MIT license. See the LICENSE file for details.
6 *
7 * payload.c: place where user payload should go :)
8 */
9
10#include <gba.h>
11#include "payload.h"
12
13// Your payload code should obviously go into the body of this, the payload function.
14void payload(pSaveBlock1 SaveBlock1,pSaveBlock2 SaveBlock2,pSaveBlock3 SaveBlock3) {
15 // This example payload will modify the first character of the player's name.
16 // It will change to 'z'. You can see the character encoding table here: http://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_III
17 SaveBlock2[0] = 0xee; // 'z'
18} \ No newline at end of file