diff options
| author | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-03-02 21:39:52 +0000 |
|---|---|---|
| committer | SND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-03-02 21:39:52 +0000 |
| commit | 585bb1ecb49bda5c3ec1112df67474922c2cc04e (patch) | |
| tree | b668cd90d449d099597f069c30a606a2294dd6ab | |
| parent | 473ab832adf21e9e5e2b0df835794556096820c8 (diff) | |
| download | pcsxr-585bb1ecb49bda5c3ec1112df67474922c2cc04e.tar.gz | |
Dynarec(x64): recompile instructions on FlushCache BIOS call - Fixes XG memcard access. Also added psxJumpText() for easier debugging.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@83304 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rwxr-xr-x | libpcsxcore/ix86_64/iR3000A-64.c | 10 | ||||
| -rwxr-xr-x | libpcsxcore/psxbios.c | 2 | ||||
| -rwxr-xr-x | libpcsxcore/psxmem.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c index e2478d61..9beae9f3 100755 --- a/libpcsxcore/ix86_64/iR3000A-64.c +++ b/libpcsxcore/ix86_64/iR3000A-64.c @@ -199,6 +199,7 @@ static void SetBranch() { MOV32MtoR(EAX, (uptr)&target); MOV32RtoM((uptr)&psxRegs.pc, EAX); CALLFunc((uptr)psxBranchTest); + CALLFunc((uptr)psxJumpTest); StackRes(); RET(); @@ -233,6 +234,7 @@ static void iJump(u32 branchPC) { iStoreCycle(); MOV32ItoM((uptr)&psxRegs.pc, branchPC); CALLFunc((uptr)psxBranchTest); + CALLFunc((uptr)psxJumpTest); StackRes(); @@ -297,6 +299,7 @@ static void iBranch(u32 branchPC, int savectx) { iStoreCycle(); MOV32ItoM((uptr)&psxRegs.pc, branchPC); CALLFunc((uptr)psxBranchTest); + CALLFunc((uptr)psxJumpTest); StackRes(); @@ -491,6 +494,13 @@ static void recError() { if (*p == 0) { recRecompile(); } + else if (psxRegs.ICache_valid == FALSE) { // Xenogears: fixes memory card access with original BIOS (0a_44_FlushCache issue) + //psxCpu->Clear(0x0, 0x20000); + memset(recRAM, 0, 0x10000 * PTRMULT); + recRecompile(); + p = (uptr *)PC_REC(psxRegs.pc); + psxRegs.ICache_valid == TRUE; + } if (*p < (uptr)recMem || *p >= (uptr)recMem + RECMEM_SIZE) { diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index c818a883..3492361f 100755 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -1070,7 +1070,7 @@ void psxBios_FlushCache() { // 44 PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x44]); #endif - psxRegs.ICache_valid = 0; + psxRegs.ICache_valid = FALSE; pc0 = ra; } diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index 8215bdaf..73f5bc76 100755 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -334,7 +334,7 @@ void psxMemWrite32(u32 mem, u32 value) { memset(psxMemWLUT + 0x8000, 0, 0x80 * sizeof(void *)); memset(psxMemWLUT + 0xa000, 0, 0x80 * sizeof(void *)); - psxRegs.ICache_valid = 0; + psxRegs.ICache_valid = FALSE; break; case 0x00: case 0x1e988: if (writeok == 1) break; |
