From 42176205ce9ed9aa2408d4042a816fe5cd082519 Mon Sep 17 00:00:00 2001 From: iCatButler Date: Mon, 27 Jun 2016 15:28:33 +0100 Subject: 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 --- libpcsxcore/pgxp_value.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libpcsxcore/pgxp_value.c (limited to 'libpcsxcore/pgxp_value.c') diff --git a/libpcsxcore/pgxp_value.c b/libpcsxcore/pgxp_value.c new file mode 100644 index 00000000..5d29097d --- /dev/null +++ b/libpcsxcore/pgxp_value.c @@ -0,0 +1,28 @@ +#include "pgxp_value.h" + + +void MakeValid(PGXP_value *pV, u32 psxV) +{ + psx_value psx; + psx.d = psxV; + if (!pV->valid) + { + pV->x = psx.sw.l; + pV->y = psx.sw.h; + pV->z = 1.f; + pV->valid = 1; + pV->value = psx.d; + } +} + +void Validate(PGXP_value *pV, u32 psxV) +{ + // assume pV is not NULL + pV->valid = (pV->valid) && (pV->value == psxV); +} + +void MaskValidate(PGXP_value *pV, u32 psxV, u32 mask) +{ + // assume pV is not NULL + pV->valid = (pV->valid) && ((pV->value & mask) == (psxV & mask)); +} \ No newline at end of file -- cgit v1.2.3