ntrteam / flashcart_core

A hopefully reusable component for dealing with flashcart specific behavior.
GNU General Public License v3.0
126 stars 32 forks source link

Fixed a bug on R4i Gold 3DS #143

Closed bulzipke closed 4 months ago

bulzipke commented 4 months ago

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.

kitlith commented 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)

bulzipke commented 4 months ago

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.

kitlith commented 4 months ago

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.