Commit Graph

16 Commits

Author SHA1 Message Date
iCatButler 496df34ee4 Prevent incomplete vertices using precise NCLIP
- Fixes errors ocurring in +CPU mode where NCLIP is used for collision detection
2017-04-25 14:58:00 +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 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 485432c198 Initialise GTE and CPU regsiters (invalidate) 2016-06-30 11:49:11 +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 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 a64d62be4b Add PGXP configuration dialog
- Allows independent toggling of PGXP, vertex caching and texture correction
2016-05-16 16:17:19 +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 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 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