Closed bulzipke closed 4 months ago
Couple issues with always enabling encryption/decryption on backup/restore.
First, judging by the code surrounding ntrboot injection, the header region is not always encrypted, so this would scramble the bits of the unencrypted region on those devices.
More importantly, though, this would make every existing backup that someone has already taken of their R4i Gold 3DS un-restorable, unless we were very careful to work around that. (it's not like we have a header that we've been embedding version information into)
I did succeed in changing the icon of flashcart with this, but my code doesn't seem appropriate for use at ntrboot. Thank you for your kind explanation.
The typo bugfix is absolutely in scope (even if it's in unused code), but changing the backup scheme at this point would be more hassle than I'm prepared to deal with, unfortunately.
Fixed a typo in the decrypt function. Enabled decryption when dumping Flashcart. Enabled encryption when restoring dumps to the Flashcart.
I have tested the dump/restore on my R4i Gold 3DS. Inject has not been tested.