From d448823ffb540cb462548552efe4b5650e66de95 Mon Sep 17 00:00:00 2001 From: slipstream/RoL Date: Mon, 20 Feb 2017 18:29:22 +0000 Subject: Add support for almost all Gen III games MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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! --- gba/source/payload.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gba/source/payload.c (limited to 'gba/source/payload.c') 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 @@ +/* + * Example Gen3-multiboot payload by slipstream/RoL 2017. + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + * + * payload.c: place where user payload should go :) + */ + +#include +#include "payload.h" + +// Your payload code should obviously go into the body of this, the payload function. +void payload(pSaveBlock1 SaveBlock1,pSaveBlock2 SaveBlock2,pSaveBlock3 SaveBlock3) { + // This example payload will modify the first character of the player's name. + // It will change to 'z'. You can see the character encoding table here: http://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_III + SaveBlock2[0] = 0xee; // 'z' +} \ No newline at end of file -- cgit 1.4.1