mirror of
https://github.com/captain-amygdala/pistorm.git
synced 2026-04-26 03:57:49 +00:00
Fix masked FillRect, add buptest bus tester
This commit is contained in:
@@ -56,6 +56,7 @@ void rtg_fillrect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint32_t color
|
||||
for (int xs = 0; xs < w; xs++) {
|
||||
SET_RTG_PIXEL_MASK(&dptr[xs], (color & 0xFF), format);
|
||||
}
|
||||
dptr += pitch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ static void handle_rtg_command(uint32_t cmd) {
|
||||
//printf("Set panning to $%.8X (%.8X)\n", framebuffer_addr, rtg_address[0]);
|
||||
//printf("(Panned: $%.8X)\n", framebuffer_addr_adj);
|
||||
//printf("Offset X/Y: %d/%d\n", rtg_offset_x, rtg_offset_y);
|
||||
//printf("Pitch: %d (%d bytes)\n", rtg_x[0], rtg_pitch);
|
||||
printf("Pitch: %d (%d bytes)\n", rtg_x[0], rtg_pitch);
|
||||
break;
|
||||
case RTGCMD_SETCLUT: {
|
||||
//printf("Command: SetCLUT.\n");
|
||||
@@ -233,22 +233,28 @@ static void handle_rtg_command(uint32_t cmd) {
|
||||
}
|
||||
break;
|
||||
case RTGCMD_FILLRECT:
|
||||
if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT)
|
||||
if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT) {
|
||||
rtg_fillrect_solid(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_rgb[0], rtg_x[2], rtg_format);
|
||||
else
|
||||
gdebug("FillRect Solid\n");
|
||||
}
|
||||
else {
|
||||
rtg_fillrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_rgb[0], rtg_x[2], rtg_format, rtg_u8[0]);
|
||||
gdebug("FillRect\n");
|
||||
gdebug("FillRect Masked\n");
|
||||
}
|
||||
break;
|
||||
case RTGCMD_INVERTRECT:
|
||||
rtg_invertrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_format, rtg_u8[0]);
|
||||
gdebug("InvertRect\n");
|
||||
break;
|
||||
case RTGCMD_BLITRECT:
|
||||
if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT)
|
||||
if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT) {
|
||||
rtg_blitrect_solid(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_format);
|
||||
else
|
||||
gdebug("BlitRect Solid\n");
|
||||
}
|
||||
else {
|
||||
rtg_blitrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_format, rtg_u8[0]);
|
||||
gdebug("BlitRect\n");
|
||||
gdebug("BlitRect Masked\n");
|
||||
}
|
||||
break;
|
||||
case RTGCMD_BLITRECT_NOMASK_COMPLETE:
|
||||
rtg_blitrect_nomask_complete(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_x[4], rtg_address[0], rtg_address[1], rtg_format, rtg_u8[0]);
|
||||
|
||||
Reference in New Issue
Block a user