diff options
Diffstat (limited to 'src/mame/drivers/shanghai.c')
-rw-r--r-- | src/mame/drivers/shanghai.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 69c782d0c3d..aaf1b64e7fe 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -80,36 +80,37 @@ static SCREEN_UPDATE_IND16( shanghai ) device_t *hd63484 = screen.machine().device("hd63484"); int x, y, b, src; - b = ((hd63484_regs_r(hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, 0xce/2, 0xffff); + address_space &space = screen.machine().driver_data()->generic_space(); + b = ((hd63484_regs_r(hd63484, space, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, space, 0xce/2, 0xffff); for (y = 0; y < 280; y++) { - for (x = 0 ; x < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 2 ; x += 2) + for (x = 0 ; x < (hd63484_regs_r(hd63484, space, 0xca/2, 0xffff) & 0x0fff) * 2 ; x += 2) { b &= (HD63484_RAM_SIZE - 1); - src = hd63484_ram_r(hd63484, b, 0xffff); + src = hd63484_ram_r(hd63484, space, b, 0xffff); bitmap.pix16(y, x) = src & 0x00ff; bitmap.pix16(y, x + 1) = (src & 0xff00) >> 8; b++; } } - if ((hd63484_regs_r(hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) + if ((hd63484_regs_r(hd63484, space, 0x06/2, 0xffff) & 0x0300) == 0x0300) { - int sy = (hd63484_regs_r(hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(hd63484, 0x88/2, 0xffff) >> 8); - int h = hd63484_regs_r(hd63484, 0x96/2, 0xffff) & 0x0fff; - int sx = ((hd63484_regs_r(hd63484, 0x92/2, 0xffff) >> 8) - (hd63484_regs_r(hd63484, 0x84/2, 0xffff) >> 8)) * 4; - int w = (hd63484_regs_r(hd63484, 0x92/2, 0xffff) & 0xff) * 4; + int sy = (hd63484_regs_r(hd63484, space, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(hd63484, space, 0x88/2, 0xffff) >> 8); + int h = hd63484_regs_r(hd63484, space, 0x96/2, 0xffff) & 0x0fff; + int sx = ((hd63484_regs_r(hd63484, space, 0x92/2, 0xffff) >> 8) - (hd63484_regs_r(hd63484, space, 0x84/2, 0xffff) >> 8)) * 4; + int w = (hd63484_regs_r(hd63484, space, 0x92/2, 0xffff) & 0xff) * 4; if (sx < 0) sx = 0; // not sure about this (shangha2 title screen) - b = (((hd63484_regs_r(hd63484, 0xdc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, 0xde/2, 0xffff)); + b = (((hd63484_regs_r(hd63484, space, 0xdc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, space, 0xde/2, 0xffff)); for (y = sy ; y <= sy + h && y < 280 ; y++) { - for (x = 0 ; x < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 2 ; x += 2) + for (x = 0 ; x < (hd63484_regs_r(hd63484, space, 0xca/2, 0xffff) & 0x0fff) * 2 ; x += 2) { b &= (HD63484_RAM_SIZE - 1); - src = hd63484_ram_r(hd63484, b, 0xffff); - if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 2) + src = hd63484_ram_r(hd63484, space, b, 0xffff); + if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, space, 0xca/2, 0xffff) & 0x0fff) * 2) { bitmap.pix16(y, x + sx) = src & 0x00ff; bitmap.pix16(y, x + sx + 1) = (src & 0xff00) >> 8; |