Commit Graph

1763 Commits

Author SHA1 Message Date
iCatButler 595034707b Fix possible function pointer initialisation problem 2016-08-03 19:30:54 +01:00
iCatButler aafb74a6af Fix NCLIP related crash
- provide wider window where NCLIP can return 0 as this was causing a crash in RR:Revolution
2016-08-01 13:10:53 +01:00
iCatButler 69f33a4782 Various CPU updates
- Sign extend values read using LH

- Add conversion functions to represent Signed/Unsigned 16-bit ranges
- Add overflow and truncation functions for 16-bit ranges

- Sign extend imm value in ADD(U)
- Add component overflow and truncation to ADD/SUB functions
- Construct new value in logic operators where result using inputs is undefined

- Return a valid W component from logic operators (if either input has one)

- Compare against high value (y), then low value (x) in less than operators

- Use doubles and implement overflow for Multiply operations to try to increase accuracy

- Use unsigned values in both MUL and DIV operations to make output as accurate as possible

- Implement several variants of shift operators. Trying both arithmetically correct and more analytical approaches with varying success.

Debug updates
- Added ability to force all values to be equal to low precision values before operating on them
- Added feature to test output of operations against a tolerance and print only those which fail

GPU updates
- Colour vertices with valid XY coordinates but no W as cyan to make them easier to spot
- Remove cyan colouring for stale vertices (wasn't useful)
- Added ability to skip debug rendering when needed (like seeing the output of offscreen rendering applied to a sprite).
- Added new mode which shows primitive type
2016-07-30 17:43:12 +01:00
iCatButler d5b40fbbe0 Use overclock on load state
- Recalculate CPU counters using current clock speed on loading a new state
2016-07-30 17:26:32 +01:00
iCatButler 97105b26f2 Change "valid" flag to multiple bit flags
Validity of a pgxp value can now be set for any of four components using individual bit flags. This also allows the potential expansion of more flag data for each component.
2016-07-04 11:48:00 +01:00
iCatButler 03cfe9e6c2 Additional checks
- Change processor transfer functions to use take both source and destination values
- Add enum values to all debug functions to double check instructions are correct
- Temporarily store instruction codes in interpreter wrappers as these are sometimes changed by branching
- Change recompiler wrapper functions to store register values in global variables in case they're changed by the original function
2016-07-02 16:52:21 +01:00
iCatButler e634f60589 Fix interpreter bugs
- Reset CPU on switching between interpret and recompiler
- Call wrapped functions even when tests fail
- Handle retrieved data overwriting address in load operations
2016-06-30 11:52:48 +01:00
iCatButler 485432c198 Initialise GTE and CPU regsiters (invalidate) 2016-06-30 11:49:11 +01:00
iCatButler 6b78a14b0e Disable debug mode
- Also add stub for RFE operation
2016-06-29 08:54:46 +01:00
iCatButler 42176205ce Imporved CPU integration
- Change PGXP integration to use wrapper functions
- Use modified function lookup tables to call wrappers or default funnctions based on mode
- Implement wrappers for interpreter too, recompiler sometimes calls interpreter functions
- Add UI elements for selecting CPU modes
- Only call precision version of NCLIP in modes where there are not going to be stale vertices in GTE registers

- Added support for CP0 co-processor functions
- Improve support for CPU functions (still broken in many games)

- Improved debug output to show values for inputs before they're modified

GPU plugin
- Ignore stale vertices (occurs when CPU  mode no longer writes to memory)
- Add Cyan vertex colouring for stale vertices
2016-06-27 15:28:33 +01:00
iCatButler cfa7b3ad11 CPU op fixes
- SH: Use appropriate masking when validating 16-bit values before storing
- Shift operations: on shifts larger than 16bits, first shift elements along, then apply arithmetic for remainder
2016-06-11 10:40:03 +01:00
iCatButler f70082329d Initial PGXP CPU commit
- Restructured project to base interface on PSX instructions
- Support for all relevant CPU arithmetic and logic instructions
- Debug output available via deferred PGXP calls
- Remove most dependencies on PCSXR
- Still very much a work in progress (lots of errors)

- Add extra debug information to GPU plugin (w values)
2016-06-07 15:57:46 +01:00
iCatButler 7ecfee1f66 Add checkbox for per-game memory cards 2016-05-31 15:39:49 +01:00
iCatButler b51d96c96d Fix screen smoothing
- Reset w values
- Set PGXP flag to ignore
2016-05-31 15:38:18 +01:00
iCatButler a64d62be4b Add PGXP configuration dialog
- Allows independent toggling of PGXP, vertex caching and texture correction
2016-05-16 16:17:19 +01:00
iCatButler 1e37eec079 Merge with OSX commit 2016-05-15 16:29:53 +01:00
iCatButler 2a24b74c12 Implement vertex caching
- Try using Blade_Arma's vertex cache to find untracked vertices
- Fix GTE_LOG
- Add more logging spew
- Update debug mode to track cached vertices
2016-05-15 16:26:39 +01:00
iCatButler fed5120857 Track memory read and writes with constant addresses 2016-05-15 16:24:55 +01:00
iCatButler 6a9f87865f Define and initialise PsxClockSpeed
- Fixes crash on entering bios
2016-05-15 09:10:10 +01:00
iCatButler a943b8e2de Merge pull request #2 from CarterLi/master
Fix build on OSX
2016-05-13 20:47:09 +01:00
Carter Li ee328ce95a Fix build on OSX
Tested on OSX 10.11.4, Xcode v7.3
2016-05-13 00:11:59 +08:00
iCatButler b5a7387481 Add PGXP visual debug mode
Toggles using F11
Red = low precision
Blue = high precision
Yellow = Sprite
2016-05-10 21:34:27 +01:00
iCatButler 1a30cfb951 Integrate SonofUgly's overclocking mechanism
3f11d29f31

Integrated with a few small changes.
2016-05-08 13:34:45 +01:00
iCatButler cd126bcb7c Revert pcsxr@87829
a37e3f092f
 "peopsgl/xvideo: fixed interlace/frame bit31 toggling. Now X-Men Acade…

…mies are fine. Obsoletes use of odd/even hack."

This fixes a hang on going to the title screen in many games.
2016-05-08 13:29:54 +01:00
iCatButler ca61b53f6c More fixes for persective correct build
- Switch back to fixed point GTE
- Only clamp w to h/2 after divide
- Fix vertex function for multi-pass (was overwriting vertexon first pass)
2016-05-06 17:12:31 +01:00
iCatButler 4b706847d4 Ensure w is reset to 1.f to prevent stale values. 2016-05-03 17:02:53 +01:00
iCatButler 216c2ff3ae Fix bugs from previous
Fix stray triangles
- Switch to full floating point RTPS/RTPT
- Clamp w values to near plane

Fix texture corruption in 1.78, copy 2.4 Tweak
- Remove matrix replacement
- Add W component to vertices
- Wrap glVertex3fv calls
- Use counter to call glVertex4fv for PGXP vertices only
2016-05-02 15:01:27 +01:00
iCatButler 153c8eb499 Perspective correct texturing
- replace calls to glOrtho with new matrix (z value becomes w)
- store w value for each vertex
- if any vertex does not have a w value set whole polygon to 1.0
- Reset vertex between draw calls to prevent stale w values persisting

- validate PGXP values using stored copy of original (allow greater variance)
- properly convert addresses before passing to plugin
- rework memory to use a single pool with offsets

- Implement floating point RTPS/RTPT transform, currently disabled.
2016-04-27 12:18:13 +01:00
iCatButler 580df75296 Fix load state bug
In some games PGSX memory pointer was not being set after saved states were reloaded, causing the GPU plugin to fall back on fixed point values.

Ensure that PGSX memory pointer in GPU plugin is always set upon initialisation.
2016-04-01 19:12:51 +01:00
iCatButler f84c6902b4 Merge pull request #1 from tapcio/master
Added my improvements and some fixes
2016-04-01 12:14:52 +01:00
Robert Krawczyk f671d256e7 Added:
- per game memory card support (improved version)
 - save state pictures (F2)
 - Wipeout MemHack (improved version)

Fixed LTCG build and set as default.
2016-04-01 01:37:04 +02:00
iCatButler 3c0cd06add Revert "Son of Ugly's Wipeout patch"
Breaks Chrono Cross intro sequence camera.

This reverts commit f7f38c4b89.
2016-03-31 21:32:15 +01:00
iCatButler 0c06f5ebc6 Fix default definition of pgxpMemory call. 2016-03-30 15:57:24 +01:00
iCatButler f7f38c4b89 This Son of Ugly's Wipeout patch
from https://github.com/SonofUgly/PCSX-Reloaded via Solis
2016-03-30 15:56:46 +01:00
iCatButler 61a6f15af5 Prevent crash on negative length patch
From the pcsxrearmed project via Solis.
2016-03-30 15:23:42 +01:00
iCatButler 8b4350fee7 Bring up to date with PCSX-R master (97809) 2016-03-30 15:07:35 +01:00
iCatButler e3df273095 - Fix memory addresses as each mirrored address range is further mirrored 4 times... :(
- Catch 8bit reads/writes and invalidate registers and memory as needed
- Prevent reading over the end of stride and count arrays when decoding primitive commands
2016-03-28 13:01:50 +01:00
iCatButler b1f5a6ce4d - Move pgxp_gpu source files into correct folder.
- Trace 16 bit reads and writes, invalidate register or memory (fixes UI glitches)
2016-03-26 10:07:46 +00:00
iCatButler 7767ea4acb Initial upload of PGXP. 2016-03-25 16:25:15 +00:00
iCatButler 106f6594c9 Update to VS 2015 2016-03-22 20:00:22 +00:00
SND\edgbla_cp 51b2ad7c2b Russian translation (edgbla);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@94310 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-22 16:31:21 +00:00
SND\edgbla_cp 3630d4fdbe Spanish translation (Imanol08);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@94305 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-21 21:01:10 +00:00
SND\MaddTheSane_cp 7ffd4315b4 OS X: Hook up the DFNet's okay and cancel buttons.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93922 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-10 02:26:12 +00:00
SND\MaddTheSane_cp ff3bbb27ec OS X: add CFBundleShortVersionString to the QuickLook and Spotlight importers.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93880 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-08 18:19:54 +00:00
SND\MaddTheSane_cp c7b3d8cc53 OS X: limit what is exported on the plug-ins.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93879 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-08 18:08:16 +00:00
SND\MaddTheSane_cp 88a3200bbc OS X: The SoftGL plug-in don't need to link against GLKit:
We don't use anything from it.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93878 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-08 17:25:00 +00:00
SND\MaddTheSane_cp 527da3c3bb OS X: Fix an off-by-one error that was causing the QuickLook and Spotlight plug-ins to crash.
The bug was also present in the app itself, but it didn't crash.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93874 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-02-07 22:17:23 +00:00
SND\MaddTheSane_cp 1b1d4c3f6a Plugins/DFInput: change the order of SDL subsystems being closed on SDL2 builds.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93286 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-01-27 18:55:41 +00:00
SND\MaddTheSane_cp 58cbcb2796 OS X: Have custom views use IB_DESIGNABLE.
Minor comment change.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93285 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-01-27 18:54:11 +00:00
SND\edgbla_cp 8796116432 psxBios__card_status() (Solis);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93284 e17a0e51-4ae3-4d35-97c3-1a29b211df97
2015-01-27 13:40:23 +00:00