1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-13 22:16:45 +00:00
Commit graph

35 commits

Author SHA1 Message Date
Pablo Curiel
3cb6ef93aa Some changes.
* 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.
2021-03-24 13:25:19 -04:00
MasaGratoR
e0949bba6b
Fix linkage for C++ projects (#79) 2021-03-23 10:06:52 -04:00
Pablo Curiel
a01b7846de title: use dynamic pointer arrays.
* 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.
2021-03-09 21:12:01 -04:00
Pablo Curiel
3bc14696ec New logfile handler.
* 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.
2021-03-07 19:22:49 -04:00
Pablo Curiel
e77c72b0db Some changes.
* 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.
2021-02-12 16:35:23 -04:00
Pablo Curiel
fbd250a417 Update copyright years. 2020-12-23 13:48:57 -04:00
Pablo Curiel
457f468519 Fix comments. 2020-11-28 02:38:53 -04:00
Pablo Curiel
dff9b1defa Revert "Rename FatFs functions to avoid linking issues with libusbhsfs."
This reverts commit 6715242fed.
2020-11-28 02:38:01 -04:00
Pablo Curiel
6715242fed Rename FatFs functions to avoid linking issues with libusbhsfs. 2020-11-20 04:56:12 -04:00
Pablo Curiel
ae6defb0e6 Another typo. 2020-10-25 11:43:22 -04:00
Pablo Curiel
3ab65d8dca Fix support for CNMTs with no ContentInfo entries. 2020-10-12 22:46:59 -04:00
Pablo Curiel
1c15a096b5 Codestyle fixes + prepare code for NPDM support. 2020-10-08 14:31:09 -04:00
Pablo Curiel
afa99ba445 Added info about XCI header keys. 2020-10-04 05:25:42 -04:00
Pablo Curiel
d385d40862 NACP parsing (part 1).
God, I'm so tired. I'll go play some good old MGS3 and continue this stuff at a later time. It builds, though.
2020-10-03 13:09:29 -04:00
Pablo Curiel
ad401d559d New template: threaded gamecard dumper via USB.
Key area and certificate can be optionally appended and/or preserved, respectively. Trimming is supported.

Also added a bunch of ZLT packet related fixes to usb.c, as well as a function to properly cancel an ongoing file transfer.
2020-08-13 02:01:23 -04:00
Pablo Curiel
7c4e7a4db0 New test app: system title NCA section dumper. 2020-07-29 17:02:21 -04:00
Pablo Curiel
90e0f057bc Bunch of changes.
* Updated NCA structs (including NcaSparseInfo).
* Changed the way NCA header + NCA FS header decryption is handled.
* Changed the way the NCA encrypted key area is handled.
* Unified hierarchical patch generation functions.
* Updated PFS, RomFS and BKTR functions accordingly to reflect NCA handling changes.
* Logfile path is now relative.
* Gamecard initial data lookup code now uses the initial data hash from the gamecard header (a tad bit slower, but way more failproof).
2020-07-22 04:03:28 -04:00
Pablo Curiel
cddf57363c Remove wrong references to ECC data in gamecards. 2020-07-17 14:42:48 -04:00
Pablo Curiel
6bee2c5d20 Tweaked gamecard code.
Modified gamecard handle retrieval and storage area mounting. Added gamecard status codes.
2020-07-17 01:01:31 -04:00
Pablo Curiel
88d3e0de8d Support for the "boot" partition in Terra gamecards. 2020-07-15 19:43:58 -04:00
Pablo Curiel
eba26a59a5 Changes to the gamecard key area handling. 2020-07-15 18:50:34 -04:00
Pablo Curiel
73861bc52f Normalize goto tag names + support for gamecard key area.
Big thanks to SciresM.
2020-07-13 02:36:17 -04:00
Pablo Curiel
b71f0d7b87 Some more changes.
* Codestyle fixes.
* NCA contexts for NCAs with titlekey crypto will now be generated even if the ticket can't be retrieved, in order to be able to use ncaReadContentFile() with them.
* Moved aes128XtsNintendoCrypt() out of nca.c.
2020-07-05 20:10:07 -04:00
Pablo Curiel
99429fd7b4 Bunch of changes.
* Updated disclaimer in all source files.
* Improved signed payload (certificate, ticket) handling.
* Prefer strlen + strcmp over strncmp whenever possible.
* Simplify header file inclusions in source files.
* Simplify background gamecard thread logic.
* Properly close keys file handle if there's a key parse error.
* Update NcaKeyGeneration enum.
* Small changes to save.c/h.

Will probably have to revert some USB changes...
2020-07-03 05:31:22 -04:00
Pablo Curiel
08b2aed130 Gamecard usermode status change event.
Useful to wait for gamecard status changes on other threads.
2020-05-03 04:40:08 -04:00
Pablo Curiel
2e48a22f8c Improve thread-safety. 2020-05-02 19:40:50 -04:00
Pablo Curiel
050f881cf6 derp 2020-05-01 11:11:18 -04:00
Pablo Curiel
91fdff7816 Codestyle fixes. 2020-05-01 11:06:24 -04:00
Pablo Curiel
7c8bf5c831 PFS0 context. 2020-04-24 05:38:13 -04:00
Pablo Curiel
cf8ab4d4ac More improvements. 2020-04-19 18:44:22 -04:00
Pablo Curiel
1b45cdf05a Mooooore baby steps.
I can finally continue the NCA handler.
2020-04-17 17:59:05 -04:00
Pablo Curiel
9679eb72bb Hash FS start. 2020-04-16 06:13:11 -04:00
Pablo Curiel
d3ad9d84b6 More changes. 2020-04-16 00:37:16 -04:00
Pablo Curiel
c83858311b More baby steps. 2020-04-15 20:06:41 -04:00
Pablo Curiel
eccd3f0c1c Baby steps. 2020-04-15 16:50:07 -04:00
Renamed from source/new/gamecard.h (Browse further)