summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/vis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/vis.cpp')
-rw-r--r--src/mame/drivers/vis.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mame/drivers/vis.cpp b/src/mame/drivers/vis.cpp
index 1ade543187c..816e0764017 100644
--- a/src/mame/drivers/vis.cpp
+++ b/src/mame/drivers/vis.cpp
@@ -316,11 +316,11 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect
{
const uint32_t IV = 0xff000000;
int height = vga.crtc.maximum_scan_line * (vga.crtc.scan_doubling + 1);
- int pos, line, column, col, addr, curr_addr = 0;
+ int curr_addr = 0;
const uint8_t decode_tbl[] = {0, 1, 2, 3, 4, 5, 6, 9, 12, 17, 22, 29, 38, 50, 66, 91, 128, 165, 190,
206, 218, 227, 234, 239, 244, 247, 250, 251, 252, 253, 254, 255};
- for (addr = vga.crtc.start_addr, line=0; line<(vga.crtc.vert_disp_end+1); line+=height, addr+=offset(), curr_addr+=offset())
+ for (int addr = vga.crtc.start_addr, line=0; line<(vga.crtc.vert_disp_end+1); line+=height, addr+=offset(), curr_addr+=offset())
{
for(int yi = 0;yi < height; yi++)
{
@@ -329,7 +329,7 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect
curr_addr = addr;
if((line + yi) == (vga.crtc.line_compare & 0x3ff))
curr_addr = 0;
- for (pos=curr_addr, col=0, column=0; column<(vga.crtc.horz_disp_end+1); column++, col+=8, pos+=8)
+ for (int pos=curr_addr, col=0, column=0; column<(vga.crtc.horz_disp_end+1); column++, col+=8, pos+=8)
{
if(pos + 0x08 > 0x80000)
return;
@@ -340,8 +340,7 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect
continue;
uint8_t a = vga.memory[pos + xi], b = vga.memory[pos + xi + 1];
uint8_t c = vga.memory[pos + xi + 2], d = vga.memory[pos + xi + 3];
- uint8_t y[4], ub, vb, trans;
- uint16_t u, v;
+ uint8_t y[4], ub, vb;
if(col || xi)
{
y[0] = decode_tbl[a & 0x1f] + ydelta;
@@ -357,9 +356,9 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect
y[1] = decode_tbl[b & 0x1f] + y[0];
y[2] = decode_tbl[c & 0x1f] + y[1];
y[3] = decode_tbl[d & 0x1f] + y[2];
- trans = (a >> 7) | ((c >> 6) & 2);
- u = ua;
- v = va;
+ uint8_t trans = (a >> 7) | ((c >> 6) & 2);
+ uint16_t u = ua;
+ uint16_t v = va;
for(int i = 0; i < 4; i++)
{
if(i == trans)
@@ -372,7 +371,7 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect
u = ub;
v = vb;
}
- bitmap.pix32(line + yi, col + xi + i) = IV | (uint32_t)yuv_to_rgb(y[i], u, v);
+ bitmap.pix(line + yi, col + xi + i) = IV | (uint32_t)yuv_to_rgb(y[i], u, v);
}
ua = ub;
va = vb;