Commit Graph
100 Commits
Author SHA1 Message Date
ITotalJustice a5f9eaa392 compress save backup by default 2025-06-05 00:42:29 +01:00
ITotalJustice cc2064f296 remove save support from ftpsrv as it may conflict with the new save menu. 2025-06-05 00:32:40 +01:00
ITotalJustice f2462cff81 add save backup/restore, fix filebrowser touch screen, optimise all zip/unzip file code by using bigger stdio buffers. 2025-06-05 00:17:55 +01:00
ITotalJustice cd0817bd11 add explicit sleep in between batch delete calls in order to not pin core3.
otherwise, core3 is pinned and button inputs (including the power button) become unresponsive.
2025-06-03 02:36:53 +01:00
ITotalJustice e88ca8ede1 fix nvjpg icon loading if w*bpp != pitch. add build option to enable/disable nvjpg (for testing). 2025-06-03 02:16:23 +01:00
ITotalJustice 7a83269d98 disable nvjpg for homebrew menu (for now).
see https://github.com/averne/oss-nvjpg/issues/1.
2025-06-02 23:09:31 +01:00
ITotalJustice 4be1d48215 use oss-nvjpg for loading jpeg images (homebrew, games and themezer).
slightly faster loading on avg compared to stbi.
2025-06-02 22:18:38 +01:00
ITotalJustice 8485ff1e99 use nxtc (nx title cache) for caching titles in the game menu. 2025-06-02 20:52:08 +01:00
ITotalJustice ea943088e5 usbds only set zlt on write 2025-06-02 18:00:40 +01:00
ITotalJustice 298be4a344 appstore add option to show installed files for app, add option to launch app website. slightly round scrollbar. 2025-06-02 17:51:48 +01:00
ITotalJustice f37fc13b7c bump yyjson version 0.10.0 -> 0.11.1 (silences cmake warning) 2025-06-01 23:51:41 +01:00
ITotalJustice 506b74868e remove old screenshots. 2025-05-31 22:15:16 +01:00
ITotalJustice 4a59d1cfda add support for loading custom forwarder gif/logo from file. 2025-05-31 22:14:02 +01:00
ITotalJustice 7201c8347f handle left/right side menu swapping.
see #153
2025-05-31 18:45:57 +01:00
ITotalJustice c8a3df3cfc merge Chinese translation from #159
fixes #159
2025-05-31 18:20:10 +01:00
ITotalJustice 2ef7742903 Merge branch 'multi_thread_everything' 2025-05-31 18:08:17 +01:00
ITotalJustice f98135325a fix icon/list layout where the highlighted border would be clipped. 2025-05-31 18:03:12 +01:00
ITotalJustice 5893cb575e fix ncz block installs, fix error module value being out of range, display error on install from filebrowser.
the issue with block installs was that i was not tracking the ncz block offset in between transfers.
this resulted in the block size being used for each transfer, rather then size-offset.

for blocks that were always compressed, this silently worked as zstd stream can handle multiple frames.
however, if there existed compressed and uncompressed blocks, then this bug would be exposed.

