Glitch City Laboratories Archives

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.

Arbitrary Code Execution Discussion

How to delete a save file with ACE? - Page 1

How to delete a save file with ACE?

Posted by: zdrmonster12
Date: 2018-07-16 19:59:55
another dumb question but possible.

Re: How to delete a save file with ACE?

Posted by: Guy
Date: 2018-07-16 21:03:27
I think throwing some random byte into $B523 would prevent the game from allowing you to load it, as that's where the main data checksum for SRAM is located. It's probably much more likely to happen by accident, considering how item underflow alone gives instant access to SRAM in unintended ways.

Re: How to delete a save file with ACE?

Posted by: ISSOtm
Date: 2018-07-16 22:44:21
One of the solutions is indeed to simply corrupt a checksum, which prevents loading the save file.
Another solution is to remove all terminator characters for the saved player name, which makes the game believe there is no save file at all. A simple way is to fill 11 bytes starting at 1:A598 with any value besides $50.

Re: How to delete a save file with ACE?

Posted by: Parzival
Date: 2018-07-18 00:24:17
Yeah, just overwrite the checksum or fuzz over SRAM to make the sums invalid. Easier to do, tbh.

Re: How to delete a save file with ACE?

Posted by: Krys3000
Date: 2018-07-18 03:44:40
Just Superglitch your game and save and it's done, haha  ;D

But seriously, similarly to what ISSOtm said, you could ACE a Superglitch as first move of any Pokémon, watch its stats, save/reset. That'd be a twisted, both dumb and genious, way to delete a save file with ACE  8).

Re: How to delete a save file with ACE?

Posted by: Parzival
Date: 2018-07-18 09:59:02
So, wait, does OP know you can erase a save with Up+Select+B at the title screen? It'd be easier to do that.

Re: How to delete a save file with ACE?

Posted by: ISSOtm
Date: 2018-07-18 10:44:32
Actually, you can just call `ClearSAV` (1C:7B6A)

ld b, $1C ; BANK(ClearSAV)
ld hl, $7B6A ; ClearSAV
jp $35D6 ; Bankswitch

Re: How to delete a save file with ACE?

Posted by: Guy
Date: 2018-07-18 13:02:27
My solution's only one line. ;)

Re: How to delete a save file with ACE?

Posted by: ISSOtm
Date: 2018-07-18 17:15:47
Wrong, it's at least 2 lines :)

ld hl, sMainDataCheckSum
inc [hl]