Commit Graph

5202 Commits

Author SHA1 Message Date
RadWolfie de347a1719 Replace Windows API to SimpleIni class
Plus also replace spaces to tabs in edited functions.
2018-09-03 21:46:57 -05:00
RadWolfie eff6da7551
Merge pull request #1426 from RadWolfie/move-source-files-to-their-own-folder-part1-of-2
Move source files to their own folder part1.2
2018-09-02 09:54:11 -05:00
RadWolfie 75ac4079aa Oops missed one link fixup 2018-09-02 09:44:18 -05:00
RadWolfie de1633dab5 Move D3D8 and Direct3D9 files into its own folder 2018-09-02 09:10:30 -05:00
RadWolfie 385e0c612d Oops 2018-09-02 06:55:23 -05:00
PatrickvL aeca7066bc
Updated readme
Changed Direct3D 8 into Direct3D 9
Removed d3d8to9 mention
2018-09-02 08:22:48 +02:00
RadWolfie 4ea37624a6
Merge pull request #1425 from RadWolfie/move-source-files-to-their-own-folder-part1
Move source files to their own folder (Part 1)
2018-09-01 15:12:18 -05:00
RadWolfie a2c667f706 Final clean up except for D3D8 files. 2018-09-01 14:49:03 -05:00
RadWolfie a89f702d1e Add D3D8 filter to visual studio 2018-09-01 14:23:18 -05:00
RadWolfie f083da6666 Move XGraphic to its own folder 2018-09-01 14:22:58 -05:00
RadWolfie 81d3ae8510 Move XOnline files to its own folder 2018-09-01 14:11:37 -05:00
RadWolfie dc24c3f1c1 Move XActEng files to its own folder 2018-09-01 13:34:50 -05:00
RadWolfie 696dc019d5 Fix file path comments 2018-09-01 12:55:13 -05:00
RadWolfie ba9dd0b399 Move XInput plugin in OHCI folder 2018-09-01 12:47:53 -05:00
RadWolfie a650e1e4f3 Move Xapi, XInput, and DInput into their own folder
Both XInput and DInput are migrated together. It's best to keep them in XInput folder.

As for Xapi files, may not require any plugin? Or possible put into their own folder?
2018-09-01 11:54:58 -05:00
RadWolfie 5ff6e9e6b5 Move DirectSound plugin to its own folder
Will eventually need to separate the APIs and its classes into a generic class.
2018-09-01 11:54:58 -05:00
RadWolfie ce67dea010 Move HLE's Intercept and Patches to their own folder
First step to organize the filesystem! (Beside hardware files has its own directory, good job!)
2018-09-01 11:54:58 -05:00
Luke Usher 9d6843f043
Merge pull request #1424 from LukeUsher/fix-depth-issues-cb-woc
Quick patch to fix Depth-Buffer issues in Crash Bandicoot: The Wrath of Cortex
2018-09-01 14:41:04 +01:00
Luke Usher f2b3a01210 Quick patch to fix Depth-Buffer issues in Crash Bandicoot: The Wrath of
Cortex (and likely many others)

Calling the unpatched trampoline of the patched function is enough to
solve the issue: This further enforces that unpatching these functions
and reading from NV2A state is the right thing to do, work will continue
on that as a seperate branch.
2018-09-01 14:33:50 +01:00
Luke Usher 9172cef216
Merge pull request #1400 from revel8n/shader_improvements
Shader improvements (Pixel Shader 2.0)
2018-08-30 21:39:47 +01:00
Luke Usher c23b3b25fc
Merge pull request #1423 from PatrickvL/newline_cleanup
Cleanup remnants from the FUNC_EXPORTS removal
2018-08-30 15:59:04 +01:00
PatrickvL 361504e97b Cleanup remnants from the FUNC_EXPORTS removal 2018-08-30 16:39:54 +02:00
Luke Usher b40431f976
Merge pull request #1421 from RadWolfie/minor-fixup-for-wm_move
Fix flickering window on move
2018-08-30 07:22:43 +01:00
RadWolfie 44013064e0 Fix flickering window on move
Using this method perform very minor flicker when moving around on screen.
2018-08-29 19:17:40 -05:00
Luke Usher a0cf419193
Merge pull request #1420 from LukeUsher/hle-patching
Split Symbol scanning and patching phases
2018-08-28 18:43:07 +01:00
Luke Usher 2c5873a070 Fix complation after rebase 2018-08-28 16:26:08 +01:00
Luke Usher b00ab30648 Split Symbol scanning and patching phases
This allows for both steps to be completely disconnected, easily
allowing patches to be turned on or off based on a set of flags, as well
as preventing the need to clear the HLE cache when switching from
HLE->LLE.

This also allows patches to be seen/modifed from a central location,
no more searching through the codebase to determine if a function should
be patched or not, and no more 'FUNC_EXPORTS/GetProcAddress' magic!

Currently, this is used for HLE only, but could really shine when
extended to introduce optional detour based logging even when LLE is
enabled.

For example We could easily add a LLE_D3D_DETOUR flag, which when
enabled, patches functions with a wrapper, which simply logs input and
output, calling the original xbox function via a trampoline.

This would be great for debugging, as we'd get a full call trace from
the API level, even when not implementing HLE.

