1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-22 18:26:39 +00:00
Commit graph

265 commits

Author SHA1 Message Date
Pablo Curiel
3d5b3757ec Use legacy Borealis. 2021-03-29 17:57:36 -04:00
Pablo Curiel
194389b73f Some changes.
* 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).
2021-03-29 14:27:35 -04:00
Pablo Curiel
45b2e2398f Update Makefile 2021-03-26 00:36:00 -04:00
Pablo Curiel
11da814fb2 Fix building issues with Borealis. 2021-03-26 00:35:14 -04:00
Pablo Curiel
e92c6e536b Add Borealis as a git submodule. 2021-03-25 22:49:59 -04:00
Pablo Curiel
c6c5667bf0 Change project layout + upgrade license to GPLv3. 2021-03-25 15:26:58 -04:00
Pablo Curiel
dd9cf1f41d Remove references to Freetype and LVGL. 2021-03-25 03:22:32 -04:00
Pablo Curiel
1e58ed4f8a Makefile: build as a C++ project.
Yes, we'll be using Borealis.
2021-03-24 20:45:31 -04:00
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
MasaGratoR
e9a9a5abcc
Change include of atomic to be compatible with C++ (#78) 2021-03-22 10:30:12 -04:00
Pablo Curiel
ae3b7266a0 Fix NACP bitflag checks. 2021-03-20 03:13:16 -04:00
Pablo Curiel
ecefbe6163 Use latest PyInstaller instead of cx_Freeze to generate a standalone Windows EXE. 2021-03-20 00:47:57 -04:00
Pablo Curiel
2bc9bae11b Small icon correction.
Looks a bit better now. Mad Paint skillz.
2021-03-19 22:36:04 -04:00
Pablo Curiel
a016ba92db More host script changes.
* Added text files with required module information, which can be used with pip.

* Added a batch file to build a ZIP archive with a standalone copy of the script, which can be used to run it under Windows systems without Python.

* Further tweaked the way the progress bar window works.

* Debug messages are no longer printed to the log.

* Rearranged some parts of the code.
2021-03-19 21:59:53 -04:00
Pablo Curiel
491b70d715 Windows taskbar progress.
We're embedding the type library as well because reasons.
2021-03-17 17:19:44 -04:00
Pablo Curiel
a291408b9d Host script changes.
* Use Python keywords in conditional blocks.
* Use one-liners whenever possible.
* Removed unused code.
* Only use a progress bar if the overall file size is greater than the hardcoded threshold value.
2021-03-17 13:25:30 -04:00
Pablo Curiel
2103c08582 Remove exit messagebox. 2021-03-16 11:54:17 -04:00
Pablo Curiel
b0607e9c6e Update nxdt_host.pyw 2021-03-16 11:52:10 -04:00
Pablo Curiel
479a36f671 Unified progress bar for all NSP file entries. 2021-03-16 11:44:48 -04:00
Pablo Curiel
a7984de0c8 Send Git commit hash as part of the StartSession block. 2021-03-16 01:08:38 -04:00
Pablo Curiel
97cd7eb53e Minor changes. 2021-03-16 00:25:19 -04:00
Pablo Curiel
e70979248a Fix crashes related to tqdm.
Use our own child window with strings generated by tqdm.format_meter() instead of relying on tqdm_tk.
2021-03-15 23:28:06 -04:00
Pablo Curiel
651e5d5f87 Update nxdt_host.pyw 2021-03-15 11:38:38 -04:00
Pablo Curiel
0a88d055b8 Host script UI. 2021-03-15 11:31:52 -04:00
Pablo Curiel
f8e10081d6 Update title.c 2021-03-12 12:47:40 -04:00
Pablo Curiel
08fbdb862d Update nxdt_host.py 2021-03-11 20:40:27 -04:00
Pablo Curiel
0ec60092df Keep indexes and counters for all supported storage IDs.
Speeds up title lookups using a specific storage ID.

Also reworked a bit the way orphan titles are handled. Should be better now.
2021-03-10 09:10:43 -04:00
Pablo Curiel
34c15d92cc Update title.h
I was sleepy.
2021-03-09 21:15:40 -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
8be5460229 Store last log message using a small stack buffer.
Will be used to print error messages down the road.
2021-03-08 10:44:11 -04:00
Pablo Curiel
43f744326f Minor fixes.
* The new logfile handler should now work properly.

* A UTF-8 BOM is now written at the start of every new logfile.
2021-03-08 07:11:28 -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
bcc688061e Account for orphan system titles as well.
Yeah, system titles we have no hardcoded metadata for, basically.
2021-03-02 01:22:10 -04:00
Pablo Curiel
a384137636 Fix compatibility with latest libusbhsfs commit. 2021-03-02 00:39:51 -04:00
Pablo Curiel
4399709aca Update libusbhsfs 2021-03-02 00:33:28 -04:00
Pablo Curiel
56a4b2f747 Update utils.c 2021-02-27 05:55:25 -04:00
Pablo Curiel
72c9349675 Update libusbhsfs 2021-02-24 23:40:48 -04:00
Pablo Curiel
5eb96cbece services: completely ditch smRegisterService() and just use the AtmosphereHasService SM API extension.
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.
2021-02-24 23:36:53 -04:00
Pablo Curiel
a90d8f2074 Title handler changes.
* 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().
2021-02-22 17:30:47 -04:00
Pablo Curiel
6df7ff0cba Fix output filenames not being updated in usb_gc_dumper. 2021-02-20 14:52:07 -04:00
Pablo Curiel
6f87e25f26 Add comments about USB backend errors. 2021-02-20 14:27:49 -04:00
Pablo Curiel
bd15898227 Silly me.
I'm sleepy, don't judge me.
2021-02-18 23:20:49 -04:00
Pablo Curiel
c6a60dcf1e Renamed script.
Also added a license notice at the top and modified it to create the provided output path if needed.
2021-02-18 23:18:30 -04:00
Pablo Curiel
954e250151 Minor improvements to the companion script.
* The KeyboardInterrupt exception is now being caught.

* The USBError exception is now only being caught while reading a command header, which has a maxed out timeout value. This is used as a way to detect if the console has been disconnected.

* An output path can now be passed as the first argument for the script. User home directory and environment variables are expanded, if needed.

* If no path is provided, the script will proceed to create a 'nxdumptool' directory inside the directory where the script is located, and use it to store all the data sent by the console.
2021-02-18 22:49:01 -04:00
Pablo Curiel
85a045ba38 Add a Python-based companion script.
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.
2021-02-18 04:24:16 -04:00
Pablo Curiel
de076f4908 More USB changes.
* 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`.
2021-02-16 08:22:14 -04:00
Pablo Curiel
b6759f764b Gracefully cancel ongoing USB file transfers.
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.
2021-02-15 17:07:47 -04:00
Pablo Curiel
c3555431d4 Prevent ALIGN_DOWN() from overflowing. 2021-02-13 19:53:30 -04:00
Pablo Curiel
1d0cc9c45b USB changes (breaks ns-usbloader compatibility).
* 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.
2021-02-13 17:49:05 -04:00