X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu_unai%2Fgpu_command.h;h=d6e7a74222e951158ed8da942bcbaebb08fd1add;hp=d380daecb59700fe29b0309ee3140b2f5a19c6e4;hb=4144e9abc1fb8420e08e0a5ef48a9ceba7f26661;hpb=89c0de4234815e0fa9e8399b940ecec6c89a062b diff --git a/plugins/gpu_unai/gpu_command.h b/plugins/gpu_unai/gpu_command.h index d380daec..d6e7a742 100644 --- a/plugins/gpu_unai/gpu_command.h +++ b/plugins/gpu_unai/gpu_command.h @@ -21,9 +21,9 @@ /////////////////////////////////////////////////////////////////////////////// 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]; @@ -31,6 +31,7 @@ INLINE void gpuSetTexture(u16 tpage) 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]; @@ -352,6 +353,16 @@ void gpuSendPacketFunction(const int PRIM) break; case 0x7C: case 0x7D: +#ifdef __arm__ + if ((GPU_GP1 & 0x180) == 0 && (Masking | PixelMSB) == 0) + { + gpuSetCLUT (PacketBuffer.U4[2] >> 16); + gpuSetTexture (GPU_GP1); + gpuDrawS16(); + break; + } + // fallthrough +#endif case 0x7E: case 0x7F: if (!isSkip) @@ -427,8 +438,8 @@ void gpuSendPacketFunction(const int PRIM) 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)); }