thanks to Marulv for reporting the bug.
2025-05-31 17:30:28 +01:00
ITotalJustice b46136b959 optimise fs CreateDirectoryRecursively() by checking if the path already exists prior to the loop. 2025-05-30 13:16:39 +01:00
ITotalJustice 390c1e870d multi-thread zip and unzip code. option to download appstore zip to mem. hasher mem support. 2025-05-30 12:34:29 +01:00
ITotalJustice 17b341d83a fix ncz install due to write offset being applied twice, fix zlt, bump version 0.11.2 -> 0.11.3
bug was introduced in 6b56b7f.
2025-05-29 01:45:15 +01:00
ITotalJustice 92eb3a9ecd add some default url entries, add option to enter custom url.
see #135
2025-05-28 20:02:51 +01:00
ITotalJustice 491445a12f Revert "remove Web menu"
This reverts commit 2d7763444e.
2025-05-28 18:46:30 +01:00
ITotalJustice 04c3c64562 always display commit hash with the version, log version hash, bump version for new release. 2025-05-28 15:37:14 +01:00
ITotalJustice 36c8a60de0 multi-threaded file copy (2.5x speed improvement for sd -> hdd). 2025-05-28 15:25:50 +01:00
ITotalJustice 6b01735655 multi-threaded hasher. 2025-05-28 15:16:32 +01:00
ITotalJustice a801e385ce reduce the size of all file assoc entries by removing the [config] section. 2025-05-28 15:15:32 +01:00
ITotalJustice 01bfcb05cd fix gamecard install due to fs==NULL. more explicit yields for sd card transfers for file based emummc. 2025-05-28 15:00:31 +01:00
ITotalJustice 6b56b7f7c2 make all threads preemptive. workaround file based emummc hanging due to fs r/w hanging the system.
the fix for file based emummc is to simply sleep between fs r/w to the sd card.
the performance impact is minimal, even with the reduced buffer size.

the above *only* applies for when using file based emummc. not affecting using partition or sysmmc.
2025-05-28 14:37:56 +01:00
ITotalJustice 37ab1a345c fix toggling ftp enable in options which could cause a crash / prevent it from re-starting ftp.
fixes #137
2025-05-28 11:55:15 +01:00
ITotalJustice 89fbb10ee6 change update behaviour to update all paths where sphaira exists and better prompt the user how to update. 2025-05-27 22:17:50 +01:00
ITotalJustice 6db0cc0615 hide left-side menu from appearing in the misc menu 2025-05-27 21:51:51 +01:00
ITotalJustice 8f6c5ff618 enable hdd mounting over ftp, bump ftpsrv commit, disable ftpsrv gc mount, reduce ftpsrv memory usage in half 2025-05-27 21:47:06 +01:00
ITotalJustice e1e19b1001 fix native fs showing empty dir count. 2025-05-27 18:21:13 +01:00
ITotalJustice 695102405b fix filebrowser split crash due to capturing the lambda by ref, 0.11.1 2025-05-27 17:59:06 +01:00
ITotalJustice aeb6c64077 bump version for new release 0.10.3 -> 0.11.0 2025-05-27 17:44:48 +01:00
ITotalJustice af4aa836a9 add gamecard trim detection. remove duplicate value in error box. 2025-05-27 15:35:52 +01:00
ITotalJustice fb2272546a bump usbhsfs git tag to include hack for adaptor mounting. fix applet mode text being draw at wrong offset. 2025-05-27 00:55:26 +01:00
ITotalJustice 4b25b2c5eb use usb mount flags to detect if its read only, rather than checking global config. 2025-05-26 23:18:14 +01:00
ITotalJustice c11d9edc4e add support for changing the left-side menu.
fixes #148
2025-05-26 22:55:06 +01:00
ITotalJustice e2a5454263 set fs view to the right side when split mode is enabled. 2025-05-26 20:27:54 +01:00
ITotalJustice 3ca82463cc mount hdd by default, add hdd write protect option. 2025-05-26 19:25:09 +01:00
ITotalJustice 793b36fd59 add hotkey for file browser to jump to advanced options (R2 + X). 2025-05-26 18:01:06 +01:00
ITotalJustice 66fe526754 add option to label trimmed xci dumps (disabled by default). 2025-05-26 17:55:54 +01:00
ITotalJustice 7c45d60e60 add nxmp and switch wave file assoc, remove old sphaira file assoc, replace ext/db assoc parse code with views::split 2025-05-26 17:42:32 +01:00
ITotalJustice a9931a975d many more optimisations. cleaned up fs code. bug fixes etc (see below).
- fix usb using the wrong year when polling the timestamp.
- fs file/dir has been re-written to allow for simplified calling and remove the need of manually closing.
- add SetSize for stdio by using ftruncate.
- don't truncate the file when opened in stdio.
- add getcount api for stdio.
- display file/dir count in filebrowser for non-native fs.
- allow hash to be used on non-native fs.
- slightly optimise nro parsing by manually calculating nro size rather than doing an os call.
- slightly optimise nro parsing by keeping the fs struct alive between calls, rather than creating a new one on the stack.
- fix filebrowser peeking into zip files that are stored on non-sd fs.
- set the timestamp of a file moved to a stdio location (cut/paste).
- slightly optimise daybreak update folder detection by skipping opening/polling the dir size.
- set the fullpath of the file thats being hashed in progress box.
2025-05-26 17:06:04 +01:00
ITotalJustice 3e3ec71329 default to having boost mode enabled for progress bar 2025-05-26 01:46:28 +01:00
ITotalJustice 49abdc0590 hotkey R2 in filebrowser for when pressed along with L2, select all files. 2025-05-25 21:06:14 +01:00
ITotalJustice 4f931d2991 Merge branch 'master' into dev 2025-05-25 21:00:51 +01:00
ITotalJustice f7c5ccfa87 huge optimisations (see below). Build with c++26 and c23.
- build with c++26 and c23, fixes warnings due to this change.
- use #embed over romfs where applicable.
- load all configs upfront in the app menu, massively improves boot time
- enable boost mode during load/scan time in all (slow loading) menus, huge load time improvement.
- enable boost mode when exiting the app, to speed up closing all the menus and saving the config.
- reduce the size of the nro nacp when loading to just the title + author + display version.
- add option to enable boost mode for all progress bar menus, huge perf improvement again.
- remove unused launch_count var from the playlog file.
- display full path when dumping.
- optimise appstore unzip code by iterating through the zip rather than finding a specific file, reduces retroarch extract time from 52s to 26s.

