* Rewrote mutex handling throughout the code to use a small, macro-based scoped lock implementation.
* Removed extern variables from common.h - launch path management is now completely handled in utils.c.
* Updated NpdmSystemCallId_Count to reflect changes introduced in 12.0.0.
* Added NcaMainSignatureKeyGeneration enum.
* NCA main signature moduli are now retrieved from FS .rodata at runtime.
* Simplified lock management in usb.c by using a single global mutex with scoped locks instead of three different r/w locks.
* Updated FatFs to R0.14b.
* Enabled 64-bit LBA support in FatFs to potentially support custom eMMC replacements / resized USER partitions in the future.
* Updated LZ4 to v1.9.3.
* Fixed typos.
* USB gamecard dumper PoC now only dumps the Initial Data area.
* Updated to-do list.
* Refactored keydata handling.
* Sealed NCA KAEKs are now generated at startup, and NCA key area entries are now decrypted by keysDecryptNcaKeyAreaEntry(), reducing the number of calls to spl functions.
* The eTicket RSA device key is now retrieved and decrypted at startup. RSA-OAEP wrapped titlekeys are now decrypted by keysDecryptRsaOaepWrappedTitleKey().
* Renamed titlekek -> ticket common key throughout the codebase.
* Added NcaKeyAreaEncryptionKeyIndex_Count and NcaKeyGeneration_Max enum values to nca.h.
* Proper usage of strcasecmp() in some functions.
* Moved syscall hint checks from keys.c to mem.c.
* Define illegal FS characters as an array rather than a char pointer.
* Services are now initialized before the CFW type checks.
* Fixed pcv/clkrst service initialization.
* Implemented additional thread safety and logfile output to service functions.
* Slightly tweaked running service checks.
* Added proper Markdown documentation for the USB ABI.
* Avoid performing any crypto operations on null NCA key area entries.
* Added commented out code to handle the aes_ctr_ex NCA key area entry, just in case we end up needing it at some point.
These files will be modified to slowly add features from the nxdumptool rewrite codebase.
This commit effectively makes it impossible to build the previous PoC. The code from each PoC will be reused, though, so it hasn't been removed.
* Remove references to the secondary Nintendo Extended BFTTF because it's identical to the first one.
* Use format attribute in functions that need it (and fixed errors I made in the past).
* Placed C++ extern "C" blocks inside include guards.
* Added a "clean_all" rule to the Makefile to avoid recompiling libusbhsfs after each time "clean" is used.
* Added static asserts for all structs that may need it throughout the code.
* Preprocessor macros are now used to generate certificate and ticket structs.
* Added functions to deal with title info and application metadata reallocations, greatly reducing the number of references to realloc() throughout the code.
* Tweaked gamecardGetHashFileSystemContext() to not return a pointer to a dynamic context.
* Added a type field to Hash FS contexts.
* Ported the logfile handler from libusbhsfs, with some slight modifications.
* Rewrote hash file system handling from scratch. I had been wanting to do this for some months now, it's a lot better now.
* Code cleanup.
This extension was already being used - however, smRegisterService() was also being used as a fallback method.
More than a year and a half has already passed since this feature was introduced, and both SX OS and ReiNX apparently support it now, so it's a justified change.
* Renamed titleRetrieveContentMetaKeysFromDatabase() to titleGenerateTitleInfoFromStorage().
* Moved linked lists generation from titleRetrieveContentMetaKeysFromDatabase() into its own function: titleUpdateTitleInfoLinkedLists().
* Adjusted orphan title checks. It is now explicitly verified if application metadata is available before treating a title as orphan, instead of checking if the parent user application is available.
* Code cleanup in titleRefreshGameCardTitleInfo().
* titleRefreshGameCardTitleInfo() now attempts to update the application metadata pointer in orphan title entries if new application metadata was retrieved after a gamecard was inserted *and* if the orphan title count is currently non-zero.
* Updated titleRemoveGameCardTitleInfoEntries() to make it use titleUpdateTitleInfoLinkedLists().
Serves the same purpose as the modded ns-usbloader builds. Supports the full USB ABI command set.
Also fixed a small issue related to ES IPC calls not writing the total number of available rights IDs.
* usb: copy command ID and block size before moving command data within the USB transfer buffer.
* nsp_dumper_usb: now spans a background thread for the dump process, progress is now displayed, process can now be cancelled by holding B, updated to properly make use of the new usbCancelFileTransfer() behavior.
* usb_gc_dumper: updated to properly make use of the new usbCancelFileTransfer() behavior.
* usb_romfs_dumper: updated to properly make use of the new usbCancelFileTransfer() behavior.
* Updated ns-usbloader patch. Must be used on commit `8771d551a4e6fa2d645e519d504a377e34cbd730`.
Keeps alive the current USB session by informing the host device that the user cancelled an ongoing USB transfer, instead of stalling the endpoints.
Also updated the USB ABI specs once again.
* Updated usbSendCommand() to make it send the command header first, and then the command block. Makes it easier for host applications to read and parse command data.
* Let usbSendCommand() take care of handling ZLT packets if required by any command block (only SendNspHeader at this moment), as well as logging status data via usbLogStatusDetail().
* Updated USB ABI specs doc.
* nacp: updated u32 and u64 field functions to let the user choose if the provided value should be printed using decimal or hexadecimal base, fixed codestyle.
* utils: properly implement ALIGN_DOWN() macro.
* gamecard: added more comments, modified gamecardGetBundledFirmwareUpdateVersion() to fill a VersionType1 pointer instead of a u32, fallback to manually reading the gamecard certificate if fsDeviceOperatorGetGameCardDeviceCertificate() fails, updated GameCardFwVersion enum.
* title: tweaked conditions for some functions.
* usb: explicitly defined values for previously omitted struct members while initializing USB comms, imported libusb structs to make it easier to work with the USB BOS, added a few more comments and changed around some code.
* utils: tweaked the illegal filesystem character array to remove some chars that are actually allowed.
* Temporarily changed tracked libusbhsfs branch from main to dev.
* Minor improvements in ums.c/h.
* Refactored nsp_dumper_sd into nsp_dumper_stor - now capable of dumping NSPs to a mounted partition from a UMS device.
* Fixed utilsWaitForButtonPress() when no button mask is provided.
* Refactored utilsGetFreeSpaceFromFileSystemByPath() into utilsGetFileSystemStatsByPath().
* Updated hardcoded system title list to match HOS 11.0.0.
* Updated NcaKeyGeneration_Current.
* Updated button input handling to match the new pad API from libnx.
* Free space is now retrieved via statvfs() for all filesystems, including the SD card.
* Updated Makefile to reflect latest libusbhsfs changes (dev branch).