From e0a35a3aa6969a6de6ec5b3bbcd6456ed013a682 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 18 Nov 2008 17:17:15 +0000 Subject: [PATCH] "Fixed" the 2 games I have that suffer from the damage calculation bug by using the code of rpropMMI's mult1. This fix isn't final yet, but for the sake of testing... you know :p git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@339 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/x86/ir5900tables.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/pcsx2/x86/ir5900tables.c b/pcsx2/x86/ir5900tables.c index c8c44e517d..16ecac3f5e 100644 --- a/pcsx2/x86/ir5900tables.c +++ b/pcsx2/x86/ir5900tables.c @@ -683,21 +683,32 @@ void rpropSPECIAL(EEINST* prev, EEINST* pinst) case 24: // mult // can do unsigned mult only if HI isn't used - //using this allocation for temp causes the emu to crash - //temp = (pinst->regs[XMMGPR_HI]&(EEINST_LIVE0|EEINST_LIVE1))?0:EEINST_MMX; - temp = 0; - rpropSetWrite(XMMGPR_LO, EEINST_LIVE1); - rpropSetWrite(XMMGPR_HI, EEINST_LIVE1); - rpropSetWrite(_Rd_, EEINST_LIVE1); + ////using this allocation for temp causes the emu to crash + ////temp = (pinst->regs[XMMGPR_HI]&(EEINST_LIVE0|EEINST_LIVE1))?0:EEINST_MMX; + //temp = 0; + //rpropSetWrite(XMMGPR_LO, EEINST_LIVE1); + //rpropSetWrite(XMMGPR_HI, EEINST_LIVE1); + //rpropSetWrite(_Rd_, EEINST_LIVE1); - // fixme - temp is always 0, so I doubt the next three lines are right. (arcum42) + //// fixme - temp is always 0, so I doubt the next three lines are right. (arcum42) - // Yep, its wrong. Using always 0 causes the wrong damage calculations in Soul Nomad. - // This bug i very important to fix!! (rama) + //// Yep, its wrong. Using always 0 causes the wrong damage calculations in Soul Nomad. + //// This bug i very important to fix!! (rama) + //rpropSetRead(_Rs_, temp); + //rpropSetRead(_Rt_, temp); + //pinst->info |= temp; + //break; + + //using the code of rpropMMI's mult1 for now which works for 2 games that would fail before (rama) + temp = (pinst->regs[XMMGPR_HI]&(EEINST_LIVE2))?0:EEINST_MMX; + rpropSetWrite0(XMMGPR_LO, EEINST_LIVE2, 0); + rpropSetWrite0(XMMGPR_HI, EEINST_LIVE2, 0); + rpropSetWrite(_Rd_, EEINST_LIVE1); rpropSetRead(_Rs_, temp); rpropSetRead(_Rt_, temp); pinst->info |= temp; break; + case 25: // multu rpropSetWrite(XMMGPR_LO, EEINST_LIVE1); rpropSetWrite(XMMGPR_HI, EEINST_LIVE1);