overall, this commit has reduced boot time from 0.4s to 0.3s and massively increased load times of other menus.
(it also reduced the binary size by 4kb, so yay)
2025-05-25 20:57:03 +01:00
ITotalJustice 5ce23f29fa GC add initial data and UID dumping (credit to nxdumptool). Fix gc bug where ns wasn't closed. Fix usb s2s being an option if dumping the bins. Always remount GC after storage has been mounted. 2025-05-25 13:24:03 +01:00
ITotalJustice be88bdb567 initial work towards support standard nsp spec.
see #147
2025-05-24 23:56:42 +01:00
ITotalJustice 1bff57f9c9 Merge branch 'master' into dev 2025-05-24 23:40:52 +01:00
ITotalJustice 1cdea981de workaround for time / battery % x position changing every few seconds.
fixes #142
2025-05-24 23:13:53 +01:00
ITotalJustice 22ebfd4a82 fs display hdd at the top of mount list for quick access, change xci dump folder to Gamecard. 2025-05-24 22:31:24 +01:00
ITotalJustice 798ac47487 limit fs hash to a single file. 2025-05-24 22:17:12 +01:00
ITotalJustice fba8051007 use feof and ferror to detect errors with stdio fs stream. 2025-05-24 22:14:06 +01:00
ITotalJustice 15721b8e8a split screen mode for fs. fix game dump. scrolling text for fs, progress, menu base. display icon when dumping. 2025-05-24 21:55:10 +01:00
ITotalJustice d43ca37875 add file hashing to the file browser (crc32, md5, sha1, sha256) 2025-05-23 17:02:35 +01:00
ITotalJustice 1b5e7401f2 use stdio for minini to benefit from buffering (reduces startup by 300ms), reduce fatfs size by 60kb. 2025-05-23 14:51:49 +01:00
ITotalJustice d8b2896bed fix native dump, fix xci dumps going to nsp folder.
native dump broke with prev commit due to not using the sd card, instead using an empty fs.
2025-05-23 13:07:00 +01:00
ITotalJustice 6475f4316a simplify stdio/native file paths by sharing the same code. 2025-05-23 12:44:56 +01:00
ITotalJustice 93c38da742 add support for mounting stdio (hdd) in the file browser. 2025-05-23 12:23:28 +01:00
ITotalJustice 8070268d2a add hdd dump support, cleanup dump code into a single generic file. 2025-05-22 15:50:50 +01:00
ITotalJustice 2e6d757852 update usbds_getspeed to match pr, fix appstore install returning a bool instead of Result. 2025-05-21 21:52:54 +01:00
ITotalJustice a91550174a add dump options, allow for gamecard menu to be accessed without install enabled. 2025-05-21 19:52:22 +01:00
ITotalJustice 52b166932d Merge branch 'master' into dev 2025-05-21 17:42:07 +01:00
ITotalJustice d50bcb650f fix crash if nro has corrupted asset entry, bump version for new release 0.10.2 -> 0.10.3
the nro that caused this was ClkrstQuery.nro

