summaryrefslogtreecommitdiff
path: root/libpcsxcore/pgxp_value.h
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2016-06-27 15:28:33 +0100
committeriCatButler <i.am.catbutler@gmail.com>2016-06-27 15:28:33 +0100
commit42176205ce9ed9aa2408d4042a816fe5cd082519 (patch)
tree43fae5134a8a72f3a5902a6be9972f0188029b76 /libpcsxcore/pgxp_value.h
parentcfa7b3ad119aed09b12aa44521f70d12df234414 (diff)
downloadpcsxr-42176205ce9ed9aa2408d4042a816fe5cd082519.tar.gz
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
Diffstat (limited to 'libpcsxcore/pgxp_value.h')
-rw-r--r--libpcsxcore/pgxp_value.h36
1 files changed, 11 insertions, 25 deletions
diff --git a/libpcsxcore/pgxp_value.h b/libpcsxcore/pgxp_value.h
index 09bd8925..4dad4d20 100644
--- a/libpcsxcore/pgxp_value.h
+++ b/libpcsxcore/pgxp_value.h
@@ -62,8 +62,14 @@ typedef struct PGXP_value_Tag
typedef enum
{
- INVALID_ADDRESS = (1 << 1),
-} PGXP_value_flags;
+ UNINITIALISED = 0,
+ INVALID_PSX_VALUE = 1,
+ INVALID_ADDRESS = 2,
+ INVALID_BITWISE_OP = 3,
+ DIVIDE_BY_ZERO = 4,
+ INVALID_8BIT_LOAD = 5,
+ INVALID_8BIT_STORE = 6
+} PGXP_error_states;
typedef enum
{
@@ -73,30 +79,10 @@ typedef enum
static const PGXP_value PGXP_value_invalid_address = { 0.f, 0.f, 0.f, 0, 0, 0, INVALID_ADDRESS, 0, 0 };
static const PGXP_value PGXP_value_zero = { 0.f, 0.f, 0.f, 0, 0, 1, 0, 0, 0 };
-inline void MakeValid(PGXP_value *pV, u32 psxV)
-{
- psx_value psx;
- psx.d = psxV;
- if (!pV->valid)
- {
- pV->x = (float)psx.sw.l;
- pV->y = (float)psx.sw.h;
- pV->valid = 1;
- pV->value = psx.d;
- }
-}
+void MakeValid(PGXP_value *pV, u32 psxV);
+void Validate(PGXP_value *pV, u32 psxV);
+void MaskValidate(PGXP_value *pV, u32 psxV, u32 mask);
-inline void Validate(PGXP_value *pV, u32 psxV)
-{
- // assume pV is not NULL
- pV->valid = (pV->valid) && (pV->value == psxV);
-}
-
-inline void MaskValidate(PGXP_value *pV, u32 psxV, u32 mask)
-{
- // assume pV is not NULL
- pV->valid = (pV->valid) && ((pV->value & mask) == (psxV & mask));
-}
typedef union
{