- 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
- 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
Following titles are functional: (demos didn't work right before)
* Xbox Demos [XK-001 v1.01]
* Whacked
* Xbox demos
* RalliSport Challenge
* Xbox demos
* Quantum Redshift
* Xbox demos
Confirmed does not regress:
* Xbox dashboard
* Xbox Live
rest of the kernel.
NOTE: This brings back the previous KeBugCheck issue: Turns out it
wasn't solved by the previous commit, instead, the thread triggering the
error was hanging, preventing the error from appearing. Need to find a
better solution.
Perhaps we need to write our own custom KeWait implementation for now,
rather than attempting to mirror Xbox functionality 1:1. Direct Code
execution severely reduces the viability of an accurate
implementation of this.
Currently disabled as it doesn't work yet/is incomplete.
Work will be resumed once LLE OCHI is stable and enabled.
For now, we'll just have to skip Segaboot and launch games directly.
Turok Evolution now finally able to save the game.
RootDirectory handle is very important role when a title pass down with non-null handle in the structure.
Ideally should not cause any regression.