- render_block_move(psx_gpu, list_s16[2] & 0x3FF, list_s16[3] & 0x1FF,
- list_s16[4] & 0x3FF, list_s16[5] & 0x1FF,
- ((list_s16[6] - 1) & 0x3FF) + 1, ((list_s16[7] - 1) & 0x1FF) + 1);
+ {
+ u32 sx = list_s16[2] & 0x3FF;
+ u32 sy = list_s16[3] & 0x1FF;
+ u32 dx = list_s16[4] & 0x3FF;
+ u32 dy = list_s16[5] & 0x1FF;
+ u32 w = ((list_s16[6] - 1) & 0x3FF) + 1;
+ u32 h = ((list_s16[7] - 1) & 0x1FF) + 1;
+
+ render_block_move(psx_gpu, sx, sy, dx, dy, w, h);
+ if (dy + h > 512)
+ h = 512 - dy;
+ sx = sx & ~7; // FIXME?
+ dx = dx * 2 & ~7;
+ dy *= 2;
+ scale2x_tiles8(psx_gpu->enhancement_buf_ptr + dy * 1024 + dx,
+ psx_gpu->vram_ptr + sy * 1024 + sx, w / 8, h);