From 35626996bcbac3beabb321576dc52fd0a0f55198 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 5 Aug 2010 09:44:25 +0000 Subject: [PATCH] - Updated SAA5050 to form 12x20 chars as noted in documentation [Miodrag Milanovic] - Updated malzak driver to support SAA5050 changes --- src/emu/video/saa5050.c | 6 +++--- src/mame/drivers/malzak.c | 4 ++-- src/mame/video/malzak.c | 34 +++++++++++++++++++++------------- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c index 52a1ad650d2..9c14bcf4892 100644 --- a/src/emu/video/saa5050.c +++ b/src/emu/video/saa5050.c @@ -319,12 +319,12 @@ void saa5050_update( running_device *device, bitmap_t *bitmap, const rectangle * { if (saa5050->flags & SAA5050_DBLHI) { - drawgfx_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 1], code, colour, 0, 0, sx * 6, ssy * 10); - drawgfx_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 2], code, colour, 0, 0, sx * 6, (ssy + 1) * 10); + drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 1], code, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); + drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 2], code, colour, 0, 0, sx * 12, (ssy + 1) * 20, 0x20000, 0x20000); } else { - drawgfx_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 0], code, colour, 0, 0, sx * 6, ssy * 10); + drawgfxzoom_opaque(bitmap, cliprect, saa5050->screen->machine->gfx[saa5050->gfxnum + 0], code, colour, 0, 0, sx * 12, ssy * 20, 0x20000, 0x20000); } } } diff --git a/src/mame/drivers/malzak.c b/src/mame/drivers/malzak.c index 639d708da51..c5e81a07b8b 100644 --- a/src/mame/drivers/malzak.c +++ b/src/mame/drivers/malzak.c @@ -409,8 +409,8 @@ static MACHINE_DRIVER_START( malzak ) MDRV_SCREEN_REFRESH_RATE(50) //MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(SAA5050_VBLANK)) MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) - MDRV_SCREEN_SIZE(240, 256) /* vert size is a guess */ - MDRV_SCREEN_VISIBLE_AREA(0, 239, 0, 239) + MDRV_SCREEN_SIZE(480, 512) /* vert size is a guess */ + MDRV_SCREEN_VISIBLE_AREA(0, 479, 0, 479) MDRV_GFXDECODE(malzak) MDRV_PALETTE_LENGTH(128) diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c index 7cb4ba1eda8..9f99b6fe59a 100644 --- a/src/mame/video/malzak.c +++ b/src/mame/video/malzak.c @@ -35,15 +35,15 @@ VIDEO_UPDATE( malzak ) for (x = 0; x < 16; x++) for (y = 0; y < 16; y++) { - sx = ((x * 16 - 48) - state->malzak_x); - sy = ((y * 16) - state->malzak_y); + sx = ((x * 16 - 48) - state->malzak_x) * 2; + sy = ((y * 16) - state->malzak_y) * 2; - if (sx < -271) - sx += 512; - if (sx < -15) - sx += 256; + if (sx < -271*2) + sx += 512*2; + if (sx < -15*2) + sx += 256*2; - drawgfx_transpen(bitmap,cliprect, screen->machine->gfx[0], state->playfield_code[x * 16 + y], 7, 0, 0, sx, sy, 0); + drawgfxzoom_transpen(bitmap,cliprect, screen->machine->gfx[0], state->playfield_code[x * 16 + y], 7*2, 0, 0, sx, sy, 0x20000, 0x20000, 0); } /* update the S2636 chips */ @@ -54,20 +54,28 @@ VIDEO_UPDATE( malzak ) { int y; - for (y = cliprect->min_y; y <= cliprect->max_y; y++) + for (y = cliprect->min_y; y <= cliprect->max_y / 2; y++) { int x; - for (x = cliprect->min_x; x <= cliprect->max_x; x++) + for (x = cliprect->min_x; x <= cliprect->max_x / 2; x++) { int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x); int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x); - if (S2636_IS_PIXEL_DRAWN(pixel0)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel0); + if (S2636_IS_PIXEL_DRAWN(pixel0)) { + *BITMAP_ADDR16(bitmap, y*2, x*2) = S2636_PIXEL_COLOR(pixel0); + *BITMAP_ADDR16(bitmap, y*2+1, x*2) = S2636_PIXEL_COLOR(pixel0); + *BITMAP_ADDR16(bitmap, y*2, x*2+1) = S2636_PIXEL_COLOR(pixel0); + *BITMAP_ADDR16(bitmap, y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel0); + } - if (S2636_IS_PIXEL_DRAWN(pixel1)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1); + if (S2636_IS_PIXEL_DRAWN(pixel1)) { + *BITMAP_ADDR16(bitmap, y*2, x*2) = S2636_PIXEL_COLOR(pixel1); + *BITMAP_ADDR16(bitmap, y*2+1, x*2) = S2636_PIXEL_COLOR(pixel1); + *BITMAP_ADDR16(bitmap, y*2, x*2+1) = S2636_PIXEL_COLOR(pixel1); + *BITMAP_ADDR16(bitmap, y*2+1, x*2+1) = S2636_PIXEL_COLOR(pixel1); + } } } }