Re: Offgao's memory viewer and Tetris ACE exploits
Posted by: Cryo
Date: 2017-01-12 15:02:34
Guess I forgot the part about optimization. :D
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
Would it be possible to have the code in SRAM Bank 0 Hall of Fame data? According the Datacrystal's RAM MAP it is about 4.8KB of space (http://datacrystal.romhacking.net/wiki/Pok%C3%A9mon_Red/Blue:RAM_map#Bank_0) and would also allow you to use your boxes without corrupting them.
Would it be possible to have the code in SRAM Bank 0 Hall of Fame data? According the Datacrystal's RAM MAP it is about 4.8KB of space (http://datacrystal.romhacking.net/wiki/Pok%C3%A9mon_Red/Blue:RAM_map#Bank_0) and would also allow you to use your boxes without corrupting them.
Would it be possible to have the code in SRAM Bank 0 Hall of Fame data? According the Datacrystal's RAM MAP it is about 4.8KB of space (http://datacrystal.romhacking.net/wiki/Pok%C3%A9mon_Red/Blue:RAM_map#Bank_0) and would also allow you to use your boxes without corrupting them.
Would it be possible to have the code in SRAM Bank 0 Hall of Fame data? According the Datacrystal's RAM MAP it is about 4.8KB of space (http://datacrystal.romhacking.net/wiki/Pok%C3%A9mon_Red/Blue:RAM_map#Bank_0) and would also allow you to use your boxes without corrupting them.
Mm, that may work but you might have to add code to open the SRAM as SRAM may be closed; filled with FF/or apparently values that are hard to predict.
I presume there's not enough space in unused event flags for this right? If not then MrCheese's virus shows that it is at least possible to fit in unused event flags a script that opens SRAM, copies some data from it, and jumps to it; would that be worth doing? Since even if you reset the save file then the memory editor should still still there, you just need to re-do the loading code.
ld hl, $0060
inc [hl]
jp $XXXX
Amazing. Thank you Cryo! :)
I worked out another way to do it butyour version looks a lot shorter.
Edit: Mine is shorter but it needs the code at DBF0.
@DA80:
01 00 DA C5 0B 0B 16 12 21 AA
C3 CD 25 DB 03 C5 01 0A 00 09
C1 15 20 F3 C1 3E ED EA D3 C3
3E FF E0 B7 76 C5 CD 31 38 C1
F0 B5 FE 02 C8 FE 03 20 02 C5
C9 FE 40 20 01 0B FE 80 20 01
03 FE 20 20 06 21 F0 FF 09 44
4D FE 10 20 06 21 10 00 09 44
4D FE 24 20 06 21 00 FF 09 44
4D FE 14 20 06 21 00 01 09 44
4D 16 00 FE 88 20 02 16 FF FE
48 20 02 16 01 FE 28 20 02 16
F0 FE 18 20 02 16 10 60 69 FE
44 20 08 F5 3A F5 2A 32 F1 77
F1 FE 84 20 08 F5 2A F5 3A 22
F1 77 F1 44 4D 7A A7 28 03 0A
82 02 C3 83 DA 3E 7C 22 3E 7F
22 78 CD 3E DB 79 CD 3E DB 3E
E3 22 0A CD 3E DB 3E 7C 22 C9
F5 CB 37 CD 45 DB F1 E5 26 DB
F6 F0 6F 7E E1 22 C9
@DBF0:
F6 F7 F8 F9 FA FB FC FD FE FF
60 61 62 63 64 65
GetChar:
and a, $0F
add a, $F6 ; '0'
jr nc , .digit
add a, $60 ; 'A'
.digit
ld (hl+), a
ret
I've been trying to bootstrap to DA80 with pokemon for a while but I'm not very good with asm so it involves a pokemon with 128218 defence
I'm not even kidding…
Once GBA4IOS comes back I'll be able to test this and post it as a proof of concept.