Commit Graph

4732 Commits

Author SHA1 Message Date
emoose 6e74ba93d6 [CPU] Add support for delta patches using *_offset fields 2018-10-22 12:26:14 +01:00
emoose d2fd109af3 [CPU] Add more asserts for XEXP descriptor (+ log a warning) 2018-10-20 05:08:14 +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
Christian Hawley add23849bf [CPU] Implement lmw and stmw instructions 2018-10-14 13:57:45 -04:00
Justin Moore 2fa7607547
Merge pull request #1086 from bwrsandman/xenia-build-test-bin-path
[Test] Fix build_bin_path for case sensitive FS
2018-10-12 15:08:04 -05:00
Dr. Chat 37e59464c2 [UI] Undo warning fix in file_picker_win.cc 2018-09-10 20:38:58 -05:00
Justin Moore 91c53f975e
Merge pull request #1209 from Triang3l/all_format_info
[GPU] Add info about unknown texture formats
2018-09-07 17:08:07 -05:00
Justin Moore 413a04eb1b
Merge pull request #1211 from Triang3l/patch-1
[GPU] Add texture signedness enumeration
2018-09-06 19:26:06 -05:00
gibbed de43afbb54 Fix warnings when building on newer Windows 10 SDK versions. 2018-08-25 14:23:20 -05:00
Triang3l 1a4fc3bde2
[GPU] Add texture signedness enumeration
For sign_x, sign_y, sign_z and sign_w fields of xe_gpu_texture_fetch_t.
2018-08-19 15:25:20 +03:00
Triang3l d75a372780 [GPU] Add info about unknown texture formats 2018-08-05 14:02:58 +03:00
gibbed ba7dc6b2d7 [GPU] Improve readability of initialization errors and remove references to OpenGL. 2018-07-01 16:50:03 -05:00
Rick Gibbed 94d1106386
Merge pull request #1177 from Triang3l/depthbias.
[GPU] Depth bias support
2018-07-01 01:34:34 -05:00
gibbed 15eb6ed2d9 [Vulkan] Fix GetMipExtent calculating mip extent incorrectly. 2018-07-01 01:31:33 -05:00
gibbed 4357415892 [GPU] Better names for tiled functions. 2018-07-01 01:30:22 -05:00
Rick Gibbed 724086dcad
Merge pull request #1189 from Triang3l/vpk_vupk_constants.
[CPU] Unify constant operand checks in pack/unpack
2018-07-01 01:23:11 -05:00
Rick Gibbed f24dbaa21b
Merge pull request #1176 from Triang3l/xex_exe_extension.
[Core] Treat .exe files as XEX
2018-07-01 01:14:04 -05:00
Dr. Chat f89b4626a3 [VFS] Add VFS dump tool (supporting STFS only as of now) 2018-06-26 13:45:16 -05:00
Dr. Chat 827e3a0be4 Ignore unused-result warnings 2018-06-26 13:36:33 -05:00
Triang3l dd19701dc4 [CPU] Unify constant operand checks in pack/unpack 2018-06-18 13:55:46 +03:00
Triang3l c6255af824 [GPU] Depth bias support 2018-06-16 16:32:14 +03:00
Rick Gibbed 4d4737339e
Always use master branch for Travis badge for build status. 2018-06-14 18:05:43 -05:00
Unknown 86443dd28a Persist title-specific profile content 2018-06-13 19:37:15 -07:00
Rick Gibbed d124e17618
Merge pull request #1186 from Triang3l/vupkd3d_nan.
[CPU] vupkd3d: NaN on negative overflow and tests
2018-06-11 13:55:01 -05:00
Triang3l c89cc6a229 [CPU] vupkd3d: NaN on negative overflow and tests 2018-06-11 21:34:13 +03:00
Rick Gibbed 03099bd6c0
Merge pull request #1185 from Triang3l/vupkd3dfixes.
[CPU] Fix W in 2101010 vupkd3d and revert untested saturation
2018-06-11 11:35:18 -05:00
Triang3l 0378f532ab [CPU] Fix W in 2101010 vupkd3d and revert untested saturation 2018-06-11 17:22:15 +03:00
Triang3l bd02fd31bd [Core] Treat .exe files as XEX 2018-06-09 10:24:11 +03:00
gibbed 5f16e46282 [Core] Do a case-insensitive compare for extension when launching a path. Fixes #1175. 2018-06-09 01:22:45 -05:00
gibbed c11cce2d3b Oops. Fix premake for xenia-ui-window-vulkan-demo. 2018-06-08 10:09:12 -05:00
gibbed fb9eb84893 Fix premake for xenia-hid-demo and xenia-ui-window-vulkan-demo. 2018-06-08 09:52:35 -05:00
gibbed 40e8d78d16 [Kernel] Allow specifying of additional command-line passed to guest. 2018-06-06 19:56:03 -05:00
gibbed 43b987da1e [HID] Make winkey key checks more readable. 2018-06-05 08:15:59 -05:00
gibbed 8d5d6c5a59 [HID] Allow shift in winkey input to toggle d-pad in addition to capslock. 2018-06-05 08:13:51 -05:00
gibbed 1409b9c565 [GPU/Vulkan] Add support for 2D image stacks. 2018-06-05 07:51:51 -05:00
gibbed 4caa2a2145 [Vulkan] Blacklist some validation layer errors we don't care about. 2018-06-04 23:37:58 -05:00
gibbed 486172770d [GPU] Ignore min mip level when one is specified and there is no mip address. 2018-06-04 22:54:41 -05:00
gibbed aba0f3c628 [GPU] Ensure pitch/height are a multiple of block size for host textures. 2018-06-04 22:53:30 -05:00
gibbed 2c7043bd98 [GPU/Vulkan] Maybe fix minimum mip level. Probably breaks everything. 2018-06-04 10:13:28 -05:00
gibbed b5a88d1a7d [GPU] Track unaligned (visible) block width in texture info.
[Vulkan] Don't use power of two for mip width/height calculation for host textures.
[Vulkan] Add more Vulkan error logging.
[Vulkan/GPU] Rudimentary texture dumping.
2018-06-04 06:08:29 -05:00
gibbed b35fe935f9 [GPU] Ignore mipmap level count when mip data address is invalid. 2018-06-01 22:04:31 -05:00
gibbed 0d429fc7d7 [Vulkan] Disable texture mipmap watches by default. 2018-05-31 23:00:11 -05:00
gibbed 79f8fe9f37 [GPU] Fixes to problems caused by previous commit (bad handling of memory addressing, watches, etc). 2018-05-31 21:50:22 -05:00
gibbed 9ac2bf0beb [Kernel] Fix fetch field name that was changed. 2018-05-31 20:17:03 -05:00
gibbed e329649f2e [GPU] Rename texture_memory_usage.cc to texture_extent.cc 2018-05-31 19:43:26 -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 cd39bbed5c [Base] Undo last commit because it breaks file redirection.
This reverts commit ceece673e8.
2018-05-31 17:22:50 -05:00
gibbed ceece673e8 [Base] Fix AttachConsole so that --help works when invoked from command-line. 2018-05-31 16:46:03 -05:00
gibbed d0df71b8b6 [Vulkan] Move texture config to its own files. 2018-05-31 10:35:58 -05:00