case 0x62:
case 0x63: { // Monochrome rectangle (variable size)
PT driver = gpuTileSpanDrivers[(Blending_Mode | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>3)) >> 1];
- gpuDrawT(packet, driver);
- cpu_cycles += gput_sprite(le16_to_u16(packet.U2[4]) & 0x3ff,
- le16_to_u16(packet.U2[5]) & 0x1ff);
+ s32 w = 0, h = 0;
+ gpuDrawT(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
case 0x64:
case 0x67: { // Textured rectangle (variable size)
gpuSetCLUT (le32_to_u32(gpu_unai.PacketBuffer.U4[2]) >> 16);
u32 driver_idx = Blending_Mode | gpu_unai.TEXT_MODE | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>1);
+ s32 w = 0, h = 0;
//senquack - Only color 808080h-878787h allows skipping lighting calculation:
// This fixes Silent Hill running animation on loading screens:
if ((le32_raw(gpu_unai.PacketBuffer.U4[0]) & HTOLE32(0xF8F8F8)) != HTOLE32(0x808080))
driver_idx |= Lighting;
PS driver = gpuSpriteSpanDrivers[driver_idx];
- gpuDrawS(packet, driver);
- cpu_cycles += gput_sprite(le16_to_u16(packet.U2[6]) & 0x3ff,
- le16_to_u16(packet.U2[7]) & 0x1ff);
+ gpuDrawS(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
case 0x68:
case 0x6B: { // Monochrome rectangle (1x1 dot)
gpu_unai.PacketBuffer.U4[2] = u32_to_le32(0x00010001);
PT driver = gpuTileSpanDrivers[(Blending_Mode | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>3)) >> 1];
- gpuDrawT(packet, driver);
+ s32 w = 0, h = 0;
+ gpuDrawT(packet, driver, &w, &h);
cpu_cycles += gput_sprite(1, 1);
} break;
case 0x73: { // Monochrome rectangle (8x8)
gpu_unai.PacketBuffer.U4[2] = u32_to_le32(0x00080008);
PT driver = gpuTileSpanDrivers[(Blending_Mode | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>3)) >> 1];
- gpuDrawT(packet, driver);
- cpu_cycles += gput_sprite(8, 8);
+ s32 w = 0, h = 0;
+ gpuDrawT(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
case 0x74:
gpu_unai.PacketBuffer.U4[3] = u32_to_le32(0x00080008);
gpuSetCLUT (le32_to_u32(gpu_unai.PacketBuffer.U4[2]) >> 16);
u32 driver_idx = Blending_Mode | gpu_unai.TEXT_MODE | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>1);
+ s32 w = 0, h = 0;
//senquack - Only color 808080h-878787h allows skipping lighting calculation:
//if ((gpu_unai.PacketBuffer.U1[0]>0x5F) && (gpu_unai.PacketBuffer.U1[1]>0x5F) && (gpu_unai.PacketBuffer.U1[2]>0x5F))
if ((le32_raw(gpu_unai.PacketBuffer.U4[0]) & HTOLE32(0xF8F8F8)) != HTOLE32(0x808080))
driver_idx |= Lighting;
PS driver = gpuSpriteSpanDrivers[driver_idx];
- gpuDrawS(packet, driver);
- cpu_cycles += gput_sprite(8, 8);
+ gpuDrawS(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
case 0x78:
case 0x7B: { // Monochrome rectangle (16x16)
gpu_unai.PacketBuffer.U4[2] = u32_to_le32(0x00100010);
PT driver = gpuTileSpanDrivers[(Blending_Mode | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>3)) >> 1];
- gpuDrawT(packet, driver);
- cpu_cycles += gput_sprite(16, 16);
+ s32 w = 0, h = 0;
+ gpuDrawT(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
case 0x7C:
#ifdef __arm__
if ((gpu_unai.GPU_GP1 & 0x180) == 0 && (gpu_unai.Masking | gpu_unai.PixelMSB) == 0)
{
- gpuSetCLUT (le32_to_u32(gpu_unai.PacketBuffer.U4[2]) >> 16);
- gpuDrawS16(packet);
- cpu_cycles += gput_sprite(16, 16);
+ s32 w = 0, h = 0;
+ gpuSetCLUT(le32_to_u32(gpu_unai.PacketBuffer.U4[2]) >> 16);
+ gpuDrawS16(packet, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
break;
}
// fallthrough
gpu_unai.PacketBuffer.U4[3] = u32_to_le32(0x00100010);
gpuSetCLUT (le32_to_u32(gpu_unai.PacketBuffer.U4[2]) >> 16);
u32 driver_idx = Blending_Mode | gpu_unai.TEXT_MODE | gpu_unai.Masking | Blending | (gpu_unai.PixelMSB>>1);
+ s32 w = 0, h = 0;
//senquack - Only color 808080h-878787h allows skipping lighting calculation:
//if ((gpu_unai.PacketBuffer.U1[0]>0x5F) && (gpu_unai.PacketBuffer.U1[1]>0x5F) && (gpu_unai.PacketBuffer.U1[2]>0x5F))
// Strip lower 3 bits of each color and determine if lighting should be used:
if ((le32_raw(gpu_unai.PacketBuffer.U4[0]) & HTOLE32(0xF8F8F8)) != HTOLE32(0x808080))
driver_idx |= Lighting;
PS driver = gpuSpriteSpanDrivers[driver_idx];
- gpuDrawS(packet, driver);
- cpu_cycles += gput_sprite(16, 16);
+ gpuDrawS(packet, driver, &w, &h);
+ cpu_cycles += gput_sprite(w, h);
} break;
#ifdef TEST
case 0xC0:
break;
#else
+ case 0x1F: // irq?
case 0x80 ... 0x9F: // vid -> vid
case 0xA0 ... 0xBF: // sys -> vid
case 0xC0 ... 0xDF: // vid -> sys