summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nubus/nubus_m2video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nubus/nubus_m2video.cpp')
-rw-r--r--src/devices/bus/nubus/nubus_m2video.cpp40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp
index f557d7631b0..60728d7dd15 100644
--- a/src/devices/bus/nubus/nubus_m2video.cpp
+++ b/src/devices/bus/nubus/nubus_m2video.cpp
@@ -139,21 +139,17 @@ void nubus_m2video_device::device_timer(emu_timer &timer, device_timer_id tid, i
uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[0x20];
+ uint8_t const *const vram = &m_vram[0x20];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0x80)];
*scanline++ = m_palette[((pixels<<1)&0x80)];
@@ -168,12 +164,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xc0)];
*scanline++ = m_palette[((pixels<<2)&0xc0)];
@@ -184,13 +180,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xf0)];
*scanline++ = m_palette[((pixels&0x0f)<<4)];
@@ -199,13 +194,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}