summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar Roberto Zandona <robertoz@mamedev.org>2009-03-08 19:40:20 +0000
committerGravatarGravatar Roberto Zandona <robertoz@mamedev.org>2009-03-08 19:40:20 +0000
commitf82922db1e88c1fdb657cca1c061699bd306357f (patch)
tree622f07fd235935584eafece0dacbfabc5e8713e8
parent3cb1b0b087308ed61ac6f9347ee1d6ba9ca94b31 (diff)
wc90b1 and wc90b2: some improvements:
- fixed bg and fg scroll - fixed bg and fg offsets
-rw-r--r--src/mame/drivers/wc90b.c3
-rw-r--r--src/mame/video/wc90b.c13
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c
index bb8144235e4..6092ebaf19d 100644
--- a/src/mame/drivers/wc90b.c
+++ b/src/mame/drivers/wc90b.c
@@ -98,6 +98,8 @@ extern UINT8 *wc90b_scroll2x;
extern UINT8 *wc90b_scroll1y;
extern UINT8 *wc90b_scroll2y;
+extern UINT8 *wc90b_scroll_x_lo;
+
VIDEO_START( wc90b );
WRITE8_HANDLER( wc90b_bgvideoram_w );
WRITE8_HANDLER( wc90b_fgvideoram_w );
@@ -176,6 +178,7 @@ static ADDRESS_MAP_START( wc90b_map1, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xfd06, 0xfd06) AM_WRITEONLY AM_BASE(&wc90b_scroll1x)
AM_RANGE(0xfd08, 0xfd08) AM_WRITEONLY AM_BASE(&wc90b_scroll2y)
AM_RANGE(0xfd0a, 0xfd0a) AM_WRITEONLY AM_BASE(&wc90b_scroll2x)
+ AM_RANGE(0xfd0e, 0xfd0e) AM_WRITEONLY AM_BASE(&wc90b_scroll_x_lo)
AM_RANGE(0xfd00, 0xfd00) AM_READ_PORT("P1")
AM_RANGE(0xfd02, 0xfd02) AM_READ_PORT("P2")
AM_RANGE(0xfd06, 0xfd06) AM_READ_PORT("DSW1")
diff --git a/src/mame/video/wc90b.c b/src/mame/video/wc90b.c
index 56f14939b4d..c8955bc2816 100644
--- a/src/mame/video/wc90b.c
+++ b/src/mame/video/wc90b.c
@@ -9,6 +9,7 @@ UINT8 *wc90b_scroll2x;
UINT8 *wc90b_scroll1y;
UINT8 *wc90b_scroll2y;
+UINT8 *wc90b_scroll_x_lo;
static tilemap *tx_tilemap,*fg_tilemap,*bg_tilemap;
@@ -128,8 +129,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
drawgfx( bitmap, machine->gfx[17], code,
flags >> 4, /* color */
- bank & 1, /* flipx */
- bank & 2, /* flipy */
+ bank & 1, /* flipx */
+ bank & 2, /* flipy */
sx,
sy,
cliprect,TRANSPARENCY_PEN,15 );
@@ -139,10 +140,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
VIDEO_UPDATE( wc90b )
{
- tilemap_set_scrollx(bg_tilemap,0,8 * wc90b_scroll2x[0] + 256);
- tilemap_set_scrolly(bg_tilemap,0,wc90b_scroll2y[0] + ((wc90b_scroll2y[0] < 0x10 || wc90b_scroll2y[0] == 0xff) ? 256 : 0));
- tilemap_set_scrollx(fg_tilemap,0,8 * wc90b_scroll1x[0] + 256);
- tilemap_set_scrolly(fg_tilemap,0,wc90b_scroll1y[0] + ((wc90b_scroll1y[0] < 0x10 || wc90b_scroll1y[0] == 0xff) ? 256 : 0));
+ tilemap_set_scrollx(bg_tilemap,0,8 * wc90b_scroll2x[0] + 256 - 4 + (wc90b_scroll_x_lo[0] & 0x07));
+ tilemap_set_scrolly(bg_tilemap,0,wc90b_scroll2y[0] + 1 + ((wc90b_scroll2y[0] < 0x10 || wc90b_scroll2y[0] == 0xff) ? 256 : 0));
+ tilemap_set_scrollx(fg_tilemap,0,8 * wc90b_scroll1x[0] + 256 - 6 + ((wc90b_scroll_x_lo[0] & 0x38) >> 3));
+ tilemap_set_scrolly(fg_tilemap,0,wc90b_scroll1y[0] + 1 + ((wc90b_scroll1y[0] < 0x10 || wc90b_scroll1y[0] == 0xff) ? 256 : 0));
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,fg_tilemap,0,0);