Commit Graph

1160 Commits

Author SHA1 Message Date
Triang3l
2c8bdcd1b0 Merge branch 'master' into d3d12 2018-11-20 23:10:25 +03:00
gibbed
ff0b8a67cd [Kernel] Tag XamContentGetLicenseMask as high frequency. 2018-11-20 13:53:46 -06:00
gibbed
e1d448f630 [Kernel] Move xam_content to new shim convention. 2018-11-20 13:50:31 -06:00
gibbed
927acf1902 [Kernel] Fix a minor typo. 2018-11-20 13:05:38 -06:00
Triang3l
a6b3bddf13 Merge branch 'master' into d3d12 2018-11-20 22:04:55 +03:00
gibbed
394105d359 [CPU/Kernel] Cleanup and rework of how kernel exports are declared. 2018-11-20 13:03:17 -06:00
gibbed
613be1425e [Kernel] Update XamContentOpenFile argument names. 2018-11-20 13:03:17 -06:00
Triang3l
3139e2d33b Merge branch 'master' into d3d12 2018-11-20 20:22:59 +03:00
Triang3l
f8ecd47490 Merge branch 'master' into d3d12 2018-11-20 10:26:31 +03:00
gibbed
dafed58e98 [Kernel] Implement MmAllocatePhysicalMemory. 2018-11-19 22:04:44 -06:00
gibbed
4f50e0e6c7 [Kernel] Implement RtlCopyString, RtlCopyUnicodeString. 2018-11-19 21:03:05 -06:00
Triang3l
251ce2af6b Merge branch 'master' into d3d12 2018-11-18 12:13:26 +03:00
Rick Gibbed
21b8620bf5 Merge pull request #1264 from bmzhao/fix-failing-linux-build
Fix Linux build errors due to missing virtual destructors
2018-11-17 18:03:09 -06:00
NPCompete
7c24f8e09f [Kernel] Made xe::kernel::App destructor virtual since it is an abstract class. 2018-11-17 14:50:00 -08:00
alan
bad8c4b0c5 [Kernel] Don't dereference null pointers in SetThreadName. 2018-11-13 11:10:21 -05:00
Triang3l
6274f664f9 Merge branch 'master' into d3d12 2018-11-08 19:45:56 +03:00
emoose
7f479ffb79 [Kernel] Remove item limit from enumerators, fixes #1255
Like said in that issue, it seems the limit passed to XamContentCreateEnumerator is actually a limit on how many results XamEnumerate should return per call, not a limit on the number of enumeration items in total.
These changes fix Sonic Unleashed not loading more than 1 DLC (it passes 1 as the limit, but then loops over XamEnumerate to load in each DLC one at a time), and likely many other games.
2018-11-07 22:47:59 +00:00
Triang3l
d55a2a586f Merge branch 'master' into d3d12 2018-11-02 09:30:53 +03:00
emoose
bbb5c938ec [CPU] Fix XexModule::FindSaveRest not finding functions properly 2018-11-01 15:50:56 +00:00
Triang3l
e4a7d1dc5e Merge branch 'master' into d3d12 2018-10-29 11:22:26 +03:00
Triang3l
3b584a5f1c [Kernel] Clang-format user_module.cc 2018-10-29 11:21:26 +03:00
Triang3l
c7befee395 Merge branch 'master' into d3d12 2018-10-28 20:31:49 +03:00
Dr. Chat
c95ba803a8 Merge branch 'xexp' 2018-10-28 12:20:02 -05:00
Dr. Chat
7443b7e61f [CPU] Rename ImportLibrary fields to follow naming conventions 2018-10-28 09:41:31 -05:00
Triang3l
4162716a54 Merge branch 'master' into d3d12 2018-10-26 22:04:59 +03:00
Rick Gibbed
6a39d4b1f5 Merge pull request #1240 from 0x8080/Exports
[Kernel] Define all exports for xboxkrnl/xam/xbdm
2018-10-23 18:30:04 -05:00
0x7FFFFFFF
96bb9b04da [Kernel] Define all exports for xboxkrnl/xam/xbdm 2018-10-23 17:26:47 -06:00
gibbed
a33b13c174 [Kernel] Stub XamShowNuiTroubleshooterUI. 2018-10-23 17:48:10 -05:00
gibbed
3a64cf64e0 [Kernel] Stub HidReadKeys. 2018-10-23 16:43:31 -05:00
Triang3l
abdb37464d Merge branch 'master' into d3d12 2018-10-22 23:15:07 +03:00
emoose
bf039172cf [Kernel] Add null pointer checks to xmp_app handlers 2018-10-22 18:01:09 +01:00
emoose
67f0e487f4 [Kernel] Fix _snwprintf not having format_core wide = true 2018-10-22 18:00:01 +01: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
Triang3l
6e36101b42 [D3D12] Experimental write watch implementation for shared memory 2018-09-24 23:18:16 +03:00
gibbed
40e8d78d16 [Kernel] Allow specifying of additional command-line passed to guest. 2018-06-06 19:56:03 -05:00
gibbed
9ac2bf0beb [Kernel] Fix fetch field name that was changed. 2018-05-31 20:17:03 -05:00
gibbed
e89a31006f - [GPU] Rename TextureMemoryUsage to TextureExtent (and relevant functions/etc).
- [GPU] Precalculate memory byte usage for base mip (and any additional mip levels).
- [GPU] Change TextureCache::WatchCallback so that if it's fired multiple times for the same texture it does not assert.
- [GPU] Add write watches for texture memory associated with additional mipmap levels.
2018-05-31 19:41:33 -05:00
gibbed
e665c0a3fb Fix another Travis complaint. 2018-05-28 14:42:53 -05:00
gibbed
f450ae6a76 Fix lint errors due to Travis lint differences. 2018-05-28 07:14:18 -05:00
gibbed
73c7546114 [Kernel] Fix return of XamUserGetXUID and XamUserGetSigninInfo. 2018-05-27 19:51:25 -05:00
gibbed
da06cb4f06 [Kernel] Fix return of XamUserGetDeviceContext. 2018-05-27 19:43:44 -05:00
gibbed
dc5bd83098 [Kernel] Move xam_user to new shim convention. 2018-05-27 19:43:39 -05:00
gibbed
fc0cc89a1d [Kernel] Add X_HRESULT_result. (yes, the name is stupid) 2018-05-27 18:12:48 -05:00
gibbed
ee7b9f415a [Kernel] Move xam_input to new shim convention. 2018-05-27 16:59:07 -05:00
gibbed
4cc2aaf5b9 Remove unnecessary usage of xe::be. 2018-05-27 16:35:01 -05:00
gibbed
56dd07e329 [Kernel] Add yield to XAudioGetVoiceCategoryVolumeChangeMask for games that spin threads with it. 2018-05-24 23:31:21 -05:00
gibbed
8e9d50dd4a [Kernel] Fix XamUserGetSigninInfo to zero out info even in failure. 2018-05-24 12:41:13 -05:00
gibbed
14c73a33f9 [Kernel] Fix return of CreateContent/OpenContent in ContentManager when an already open package was found. 2018-05-24 11:17:56 -05:00
gibbed
85ad87eb73 [Kernel] Fix ContentPackage leaking its registered device. 2018-05-24 11:17:52 -05:00