Commit Graph

477 Commits

Author SHA1 Message Date
ITotalJustice
a772d660f3 use spinner instead of default icon for homebrew + games menus.
more menus will use it soon.
need to have a way to show the spinner when loading, then revert to the default icon if
failed to load, or an icon doesn't exist.

otherwise, the user may think that the icon is still loading and wait for it.
2025-09-21 04:08:36 +01:00
ITotalJustice
3c504cc85d devoptab: add mounts (wrapper around all mounts, exposed via MTP/FTP). lots of fixes (see below).
- updated libhaze to 81154c1.
- increase ftpsrv stack size as it would crash when modifying custom mounts.
- fix warning for unused log data in haze.
- fix eof read for nsp/xci source by instead returning 0 for bytes read, rather than error.
- add support for lstat the root of a mount.
- handle zero size reads when reading games via devoptab.
2025-09-21 03:51:13 +01:00
ITotalJustice
0a2c16db0c mtp: bump to 6e24502, fixes freezing if write blocks for too long, simplify stream install for mtp and ftp.
see: https://github.com/ITotalJustice/libhaze/issues/1
2025-09-20 20:27:02 +01:00
ITotalJustice
2bd84c8d5a add version overrides for builds. 2025-09-19 19:43:38 +01:00
ITotalJustice
7cd668efb7 keyboard: swap Z/X 2025-09-18 17:14:37 +01:00
ITotalJustice
a6265c3089 add keyboard navigation support. 2025-09-18 17:06:22 +01:00
ITotalJustice
a2300c1a96 fix crashes when signalling a event thats not created yet.
this caused a crash after installing a game if the games menu wasn't init.
the same would happen if the games menu signalled the save menu.
2025-09-18 15:35:24 +01:00
ITotalJustice
3dae3f9173 devoptab/curl: fix rare deadlock casued by sleeping/blocking in curl callback functions.
it seems that curl does not like long blocking in the r/w callbacks.
blocking for too seems to cause a deadlock as the server stops send/recv anymore data.

to fix this, i now use curls pause api.
this api is not thread safe, so it's a little more involved than it needs to be.

however this fixes the deadlock as curls pause actually reduces the download/upload speed
to the minimum. it also reduces exit latency as now exiting is handled in the progress callback
as well, which is called far more often than r/w.
2025-09-16 04:15:56 +01:00
ITotalJustice
63c420d5d8 devoptab: set default url scheme and port in creator. make form sidebar slightly wider and always show on the left side. 2025-09-15 21:51:06 +01:00
ITotalJustice
a94c6bb581 devoptab: add games. add MTP and FTP game exporting. update ftpsrv (see below). fix "fix_path()" parsing.
ftpsrv was updated to support MLST and MLSD, as well as fixing SIZE (was fixed to 32bit).
2025-09-15 21:18:53 +01:00
ITotalJustice
9fe0044a65 devoptab: only push popuplist if the items array is non-empty. curl: guess the url scheme rather than force https. 2025-09-14 15:14:35 +01:00
ITotalJustice
c05ce5eff4 yati: signal change to games menu when a new game is installed. 2025-09-14 14:52:21 +01:00
ITotalJustice
a019103ed5 mui: create menus info text from the menus array, rather than hardcoding them. 2025-09-14 14:37:00 +01:00
ITotalJustice
50e55f4fca mtp: support overriding vid/pid. 2025-09-14 14:30:46 +01:00
ITotalJustice
0706683690 mui: rename misc to menus, change menu options order so that menus is at the top, improve some info boxes text. 2025-09-14 14:16:50 +01:00
ITotalJustice
9cdb77bafa devoptab: add mount creator. 2025-09-14 14:04:20 +01:00
ITotalJustice
b476c54825 devoptab: add workaround for dkp nullptr bug.
manually set the array at startup to avoid nullptr access.
2025-09-13 13:28:55 +01:00
ITotalJustice
8b2e541b1d lots of changes, see description.
- enable sftp by default.
- add more descriptive stdio errors.
- disable devoptab timeout by default.
- handle errors for devoptab seek.
- add r/d/w progress events for threaded_file_transfer
- remove system album from file browser, only show sd card.
- do not clear game selection in games menu. useful for selecting games to backup, then delete after.
- change smb2 r/w to only send max amount, matches nfs behaviour. not sure if its needed as smb probably handles it for us.
2025-09-13 13:16:18 +01:00
ITotalJustice
931531e799 devoptab: add SFTP. fs: disable stdio buffering. cmake: add options to disable components of sphaira, add new "lite" build with minimal features. 2025-09-09 18:39:03 +01:00
ITotalJustice
1695d69aa3 audio: enable flac, make thread safe, fix crash on exit if audio wasn't init. 2025-09-09 10:39:52 +01:00
ITotalJustice
217bd3bed3 mui: add list index to sidebar and popup_list, and better center the index text. 2025-09-08 01:47:41 +01:00
ITotalJustice
384e8794bf devoptab: refactor all custom mounts to inherit from helper struct. 2025-09-08 01:34:20 +01:00
ITotalJustice
61b398a89a fatfs: use devoptab mounting. devoptab: add config for hidding from fs and dump, fix http being writeable. 2025-09-07 17:35:37 +01:00
ITotalJustice
ba78fd0dc5 devoptab: add vfs, change mount.ini path location. 2025-09-07 15:43:01 +01:00
ITotalJustice
43969a773e fs: fix CreateDirectoryRecursivelyWithPath() for root files. save: fix restore detection. devoptab: return proper errno codes. 2025-09-07 14:40:45 +01:00
ITotalJustice
6e1eabbe0f devoptab: deprecate locations.ini in favour of hdd/network mounts, better handle folder creation errors. 2025-09-07 13:30:53 +01:00
ITotalJustice
b99d1e5dea devoptab: add webdav, refactor network devices, multi thread r/w to improve perf and support webdav uploads. 2025-09-07 12:40:45 +01:00
ITotalJustice
6ce566aea5 http: optimise the dir_list parsing, only parse tables. filebrowser: option to disable stat per fs.
this improves network fs speed by disabling stat for http entriely, and only enabling file stat for everything else.
this can be overriden in the config.
2025-09-05 14:10:06 +01:00
ITotalJustice
a4209961e2 devoptab: add ftp mount with random read and streaming write support.
read still needs some work. opening a file should open a thread where data is read/written async.
this avoids the huge number of roundtrips per r/w.

