#5609 - Rattus - Sat May 03, 2003 3:38 am
How common is the use of hardware interrupts over polling to detect the key states? If the majority of games DIDN'T use REG_KEYCNT, would it be possible to do something like the following?
1. Load your custom GBA shutdown (or a trainer, or whatever) code into memory
2. Stick a jump instruction at 0x03007FFC (the address branched to when a hardware interrupt occurs) to point to your custom code
3. Set the key control register to generate a hardware interrupt when a set of keys (eg start & select & L & R)
4. Load a game ROM and transfer control to it
So that (assuming the ROM didn't overwrite your function loaded into ram at step 1) during any game, you could hold down the buttons and have a suspend-mode for any game? Hmm, thinking about it, this would only work for a game that didn't hook the 0x03007FFC hardware interrupt vector at all, wouldn't it? :( Can anyone else think of a creative way of making a software gameshark/universal suspend-the-GBA system that could be loaded around existing ROMs on a flash cart?
1. Load your custom GBA shutdown (or a trainer, or whatever) code into memory
2. Stick a jump instruction at 0x03007FFC (the address branched to when a hardware interrupt occurs) to point to your custom code
3. Set the key control register to generate a hardware interrupt when a set of keys (eg start & select & L & R)
4. Load a game ROM and transfer control to it
So that (assuming the ROM didn't overwrite your function loaded into ram at step 1) during any game, you could hold down the buttons and have a suspend-mode for any game? Hmm, thinking about it, this would only work for a game that didn't hook the 0x03007FFC hardware interrupt vector at all, wouldn't it? :( Can anyone else think of a creative way of making a software gameshark/universal suspend-the-GBA system that could be loaded around existing ROMs on a flash cart?