Previous 15994 Revisions Next

r9896 Sunday 2nd January, 2011 at 23:27:44 UTC by MooglyGuy
[N64] Replaced improper VRSQL implementation with proper VRSQL implementation in the RSP core, fixing Mario 64's file select screen. [Harmony]
[src/emu/cpu/rsp]rspdrc.c

src/emu/cpu/rsp/rspdrc.c
r9895r9896
32723272   int sel = EL & 7;
32733273   INT32 shifter = 0;
32743274
3275   INT32 rec = (INT16)(VREG_S(VS2REG, sel));
3276   INT32 datainput = (rec < 0) ? (-rec) : rec;
3275   INT32 rec = ((UINT16)(VREG_S(VS2REG, sel)) | ((UINT32)(rsp->reciprocal_high) & 0xffff0000));
3276
3277   INT32 datainput = rec;
3278
3279   if (rec < 0)
3280   {
3281      if (rsp->dp_allowed)
3282      {
3283         if (rec < -32768)//VDIV.C,208
3284         {
3285            datainput = ~datainput;
3286         }
3287         else
3288         {
3289            datainput = -datainput;
3290         }
3291      }
3292      else
3293      {
3294         datainput = -datainput;
3295      }
3296   }
3297
32773298   if (datainput)
32783299   {
32793300      for (i = 0; i < 32; i++)
32803301      {
3281         if (datainput & (1 << ((~i) & 0x1f)))//ò.æ.÷òî 31 - i
3302         if (datainput & (1 << ((~i) & 0x1f)))
32823303         {
32833304            shifter = i;
32843305            break;
r9895r9896
32873308   }
32883309   else
32893310   {
3290      shifter = 0x10;
3311      if (rsp->dp_allowed)
3312      {
3313         shifter = 0;
3314      }
3315      else
3316      {
3317         shifter = 0x10;
3318      }
32913319   }
32923320
32933321   INT32 address = ((datainput << shifter) & 0x7fc00000) >> 22;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team