eg, a read currently has to REST, open the data socket, send the file data, send ABOR to close and then close the data socket.

using the thread approach would just send the file over the already open data socket.
writes will also benefit from the above, just instead of REST it would be APPE.

seeks would need to do the above ABORT, close and re-open. however most reads in sphaira are not random access. so this isn't an issue.
2025-09-04 22:29:35 +01:00
ITotalJustice
181ff3f2bf devoptab: fix http config parsing, add more options to network mounts (timeout,uid,port). fs: update path size.
fs path was changed to 255 in the past because that is the real path size that fs can handle.
however, this restriction does not apply to nfs, samba, http - and it is very easy to exceed this 255 path length.

to fix this, i have increased the path len to 1024. this allows fs to continue to work as the buffer is
big enough, but also gives network mounts enough space to work with.
2025-09-04 12:18:34 +01:00
ITotalJustice
b85b522643 app: remove ams erpt disable as it is possible to cause ams to fatal if a crash report fails to write. 2025-09-04 09:40:39 +01:00
ITotalJustice
5158e264c0 devoptab: add http, nfs and smb mount. nca: zero init ncz structs. fs: fix FsPath compare. 2025-09-03 18:56:54 +01:00
ITotalJustice
fd67da0527 webusb: add support for exporting. usb: block requests with no timeout, using pbox to cancel if the user presses B. 2025-09-02 04:24:45 +01:00
ITotalJustice
7bdec8457f tests: move location of usb tests and update workflows for the new paths. 2025-08-31 07:37:54 +01:00
ITotalJustice
bc75c9a89f workflow: temp disable main workflow on dev until libnx pushes a new release. 2025-08-31 07:30:13 +01:00
ITotalJustice
c2e8734e85 webusb: add webUSB page and workflow to auto build it. 2025-08-31 07:15:53 +01:00
ITotalJustice
22e965521a usb: change api so that every packet sent is crc32c, update python usb api, add automated tests for usb. 2025-08-31 06:12:02 +01:00
ITotalJustice
b6b1af5959 Revert "Clean up python (#212)"
This reverts commit 0a8bc01870.
2025-08-31 04:27:53 +01:00
ITotalJustice
876be3b7b6 download: add ref count to cache init/exit and have all threads call init.
this ensures that the etag cache is ready to use before a download request is made, avoiding a rare race condition.
2025-08-31 03:50:44 +01:00
ITotalJustice
62f48353ba download: use new etag cache file and delete the old one, this removes all the old themezer entries. 2025-08-31 03:50:44 +01:00
ITotalJustice
9c65e5a12d app: remove old themezer cache 2025-08-31 03:50:44 +01:00
ITotalJustice
235e947186 app: move config to async init 2025-08-31 03:50:44 +01:00
AndrewSpangler
0a8bc01870 Clean up python (#212)
* Python cleanup
2025-08-31 03:48:37 +01:00
ITotalJustice
f0bdc01156 huge changes to everything (see below).
Changelog:
- re-enable use in release build.
- remove ftpsrv and untitled from builtin ghdl options, as both packages are available in the appstore.
- add image viewer (png, jpg, bmp)
- add music player (bfstm, bfwav, mp3, wav, ogg)
- add idv3 tag parsing support for mp3.
- add "decyption" of GTA Vice City mp3.
- add usbdvd support for music playback and file browsing.
- add nsz export support (solid, block, ldm).
- add xcz export support (same as above).
- add nro fs proper mount support (romfs, nacp, icon).
- add program nca fs support.
- add bfsar fs support.
- re-write the usb protocol, still wip. replaces tinfoil protocol.
- all threads are now create with pre-emptive support with the proper affinity mask set.
- fix oob crash in libpulsar when a bfwav was opened that had more than 2 channels.
- bump yyjson version.
- bump usbhsfs version.
- disable nvjpg.
- add support for theme music of any supported playback type (bfstm, bfwav, mp3, wav, ogg).
- add support for setting background music.
- add async exit to blocking threads (download, nxlink, ftpsrv) to reduce exit time.
- add support for dumping to pc via usb.
- add null, deflate, zstd hash options, mainly used for benchmarking.
- add sidebar slider (currently unused).
- file_viwer can now be used with any filesystem.
- filebrowser will only ever stat file once. previously it would keep stat'ing until it succeeded.
- disabled themezer due to the api breaking and i am not willing to keep maintaining it.
- disable zlt handling in usbds as it's not needed for my api's because the size is always known.
- remove usbds enums and GetSpeed() as i pr'd it to libnx.
- added support for mounting nca's from any source, including files, memory, nsps, xcis etc.
- split the lru cache into it's own header as it's now used in multiple places (nsz, all mounted options).
- add support for fetching and decrypting es personalised tickets.
- fix es common ticket converting where i forgot to also convert the cert chain as well.
- remove the download default music option.
- improve performance of libpulsar when opening a bfsar by remove the large setvbuf option. instead, use the default 1k buffer and handle large buffers manually in sphaira by using a lru cache (todo: just write my own bfsar parser).
- during app init and exit, load times have been halved as i now load/exit async. timestamps have also been added to measure how long everything takes.
- download now async loads / exits the etag json file to improve init times.
- add custom zip io to dumper to support writing a zip to any dest (such as usb).
- dumper now returns a proper error if the transfer was cancelled by the user.
- fatfs mount now sets the timestamp for files.
- fatfs mount handles folders with the archive bit by reporting them as a file.
- ftpsrv config is async loaded to speed up load times.
- nxlink now tries attempt to connect/accept by handling blocking rather than just bailing out.
- added support for minini floats.
- thread_file_transfer now spawns 3 threads rather than 2, to have the middle thread be a optional processor (mainly used for compressing/decompressing).
- added spinner to progress box, taken from nvg demo.
- progress box disables sleep mode on init.
- add gamecard detection to game menu to detect a refresh.
- handle xci that have the key area prepended.
- change gamecard mount fs to use the xci mount code instead of native fs, that way we can see all the partitions rather than just secure.
- reformat the ghdl entries to show the timestamp first.
- support for exporting saves to pc via usb.
- zip fs now uses lru cache.
2025-08-28 23:12:34 +01:00
ITotalJustice
cd6fed6aae devoptab: use fixed size array of entries rather than vector as vector can change/break pointers when it reallocs. fs: disable loading assoc when mounting custom fs. 2025-08-12 08:04:24 +01:00
ITotalJustice
7835ebc346 perf: async signal exit ftpsrv and nxlink thread in order to not block. add perf logging for exit. 2025-08-11 22:26:28 +01:00
ITotalJustice
3c33581a08 devoptab: cache all reads to max read throughput, now as fast as normal sd card reads, including compressed zips (80MiB/s). 2025-08-11 21:35:43 +01:00
ITotalJustice
3e9a8c9249 devoptab: only add new entry if mounting is successful. 2025-08-11 20:59:56 +01:00
ITotalJustice
d6c8f120c6 fs: add zip mount support. hash: fix not checking open result for file. fs: fix stdio not checking nullptr access. 2025-08-11 20:01:53 +01:00
ITotalJustice
cb2fa1abfc fs: add support for mounting nsp an xci files in the filebrowser. 2025-08-11 07:01:52 +01:00