mirror of https://github.com/PCSX2/pcsx2.git
EE Interpreter is (mostly) fixed now.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@362 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
af7949f4ad
commit
dcd3eaca10
|
@ -90,7 +90,7 @@ static u32 branchPC;
|
||||||
#define debugI()
|
#define debugI()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void execI() {
|
static __forceinline void execI() {
|
||||||
|
|
||||||
cpuRegs.cycle++;
|
cpuRegs.cycle++;
|
||||||
//cpuRegs.CP0.n.Count++; /*count every cycles.*/
|
//cpuRegs.CP0.n.Count++; /*count every cycles.*/
|
||||||
|
@ -101,16 +101,12 @@ void execI() {
|
||||||
#else
|
#else
|
||||||
cpuRegs.code = *(u32 *)PSM(cpuRegs.pc);
|
cpuRegs.code = *(u32 *)PSM(cpuRegs.pc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
cpuRegs.pc+= 4;
|
cpuRegs.pc+= 4;
|
||||||
// if((cpuRegs.PERF.n.pccr & 0x80000020) == 0x80000020) cpuRegs.PERF.n.pcr0++;
|
|
||||||
// if((cpuRegs.PERF.n.pccr & 0x80008000) == 0x80008000) cpuRegs.PERF.n.pcr1++;
|
|
||||||
|
|
||||||
Int_OpcodePrintTable[cpuRegs.code >> 26]();
|
Int_OpcodePrintTable[cpuRegs.code >> 26]();
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline void doBranch(u32 tar) {
|
static void doBranch(u32 tar) {
|
||||||
branch2 = cpuRegs.branch = 1;
|
branch2 = cpuRegs.branch = 1;
|
||||||
branchPC = tar;
|
branchPC = tar;
|
||||||
execI();
|
execI();
|
||||||
|
|
|
@ -27,41 +27,7 @@ static int branch = 0;
|
||||||
static int branch2 = 0;
|
static int branch2 = 0;
|
||||||
static u32 branchPC;
|
static u32 branchPC;
|
||||||
|
|
||||||
// These macros are used to assemble the repassembler functions
|
static void doBranch(tar); // forward declared prototype
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
#define execI() { \
|
|
||||||
psxRegs.code = PSXMu32(psxRegs.pc); \
|
|
||||||
\
|
|
||||||
if (Log) { \
|
|
||||||
PSXCPU_LOG("%s\n", disR3000AF(psxRegs.code, psxRegs.pc)); \
|
|
||||||
} \
|
|
||||||
psxRegs.pc+= 4; \
|
|
||||||
psxRegs.cycle++; \
|
|
||||||
\
|
|
||||||
psxBSC[psxRegs.code >> 26](); \
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define execI() { \
|
|
||||||
psxRegs.code = PSXMu32(psxRegs.pc); \
|
|
||||||
\
|
|
||||||
psxRegs.pc+= 4; \
|
|
||||||
psxRegs.cycle++; \
|
|
||||||
\
|
|
||||||
psxBSC[psxRegs.code >> 26](); \
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define doBranch(tar) { \
|
|
||||||
branch2 = branch = 1; \
|
|
||||||
branchPC = tar; \
|
|
||||||
execI(); \
|
|
||||||
branch = 0; \
|
|
||||||
psxRegs.pc = branchPC; \
|
|
||||||
\
|
|
||||||
psxBranchTest(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subsets
|
// Subsets
|
||||||
extern void (*psxBSC[64])();
|
extern void (*psxBSC[64])();
|
||||||
|
@ -755,6 +721,31 @@ void (*psxCP2BSC[32])() = {
|
||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
// These macros are used to assemble the repassembler functions
|
||||||
|
|
||||||
|
static __forceinline void execI() {
|
||||||
|
psxRegs.code = PSXMu32(psxRegs.pc);
|
||||||
|
|
||||||
|
PSXCPU_LOG("%s\n", disR3000AF(psxRegs.code, psxRegs.pc));
|
||||||
|
|
||||||
|
psxRegs.pc+= 4;
|
||||||
|
psxRegs.cycle++;
|
||||||
|
psxCycleEE-=8;
|
||||||
|
|
||||||
|
psxBSC[psxRegs.code >> 26]();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void doBranch(tar) {
|
||||||
|
branch2 = branch = 1;
|
||||||
|
branchPC = tar;
|
||||||
|
execI();
|
||||||
|
branch = 0;
|
||||||
|
psxRegs.pc = branchPC;
|
||||||
|
|
||||||
|
psxBranchTest();
|
||||||
|
}
|
||||||
|
|
||||||
static int intInit() {
|
static int intInit() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -775,7 +766,7 @@ static void intExecuteBlock() {
|
||||||
psxBreak = 0;
|
psxBreak = 0;
|
||||||
psxCycleEE = EEsCycle;
|
psxCycleEE = EEsCycle;
|
||||||
|
|
||||||
while (psxCycleEE >= 0){
|
while (psxCycleEE > 0){
|
||||||
branch2 = 0;
|
branch2 = 0;
|
||||||
while (!branch2) {
|
while (!branch2) {
|
||||||
execI();
|
execI();
|
||||||
|
|
Loading…
Reference in New Issue