summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2016-03-30 15:56:46 +0100
committeriCatButler <i.am.catbutler@gmail.com>2016-03-30 15:56:46 +0100
commitf7f38c4b89937391a8ba7c785d0d6b108ac02eb7 (patch)
tree2d217ed22e273b8ff29f181585258b2b5e7b389c /libpcsxcore
parent61a6f15af54923b16d6a7d84ba5fee50e30b4665 (diff)
downloadpcsxr-f7f38c4b89937391a8ba7c785d0d6b108ac02eb7.tar.gz
This Son of Ugly's Wipeout patch
from https://github.com/SonofUgly/PCSX-Reloaded via Solis
Diffstat (limited to 'libpcsxcore')
-rwxr-xr-xlibpcsxcore/psxcommon.h1
-rwxr-xr-xlibpcsxcore/psxmem.c42
2 files changed, 25 insertions, 18 deletions
diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h
index 3f13dfa8..61a675ca 100755
--- a/libpcsxcore/psxcommon.h
+++ b/libpcsxcore/psxcommon.h
@@ -162,6 +162,7 @@ typedef struct {
u32 AltSpeed1; // Percent relative to natural speed.
u32 AltSpeed2;
u8 HackFix;
+ u8 MemHack;
#ifdef _WIN32
char Lang[256];
#endif
diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c
index 285eaf67..fc748698 100755
--- a/libpcsxcore/psxmem.c
+++ b/libpcsxcore/psxmem.c
@@ -143,9 +143,10 @@ u8 psxMemRead8(u32 mem) {
char *p;
u32 t;
-
- psxRegs.cycle += 0;
-
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 0;
+ }
t = mem >> 16;
if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
@@ -172,10 +173,11 @@ u16 psxMemRead16(u32 mem) {
char *p;
u32 t;
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 1;
+ }
- psxRegs.cycle += 1;
-
-
t = mem >> 16;
if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
if ((mem & 0xffff) < 0x400)
@@ -201,10 +203,11 @@ u32 psxMemRead32(u32 mem) {
char *p;
u32 t;
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 1;
+ }
- psxRegs.cycle += 1;
-
-
t = mem >> 16;
if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
if ((mem & 0xffff) < 0x400)
@@ -230,10 +233,11 @@ void psxMemWrite8(u32 mem, u8 value) {
char *p;
u32 t;
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 1;
+ }
- psxRegs.cycle += 1;
-
-
t = mem >> 16;
if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
if ((mem & 0xffff) < 0x400)
@@ -261,10 +265,11 @@ void psxMemWrite16(u32 mem, u16 value) {
char *p;
u32 t;
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 1;
+ }
- psxRegs.cycle += 1;
-
-
t = mem >> 16;
if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
if ((mem & 0xffff) < 0x400)
@@ -292,9 +297,10 @@ void psxMemWrite32(u32 mem, u32 value) {
char *p;
u32 t;
-
- psxRegs.cycle += 1;
-
+ if (Config.MemHack)
+ {
+ psxRegs.cycle += 1;
+ }
// if ((mem&0x1fffff) == 0x71E18 || value == 0x48088800) SysPrintf("t2fix!!\n");
t = mem >> 16;