diff options
Diffstat (limited to 'src/devices/bus/nubus/nubus_specpdq.cpp')
-rw-r--r-- | src/devices/bus/nubus/nubus_specpdq.cpp | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index 891defaa336..c00938c6102 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -157,22 +157,18 @@ void nubus_specpdq_device::device_timer(emu_timer &timer, device_timer_id tid, i uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - uint32_t *scanline; - int x, y; - uint8_t pixels, *vram; - // first time? kick off the VBL timer - vram = &m_vram[0x9000]; + uint8_t const *const vram = &m_vram[0x9000]; switch (m_mode) { case 0: // 1 bpp - for (y = 0; y < 844; y++) + for (int y = 0; y < 844; y++) { - scanline = &bitmap.pix32(y); - for (x = 0; x < 1152/8; x++) + uint32_t *scanline = &bitmap.pix(y); + for (int x = 0; x < 1152/8; x++) { - pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))]; + uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))]; *scanline++ = m_palette_val[(pixels&0x80)]; *scanline++ = m_palette_val[((pixels<<1)&0x80)]; @@ -187,12 +183,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 break; case 1: // 2 bpp - for (y = 0; y < 844; y++) + for (int y = 0; y < 844; y++) { - scanline = &bitmap.pix32(y); - for (x = 0; x < 1152/4; x++) + uint32_t *scanline = &bitmap.pix(y); + for (int x = 0; x < 1152/4; x++) { - pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))]; + uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))]; *scanline++ = m_palette_val[(pixels&0xc0)]; *scanline++ = m_palette_val[((pixels<<2)&0xc0)]; @@ -203,13 +199,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 break; case 2: // 4 bpp - for (y = 0; y < 844; y++) + for (int y = 0; y < 844; y++) { - scanline = &bitmap.pix32(y); - - for (x = 0; x < 1152/2; x++) + uint32_t *scanline = &bitmap.pix(y); + for (int x = 0; x < 1152/2; x++) { - pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))]; + uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))]; *scanline++ = m_palette_val[(pixels&0xf0)]; *scanline++ = m_palette_val[((pixels<<4)&0xf0)]; @@ -218,13 +213,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 break; case 3: // 8 bpp - for (y = 0; y < 844; y++) + for (int y = 0; y < 844; y++) { - scanline = &bitmap.pix32(y); - - for (x = 0; x < 1152; x++) + uint32_t *scanline = &bitmap.pix(y); + for (int x = 0; x < 1152; x++) { - pixels = vram[(y * 1152) + (BYTE4_XOR_BE(x))]; + uint8_t const pixels = vram[(y * 1152) + (BYTE4_XOR_BE(x))]; *scanline++ = m_palette_val[pixels]; } } |