diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-05 06:11:21 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-05 06:11:21 +0000 |
| commit | b6a7c5e5bc9f438059e5a71fe7f850410b668210 (patch) | |
| tree | c23cedd8aec77f0e14f38d70641a61423d8f7ade /libpcsxcore | |
| parent | fe689494e432a145784ce2330fc0faf683dbf5e0 (diff) | |
| download | pcsxr-b6a7c5e5bc9f438059e5a71fe7f850410b668210.tar.gz | |
ported change in r59193 to dynarec (x86-32).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59209 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
| -rw-r--r-- | libpcsxcore/cdrom.h | 2 | ||||
| -rw-r--r-- | libpcsxcore/ix86/iR3000A.c | 48 | ||||
| -rw-r--r-- | libpcsxcore/r3000a.c | 2 |
3 files changed, 49 insertions, 3 deletions
diff --git a/libpcsxcore/cdrom.h b/libpcsxcore/cdrom.h index 82afa42c..3ab4336d 100644 --- a/libpcsxcore/cdrom.h +++ b/libpcsxcore/cdrom.h @@ -98,6 +98,8 @@ typedef struct { extern cdrStruct cdr; +void cdrDecodedBufferInterrupt(); + void cdrReset(); void cdrInterrupt(); void cdrReadInterrupt(); diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index 19ab6c84..42b7a09b 100644 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -1083,7 +1083,16 @@ static void recDIV() { // iFlushRegs(); if (IsConst(_Rt_)) { - if (iRegs[_Rt_].k == 0) return; + if (iRegs[_Rt_].k == 0) { + MOV32ItoM((u32)&psxRegs.GPR.n.lo, 0xffffffff); + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + } + return; + } MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divrtk %x\n", iRegs[_Rt_].k); } else { MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); @@ -1099,8 +1108,21 @@ static void recDIV() { IDIV32R (ECX); MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + j8Ptr[1] = JMP8(1); + x86SetJ8(j8Ptr[0]); + + MOV32ItoM((u32)&psxRegs.GPR.n.lo, 0xffffffff); + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + } + + x86SetJ8(j8Ptr[1]); } } @@ -1110,7 +1132,16 @@ static void recDIVU() { // iFlushRegs(); if (IsConst(_Rt_)) { - if (iRegs[_Rt_].k == 0) return; + if (iRegs[_Rt_].k == 0) { + MOV32ItoM((u32)&psxRegs.GPR.n.lo, 0xffffffff); + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + } + return; + } MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divurtk %x\n", iRegs[_Rt_].k); } else { MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); @@ -1126,8 +1157,21 @@ static void recDIVU() { DIV32R (ECX); MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + j8Ptr[1] = JMP8(1); + x86SetJ8(j8Ptr[0]); + + MOV32ItoM((u32)&psxRegs.GPR.n.lo, 0xffffffff); + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + } + + x86SetJ8(j8Ptr[1]); } } //#endif diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index 0fa51fd5..6f766e8b 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -24,8 +24,8 @@ #include "r3000a.h" #include "cdrom.h" #include "mdec.h" +#include "gpu.h" #include "gte.h" - extern u32 *Read_ICache( u32 pc, u32 isolate );
|
