mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-08 11:51:48 +00:00
15431ec2c8
* AES: moved CTR initializing/updating functions here from nca.c. * BKTR/RomFS/PFS: check if we're dealing with a NCA with titlekey crypto and the titlekey hasn't been retrieved. * BFTTF: use void pointers for output font data. * Mem: Only exclude Unmapped/Uo/ThreadLocal/Reserved memory pages if dealing with FS. * NCA: use content type context pointers inside NCA contexts to manage ContentMeta, ProgramInfo, Nacp and LegalInfo contexts. * NCA: added 'written' bool elements to patch structs to indicate patch write completion. * NPDM: remove unnecessary inline functions, generate PFS patch right after changing ACID data, add a pfsWriteEntryPatchToMemoryBuffer wrapper. * PFS: added PartitionFileSystemFileContext and related functions to deal with NSP headers. * ProgramInfo: removed unnecessary inline functions. * Save: added commented code to dump a full system savefile - will probably use it down the road. * Tik: added support for volatile tickets (thanks to @shchmue and @Whovian9369!), added a rights ID string representation to the Ticket struct, clear Volatile and ELicenseRequired flags in conversions to common tickets. * Title: added a function to calculate the number of titles (current + siblings) from a TItleInfo block. * Utils: added a function to generate a dynamically allocated path string using a prefix, a filename and a extension. * Removed explicit offset checks throughout all the code. * Codestyle fixes. * Updated to-do.
82 lines
No EOL
3.4 KiB
Text
82 lines
No EOL
3.4 KiB
Text
reminder:
|
|
|
|
list of top level functions designed to alter nca data in order of (possible) usage:
|
|
|
|
out of loop:
|
|
* ncaSetDownloadDistributionType (instead of always using it like legacy, offer it as an option)
|
|
|
|
* ncaRemoveTitlekeyCrypto (can be used with digital titles + game updates in gamecards)
|
|
|
|
* cnmtGenerateNcaPatch (Meta)
|
|
* calls pfsGenerateEntryPatch
|
|
* calls ncaGenerateHierarchicalSha256Patch
|
|
* cnmtIsNcaPatchRequired -> not sure if i'll keep this
|
|
* missing wrapper for pfsWriteEntryPatchToMemoryBuffer !!!
|
|
|
|
* programInfoChangeAcidPublicKeyAndNcaSignature (Program)
|
|
* calls npdmChangeAcidPublicKeyAndNcaSignature
|
|
* calls pfsGenerateEntryPatch
|
|
* calls ncaGenerateHierarchicalSha256Patch
|
|
* needs programInfoWriteNcaPatch to write patched data
|
|
* calls npdmWriteNcaPatch
|
|
* calls pfsWriteEntryPatchToMemoryBuffer
|
|
* calls ncaWriteHierarchicalSha256PatchToMemoryBuffer
|
|
|
|
* nacpGenerateNcaPatch (Control)
|
|
* calls romfsGenerateFileEntryPatch
|
|
* calls ncaGenerateHierarchicalSha256Patch / ncaGenerateHierarchicalIntegrityPatch
|
|
* nacpIsNcaPatchRequired is used to check if a nacp patch was applied
|
|
* missing wrapper for romfsWriteFileEntryPatchToMemoryBuffer !!!
|
|
* missing functions for nacp mods !!!
|
|
|
|
* ncaIsHeaderDirty (doesn't modify anything per se, but it's used to check if any of the functions above has been used, basically)
|
|
* ncaEncryptHeader (doesn't modify anything per se, but it's used to generate new encrypted header data if needed)
|
|
|
|
inside loop:
|
|
* ncaWriteEncryptedHeaderDataToMemoryBuffer
|
|
|
|
* pfsWriteEntryPatchToMemoryBuffer
|
|
* calls ncaWriteHierarchicalSha256PatchToMemoryBuffer
|
|
* missing cnmt, program wrappers
|
|
|
|
* romfsWriteFileEntryPatchToMemoryBuffer
|
|
* calls ncaWriteHierarchicalSha256PatchToMemoryBuffer / ncaWriteHierarchicalIntegrityPatchToMemoryBuffer
|
|
* missing nacp wrapper
|
|
|
|
minor steps to take into account:
|
|
|
|
* check if rights_id_available == true and titlekey_retrieved == false (preload handling)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
todo:
|
|
|
|
nca: support for compressed fs sections?
|
|
nca: support for sparse sections?
|
|
|
|
tik: option to wipe elicense property mask (otherwise, the console will attempt to connect to the Internet to perform elicense verification before launching the title the ticket belongs to)
|
|
tik: option to wipe volatile property mask (otherwise, the imported ticket will use an additional aes-ctr crypto layer in ticket.bin)
|
|
tik: automatically dump tickets to the SD card?
|
|
tik: use dumped tickets when the original ones can't be found in the ES savefile?
|
|
|
|
gamecard: functions to display filelist
|
|
|
|
pfs0: functions to display filelist
|
|
pfs0: full header aligned to 0x20 (nsp)
|
|
|
|
romfs: functions to display filelist
|
|
|
|
bktr: functions to display filelist (wrappers for romfs functions tbh)
|
|
|
|
title: fix titleinfo issue
|
|
title: more functions for title lookup? (filters, patches / aoc, etc.)
|
|
title: more functions for content lookup? (based on id)
|
|
title: parse the update partition from gamecards (if available) to generate ncmcontentinfo data for all update titles
|
|
|
|
|