diff options
| author | iCatButler <i.am.catbutler@gmail.com> | 2016-03-28 13:01:50 +0100 |
|---|---|---|
| committer | iCatButler <i.am.catbutler@gmail.com> | 2016-03-28 13:01:50 +0100 |
| commit | e3df273095a5800e3dcdcb63bd66e269c0c2d3a8 (patch) | |
| tree | 8e96b8cbb344da3ab10ecf09f258fceb46d9c765 /plugins | |
| parent | b1f5a6ce4d7b9156910078300bfdf4ff0fd8ccf0 (diff) | |
| download | pcsxr-e3df273095a5800e3dcdcb63bd66e269c0c2d3a8.tar.gz | |
- 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
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/peopsxgl/pgxp_gpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/peopsxgl/pgxp_gpu.c b/plugins/peopsxgl/pgxp_gpu.c index 5b64382a..1ce67bf8 100644 --- a/plugins/peopsxgl/pgxp_gpu.c +++ b/plugins/peopsxgl/pgxp_gpu.c @@ -64,7 +64,7 @@ void PGXP_SetAddress(unsigned int addr) int PGXP_GetVertices(unsigned int* addr, void* pOutput)
{
unsigned int primCmd = ((*addr >> 24) & 0xff); // primitive command
- unsigned int primIdx = (primCmd - 0x20) >> 2; // index to primitive lookup
+ unsigned int primIdx = min((primCmd - 0x20) >> 2, 8); // index to primitive lookup
OGLVertex* pVertex = (OGLVertex*)pOutput; // pointer to output vertices
unsigned int stride = primStrideTable[primIdx]; // stride between vertices
unsigned int count = primCountTable[primIdx]; // number of vertices
|
