Commit Graph

26 Commits

Author SHA1 Message Date
Gliniak
7f359f3654 [Kernel] Skip (again) initialization of XAM executable 2025-10-16 21:00:19 +02:00
Adrian
e66028f0ff [Kernel] Check XAM is attached using bounding path 2025-08-18 07:41:50 +02:00
Adrian
e45f547a49 [Kernel] Prevent $flash_xam from initialization while loading dashboard 2025-08-15 22:38:25 +02:00
Gliniak
06456c20fc [Kernel] Prevent real XAM from initialization while loading dashboard 2025-08-08 22:05:24 +02:00
Gliniak
2969a04145 [Kernel] Added support for loading modules before main 2025-08-03 20:40:30 +02:00
Hyper
a867320a87 [Kernel] Implemented XexLoadImageFromMemory 2024-08-27 22:14:21 +02:00
Adrian
5efcc6a71b [Emulator] Launch file based on signature instead of file extension 2024-03-21 15:22:32 +01:00
Gliniak
b9061e6292 [LINT] Linted files + Added lint job to CI 2024-03-12 19:19:30 +01:00
Byrom90
f743cf1e65 Implimented xex timestamp logging & ldr_data field. Allows custom plugins to access a modules timedatestamp via LDR_DATA_TABLE_ENTRY. 2023-08-08 08:45:43 +02:00
Gliniak
e8aaddf4d5 Merge remote-tracking branch 'GliniakRepo/patchingSystem' into canary_experimental 2022-06-14 17:50:25 +02:00
Gliniak
91f43a374d Initial support for xex patching 2022-06-12 20:10:07 +02:00
Gliniak
b759cb23a5 Better handling of title workspace 2022-05-22 13:11:08 +02:00
Gliniak
db50db3215 Merge remote-tracking branch 'GliniakRepo/TU_APPLY' into canary_experimental 2022-05-19 11:00:34 +02:00
Gliniak
c65f240c0b [Kernel] Improved TUs Support
- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
2022-05-06 08:04:47 +02:00
Gliniak
d78fd19ab4 Fixed incorrect hash generation + lint fixes 2022-04-29 20:33:21 +02:00
Gliniak
c73cdb506a Initial support for xex patching 2022-04-26 13:26:49 +02:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
741b5ae2ec [Memory] Add HostToGuestVirtual and use it in a couple of places 2019-08-13 23:49:49 +03:00
emoose
265903fe66 [CPU] Add XEXP support to XexModule, if XEXP is in same folder as XEX
This was a headache to work out, big thanks to the lack of documentation on .xexp files... a ton of guesswork was involved here but luckily it turned out well.

I did have to make some pretty major changes to the way XEX files are loaded though.
Previously it'd just load everything in one go: XEX headers -> decrypt/decompress data -> load imports/symbols -> set loader data table entries, etc...

Now it's changed to something like this:
- Load base XEX headers + decrypted/decompressed image data, return X_STATUS_PENDING
- In the LoadFromFile call used to load the XEX, search for XEXP patch file (only .xexp in same folder atm)
- If patch exists: load XEXP, decrypt headers/data, apply patch to base XEX, dispose of XEXP
- Finish XEX load via LoadXexContinue() (handles imports/symbols/loader data...)

This saves us from needing to reset the imports/function/symbol stuff after patching (since all the XEX code will be a lot different), but I'm not really sure if I went about it the best way.
2018-10-20 04:36:21 +01:00
emoose
0b7f7e1657 [CPU] Move XEX2 code into XexModule class, autodetect XEX key
Code is mainly just copy/pasted from kernel/util/xex2.cc, I've tried fixing it up to work better in a class, but there's probably some things I missed.

Also includes some minor improvements to the XEX loader, like being able to try both XEX keys (retail/devkit) automatically, and some fixes to how the base address is determined.

(Previously there was code that would get base address from optional header, code that'd get it from xex_security_info, code that'd use a stored base address value...
Now everything reads it from a single stored value instead, which is set either from the xex_security_info, or if it exists from the optional header instead.
Maybe this can help improve compatibility with any weird XEX's that don't have a base address optional header?)

Compressed XEX loader also has some extra checks to make sure the compressed data hash matches what's expected.
Might increase loading times by a fraction, but could save reports from people unknowingly using corrupt XEXs.
(still no checks for non-compressed data though, maybe need to compare data with xex_security_info->ImageHash?)
2018-10-20 04:18:18 +01:00
Dr. Chat
a148b965f1 KernelState should handle module launching 2016-10-24 11:01:10 -05:00
Ben Vanik
f26bea88d9 Replacing zlib with snappy in traces, adding trace header, docs. 2015-12-30 22:58:22 -08:00
Dr. Chat
4e7dfa477b Assign XModule path on load rather than in the constructor 2015-12-29 13:10:03 -08:00
Dr. Chat
4a3773d2fb XModule Save/Restore 2015-12-29 13:09:32 -08:00
Dr. Chat
aa7919bd89 emulator.cc savestates
Change UserModule::Launch to be non-blocking (returns the main thread)
2015-12-29 13:09:17 -08:00
Ben Vanik
e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00