fixes #141
2025-05-21 17:29:18 +01:00
ITotalJustice 654f3a1446 replace progress box result from bool to Result. Display error box if progress box fails. 2025-05-21 16:50:18 +01:00
ITotalJustice 71415e5044 remove unused last_launch | prev_timestamp storing / fetching. 2025-05-21 15:32:42 +01:00
ITotalJustice da33b9a6b9 add usbds speed / max packet detection, add zlt support for usbds, fix game usb transfer bug (see below).
due to the previous commit, i broke dumping multiple games via usb as the stream offset wasn't reset.
because of this, the first transfer would complete, but the 2nd one would fail.
2025-05-21 14:43:18 +01:00
ITotalJustice fe2a1a3a80 add support for streamed usb upload, multi thread usb uploads / dumps.
Some notes i made when adding stream support:
The tinfoil API makes it hard / impossible to multi thread the file upload because each data transfer passes the the file name and offset, meaning that it can and will change files and offset in the middle of a transfer
So that prevents the read thread from running freely in the background and the pull thread pulling data when requested.
The extension adds a flag to the usb header which if set, enables stream mode (same as ftp installs). This removes random access, but allows for multi threading as the data will be requested in order.
2025-05-21 13:19:46 +01:00
ITotalJustice a67171e2b8 disable sleep whilst downloading, uploading, using usb, inside ftp menu. 2025-05-20 23:33:51 +01:00
ITotalJustice cf908d63b9 backport controller led flashing from ftpsrv (only flash 1 controller). 2025-05-20 23:13:20 +01:00
ITotalJustice ef25c3edc7 multi thread game dumps and file uploads.
previous uploads were all single threaded, which meant that it only uploaded as fast as the slowest source.
usb transfer is still single threaded due it being random access for both files and data, making it
hard for the read thread to run freely.
2025-05-20 22:50:05 +01:00
ITotalJustice f956adabc3 add xci dumping, add xci cert and id set dump.
still missing uid and initial dumping.
2025-05-20 17:56:55 +01:00
ITotalJustice cf192fca85 fix hbmenu not being updated due to faulty string compare, bump version 0.10.1 -> 0.10.2 2025-05-19 20:34:22 +01:00
ITotalJustice df558d5dcc bump version for new release 0.10.0 -> 0.10.1 2025-05-19 17:06:49 +01:00
ITotalJustice 33de03a923 fix sd card dumps due to the folder not being created. 2025-05-19 17:04:49 +01:00
ITotalJustice 1000b9c8ec fix sphaira not detecting latest update as we went from 0.9 to 0.10. 2025-05-19 16:23:45 +01:00
ITotalJustice 74fddecebc bump version for new release 0.9.1 -> 0.10.0 2025-05-19 16:09:33 +01:00
ITotalJustice a64d4dce7a remove ns event from games menu (see below).
turns out that the event is auto cleared when waited.
this meant that if sphaira handled the event before qlaunch got chance to handle it,
then qlaunch won't update when app records changed.

