diff options
Diffstat (limited to 'src/devices/machine/mc68328.cpp')
-rw-r--r-- | src/devices/machine/mc68328.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp index 3df500d2f0c..e3690287710 100644 --- a/src/devices/machine/mc68328.cpp +++ b/src/devices/machine/mc68328.cpp @@ -3044,20 +3044,17 @@ uint16_t mc68328_device::internal_read(offs_t offset, uint16_t mem_mask) uint32_t mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { uint32_t vram_addr = m_regs.lssa & 0x00fffffe; - uint16_t word; - uint16_t *line; - int y, x, b; if (m_regs.lckcon & LCKCON_LCDC_EN) { - for (y = 0; y < 160; y++) + for (int y = 0; y < 160; y++) { - line = &bitmap.pix16(y); + uint16_t *const line = &bitmap.pix(y); - for (x = 0; x < 160; x += 16, vram_addr += 2) + for (int x = 0; x < 160; x += 16, vram_addr += 2) { - word = space(AS_PROGRAM).read_word(vram_addr); - for (b = 0; b < 16; b++) + uint16_t const word = space(AS_PROGRAM).read_word(vram_addr); + for (int b = 0; b < 16; b++) { line[x + b] = (word >> (15 - b)) & 0x0001; } @@ -3066,11 +3063,11 @@ uint32_t mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitm } else { - for (y = 0; y < 160; y++) + for (int y = 0; y < 160; y++) { - line = &bitmap.pix16(y); + uint16_t *const line = &bitmap.pix(y); - for (x = 0; x < 160; x++) + for (int x = 0; x < 160; x++) { line[x] = 0; } |