[pull] master from GerbilSoft:master#259
Merged
Merged
Conversation
There's two types: one for DSi, and one for 3DS. - DSi NTRBOOT has more fields set in the headers. - 3DS NTRBOOT only has a few fields. - DSi NTRBOOT has some payload that I haven't figured out yet. - 3DS NTRBOOT has a FIRM payload at 0x7E00. It's encrypted using the NTRBOOT key, which is currently incorrectly listed as the SPI boot key. TODO: - Use Nintendo3DSFirm to show more information about the FIRM payload. Will need to decrypt it. - Add support for NTRBOOT from WLAN firmware (SPIBOOT?). - Improve the heuristics for detection, since the bootroms don't actually need most of these fields. nds_structs.h: Add NDS_CodeInfo_t, DSi_CodeInfo_t, and constants for the card control fields. Also add more offset comments. Thanks to F3l1x_10m for providing test files for the NTRBOOT implementation.
… NTR boot; add the actual SPI boot keys. SPI boot is specifically referring to booting from the WLAN firmware, which isn't usually done.
…to NtrBoot; add the actual SpiBoot keys. All four are conveniently located in the same 64-byte block at 0x5720 in the protected section of boot9.
Needed in order for KDE to detect .bin files as NTRBOOT.
Add the fields from Nintendo3DSFirm in a new FIRM tab. Nintendo3DSFirm: Add a constructor taking a storage type: - NAND FIRM is unencrypted. - NTR FIRM is encrypted, with one set of keys. - SPI FIRM is encrypted, with a different set of keys. The keys are different for NTR/SPI and retail/debug. I'm not sure if there's an easy way to tell if a given FIRM is retail or debug, so we'll have to use heuristics. (NTR vs SPI can be determined based on the container format; anything handled by NintendoDS is NTR.) TODO: Decrypt the FIRM binary for NTR and SPI.
…used for both NTR and SPI.
…ge isNew3DS to Flags. Five flags are currently defined: - FLAG_New3DS - FLAG_Devel - FLAG_SafeMode - FLAG_TWL_FIRM - FLAG_AGB_FIRM TODO: Add more SAFE_MODE FIRM, and then add devkit, TWL, and AGB firmware binaries. Nintendo3DSFirm: Handle the New3DS flag change, and also add TWL and AGB flag handling, even though they're not used yet.
…loading into a separate function, d->loadFirmBin(). This function will eventually support decrypting the FIRM binary if e.g. an NTRBOOT or SPIBOOT image is loaded. For now, it works the same as before, though the FIRM header is *not* included in firmBuf anymore. The CRC32s still include the FIRM header, so the FIRM header has to be CRC'd first, followed by the rest of the FIRM binary.
…ad of unitcode. Unitcode is usually 0 for DSi NTRBOOT, so this asserted on DSi NTRBOOT ROM images. NOTE: The title ID is usually all zero for DSi NTRBOOT ROMs, so maybe we shouldn't show it (or various other fields...).
…FIRM images. TODO: - Add an NCCH tab for NCCH FIRMs. - Add heuristics for prod vs. devel.
…ighaxed signature is found. This works for homebrew, at least. TODO: For non-sighaxed signatures, validate it using the prod and devel public keys to determine if it's retail or debug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )