Commit Graph
69 Commits
Author SHA1 Message Date
Michael Scire db71eefd9f loader: update for 20.0.0/21.0.0 2025-11-15 12:31:07 -07:00
Michael Scire 3bc1951820 ams: mark ams::Result [[nodiscard]] (partially complete).
NOTE: This work is not yet fully complete; kernel is done, but
it was taking an exceedingly long time to get through libstratosphere.
Thus, I've temporarily added -Wno-error=unused-result for libstratosphere/stratosphere.

All warnings should be fixed to do the same thing Nintendo does as relevant, but this
is taking a phenomenally long time and is not actually the most important work to do,
so it can be put off for some time to prioritize other tasks for 21.0.0 support.
2025-11-15 12:31:07 -07:00
Michael Scire d305d48a7e ams: basic support for compiling with gcc 15 2025-05-09 11:55:21 -07:00
Michael Scire b7ec64ea16 fs.mitm: add and use memlet module to temporarily steal applet memory while building romfs images.
Starting in 20.0.0, the browser needs more applet memory to function, so we can't steal as much any more.
Thus, we now steal 14 MB on 20.0.0+ instead of 40MB.

However, since this reduces memory available for custom system modules, we are adjusting to compensate.
ams.mitm's heap size has been reduced from 32MB to 12MB (recovering 20MB).
In addition, fs.mitm now uses a new mechanism for stealing memory from the applet pool while romfs is being built.

On net, we are compromising:
    * Custom sysmodules lose memory available to them.
        On 19.0.0/AMS 1.8.0, there was 30 MB available for custom sysmodules.
        Stealing 14 MB instead of 40 MB, we lose 26 MB of that. Reducing ams.mitm's usage will gain us back 20.
        Nintendo also appears to...use 4 extra MB, in 20.0.0, from my test homebrew.
        So on 20.0.0/AMS 1.9.0, there should be 20 MB available for custom sysmodules.
        On the bright side, on <20.0.0/AMS 1.9.0, I guess there will be 50 MB available for custom sysmodules now?
    * totk mods will lose the ability to...put every file in the romfs on sd card. There will be some unknown maximum filecount for totk mods.
        On the bright side, implementing the transient memory stealing should improve compatibility for some mods which strictly add files?
2025-05-09 11:55:21 -07:00
Michael Scire 791edf87a0 ncm: update to implement new ContentMetaDatabase function for 20.0.0 2025-05-09 11:55:21 -07:00
Michael Scire 3a8cffef57 ncm: better detect + fix 17 brick after-the-fact
This adds detection for missing-save or empty-save, and rebuilds in either case.
2023-10-16 02:38:30 -07:00
Michael Scire c95741142e ncm: update for new 17.0.0 apis 2023-10-12 08:55:58 -07:00
Michael Scire 8876eedfb0 ncm: alignment was changed for PlaceHolderId/ContentId in 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire f7915c2c05 ncm: Add IntegratedContent*Impl 2023-02-22 17:19:51 -08:00
Michael Scire 668cabd4a2 ncm: first pass at ContentManagerImpl refactor (missing the IntegratedImpls, won't link) 2023-02-22 17:19:51 -08:00
Michael Scire 0ea5dbcfbb libstrat: make build with new ncm/fs api changes (sysmodules probably fail to build) 2023-02-22 17:19:51 -08:00
Michael Scire e46e7e0eb1 boot2: update for 16.0.0 2023-02-22 17:19:51 -08:00
Michael Scire 8ce4f19615 ncm: update enums, refactor comparison operators 2022-10-18 11:10:17 -07:00
Michael Scire dddb5bfdea boot2: launch new eth sysmodule after bsdsockets 2022-10-12 09:15:16 -07:00
Michael Scire 427130a122 ncm: update for new add on content/attr changes 2022-10-12 09:15:16 -07:00
Michael Scire 05de5538d6 ncm: GetContentAccessibilities, GetContentInfo* 2022-10-12 09:15:16 -07:00
Michael Scire a975689c59 ams: address some warnings when building with gcc-12 2022-06-05 22:57:08 -07:00
Michael Scire bbf22b4c60 ams: globally prefer R_RETURN to return for ams::Result 2022-03-26 14:48:33 -07:00
Michael Scire dd78ede99f ams: use R_SUCCEED, R_THROW globally 2022-03-26 00:14:36 -07:00
Michael Scire a89c5dd5d7 ncm: hot take, uninitialized data bad 2022-03-23 09:10:50 -07:00
Michael Scire 07f91f0a83 boot2: launch omm before am 2022-03-23 09:10:50 -07:00
Michael Scire 3579797309 sf: add new debug-interface-id in cmif out header 2022-03-23 09:10:50 -07:00
Michael Scire fa98bf9434 libstrat: misc fixes for unused arg warnings 2022-03-23 09:10:50 -07:00
Michael Scire 320a946fc7 ncm: update client code to better reflect latest sysupdate 2022-03-21 17:21:44 -07:00
Michael Scire 64a97576d0 ams: support building unit test programs on windows/linux/macos 2022-03-21 17:21:44 -07:00
Michael Scire 889d843718 ams: improve offsetof style consistency 2021-10-18 00:17:13 -07:00
Michael Scire 5708bb1557 ams: allow bootloader to merely approximate correct target firmware 2021-10-11 00:54:17 -07:00
Michael Scire bc96ebb74c os: add FlushDataCache 2021-10-10 00:33:52 -07:00
Michael Scire a595c232b9 strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
Michael Scire 1ab0bd1765 ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
Michael Scire b0e520112b strat: always use explicit result namespacing 2021-10-09 10:36:21 -07:00
Adubbz 303c6eb5f9 settings: implement KeyValueStore (#1659)
* settings: implement KeyValueStore and dependencies

* settings: update KeyValueStore for recent refactoring

* settings: address feedback
2021-10-09 09:16:40 -07:00
Michael Scire e8f1efd01b libstrat: fix compilation without pre-compiled header/without lto 2021-10-06 17:58:42 -07:00
Michael Scire 77fe5cf6f5 ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
Michael Scire 41ab4c2c68 stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex 2021-09-29 22:52:50 -07:00
Adubbz b6b09d6944 ncm: updated to 13.0.0 2021-09-19 10:34:31 -07:00
Adubbz a941e4be03 ncm: skeleton new commands 2021-09-19 10:34:31 -07:00
Michael Scire a2c0cc924b fix dmnt.gen2 title id (not sure how I typo'd this) 2021-09-11 19:41:47 -07:00
Michael Scire 206516411f boot2: launch dmnt.gen2 over dmnt, when using htc 2021-09-11 19:41:47 -07:00
SciresM e9849c74cf LogManager: implement system module, client api, logging api (#1617)
Some notes:

* Unless `atmosphere!enable_log_manager` is true, Nintendo's log manager will be used instead.
  * This prevents paying memory costs for LM when not enabling logging.
  * To facilitate this, Atmosphere's log manager has a different program id from Nintendo's.
  * `atmosphere!enable_htc` implies `atmosphere!enable_log_manager`.
* LogManager logs to tma, and the SD card (if `lm!enable_sd_card_logging` is true, which it is by default).
* Binary logs are saved to `lm!sd_card_log_output_directory`, which is `atmosphere/binlogs` by default.
2021-09-11 19:32:14 -07:00
Michael Scire a7c14e03b9 ams: std::optional -> util::optional 2021-07-08 02:37:26 -07:00
Michael Scire 9be8b32311 tipc/sm: various fixes for issues 2021-04-11 03:42:16 -07:00
Michael Scire aff0da9427 ams: remove TYPED_STORAGE() macro in favor of template 2021-03-21 18:47:30 -07:00
Michael Scire cee1ecd06f tio: add stub sysmodule to host target io server 2021-02-26 04:49:20 -08:00
Michael Scire fc060d3777 htc: skeleton main file/sysmodule dir 2021-02-24 04:06:54 -08:00
Michael Scire 9878c18e47 ncm: update for new sf semantics 2021-01-20 23:39:31 -08:00
Michael Scire f06de12bea libstrat: convert to experimental new (super-accurate) sf allocation semantics 2021-01-20 23:39:31 -08:00
Michael Scire 5ef93778f6 fs: move file storage to common 2020-12-05 03:31:12 -08:00
Michael Scire ad551c3b55 ncm: loosen FirmwareVariation restrictions. 2020-07-10 11:46:53 -07:00
VolcaEM 8d6e076b77 ncm: Mark two variables as const (#1078)
ncm: Mark two variables as const
2020-07-08 21:48:41 -07:00