{
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// lower 16 bit
- u32 data = (unsigned long)pvram[px];
+ u32 data = pvram[px];
if (++px>=x_end)
{
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// higher 16 bit (always, even if it's an odd width)
- data |= (unsigned long)(pvram[px])<<16;
+ data |= (u32)(pvram[px])<<16;
*dmaAddress++ = data;
///////////////////////////////////////////////////////////////////////////////
INLINE void gpuSetTexture(u16 tpage)
{
- long tp;
- long tx, ty;
- GPU_GP1 = (GPU_GP1 & ~0x7FF) | (tpage & 0x7FF);
+ u32 tp;
+ u32 tx, ty;
+ GPU_GP1 = (GPU_GP1 & ~0x1FF) | (tpage & 0x1FF);
TextureWindow[0]&= ~TextureWindow[2];
TextureWindow[1]&= ~TextureWindow[3];
tp = (tpage >> 7) & 3;
tx = (tpage & 0x0F) << 6;
ty = (tpage & 0x10) << 4;
+ if (tp == 3) tp = 2;
tx += (TextureWindow[0] >> (2 - tp));
ty += TextureWindow[1];
case 0xE5:
{
const u32 temp = PacketBuffer.U4[0];
- DrawingOffset[0] = ((long)temp<<(32-11))>>(32-11);
- DrawingOffset[1] = ((long)temp<<(32-22))>>(32-11);
+ DrawingOffset[0] = ((s32)temp<<(32-11))>>(32-11);
+ DrawingOffset[1] = ((s32)temp<<(32-22))>>(32-11);
//isSkip = false;
DO_LOG(("DrawingOffset(0x%x)\n",PRIM));
}
#define GPU_DIGITS 16
#define GPU_DIGITSC (GPU_DIGITS+3)
-INLINE long GPU_DIV(long rs, long rt)
+INLINE s32 GPU_DIV(s32 rs, s32 rt)
{
return rt ? (rs / rt) : (0);
}
}
case 0xE5: {
const u32 temp = PacketBuffer.U4[0];
- DrawingOffset[0] = ((long)temp<<(32-11))>>(32-11);
- DrawingOffset[1] = ((long)temp<<(32-22))>>(32-11);
+ DrawingOffset[0] = ((s32)temp<<(32-11))>>(32-11);
+ DrawingOffset[1] = ((s32)temp<<(32-22))>>(32-11);
gpu.ex_regs[5] = temp;
break;
}