diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index 8b2e5efa2d6..045907d9eed 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -4688,14 +4688,16 @@ static ADDRESS_MAP_START( afega, ADDRESS_SPACE_PROGRAM, 16 ) /**/AM_RANGE(0x08c000, 0x08c003) AM_RAM_WRITE(afega_scroll0_w) AM_BASE(&afega_scroll_0) // Scroll /**/AM_RANGE(0x08c004, 0x08c007) AM_RAM_WRITE(afega_scroll1_w) AM_BASE(&afega_scroll_1) // AM_RANGE(0x08c008, 0x08ffff) AM_WRITE(SMH_RAM) // -/**/AM_RANGE(0x090000, 0x091fff) AM_RAM_WRITE(afega_vram_0_w) AM_BASE(&afega_vram_0) // Layer 0 -/**/AM_RANGE(0x092000, 0x093fff) AM_RAM // ? +/**/AM_RANGE(0x090000, 0x093fff) AM_RAM_WRITE(afega_vram_0_w) AM_BASE(&afega_vram_0) // Layer 0 // ? /**/AM_RANGE(0x09c000, 0x09c7ff) AM_RAM_WRITE(afega_vram_1_w) AM_BASE(&afega_vram_1) // Layer 1 AM_RANGE(0x0c0000, 0x0cffff) AM_RAM_WRITE(nmk16_mainram_strange_w) AM_SHARE(1) AM_BASE(&nmk16_mainram) AM_RANGE(0x0f0000, 0x0fffff) AM_RAM_WRITE(nmk16_mainram_strange_w) AM_SHARE(1) ADDRESS_MAP_END + + + #if 0 // The high byte of the word written is the address to write to (byte offset), the low byte is data static WRITE16_HANDLER( twinactn_scroll0_w ) @@ -4925,12 +4927,27 @@ static MACHINE_DRIVER_START( grdnstrm ) /* basic machine hardware */ MDRV_IMPORT_FROM(stagger1) + + /* video hardware */ + MDRV_GFXDECODE(grdnstrm) + MDRV_VIDEO_START(firehawk) + MDRV_VIDEO_UPDATE(firehawk) +MACHINE_DRIVER_END +static MACHINE_DRIVER_START( grdnstrmk ) + + /* basic machine hardware */ + MDRV_IMPORT_FROM(stagger1) + + MDRV_CPU_MODIFY("maincpu") + MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2) + /* video hardware */ MDRV_GFXDECODE(grdnstrm) MDRV_VIDEO_START(grdnstrm) MACHINE_DRIVER_END + static MACHINE_DRIVER_START( popspops ) /* basic machine hardware */ @@ -7118,8 +7135,8 @@ GAME( 1997, redhawk, stagger1, stagger1, stagger1, redhawk, ROT270, "Afega (Ne GAME( 1997, redhawki, stagger1, redhawki, stagger1, 0, ROT0, "Afega (Hea Dong Corp license)", "Red Hawk (Italy)", 0 ) // bootleg? strange scroll regs GAME( 1997, redhawke, stagger1, stagger1, stagger1, 0, ROT270, "Afega (Excellent Co. license)", "Red Hawk (Excellent Co., Ltd)", 0 ) GAME( 1997, redhawkb, stagger1, redhawkb, redhawkb, 0, ROT0, "bootleg", "Red Hawk (bootleg)", 0 ) -GAME( 1998, grdnstrm, 0, grdnstrm, grdnstrm, 0, ROT0, "Afega (Apples Industries license)", "Guardian Storm", GAME_NOT_WORKING ) -GAME( 1998, grdnstrmk,grdnstrm, grdnstrm, grdnstrk, grdnstrm, ROT270, "Afega", "Sen Jin - Guardian Storm (Korea)", 0 ) +GAME( 1998, grdnstrm, 0, grdnstrm, grdnstrm, 0, ORIENTATION_FLIP_Y, "Afega (Apples Industries license)", "Guardian Storm", 0 ) +GAME( 1998, grdnstrmk,grdnstrm, grdnstrmk,grdnstrk, grdnstrm, ROT270, "Afega", "Sen Jin - Guardian Storm (Korea)", 0 ) GAME( 1998, bubl2000, 0, popspops, bubl2000, bubl2000, ROT0, "Tuning", "Bubble 2000", 0 ) // on a tuning board (bootleg?) GAME( 1998, hotbubl, bubl2000, popspops, bubl2000, bubl2000, ROT0, "Pandora", "Hot Bubble" , 0 ) // on an afega board .. GAME( 1999, popspops, 0, popspops, popspops, grdnstrm, ROT0, "Afega", "Pop's Pop's", 0 ) diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index 863fe33eef1..a120102bdb2 100644 --- a/src/mame/video/nmk16.c +++ b/src/mame/video/nmk16.c @@ -733,10 +733,8 @@ UINT16 *afega_vram_1, *afega_scroll_1; #define TILES_PER_PAGE_X (0x10) #define TILES_PER_PAGE_Y (0x10) -#define PAGES_PER_TMAP_X (0x4) -#define PAGES_PER_TMAP_Y (0x4) -#define FIREHAWK_PAGES_PER_TMAP_X (0x1) -#define FIREHAWK_PAGES_PER_TMAP_Y (0x1) +#define PAGES_PER_TMAP_X (0x10) +#define PAGES_PER_TMAP_Y (0x2) #define TWINACTN_TILES_PER_PAGE_X (0x100) #define TWINACTN_TILES_PER_PAGE_Y (0x10) #define TWINACTN_PAGES_PER_TMAP_X (0x1) @@ -752,15 +750,6 @@ static TILEMAP_MAPPER( afega_tilemap_scan_pages ) (col % TILES_PER_PAGE_X) * TILES_PER_PAGE_Y; } -static TILEMAP_MAPPER( firehawk_tilemap_scan_pages ) -{ - return (row / TILES_PER_PAGE_Y) * TILES_PER_PAGE_X * TILES_PER_PAGE_Y * FIREHAWK_PAGES_PER_TMAP_X + - (row % TILES_PER_PAGE_Y) + - - (col / TILES_PER_PAGE_X) * TILES_PER_PAGE_X * TILES_PER_PAGE_Y + - (col % TILES_PER_PAGE_X) * TILES_PER_PAGE_Y; -} - static tilemap *tilemap_0, *tilemap_1; static TILE_GET_INFO( get_tile_info_0_4bit ) @@ -856,10 +845,10 @@ VIDEO_START( firehawk ) spriteram_old2 = auto_alloc_array_clear(machine, UINT16, 0x1000/2); - tilemap_0 = tilemap_create( machine, get_tile_info_0_8bit, firehawk_tilemap_scan_pages, + tilemap_0 = tilemap_create( machine, get_tile_info_0_8bit, afega_tilemap_scan_pages, 16,16, - TILES_PER_PAGE_X*FIREHAWK_PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*FIREHAWK_PAGES_PER_TMAP_Y); + TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y); tilemap_1 = tilemap_create( machine, get_tile_info_1, tilemap_scan_cols, @@ -894,12 +883,14 @@ static void video_update(running_machine *machine, bitmap_t *bitmap, const recta flip_screen_y_set(machine, ~input_port_read(machine, "DSW1") & 0x0200); } + tilemap_set_scrollx(tilemap_0, 0, afega_scroll_0[1] + xoffset); tilemap_set_scrolly(tilemap_0, 0, afega_scroll_0[0] + yoffset); tilemap_set_scrollx(tilemap_1, 0, afega_scroll_1[1]); tilemap_set_scrolly(tilemap_1, 0, afega_scroll_1[0]); + tilemap_draw(bitmap,cliprect,tilemap_0,0,0); nmk16_draw_sprites_flipsupported(machine, bitmap,cliprect,3);