There's also the possibility of mixing in some patches even with LLE
enabled: for a hybrid HLE/LLE solution of the same functionality,
but there are no plans to implement that at this moment of time.
2018-08-28 16:23:53 +01:00
revel8n 4d2e5a27ef
Fix incorrect instruction index used for register replacement 2018-08-28 09:22:02 -05:00
revel8n 28ace7e010
Update to pass correct register type for pixel shader 1.3 and below when determining output register validity 2018-08-28 09:21:59 -05:00
revel8n ad2691618a
Added initial implementation of bump mapping related instructions
- Added handling of missing texture state states
- Added retrieval of bump mapping texture stage states as pixel shader constants
2018-08-28 09:21:55 -05:00
revel8n 919891cf3d
Fixes for matrix calculations in texm instructions
- Updated incomplete logic for texm instructions to perform correct number of dot products
- updated CMP instruction logic to more closely match CND logic
- Added missing compare to depth instruction
2018-08-28 09:21:51 -05:00
revel8n 3f0f0cd2f2
Initial implementation of pixel shader 2.0 replacement of unsupported 'texm*' instructions and register usage optimization 2018-08-28 09:21:47 -05:00
revel8n 71803eed5c
Additional fixes for constant register usage and argument modifier replacement
- Fixed constant register logic erroneously keeping Modifier and Multiplier values
- Fixed incorrect argument modifier masks used when replacing argument modifiers
- Fixed incorrect parameter set for invert argument modifier replacement
- Added more specific instruction comments for replaced argument modifiers
- Moved argument modifier replacement step outside of recursive fixup method
2018-08-28 09:21:44 -05:00
revel8n d78d58206d
Updates to fix replacement of instruction modifiers in 2.0+ pixel shaders 2018-08-28 09:21:40 -05:00
revel8n 565636aa4e
More improvements to pixel shader compilation in model 1.4+
- Moved recompiled results into shader structure as mappings are needed when resolving constant register indexes
- Moved texture mode decoding to before fixups and optimizations
- Added initial method to fix uninitialized registers components
- Added fixes for accesses to registers that became read-only in 1.4+
- Updated logic that initialized texture coordinate register accesses
- Additional logic to fix LRP instruction that accessed registers more than allowed
- Preparations for method to handle general register access limitations
- Moved patching of scalar instructions to catch those missed before
2018-08-28 09:21:36 -05:00
revel8n 694f518567
Additional minor fixes, clarifications and cleanup as suggested in review 2018-08-28 09:21:33 -05:00
revel8n 2b7a74036d
Consolidate argument modifier flag checks to make use of 'HasModifier' helper method 2018-08-28 09:21:28 -05:00
revel8n 2adf4a03d5
Initial changes to add pixel shader 2.0 support
- Added enumeration values for additional DCL instructions
- Added enumeration values for additional TEXLD and TEXCRD instructions
- Added enumeration values for Sampler and Output Color registers
- Added additional constant declarations for use as scaling parameters when replacing unsupported instruction and argument modifiers
- Added helper method for checking set argument modifier flags
- Added helper method for setting parameter to declared constant register value
- Increased number of Intermediate slots
- Added helper method to set parameter to unclamped color value
- Added helper methods that allow for searching for free registers to be used as outputs
- Added helper method to retrieve maximum register counts based on type
- Updated register replacement methods to allow specifying range and exclusion
- Added helper method to determine which registers are valid for output on PC
- Added additional optimizations for MAD instructions
- Added conversion of CND instruction on unsupported pixel shader versions
- Added additional methods to fix destination register usage, constant value parameters, and argument and instruction modifiers
- Added additional method to add output to color register when required
- Updated texture mode decoding to support requirements for pixel shader version 2.0 (declare samplers, declare input registers, texcoord and texcrd usage, etc.)
- Fix for loops that were overrunning parameter counts
- Added additional constant value logic to attempt to use constant registers when possible
2018-08-28 09:21:22 -05:00
Luke Usher 8a846c357e
Merge pull request #1419 from ergo720/nt_query
Report correctly free/committed placeholder memory
2018-08-27 20:03:23 +01:00
ergo720 e28909e0f5 Report correctly free/committed placeholder memory 2018-08-27 20:00:30 +02:00
Luke Usher 878712c9a0
Merge pull request #1418 from LukeUsher/fix-window-draw
Fix an issue with window redraw when dragging over screen boundary
2018-08-27 18:43:37 +01:00
Luke Usher 22f3cc32f1 Fix an issue with window redraw when dragging over screen boundary 2018-08-27 18:38:47 +01:00
Luke Usher 346c077c87
Merge pull request #1417 from ergo720/vm_existVMA_fix
Removed CheckExistenceVMA, it's actually redundant
2018-08-27 16:08:01 +01:00
ergo720 286ff4612d Removed CheckExistenceVMA, it's actually redundant 2018-08-27 16:51:53 +02:00
RadWolfie 7b8d698fcf
Merge pull request #1413 from RadWolfie/fix-reboot-target-directory
Fix both retail and demo discs with given current directory
2018-08-26 19:42:37 -05:00
PatrickvL 51189b71be
Merge pull request #1415 from ergo720/vm_quick_fix
Count reserved bytes by the xbe image too
2018-08-26 20:03:19 +02:00
PatrickvL b760a9623f
Merge pull request #1414 from ergo720/fix_fable
Add INVLPG to X86 decoder
2018-08-26 20:02:36 +02:00
ergo720 92ffe2fb39 Count reserved bytes by the xbe image too 2018-08-26 19:47:48 +02:00
ergo720 29969913e3 Add INVLPG to X86 decoder 2018-08-26 19:16:27 +02:00
RadWolfie ce6e625954 update comment
Not really a root, more of a current directory
2018-08-26 05:50:19 -05:00