this can result in a gamecard not being mounted, deleted games still apearing, installed games
not being displayed etc...
2025-05-19 16:07:24 +01:00
ITotalJustice 5daca4354c add support for webdav uploads by creating missing folders, game now dumps to title/title[id].nsp 2025-05-19 16:00:03 +01:00
ITotalJustice da9235f58e fix upload url path not being encoded, add seek api for uploads. 2025-05-19 12:06:43 +01:00
ITotalJustice bd6566524c enable ftp in the ftp menu if it isn't already enabled. 2025-05-19 08:32:05 +01:00
ITotalJustice eadc46b0e4 add support for file uploads in the file browser, optimise curl single thread download.
- curl now keeps the handle alive for single threaded downloads, rather than creating it each time.
2025-05-18 23:00:51 +01:00
ITotalJustice 71df5317be add game dump uploading, fix download progress using u32 instead of s64, add progress and title for usb game dump.
- added support for custom upload locations, set in /config/sphaira/locations.ini
- add support for various auth options for download/upload (port, pub/priv key, user/pass, bearer).
2025-05-18 20:30:04 +01:00
ITotalJustice bd7eadc6a0 add game dumping, add game transfer (switch2switch) via usb, add multi game selecting, fix bugs (see below).
- added more es commands.
- fixed usb install potential hang if the exit command is sent, but the client stops responding (timeout is now 3s).
- added multi select to the games menu.
- added game dumping.
- added switch2switch support by having a switch act as a usb client to transfer games.
- replace std::find with std::ranges (in a few places).
- fix rounding of icon in progress box being too round.
- fix file copy helper in progress box not updating the progress bar.
2025-05-18 13:46:10 +01:00
ITotalJustice 544272925d fix IsEmunand() failing due to the paths not being page aligned. 2025-05-15 16:13:35 +01:00
ITotalJustice 70a31be134 don't fail if the control nca cannot be parsed during install, as it may depend on ticket not yet installed. 2025-05-15 15:25:03 +01:00
ITotalJustice 55ae2a63d9 fix installing failing during setup if prod.keys isn't found. 2025-05-15 15:14:02 +01:00
ITotalJustice 5a53947a3e fix crash in list layout caused by rendering all previous hidden entries. 2025-05-14 18:00:56 +01:00
ITotalJustice 83472f1020 fix game menu forcefully disabled manual loading of control data.
this was done during testing / benchmarking, but i forgot to undo this.
2025-05-14 00:06:36 +01:00
ITotalJustice 0167bf034c gc menu now tries to load control data from ns cache before manually loading.
on fw 19 and below, loading from cache takes ~5ms, whereas manually loading takes ~20ms.
manually loading is still faster than relying on ns to load control from storage (~50ms).
2025-05-14 00:04:47 +01:00
ITotalJustice 35abe363a6 optimise theme meta loading. 2025-05-13 23:52:34 +01:00
ITotalJustice 97d3fd396e optimise game menu for fw 20
- loading the control data is ran on its own thread, it does not block the main thread. allows for smooth scrolling like nintendos home menu.
- on fw20+, sphaira manually parses the control data, rather than using ns. manually parsing takes 20-40ms, which is faster than ms which can take 50-500ms.
- on fw19 and below, if the control data is not in ns cache, sphaira will manually parse the data as its twice as fast as ns. You can see how fast this is by loading the gamecard menu as that manually parses everything, and it loads the gamecard faster than the home menu
2025-05-13 23:51:06 +01:00
ITotalJustice b98ccb927e fix appstore status icons no longer being rounded (bug added in e279a70) 2025-05-11 20:19:43 +01:00
ITotalJustice db23f072a2 add sysmmc / emummc install enable options.
allows the user to enable installs for one config and disable it for the other.
by default, it will load the install option found in the config, if found.
otherwise, it will load from the new config option.
2025-05-11 20:14:34 +01:00
ITotalJustice 4d3d7e81d4 update libhaze to silence gcc 15 warning and run on core2 instead of core0. 2025-05-11 03:45:48 +01:00
ITotalJustice 441807bc53 fix building for gcc 15 2025-05-11 03:00:04 +01:00