summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/system16.c487
-rw-r--r--src/mame/includes/system16.h3
-rw-r--r--src/mame/video/segaic16.c227
-rw-r--r--src/mame/video/segaic16.h3
-rw-r--r--src/mame/video/sys16spr.c187
-rw-r--r--src/mame/video/system16.c562
6 files changed, 546 insertions, 923 deletions
diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c
index e1e3b34865a..cd4f9c018cf 100644
--- a/src/mame/drivers/system16.c
+++ b/src/mame/drivers/system16.c
@@ -95,6 +95,7 @@
#include "sound/upd7759.h"
#include "sound/2612intf.h"
#include "sound/rf5c68.h"
+#include "video/segaic16.h"
/***************************************************************************/
@@ -491,10 +492,10 @@ static ADDRESS_MAP_START( bayroute_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x100000, 0x100003) AM_WRITENOP // tilebank control?
AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
- AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0x900000, 0x900001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1")
AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2")
@@ -596,16 +597,7 @@ static WRITE16_HANDLER( eswat_tilebank0_w )
static MACHINE_RESET( eswatbl )
{
- static const int bank[16] = {
- 0,1, 4,5,
- 8,9, 12,13,
- 2,3, 6,7,
- 10,11, 14,15
- };
-
- sys16_obj_bank = bank;
- sys16_sprxoffset = -0x23c;
}
@@ -826,8 +818,8 @@ static ADDRESS_MAP_START( goldnaxe_b1_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x118018, 0x118019) AM_WRITE(sys16bootleg_bgscrollx_w)
AM_RANGE(0x118020, 0x118021) AM_WRITE(sys16bootleg_fgpage_w)
AM_RANGE(0x118028, 0x118029) AM_WRITE(sys16bootleg_bgpage_w)
- AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
- AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
@@ -844,7 +836,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( bayroute_b1_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
- AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w)
@@ -853,7 +845,7 @@ static ADDRESS_MAP_START( bayroute_b1_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x718018, 0x718019) AM_WRITE(sys16bootleg_bgscrollx_w)
AM_RANGE(0x718020, 0x718021) AM_WRITE(sys16bootleg_fgpage_w)
AM_RANGE(0x718028, 0x718029) AM_WRITE(sys16bootleg_bgpage_w)
- AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1")
AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2")
@@ -911,7 +903,7 @@ static WRITE16_HANDLER( datsu_page3_w )
static ADDRESS_MAP_START( bayroute_b2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
- AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w)
@@ -923,7 +915,7 @@ static ADDRESS_MAP_START( bayroute_b2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x718024, 0x718025) AM_WRITE(datsu_page2_w)
AM_RANGE(0x718026, 0x718027) AM_WRITE(datsu_page3_w)
- AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1")
AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2")
AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w)
@@ -936,8 +928,8 @@ static ADDRESS_MAP_START( dduxbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w)
AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_w)
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
@@ -1026,8 +1018,8 @@ static ADDRESS_MAP_START( goldnaxe_b2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
- AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("DSW2") AM_WRITE(SMH_NOP)
AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1")
AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
@@ -1167,7 +1159,7 @@ static ADDRESS_MAP_START( fpointbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w)
AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE")
@@ -1176,7 +1168,7 @@ static ADDRESS_MAP_START( fpointbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2")
AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1")
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0x843000, 0x843001) AM_WRITENOP
AM_RANGE(0xC46000, 0xC46001) AM_WRITE(sys16bootleg_fgscrolly_w)
@@ -1234,8 +1226,8 @@ static ADDRESS_MAP_START( eswatbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w)
AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
@@ -1273,8 +1265,8 @@ static ADDRESS_MAP_START( system16a_bootleg_passsht_map, ADDRESS_SPACE_PROGRAM,
AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2")
@@ -1352,8 +1344,8 @@ static ADDRESS_MAP_START( system16a_bootleg_passht4b_map, ADDRESS_SPACE_PROGRAM,
AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc41000, 0xc41001) AM_READ(passht4b_service_r)
AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r)
AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r)
@@ -1491,7 +1483,7 @@ static MACHINE_DRIVER_START( passsht )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passsht_map)
- MDRV_VIDEO_START( system16a_bootleg )
+ MDRV_VIDEO_START( system16a_bootleg_passsht )
MDRV_VIDEO_UPDATE( system16a_bootleg )
MDRV_MACHINE_RESET(passsht)
@@ -1505,7 +1497,7 @@ static MACHINE_DRIVER_START( passht4b )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passht4b_map)
- MDRV_VIDEO_START( system16a_bootleg )
+ MDRV_VIDEO_START( system16a_bootleg_passsht )
MDRV_VIDEO_UPDATE( system16a_bootleg_passht4b )
MDRV_MACHINE_RESET(passht4b)
@@ -1549,8 +1541,8 @@ static ADDRESS_MAP_START( system16a_bootleg_shinobi_map, ADDRESS_SPACE_PROGRAM,
AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
AM_RANGE(0x411000, 0x411fff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
AM_RANGE(0x412000, 0x412fff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w)
AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
@@ -1571,23 +1563,8 @@ ADDRESS_MAP_END
/***************************************************************************/
-
-static MACHINE_RESET( shinobl )
-{
- static const int bank[16] = {
- 0,2,4,6,
- 1,3,5,7
- };
- sys16_obj_bank = bank;
- sys16_spritesystem = sys16_sprite_quartet2;
- sys16_sprxoffset = -0xbc;
- sys16_fgxoffset = sys16_bgxoffset = 7;
- sys16_tilebank_switch=0x2000;
-}
-
static DRIVER_INIT( shinobl )
{
- shinobl_kludge = 1;
MACHINE_RESET_CALL(sys16_onetime);
}
@@ -1600,10 +1577,8 @@ static MACHINE_DRIVER_START( system16a_bootleg_shinobi )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(system16a_bootleg_shinobi_map)
- MDRV_VIDEO_START( system16a_bootleg )
+ MDRV_VIDEO_START( system16a_bootleg_shinobi )
MDRV_VIDEO_UPDATE( system16a_bootleg )
-
- MDRV_MACHINE_RESET(shinobl)
MACHINE_DRIVER_END
/***************************************************************************/
@@ -1621,8 +1596,8 @@ static ADDRESS_MAP_START( tetrisbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_fgpage_w)
AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_bgpage_w)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
@@ -1661,8 +1636,8 @@ static ADDRESS_MAP_START( beautyb_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w)
AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xC41000, 0xC41001) AM_READ(beautyb_unkx_r )
AM_RANGE(0xC41002, 0xC41003) AM_READ(beautyb_unkx_r )
@@ -1675,10 +1650,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-static MACHINE_RESET( tetrisbl )
-{
- sys16_sprxoffset = -0x40;
-}
static DRIVER_INIT( tetrisbl )
{
@@ -1718,8 +1689,6 @@ static MACHINE_DRIVER_START( tetrisbl )
MDRV_IMPORT_FROM(system16)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(tetrisbl_map)
-
- MDRV_MACHINE_RESET(tetrisbl)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( beautyb )
@@ -1728,8 +1697,6 @@ static MACHINE_DRIVER_START( beautyb )
MDRV_IMPORT_FROM(system16)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(beautyb_map)
-
- MDRV_MACHINE_RESET(tetrisbl)
MACHINE_DRIVER_END
/***************************************************************************/
@@ -1767,10 +1734,10 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( tturfbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x200000, 0x203fff) AM_RAM // work ram
- AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2")
AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1")
@@ -1794,19 +1761,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-
-static MACHINE_RESET( tturfbl )
-{
- static const int bank[16] = {
- 0,0,0,0,
- 0,0,0,3,
- 0,0,0,2,
- 0,1,0,0
- };
- sys16_obj_bank = bank;
- sys16_sprxoffset = -0x48;
-}
-
static DRIVER_INIT( tturfbl )
{
UINT8 *mem;
@@ -1835,8 +1789,6 @@ static MACHINE_DRIVER_START( tturfbl )
MDRV_SOUND_CONFIG(tturfbl_msm5205_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80)
-
- MDRV_MACHINE_RESET(tturfbl)
MACHINE_DRIVER_END
@@ -1876,8 +1828,8 @@ static ADDRESS_MAP_START( wb3bbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
@@ -1896,22 +1848,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-static MACHINE_RESET( wb3bbl )
-{
- static const int bank[16] = {
- 2,0,
- 1,0,
- 3,0,
- 0,3,
- 0,0,
- 0,2,
- 0,1,
- 0,0
- };
-
- sys16_obj_bank = bank;
-}
-
static DRIVER_INIT( wb3bbl )
{
MACHINE_RESET_CALL(sys16_onetime);
@@ -1926,10 +1862,8 @@ static MACHINE_DRIVER_START( system16a_bootleg_wb3 )
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(wb3bbl_map)
- MDRV_VIDEO_START( system16a_bootleg )
+ MDRV_VIDEO_START( system16a_bootleg_wb3bl )
MDRV_VIDEO_UPDATE( system16a_bootleg )
-
- MDRV_MACHINE_RESET(wb3bbl)
MACHINE_DRIVER_END
/*****************************************************************************/
@@ -1946,6 +1880,7 @@ ROM_START( bayrouteb1 )
ROM_LOAD16_BYTE( "b6.bin", 0x0a0001, 0x10000, CRC(2bc748a6) SHA1(9ab760377fde24cecb703726ee3e59ee23d60a3a) )
// interrupt code, taken from the other bootleg set(!)
+ // might be wrong for this, hence the broken sprites
ROM_LOAD( "protdata", 0x0bf000, 0x01000, BAD_DUMP CRC(5474fd95) SHA1(1cbd47aa8f8b9641ba81942bcaae0bc768fd33fd) )
// there clearly should be some kind of MCU on this bootleg to put the interrupt code in RAM
@@ -1959,7 +1894,7 @@ ROM_START( bayrouteb1 )
ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) )
ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
- ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
@@ -1994,7 +1929,8 @@ ROM_START( bayrouteb2 )
ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) )
ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
- ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
+ #if 0 // these look bad
+ ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
ROM_LOAD16_BYTE( "br_11", 0x00001, 0x10000, CRC(65232905) SHA1(cb195a0ce8bff9d1d3e31678060b3aaccfefcd2d) )
ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
@@ -2003,6 +1939,18 @@ ROM_START( bayrouteb2 )
ROM_LOAD16_BYTE( "br_09", 0x40000, 0x10000, CRC(05e9b840) SHA1(7cc1c9ac7b85f1e1bdb68215b5e83eae3ee5ba2a) )
ROM_LOAD16_BYTE( "br_14", 0x60001, 0x10000, CRC(4c4a177b) SHA1(a9dfd7e56b0a21a0f7750d8ec4631901ad182609) )
ROM_LOAD16_BYTE( "bs7.bin", 0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
+ #endif
+
+ // use the roms from the first bootleg set
+ ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
+ ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
+ ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
+ ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
+ ROM_LOAD16_BYTE( "br_obj1e.6b", 0x20000, 0x10000, CRC(d3123315) SHA1(16a87caed1cabb080d4f35935910b38797344ca5) )
+ ROM_LOAD16_BYTE( "br_obj2o.3b", 0x40001, 0x10000, CRC(84efac1f) SHA1(41c43d70dc7ae7e361d6fa12c5790ea7ebf13ca8) )
+ ROM_LOAD16_BYTE( "br_obj2e.7b", 0x40000, 0x10000, CRC(b73b12cb) SHA1(e8265ae90aabf1ee0522dbc6541a0f82fec97c7a) )
+ ROM_LOAD16_BYTE( "br_obj3o.4b", 0x60001, 0x10000, CRC(a2e238ac) SHA1(c854774c0ffd1ccf6e46591a8fa3c80a4630e007) )
+ ROM_LOAD16_BYTE( "bs7.bin", 0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */
ROM_LOAD( "br_01", 0x00000, 0x10000, CRC(b87156ec) SHA1(bdfef2ab5a4d3cac4077c92ce1ef4604b4c11cf8) )
@@ -2023,17 +1971,15 @@ ROM_START( dduxbl )
ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) )
ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) )
- ROM_REGION( 0xa0000, "gfx2", 0 ) //* sprites */
- ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) )
- ROM_RELOAD( 0x20001, 0x010000 )
+ ROM_REGION16_BE( 0x100000, "gfx2", 0 ) //* sprites */
ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) )
- ROM_RELOAD( 0x20000, 0x010000 )
- ROM_LOAD16_BYTE( "dduxb11.bin", 0x40001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) )
- ROM_LOAD16_BYTE( "dduxb07.bin", 0x40000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) )
- ROM_LOAD16_BYTE( "dduxb12.bin", 0x60001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) )
- ROM_LOAD16_BYTE( "dduxb08.bin", 0x60000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) )
- ROM_LOAD16_BYTE( "dduxb13.bin", 0x80001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) )
- ROM_LOAD16_BYTE( "dduxb09.bin", 0x80000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) )
+ ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) )
+ ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) )
+ ROM_LOAD16_BYTE( "dduxb11.bin", 0x20001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) )
+ ROM_LOAD16_BYTE( "dduxb08.bin", 0x40000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) )
+ ROM_LOAD16_BYTE( "dduxb12.bin", 0x40001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) )
+ ROM_LOAD16_BYTE( "dduxb09.bin", 0x60000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) )
+ ROM_LOAD16_BYTE( "dduxb13.bin", 0x60001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) )
ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */
ROM_LOAD( "dduxb01.bin", 0x0000, 0x8000, CRC(0dbef0d7) SHA1(8b9afb2fcb946cec467b1e691c267194b503f841) )
@@ -2054,14 +2000,20 @@ ROM_START( eswatbl )
ROM_LOAD( "mpr12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) // ic20
ROM_LOAD( "mpr12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) // ic21
- ROM_REGION( 0x180000, "gfx2", 0 ) /* sprites */
- ROM_LOAD16_BYTE( "mpr12618.b1", 0x000001, 0x40000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) // ic9
- ROM_LOAD16_BYTE( "mpr12621.b4", 0x000000, 0x40000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) // ic12
- ROM_LOAD16_BYTE( "mpr12619.b2", 0x080001, 0x40000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) ) // ic10
- ROM_LOAD16_BYTE( "mpr12622.b5", 0x080000, 0x40000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) ) // ic13
- ROM_LOAD16_BYTE( "mpr12620.b3", 0x100001, 0x40000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) ) // ic11
- ROM_LOAD16_BYTE( "mpr12623.b6", 0x100000, 0x40000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) ) // ic14
-
+ ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
+ ROM_LOAD16_BYTE( "ic9", 0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) )
+ ROM_CONTINUE( 0x100001, 0x20000 )
+ ROM_LOAD16_BYTE( "ic12", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) )
+ ROM_CONTINUE( 0x100000, 0x20000 )
+ ROM_LOAD16_BYTE( "ic10", 0x040001, 0x20000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) )
+ ROM_CONTINUE( 0x140001, 0x20000 )
+ ROM_LOAD16_BYTE( "ic13", 0x040000, 0x20000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) )
+ ROM_CONTINUE( 0x140000, 0x20000 )
+ ROM_LOAD16_BYTE( "ic11", 0x080001, 0x20000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) )
+ ROM_CONTINUE( 0x180001, 0x20000 )
+ ROM_LOAD16_BYTE( "ic14", 0x080000, 0x20000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) )
+ ROM_CONTINUE( 0x180000, 0x20000 )
+
ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */
ROM_LOAD( "epr12617.a13", 0x00000, 0x08000, CRC(7efecf23) SHA1(2b87af7cfaab5942a3f7b38c987fcba01d3475ab) ) // ic8
ROM_LOAD( "mpr12616.a11", 0x10000, 0x40000, CRC(254347c2) SHA1(bf2d83a69a5be375c7e42e9f7d6e65c1095a354c) ) // ic6
@@ -2078,7 +2030,7 @@ ROM_START( fpointbl )
ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
- ROM_REGION( 0x20000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
@@ -2096,7 +2048,7 @@ ROM_START( fpointbj )
ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
- ROM_REGION( 0x20000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
@@ -2256,8 +2208,8 @@ ROM_START( goldnaxeb1 )
ROM_LOAD( "29.13", 0x30000, 0x10000, CRC(e29baf4f) SHA1(3761cb2217599fe3f2f860f9395930b96ec52f47) )
ROM_LOAD( "28.12", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) )
ROM_LOAD( "27.11", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) )
-
- ROM_REGION( 0x1c0000, "gfx2", 0 ) /* sprites */
+
+ ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "33.17", 0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) )
ROM_LOAD16_BYTE( "34.18", 0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) )
ROM_LOAD16_BYTE( "37.bin", 0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) )
@@ -2271,9 +2223,9 @@ ROM_START( goldnaxeb1 )
ROM_LOAD16_BYTE( "35.19", 0x040001, 0x10000, CRC(101d2fff) SHA1(1de1390c5f55f192491053c8aac31be3389aab2b) )
ROM_LOAD16_BYTE( "36.20", 0x060001, 0x10000, CRC(677e64a6) SHA1(e3d0d31097017c6cb1a7f41292783f18ce13b41c) )
- ROM_LOAD16_BYTE( "15.bin", 0x0a0000, 0x10000, CRC(11794d05) SHA1(eef52d7a644dbcc5f983222f163445a725286a32) )
+ ROM_LOAD16_BYTE( "15.bin", 0x140001, 0x10000, CRC(11794d05) SHA1(eef52d7a644dbcc5f983222f163445a725286a32) )
ROM_LOAD16_BYTE( "17.bin", 0x160001, 0x10000, CRC(ad1c1c90) SHA1(155f17593cfab1a117bb755b1edd0c473d455f91) )
-
+
ROM_LOAD16_BYTE( "23.9", 0x040000, 0x10000, CRC(5853000d) SHA1(db7adf1de74c66f667ea7ccc41702576de081ff5) )
ROM_LOAD16_BYTE( "24.10", 0x060000, 0x10000, CRC(697b3276) SHA1(a8aeb2cfaca9368d5bfa14a67de36dbadd4a0585) )
ROM_LOAD16_BYTE( "16.bin", 0x140000, 0x10000, CRC(753b01e8) SHA1(0180cf893d63e60e14e2fb0f5836b302f08f0228) )
@@ -2289,6 +2241,7 @@ ROM_START( goldnaxeb1 )
ROM_LOAD16_BYTE( "20.bin", 0x180000, 0x10000, CRC(cba013c7) SHA1(a0658aaf7893bc9fb8f0435cab9f77ceb1fb4e1d) )
ROM_LOAD16_BYTE( "26.bin", 0x1a0000, 0x10000, CRC(bea4d237) SHA1(46e51e89b4ee1e2701da1004758d7da547a2e4c2) )
+
ROM_REGION( 0x30000, "soundcpu", 0 ) /* sound CPU */
ROM_LOAD( "2.3", 0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
ROM_LOAD( "3.1", 0x10000, 0x10000, CRC(50eb5a56) SHA1(d59ba04254000de5577e8a58d0b51c73112a4c80) )
@@ -2344,7 +2297,7 @@ ROM_START( goldnaxeb2 )
ROM_LOAD( "ic2.37", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) )
ROM_LOAD( "ic16.40", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) )
- ROM_REGION( 0x1c0000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "ic73.34", 0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) ) // mpr12378.b1 [1/4] IDENTICAL
ROM_LOAD16_BYTE( "ic74.33", 0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) ) // mpr12378.b1 [2/4] IDENTICAL
ROM_LOAD16_BYTE( "ic79.28", 0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) ) // mpr12378.b1 [3/4] IDENTICAL
@@ -2387,7 +2340,7 @@ ROM_START( passht4b )
ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) )
ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) )
- ROM_REGION( 0x60000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x60000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
@@ -2411,7 +2364,7 @@ ROM_START( passshtb )
ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) )
ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) )
- ROM_REGION( 0x60000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
ROM_LOAD16_BYTE( "opr11862.b1", 0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
ROM_LOAD16_BYTE( "opr11865.b5", 0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
ROM_LOAD16_BYTE( "opr11863.b2", 0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
@@ -2442,24 +2395,16 @@ ROM_START( shinobld )
ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) )
ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) )
- ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
- ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
- ROM_CONTINUE( 0x40001, 0x08000 )
- ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
- ROM_CONTINUE( 0x40000, 0x08000 )
- ROM_LOAD16_BYTE( "8.bin", 0x10001, 0x08000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
- ROM_CONTINUE( 0x50001, 0x08000 )
- ROM_LOAD16_BYTE( "2.bin", 0x10000, 0x08000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
- ROM_CONTINUE( 0x50000, 0x08000 )
- ROM_LOAD16_BYTE( "6.bin", 0x30001, 0x08000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
- ROM_CONTINUE( 0x60001, 0x08000 )
- ROM_LOAD16_BYTE( "4.bin", 0x30000, 0x08000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
- ROM_CONTINUE( 0x60000, 0x08000 )
- ROM_LOAD16_BYTE( "7.bin", 0x40001, 0x08000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
- ROM_CONTINUE( 0x70001, 0x08000 )
- ROM_LOAD16_BYTE( "1.bin", 0x40000, 0x08000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
- ROM_CONTINUE( 0x70000, 0x08000 )
-
+ ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
+ ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
+ ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
+ ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
+ ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
+ ROM_LOAD16_BYTE( "6.bin", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
+ ROM_LOAD16_BYTE( "4.bin", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
+ ROM_LOAD16_BYTE( "7.bin", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
+ ROM_LOAD16_BYTE( "1.bin", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
+
ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU + data */
ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) )
ROM_END
@@ -2475,7 +2420,7 @@ ROM_START( tetrisbl )
ROM_LOAD( "epr12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) )
ROM_LOAD( "epr12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) )
- ROM_REGION( 0x020000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x020000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) )
ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) )
@@ -2496,7 +2441,7 @@ ROM_START( tturfbl )
ROM_LOAD( "tt16cf44.rom", 0x10000, 0x10000, CRC(4c467735) SHA1(8338b6605cbe2e076da0b3e3a47630409a79f002) )
ROM_LOAD( "tt17d59e.rom", 0x20000, 0x10000, CRC(60c0f2fe) SHA1(3fea4ed757d47628f59ff940e40cb86b3b5b443b) )
- ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )
ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )
ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )
@@ -2511,7 +2456,6 @@ ROM_START( tturfbl )
ROM_LOAD( "tt0246ff.rom", 0x20000, 0x10000, CRC(bb4bba8f) SHA1(b182a7e1d0425e93c2c1b93472aafd30a6af6907) )
ROM_END
-// sys16B
ROM_START( wb3bbl )
ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "wb3_03", 0x000000, 0x10000, CRC(0019ab3b) SHA1(89d49a437690fa6e0c35bb9f1450042f89504714) )
@@ -2524,15 +2468,16 @@ ROM_START( wb3bbl )
ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) )
ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) )
- ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
- ROM_LOAD16_BYTE( "epr12093.b4", 0x000001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
- ROM_LOAD16_BYTE( "epr12097.b8", 0x000000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
- ROM_LOAD16_BYTE( "epr12091.b2", 0x020001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
- ROM_LOAD16_BYTE( "epr12095.b6", 0x020000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
- ROM_LOAD16_BYTE( "epr12090.b1", 0x040001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
- ROM_LOAD16_BYTE( "epr12094.b5", 0x040000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
- ROM_LOAD16_BYTE( "epr12092.b3", 0x060001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
- ROM_LOAD16_BYTE( "epr12096.b7", 0x060000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
+ ROM_REGION16_BE( 0x100000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
+ ROM_LOAD16_BYTE( "epr12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
+ ROM_LOAD16_BYTE( "epr12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
+ ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
+ ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
+ ROM_LOAD16_BYTE( "epr12092.b3", 0x40001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
+ ROM_LOAD16_BYTE( "epr12096.b7", 0x40000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
+ ROM_LOAD16_BYTE( "epr12093.b4", 0x60001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
+ ROM_LOAD16_BYTE( "epr12097.b8", 0x60000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
+
ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */
ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) )
@@ -2542,7 +2487,7 @@ ROM_END
/* Looked at 24/05/09 */
// System 16B based bootlegs
-GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0, "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING )
+GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0, "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING ) // broken sprites (due to missing/wrong irq code?)
GAME( 1989, bayrouteb2, bayroute, bayrouteb2, bayroute, bayrouteb2, ROT0, "bootleg", "Bay Route (Datsu bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING )
GAME( 1989, goldnaxeb1, goldnaxe, goldnaxe_b1, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (encrypted bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND )
GAME( 1989, goldnaxeb2, goldnaxe, goldnaxe_b2, goldnaxe, goldnab2, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND )
@@ -2858,183 +2803,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-
-/*
- 315-5296 I/O chip emulation
-*/
-#if 0
-static int io_reg[0x10];
-
-static READ16_HANDLER( sys18_io_r )
-{
- if(ACCESSING_BITS_0_7)
- {
- switch(offset & 0x3000/2)
- {
- case 0x0000/2: /* I/O chip internal locations */
- case 0x1000/2: /* I/O chip internal locations (mirror) */
- switch(offset & 0x1F)
- {
- case 0x00: /* Port A - 1P controls */
- if(io_reg[0x0F] & 0x01)
- return io_reg[0x00];
- else
- return input_port_read(space->machine, "P1");
- break;
-
- case 0x01: /* Port B - 2P controls */
- if(io_reg[0x0F] & 0x02)
- return io_reg[0x01];
- else
- return input_port_read(space->machine, "P2");
- break;
-
- case 0x02: /* Port C - Bidirectional I/O port */
- if(io_reg[0x0F] & 0x04)
- return io_reg[0x02];
- else
- return -1;
- break;
-
- case 0x03: /* Port D - Miscellaneous outputs */
- if(io_reg[0x0F] & 0x08)
- return io_reg[0x03];
- else
- return -1;
- break;
-
- case 0x04: /* Port E - Service / Coin inputs */
- if(io_reg[0x0F] & 0x10)
- return io_reg[0x04];
- else
- return input_port_read(space->machine, "SERVICE");
- break;
-
- case 0x05: /* Port F - DIP switch #1 */
- if(io_reg[0x0F] & 0x20)
- return io_reg[0x05];
- else
- return input_port_read(space->machine, "DSW1");
- break;
-
- case 0x06: /* Port G - DIP switch #2 */
- if(io_reg[0x0F] & 0x40)
- return io_reg[0x06];
- else
- return input_port_read(space->machine, "P3");
- break;
-
- case 0x07: /* Port H - Tile banking control */
- if(io_reg[0x0F] & 0x80)
- return io_reg[0x07];
- else
- return -1;
- break;
-
- case 0x08: /* Protection #1 */
- return 'S';
- case 0x09: /* Protection #2 */
- return 'E';
- case 0x0A: /* Protection #3 */
- return 'G';
- case 0x0B: /* Protection #4 */
- return 'A';
-
- case 0x0C: /* CNT2-0 pin output control (mirror) */
- case 0x0E: /* CNT2-0 pin output control */
- return io_reg[0x0E];
-
- case 0x0D: /* Port direction control (mirror) */
- case 0x0F: /* Port direction control */
- return io_reg[0x0F];
- }
- return -1;
-
- case 0x2000/2: /* Unused */
- logerror("read video control latch %06X (%06X)\n", offset, cpu_get_pc(space->cpu));
- return -1;
-
- case 0x3000/2: /* Expansion connector */
- logerror("read expansion area %06X (%06X)\n", offset, cpu_get_pc(space->cpu));
- return -1;
- }
- }
-
- return -1;
-}
-
-static WRITE16_HANDLER( sys18_io_w )
-{
- if(ACCESSING_BITS_0_7)
- {
- switch(offset & 0x3000/2)
- {
- case 0x0000/2: /* I/O chip internal locations */
- case 0x1000/2: /* I/O chip internal locations (mirror) */
- switch(offset & 0x1F)
- {
- case 0x00: /* Port A - 1P controls */
- io_reg[0x00] = data;
- break;
-
- case 0x01: /* Port B - 2P controls */
- io_reg[0x01] = data;
- break;
-
- case 0x02: /* Port C - Bidirectional I/O port */
- io_reg[0x02] = data;
- break;
-
- case 0x03: /* Port D - Miscellaneous outputs */
- io_reg[0x03] = data;
- coin_lockout_w(1, data & 8);
- coin_lockout_w(0, data & 4);
- coin_counter_w(1, data & 2);
- coin_counter_w(0, data & 1);
- break;
-
- case 0x04: /* Port E - Service / Coin inputs */
- io_reg[0x04] = data;
- break;
-
- case 0x05: /* Port F - DIP switch #1 */
- io_reg[0x05] = data;
- break;
-
- case 0x06: /* Port G - DIP switch #2 */
- io_reg[0x06] = data;
- break;
-
- case 0x07: /* Port H - Tile banking control */
- io_reg[0x07] = data;
- sys16_tile_bank0 = (data >> 0) & 0x0F;
- sys16_tile_bank1 = (data >> 4) & 0x0F;
- break;
-
- case 0x0E: /* CNT2-0 pin output control */
- io_reg[0x0E] = data;
- sys16_refreshenable = data & 0x02;
- break;
-
- case 0x0F: /* Port direction control */
- io_reg[0x0F] = data;
- break;
- }
- break;
-
- case 0x2000/2: /* Video control latch */
- logerror("write video control latch %06X = %04X (%06X)\n", offset, data, cpu_get_pc(space->cpu));
- break;
-
- case 0x3000/2: /* Expansion connector */
-// logerror("write expansion area %06X = %04X (%06X)\n", offset, data, cpu_get_pc(space->cpu));
- break;
- }
- }
-}
-#endif
-
-/***************************************************************************/
/*
Shadow Dancer (Bootleg)
@@ -3080,8 +2848,8 @@ static ADDRESS_MAP_START( shdancbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
AM_RANGE(0xc00000, 0xc0ffff) AM_NOP
AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE")
AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1")
@@ -3100,12 +2868,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-static MACHINE_RESET( shdancbl )
-{
- sys16_sprxoffset = -0xbc+0x77;
-}
-
-
static DRIVER_INIT( shdancbl )
{
@@ -3132,8 +2894,8 @@ static ADDRESS_MAP_START( mwalkbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
- AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
+ AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
/* bootleg video regs */
/*AM_RANGE(0xc00000, 0xc00001) AM_NOP
@@ -3164,11 +2926,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-static MACHINE_RESET( mwalkbl )
-{
-
-}
-
static DRIVER_INIT( mwalkbl )
{
UINT8 *RAM= memory_region(machine, "soundcpu");
@@ -3196,8 +2953,8 @@ static ADDRESS_MAP_START( astormbl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
- AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
- AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
+ AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
+ AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE")
AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1")
AM_RANGE(0xa00006, 0xa00007) AM_WRITE(sound_command_nmi_w)
@@ -3230,12 +2987,6 @@ ADDRESS_MAP_END
/***************************************************************************/
-static MACHINE_RESET( astormbl )
-{
-
-}
-
-
static DRIVER_INIT( astormbl )
{
UINT8 *RAM= memory_region(machine, "soundcpu");
@@ -3310,8 +3061,6 @@ static MACHINE_DRIVER_START( astormbl )
MDRV_IMPORT_FROM(system18)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(astormbl_map)
-
- MDRV_MACHINE_RESET(astormbl)
MACHINE_DRIVER_END
@@ -3321,8 +3070,6 @@ static MACHINE_DRIVER_START( mwalkbl )
MDRV_IMPORT_FROM(system18)
MDRV_CPU_MODIFY("maincpu")
MDRV_CPU_PROGRAM_MAP(mwalkbl_map)
-
- MDRV_MACHINE_RESET(mwalkbl)
MACHINE_DRIVER_END
@@ -3342,8 +3089,6 @@ static MACHINE_DRIVER_START( shdancbl )
MDRV_SOUND_CONFIG(shdancbl_msm5205_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80)
-
- MDRV_MACHINE_RESET(shdancbl)
MACHINE_DRIVER_END
@@ -3496,7 +3241,7 @@ ROM_START( astormbl )
ROM_LOAD( "epr13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) )
ROM_LOAD( "epr13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) )
- ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "mpr13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) )
ROM_LOAD16_BYTE( "astorm.a11", 0x000000, 0x40000, CRC(7829c4f3) SHA1(3adb7aa7f70163d3848c98316e18b9783c41d663) )
ROM_LOAD16_BYTE( "mpr13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) )
@@ -3558,7 +3303,7 @@ ROM_START( astormb2 )
ROM_LOAD( "36.03", 0x80000, 0x20000, CRC(c0f9628d) SHA1(aeacf5e409adfa0b9c28c90d4e89eb1f56cd5f4d) ) // epr13075.bin [1/2] IDENTICAL
ROM_LOAD( "37.031", 0xa0000, 0x20000, CRC(95af904e) SHA1(6574fa874c355c368109b417aab7d0b05c9d215d) ) // epr13075.bin [2/2] IDENTICAL
- ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "17.042", 0x000001, 0x20000, CRC(db08beb5) SHA1(c154d22c69b77637d6a9d0f2bffcfb47e6901ec8) ) // mpr13082.bin [1/2] IDENTICAL
ROM_LOAD16_BYTE( "16.043", 0x040001, 0x20000, CRC(41f78977) SHA1(9cf9fcf96722d148c4b2cf7aa33425b6efcd0379) ) // mpr13082.bin [2/2] IDENTICAL
ROM_LOAD16_BYTE( "29.012", 0x000000, 0x20000, CRC(22acf675) SHA1(80fd0d96017bf36d964a79f7e13e73fee7ed370a) ) // mpr13089.bin [1/2] 99.941254%
@@ -3613,7 +3358,7 @@ ROM_START( mwalkbl )
ROM_LOAD( "mpr13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) )
ROM_LOAD( "mpr13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) )
- ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
ROM_LOAD16_BYTE( "mpr13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) )
ROM_LOAD16_BYTE( "mpr13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) )
ROM_LOAD16_BYTE( "mpr13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) )
@@ -3651,7 +3396,7 @@ ROM_START( shdancbl )
ROM_LOAD( "ic2", 0x80000, 0x20000, CRC(60095070) SHA1(913c2ee51fb6f838f3c6cbd27032bdf754fbadf1) )
ROM_LOAD( "ic16", 0xa0000, 0x20000, CRC(0f0d5dd3) SHA1(76812e2f831256a8b6598257dd84a7f07443642e) )
- ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
+ ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
// 12719
ROM_LOAD16_BYTE( "ic73", 0x000001, 0x10000, CRC(59e77c96) SHA1(08da058529ac83352a4528d3792a21edda348f7a) )
diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h
index 3077bde4b9b..3788623d30b 100644
--- a/src/mame/includes/system16.h
+++ b/src/mame/includes/system16.h
@@ -144,6 +144,9 @@ GFXDECODE_EXTERN( sys16 );
/*----------- defined in video/system16.c -----------*/
extern VIDEO_START( system16a_bootleg );
+extern VIDEO_START( system16a_bootleg_wb3bl );
+extern VIDEO_START( system16a_bootleg_shinobi );
+extern VIDEO_START( system16a_bootleg_passsht );
extern VIDEO_UPDATE( system16a_bootleg );
extern VIDEO_UPDATE( system16a_bootleg_passht4b );
extern WRITE16_HANDLER( system16a_bootleg_tilemapselect_w );
diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c
index d2a7f99323d..2d1bf77ca3f 100644
--- a/src/mame/video/segaic16.c
+++ b/src/mame/video/segaic16.c
@@ -2016,7 +2016,7 @@ static void segaic16_sprites_16b_draw(running_machine *machine, struct sprite_in
{
int bottom = data[0] >> 8;
int top = data[0] & 0xff;
- int xpos = (data[1] & 0x1ff) - 0xb8;
+ int xpos = (data[1] & 0x1ff);
int hide = data[2] & 0x4000;
int flip = data[2] & 0x100;
int pitch = (INT8)(data[2] & 0xff);
@@ -2028,7 +2028,14 @@ static void segaic16_sprites_16b_draw(running_machine *machine, struct sprite_in
int hzoom = data[5] & 0x1f;
const UINT16 *spritedata;
int x, y, pix, xdelta = 1;
-
+
+ /* some bootlegs have offset sprites */
+ xpos += info->xoffs;
+ xpos &= 0x1ff;
+
+ /* originals all have this offset */
+ xpos -= 0xb8;
+
/* initialize the end address to the start address */
data[7] = addr;
@@ -2056,7 +2063,7 @@ static void segaic16_sprites_16b_draw(running_machine *machine, struct sprite_in
/* loop from top to bottom */
for (y = top; y < bottom; y++)
- {
+ {
/* advance a row */
addr += pitch;
@@ -2651,7 +2658,201 @@ static void segaic16_sprites_yboard_draw(running_machine *machine, struct sprite
}
}
+/* bootlegs */
+
+/*
+
+ the system16a bootleg sprite hardware differs in subtle ways on a per game basis
+ with each game having the words swapped around.
+
+ there are also some subtle, but important changes when compared to the original
+ system16a sprites, mainly the increment of the address not happening until
+ the end of the loop
+
+*/
+
+/* ignores the sprite priority until we understand priority better on the bootlegs */
+#define system16a_bootleg_draw_pixel() \
+ /* only draw if onscreen, not 0 or 15 */ \
+ if (x >= cliprect->min_x && x <= cliprect->max_x && pix != 0 && pix != 15) \
+ { \
+ /* are we high enough priority to be visible? */ \
+ if (sprpri || 1) \
+ { \
+ /* shadow/hilight mode? */ \
+ if (color == info->colorbase + (0x3f << 4)) \
+ dest[x] += (paletteram16[dest[x]] & 0x8000) ? palette.entries*2 : palette.entries; \
+ \
+ /* regular draw */ \
+ else \
+ dest[x] = pix | color; \
+ } \
+ \
+ /* always mark priority so no one else draws here */ \
+ pri[x] = 0xff; \
+ } \
+
+
+/* make this an actual function */
+#define system16a_bootleg_draw_core() \
+ { \
+ const UINT16 *spritedata; \
+ int x, y, pix, xdelta = 1; \
+ \
+ xpos += info->xoffs; \
+ xpos &= 0x1ff; \
+ \
+ xpos -= 0xbd; \
+ \
+ /* initialize the end address to the start address */ \
+ data[7] = addr; \
+ \
+ /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */ \
+ if ((top >= bottom) || bank == 255) \
+ continue; \
+ \
+ /* clamp to within the memory region size */ \
+ if (numbanks) \
+ bank %= numbanks; \
+ spritedata = spritebase + 0x8000 * bank; \
+ \
+ /* adjust positions for screen flipping */ \
+ if (info->flip) \
+ { \
+ int temp = top; \
+ top = 224 - bottom; \
+ bottom = 224 - temp; \
+ xpos = 320 - xpos; \
+ xdelta = -1; \
+ } \
+ \
+ /* loop from top to bottom */ \
+ for (y = top; y < bottom; y++) \
+ { \
+ \
+ /* skip drawing if not within the cliprect */ \
+ if (y >= cliprect->min_y && y <= cliprect->max_y) \
+ { \
+ UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); \
+ UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0); \
+ \
+ /* note that the System 16A sprites have a design flaw that allows the address */ \
+ /* to carry into the flip flag, which is the topmost bit -- it is very important */ \
+ /* to emulate this as the games compensate for it */ \
+ \
+ /* non-flipped case */ \
+ if (!(addr & 0x8000)) \
+ { \
+ /* start at the word before because we preincrement below */ \
+ data[7] = addr - 1; \
+ for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) \
+ { \
+ UINT16 pixels = spritedata[++data[7] & 0x7fff]; \
+ \
+ /* draw four pixels */ \
+ pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ \
+ /* stop if the last pixel in the group was 0xf */ \
+ if (pix == 15) \
+ break; \
+ } \
+ } \
+ \
+ /* flipped case */ \
+ else \
+ { \
+ /* start at the word after because we predecrement below */ \
+ data[7] = addr + 1; \
+ for (x = xpos; ((xpos - x) & 0x1ff) != 1; ) \
+ { \
+ UINT16 pixels = spritedata[--data[7] & 0x7fff]; \
+ \
+ /* draw four pixels */ \
+ pix = (pixels >> 0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta; \
+ \
+ /* stop if the last pixel in the group was 0xf */ \
+ if (pix == 15) \
+ break; \
+ } \
+ } \
+ } \
+ \
+ /* advance a row - must be done at the end on the bootlegs! */ \
+ addr += pitch; \
+ } \
+ } \
+
+
+
+static void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
+{
+ UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
+ const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
+ UINT16 *data;
+ for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
+ {
+ int bottom = (data[4] >> 8);
+ int top = (data[4] & 0xff);
+ int xpos = (data[0]);
+ int pitch = (INT16)data[5];
+ UINT16 addr = data[1];
+ int color = info->colorbase + (((data[6] >> 8) & 0x3f) << 4);
+ int bank = info->bank[(data[6] >> 4) & 0x7];
+ int sprpri = 1 << ((data[6] >> 0) & 0x3);
+
+ system16a_bootleg_draw_core();
+ }
+}
+
+/* 4 player passing shot is different to this.. */
+static void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
+{
+UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
+ const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
+ UINT16 *data;
+
+ for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
+ {
+ int bottom = (data[1] >> 8)-1;
+ int top = (data[1] & 0xff)-1;
+ int xpos = (data[0]);
+ int pitch = (INT16)data[3];
+ UINT16 addr = data[2];
+ int color = info->colorbase + (((data[5] >> 8) & 0x3f) << 4);
+ int bank = info->bank[(data[5] >> 4) & 0x7];
+ int sprpri = 1 << ((data[5] >> 0) & 0x3);
+
+ system16a_bootleg_draw_core();
+ }
+}
+
+static void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
+{
+ UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
+ const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
+ UINT16 *data;
+
+ for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
+ {
+ int bottom = (data[0] >> 8)-1;
+ int top = (data[0] & 0xff)-1;
+ int xpos = (data[1]);
+ int pitch = (INT16)data[2];
+ UINT16 addr = data[3];
+ int color = info->colorbase + (((data[4] >> 8) & 0x3f) << 4);
+ int bank = info->bank[(data[4] >> 4) & 0x7];
+ int sprpri = 1 << ((data[4] >> 0) & 0x3);
+
+ system16a_bootleg_draw_core();
+ }
+}
/*************************************
*
@@ -2671,6 +2872,8 @@ void segaic16_sprites_init(running_machine *machine, int which, int type, int co
for (i = 0; i < 16; i++)
info->bank[i] = i;
info->colorbase = colorbase;
+
+ /* some bootlegs have offset sprites */
info->xoffs = xoffs;
/* set up based on which sprite system */
@@ -2700,7 +2903,7 @@ void segaic16_sprites_init(running_machine *machine, int which, int type, int co
info->draw = segaic16_sprites_16a_draw;
info->ramsize = 0x800;
break;
-
+
case SEGAIC16_SPRITES_16B:
info->draw = segaic16_sprites_16b_draw;
info->ramsize = 0x800;
@@ -2728,6 +2931,21 @@ void segaic16_sprites_init(running_machine *machine, int which, int type, int co
info->ramsize = 0x800;
break;
+ case SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL:
+ info->draw = segaic16_sprites_16a_bootleg_wb3bl_draw;
+ info->ramsize = 0x800;
+ break;
+
+ case SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL:
+ info->draw = segaic16_sprites_16a_bootleg_passhtb_draw;
+ info->ramsize = 0x800;
+ break;
+
+ case SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD:
+ info->draw = segaic16_sprites_16a_bootleg_shinobld_draw;
+ info->ramsize = 0x800;
+ break;
+
default:
fatalerror("Invalid sprite system specified in segaic16_sprites_init");
}
@@ -2741,6 +2959,7 @@ void segaic16_sprites_init(running_machine *machine, int which, int type, int co
state_save_register_item_array(machine, "segaic16_sp", NULL, which, info->bank);
state_save_register_item(machine, "segaic16_sp", NULL, which, info->colorbase);
state_save_register_item(machine, "segaic16_sp", NULL, which, info->xoffs);
+
if (buffer)
state_save_register_item_pointer(machine, "segaic16_sp", NULL, which, ((UINT8 *) info->buffer), info->ramsize);
}
diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h
index 0900214906f..2e865d0a957 100644
--- a/src/mame/video/segaic16.h
+++ b/src/mame/video/segaic16.h
@@ -54,6 +54,9 @@ WRITE16_HANDLER( segaic16_textram_0_w );
#define SEGAIC16_SPRITES_XBOARD 5
#define SEGAIC16_SPRITES_YBOARD 6
#define SEGAIC16_SPRITES_YBOARD_16B 7
+#define SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL 8
+#define SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL 9
+#define SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD 10
void segaic16_sprites_init(running_machine *machine, int which, int type, int colorbase, int xoffs);
void segaic16_sprites_draw(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, int which);
diff --git a/src/mame/video/sys16spr.c b/src/mame/video/sys16spr.c
index fc9c640df4a..b73592ffb6f 100644
--- a/src/mame/video/sys16spr.c
+++ b/src/mame/video/sys16spr.c
@@ -1,188 +1,3 @@
/* sys16spr.c
-**
-** This module maps spriteram for various Sega System16/System18 games to
-** a shared abstraction represented by the sys16_sprite_attributes
-** structure.
-**
-** Each function takes a pointer to a sprite attribute structure to fill
-** out. This function is initialized to zero automatically prior to the
-** function call.
-**
-** The next parameter, source points to the spriteram
-** associated with a particular sprite.
-**
-** The final parameter bJustGetColor is set when this function is called while
-** marking colors. During this pass, only the palette field needs to be
-** populated.
-**
-** This function must return 1 if the sprite was flagged as the last sprite,
-** or 0 if the sprite was not flagged as the last sprite.
-**
-** We should probably unpack sprites into an array once, rather than processing
-** sprites one at a time, once when marking colors and once when rendering them.
-** Note that we need to draw sprites from front to back to achieve proper sprite-tilemap
-** orthogonality, so would make it easier to know how many sprites there are (and
-** thus which is the 'last sprite' with which we need to start.
+ old file, delete me
*/
-
-/*
-Changes:
-03/12/04 Charles MacDonald
-- Fixed end of list and sprite hide flag processing in sys16_sprite_shinobi, hwchamp output test works properly.
-- Fixed size of zoom fields, fixes sprite alignment issues in hwchamp
-*/
-
-#include "driver.h"
-#include "system16.h"
-
-int sys16_sprite_shinobi( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
-/* standard sprite hardware (Shinobi, Altered Beast, Golden Axe
- 0 YYYYYYYY YYYYYYYY top, bottom (screen coordinates)
- 1 -------X XXXXXXXX left (screen coordinate)
- 2 EH------F WWWWWWWW end list flag, hide sprite flag, flipx, signed pitch
- 3 TTTTTTTT TTTTTTTT word offset for start of sprite data; each word is 16 bits (4 pixels)
- 4 ----BBBB PPCCCCCC attributes: bank, priority, color
- 5 ------YY YYYXXXXX zoomy, zoomx
- 6 -------- --------
- 7 -------- --------
-*/
- UINT16 ypos = source[0];
- UINT16 width = source[2];
- int top = ypos&0xff;
- int bottom = ypos>>8;
- if(width & 0x8000) return 1; // End of list bit set
- if(width & 0x4000) return 0; // Hide this sprite bit set
- if(top >= bottom || top >= 0xe0) return 0; // Invalid height or off-screen
- if(bottom >= 0xe0) bottom = 0xe0; // Clip bottom of sprite
-
- {
- UINT16 attributes = source[4];
-
- UINT16 zoomx = source[5] & 0x1F;
- UINT16 zoomy = (source[5] >> 5) & 0x1F;
-
- // Rest of rendering code expects zoom to be 10 bits
- zoomx <<= 5;
- zoomy <<= 5;
-
- // Having zoomy set to zoomx when zoomy is zero heavily distorts the multi-sprite opponents in hwchamp
- //if( zoomy==0 || source[6]==0xffff ) zoomy = zoomx; /* if zoomy is 0, use zoomx instead */
-
- sprite->x = source[1] + sys16_sprxoffset;
- sprite->y = top;
- sprite->priority = (attributes>>6)&0x3;
- sprite->color = 1024/16 + (attributes&0x3f);
- sprite->screen_height = bottom-top;
- sprite->flags = SYS16_SPR_VISIBLE;
- if( width&0x100 ) sprite->flags |= SYS16_SPR_FLIPX;
- if ((attributes&0x3f)==0x3f) sprite->flags|= SYS16_SPR_SHADOW;
- sprite->zoomx = zoomx;
- sprite->zoomy = zoomy;
- sprite->pitch = source[2]&0xff;
- sprite->gfx = ( source[3] + (sys16_obj_bank[(attributes>>8)&0xf]<<16) ) << 1; //*
- }
- return 0;
-}
-
-int sys16_sprite_passshot( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
-/* Passing shot 4p needs: passshot_y=-0x23; passshot_width=1;
- 0 -------X XXXXXXXX left (screen coordinate)
- 1 YYYYYYYY YYYYYYYY bottom, top (screen coordinates)
- 2 XTTTTTTT TTTTTTTT (pen data, flipx, flipy)
- 3 -------- FWWWWWWW pitch: flipy, logical width
- 4 ------ZZ ZZZZZZZZ zoom
- 5 PPCCCCCC BBBB---- attributes: priority, color, bank
- 6 -------- --------
- 7 -------- --------
-*/
- int passshot_y=0;
- int passshot_width=0;
- UINT16 attributes = source[5];
- UINT16 ypos = source[1];
- int bottom = (ypos>>8)+passshot_y;
- int top = (ypos&0xff)+passshot_y;
- if( bottom>top && ypos!=0xffff ){
- int bank = (attributes>>4)&0xf;
- UINT16 number = source[2];
- UINT16 width = source[3];
- int zoom = source[4]&0x3ff;
- int xpos = source[0] + sys16_sprxoffset;
- sprite->screen_height = bottom - top;
- sprite->priority = attributes>>14;
- sprite->color = 1024/16+ ((attributes>>8)&0x3f);
- /* hack */
- if( passshot_width) { /* 4 player bootleg version */
- width = -width;
- number -= width*(bottom-top-1)-1;
- }
- sprite->flags = SYS16_SPR_VISIBLE;
- if( number & 0x8000 ) sprite->flags |= SYS16_SPR_FLIPX;
- if (((attributes>>8)&0x3f)==0x3f) // shadow sprite
- sprite->flags|= SYS16_SPR_SHADOW;
- sprite->pitch = width&0xff;
- if( sprite->flags&SYS16_SPR_FLIPX ){
- bank = (bank-1) & 0xf; /* ? */
- }
- sprite->gfx = ((number-(short)width)*4 + (sys16_obj_bank[bank] << 17))/2; //*
- sprite->x = xpos;
- sprite->y = top+2; //*
- sprite->zoomx = sprite->zoomy = zoom;
- }
- return 0;
-}
-
-
-int sys16_sprite_quartet2( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
-/* Quartet2, Alexkidd, Bodyslam, mjleague, shinobibl
- 0 YYYYYYYY YYYYYYYY bottom, top
- 1 -------X XXXXXXXX xpos
- 2 -------- WWWWWWWW pitch
- 3 FTTTTTTT TTTTTTTT flipx, gfx
- 4 --CCCCCC BBBBPPPP color, bank, priority
- 5 -------- --------
- 6 -------- --------
- 7 -------- --------
-*/
- UINT16 ypos = source[0];
- int top = ypos&0xff;
- int bottom = ypos>>8;
- if( bottom == 0xff ) return 1;
- if(bottom !=0 && bottom > top){
- UINT16 spr_pri=(source[4])&0xf; /* ?? */
- UINT16 bank=(source[4]>>4) &0xf;
- UINT16 pal=(source[4]>>8)&0x3f;
- UINT16 tsource[4];
- UINT16 width;
- int gfx;
-
- if (spr_pri) { /* MASH - ?? */
- tsource[2]=source[2];
- tsource[3]=source[3];
- if((tsource[3] & 0x7f80) == 0x7f80){
- bank=(bank-1)&0xf;
- tsource[3]^=0x8000;
- }
- tsource[2] &= 0x00ff;
- if (tsource[3]&0x8000){ // reverse
- tsource[2] |= 0x0100;
- tsource[3] &= 0x7fff;
- }
- gfx = tsource[3]*4;
- width = tsource[2];
- //top++;
- //bottom++;
- sprite->x = source[1] + sys16_sprxoffset;
- if(sprite->x > 0x140) sprite->x-=0x200;
- sprite->y = top;
- sprite->priority = spr_pri;
- sprite->color = 1024/16 + pal;
- sprite->screen_height = bottom-top;
- sprite->pitch = width&0xff;
- sprite->flags = SYS16_SPR_VISIBLE;
- if( width&0x100 ) sprite->flags |= SYS16_SPR_FLIPX;
- if( pal==0x3f ) sprite->flags|= SYS16_SPR_SHADOW; // shadow sprite
- sprite->gfx = ((gfx &0x3ffff) + (sys16_obj_bank[bank] << 17))/2;
- }
- }
- return 0;
-}
diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c
index d7c90a5fe6e..c92b114ccff 100644
--- a/src/mame/video/system16.c
+++ b/src/mame/video/system16.c
@@ -27,6 +27,107 @@
#include "driver.h"
#include "system16.h"
#include "video/resnet.h"
+#include "video/segaic16.h"
+
+int system16_bootleg_spritebank_type = -1;
+int system16_bootleg_back_tilemap_yscroll = 0;
+int system16_bootleg_fore_tilemap_yscroll = 0;
+int system16_bootleg_text_tilemap_yscroll = 0;
+int system16_bootleg_sprite_xoffs = 0;
+
+/* A config table for per-game offsets and bank types */
+struct system15_bootleg_config
+{
+ const char *name; /* game driver name */
+ int spritebank_type;
+ int back_tilemap_yscroll;
+ int fore_tilemap_yscroll;
+ int text_tilemap_yscroll;
+ int sprite_xoffs;
+};
+
+
+static const struct system15_bootleg_config config_table[] =
+{
+ /* 16A bootlegs */
+ { "shinobld", 1, 0,0,0, 117 },
+ { "passshtb", 1, 3,0,0, 117 },
+ { "passht4b", 1, 0,0,0, 117 },
+ { "wb3bbl", 1, 2,2,0, 117 },
+
+ /* 16B bootlegs */
+ { "bayrouteb1", 0, 0,0,0, 107 },
+ { "bayrouteb2", 0, 0,0,0, 107 },
+ { "goldnaxeb1", 1, 0,0,0, 121 },
+ { "goldnaxeb2", 1, 0,0,0, 121 },
+ { "tturfbl", 0, 0,0,0, 107 },
+ { "dduxbl", 0, 0,0,0, 112 },
+ { "eswatbl", 1, 0,0,0, 124 },
+ { "fpointbl", 0, 2,2,0, 107 },
+ { "fpointbj", 0, 2,2,0, 107 },
+ { "tetrisbl", 0, 0,0,0, 112 },
+
+ /* 18 bootlegs */
+ { "astormbl", 1, 0,0,0, 107 },
+ { "astormb2", 1, 0,0,0, 107 },
+ { "mwalkbl", 1, 0,0,0, 107 },
+ { "shdancbl", 1, 0,0,0, 107 },
+
+ /* Tetris-based hardware */
+ { "beautyb", 0, 0,0,0, 112 },
+ { "iqpipe", 0, 0,0,0, 112 },
+
+
+
+ { NULL, 0 } // end of table
+};
+
+
+
+
+void setup_system16_bootleg_video(running_machine* machine)
+{
+ const char *gamename = machine->gamedrv->name;
+ const struct system15_bootleg_config *k = &config_table[0];
+ int found = 0;
+ while (k->name)
+ {
+ if (strcmp(k->name, gamename) == 0)
+ {
+ system16_bootleg_spritebank_type = k->spritebank_type;
+ system16_bootleg_back_tilemap_yscroll = k->back_tilemap_yscroll;
+ system16_bootleg_fore_tilemap_yscroll = k->fore_tilemap_yscroll;
+ system16_bootleg_text_tilemap_yscroll = k->text_tilemap_yscroll;
+ system16_bootleg_sprite_xoffs = k->sprite_xoffs;
+ found = 1;
+ break;
+ }
+ ++k;
+ }
+
+ if (!found) fatalerror("system16 bootleg not in system15_bootleg_config config_table[]!\n");
+}
+
+void setup_system16_bootleg_spritebanking(running_machine* machine)
+{
+
+ if (system16_bootleg_spritebank_type == 1)
+ {
+ static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+ int i;
+ for (i = 0; i < 16; i++)
+ segaic16_sprites_set_bank(machine, 0, i, default_banklist[i]);
+ }
+ else
+ {
+ static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 };
+ int i;
+ for (i = 0; i < 16; i++)
+ segaic16_sprites_set_bank(machine, 0, i, alternate_banklist[i]);
+
+ }
+
+}
UINT16* system16a_bootleg_bg0_tileram;
@@ -45,7 +146,7 @@ int sys16_MaxShadowColors;
/* video driver constants (potentially different for each game) */
int sys16_gr_bitmap_width;
-int (*sys16_spritesystem)( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
+
const int *sys16_obj_bank;
int sys16_sprxoffset;
int sys16_bgxoffset;
@@ -166,254 +267,6 @@ static TILE_GET_INFO( get_system16b_bootleg_tile_info1 )
/***************************************************************************/
-/*
- We mark the priority buffer as follows:
- text (0xf)
- fg (hi) (0x7)
- fg (lo) (0x3)
- bg (hi) (0x1)
- bg (lo) (0x0)
-
- Each sprite has 4 levels of priority, specifying where they are placed between bg(lo) and text.
-*/
-
-static void draw_sprite(running_machine *machine,
- bitmap_t *bitmap,
- const rectangle *cliprect,
- const UINT8 *addr, int pitch,
- pen_t pen_base,
- int x0, int y0, int screen_width, int screen_height,
- int width, int height,
- int flipx, int flipy,
- int priority,
- int shadow,
- int shadow_pen, int eos )
-{
- pen_t shadow_pen_base = machine->gfx[0]->color_base + (machine->config->total_colors/2);
- const UINT8 *source;
- int full_shadow=shadow&SYS16_SPR_SHADOW;
- int partial_shadow=shadow&SYS16_SPR_PARTIAL_SHADOW;
- int shadow_mask=(machine->config->total_colors/2)-1;
- int sx, x, xcount;
- int sy, y, ycount = 0;
- int dx,dy;
- UINT16 *dest;
- UINT8 *pri;
- unsigned pen, data;
-
- priority = 1<<priority;
-
- if( flipy ){
- dy = -1;
- y0 += screen_height-1;
- }
- else {
- dy = 1;
- }
-
- if( flipx ){
- dx = -1;
- x0 += screen_width-1;
- }
- else {
- dx = 1;
- }
-
- if (!eos)
- {
- sy = y0;
- for( y=height; y; y-- ){
- ycount += screen_height;
- while( ycount>=height ){
- if( sy>=cliprect->min_y && sy<=cliprect->max_y ){
- source = addr;
- dest = BITMAP_ADDR16(bitmap, sy, 0);
- pri = BITMAP_ADDR8(priority_bitmap, sy, 0);
- sx = x0;
- xcount = 0;
- for( x=width; x; x-=2 ){
- data = (unsigned)*source++; /* next 2 pixels */
- pen = data>>4;
- xcount += screen_width;
- while( xcount>=width )
- {
- if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x ){
- if(!(pri[sx]&priority)){
- if (full_shadow)
- dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
- else if (partial_shadow && pen==shadow_pen)
- dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
- else
- dest[sx] = pen_base + pen;
- }
- }
- xcount -= width;
- sx+=dx;
- }
- pen = data&0xf;
- xcount += screen_width;
- while( xcount>=width )
- {
- if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x ){
- if(!(pri[sx]&priority)){
- if (full_shadow)
- dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
- else if (partial_shadow && pen==shadow_pen)
- dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
- else
- dest[sx] = pen_base + pen;
- }
- }
- xcount -= width;
- sx+=dx;
- }
- }
- }
- ycount -= height;
- sy+=dy;
- }
- addr += pitch;
- }
- }
- else
- {
- sy = y0;
- for( y=height; y; y-- ){
- ycount += screen_height;
- while( ycount>=height ){
- if( sy>=cliprect->min_y && sy<=cliprect->max_y ){
- source = addr;
- dest = BITMAP_ADDR16(bitmap, sy, 0);
- pri = BITMAP_ADDR8(priority_bitmap, sy, 0);
- sx = x0;
- xcount = 0;
- for( x=width; x; x-=2 ){
- data = (unsigned)*source++; /* next 2 pixels */
- pen = data>>4;
- if (pen==0xf) break;
- xcount += screen_width;
- while( xcount>=width )
- {
- if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x )
- if(!(pri[sx]&priority)) dest[sx] = pen_base + pen;
- xcount -= width;
- sx+=dx;
- }
- pen = data&0xf;
- xcount += screen_width;
- while( xcount>=width )
- {
- if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x )
- if(!(pri[sx]&priority)) dest[sx] = pen_base + pen;
- xcount -= width;
- sx+=dx;
- }
- }
- }
- ycount -= height;
- sy+=dy;
- }
- addr += pitch;
- }
- }
-}
-
-static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int b3d ) //*
-{
- pen_t pen_base = machine->gfx[0]->color_base;
- const UINT8 *base_gfx = memory_region(machine, "gfx2");
- const int gfx_rom_size = memory_region_length(machine, "gfx2");
- const UINT16 *source = sys16_spriteram;
- struct sys16_sprite_attributes sprite;
- int xpos, ypos, screen_width, width, logical_height, pitch, flipy, flipx;
- int i, mod_h, mod_x, eos;
- unsigned gfx;
-
- memset(&sprite, 0x00, sizeof(sprite));
-
- for(i=0; i<num_sprites; i++)
- {
- sprite.flags = 0;
- if (sys16_spritesystem(&sprite, source, 0)) return; /* end-of-spritelist */
- source += 8;
-
- if( sprite.flags & SYS16_SPR_VISIBLE )
- {
- xpos = sprite.x;
- flipx = sprite.flags & SYS16_SPR_FLIPX;
- ypos = sprite.y;
- pitch = sprite.pitch;
- flipy = pitch & 0x80;
- width = pitch & 0x7f;
- if (pitch & 0x80) width = 0x80 - width;
- pitch = width << 1;
- width <<= 2;
- eos = 0;
-
- if( b3d ) // outrun/aburner
- {
- if (b3d == 2) eos = 1;
- if (xpos < 0 && flipx) continue;
- if (ypos >= 240) ypos -= 256;
- sprite.screen_height++;
- logical_height = (sprite.screen_height<<4)*sprite.zoomy/0x2000;
- screen_width = width*0x200/sprite.zoomx;
-
- if (flipx && flipy) { mod_h = -logical_height; mod_x = 4; }
- else if (flipx) { mod_h = -1; xpos++; mod_x = 4; }
- else if (flipy) { mod_h = -logical_height; mod_x = 0; }
- else { mod_h = 0; mod_x = 0; }
-
- if( sprite.flags & SYS16_SPR_DRAW_TO_TOP )
- {
- ypos -= sprite.screen_height;
- flipy = !flipy;
- }
-
- if( sprite.flags & SYS16_SPR_DRAW_TO_LEFT )
- {
- xpos -= screen_width;
- flipx = !flipx;
- }
- }
- else
- {
- if (!width) { width = 512; eos = 1; } // used by fantasy zone for laser
- screen_width = width;
- logical_height = sprite.screen_height;
-
- if (sprite.zoomy) logical_height = logical_height*(0x400 + sprite.zoomy)/0x400 - 1;
- if (sprite.zoomx) screen_width = screen_width*(0x800 - sprite.zoomx)/0x800 + 2;
-
-// fix, 5-bit zoom field
-// if (sprite.zoomy) logical_height = logical_height*(0x20 + sprite.zoomy)/0x20 - 1;
-// if (sprite.zoomx) screen_width = screen_width*(0x40 - sprite.zoomx)/0x40 + 2;
-
- if (flipx && flipy) { mod_h = -logical_height-1; mod_x = 2; }
- else if (flipx) { mod_h = 0; mod_x = 2; }
- else if (flipy) { mod_h = -logical_height; mod_x = 0; }
- else { mod_h = 1; mod_x = 0; }
- }
-
- gfx = sprite.gfx + pitch * mod_h + mod_x;
- if (gfx >= gfx_rom_size) gfx %= gfx_rom_size;
-
- gfx &= 0x1fffff; // temp kludge to stop line of fire crashing
-
- draw_sprite(machine,
- bitmap,cliprect,
- base_gfx + gfx, pitch,
- pen_base + (sprite.color<<4),
- xpos, ypos, screen_width, sprite.screen_height,
- width, logical_height,
- flipx, flipy,
- sprite.priority,
- sprite.flags,
- sprite.shadow_pen, eos);
- }
- }
-}
-
/***************************************************************************/
static TILEMAP_MAPPER( sys16_bg_map )
@@ -458,6 +311,7 @@ static const int resistances_normal[6] = {3900, 2000, 1000, 1000/2, 1000/4, 0};
static const int resistances_sh[6] = {3900, 2000, 1000, 1000/2, 1000/4, 470};
static double weights[2][3][6];
+#if 0
WRITE16_HANDLER( sys16_paletteram_w )
{
UINT16 newword;
@@ -504,7 +358,7 @@ WRITE16_HANDLER( sys16_paletteram_w )
palette_set_color( space->machine, offset+space->machine->config->total_colors/2,MAKE_RGB(rs,gs,bs));
}
}
-
+#endif
static void update_page( void ){
int all_dirty = 0;
@@ -564,39 +418,11 @@ static TILE_GET_INFO( get_bg_tile_info ){
int data = source[tile_index%(64*32)];
int tile_number = (data&0xfff) + 0x1000*((data&sys16_tilebank_switch)?sys16_tile_bank1:sys16_tile_bank0);
- if (!shinobl_kludge)
- {
- SET_TILE_INFO(
- 0,
- tile_number,
- (data>>6)&0x7f,
- 0);
- }
- else
- {
- SET_TILE_INFO(
- 0,
- tile_number,
- (data>>5)&0x7f,
- 0);
- }
-
- switch(sys16_bg_priority_mode) {
- case 1: // Alien Syndrome
- tileinfo->category = (data&0x8000)?1:0;
- break;
- case 2: // Body Slam / wrestwar
- tileinfo->category = ((data&0xff00) >= sys16_bg_priority_value)?1:0;
- break;
- case 3: // sys18 games
- if( data&0x8000 ){
- tileinfo->category = 2;
- }
- else {
- tileinfo->category = ((data&0xff00) >= sys16_bg_priority_value)?1:0;
- }
- break;
- }
+ SET_TILE_INFO(
+ 0,
+ tile_number,
+ (data>>6)&0x7f,
+ 0);
}
static TILE_GET_INFO( get_fg_tile_info ){
@@ -604,38 +430,11 @@ static TILE_GET_INFO( get_fg_tile_info ){
int data = source[tile_index%(64*32)];
int tile_number = (data&0xfff) + 0x1000*((data&sys16_tilebank_switch)?sys16_tile_bank1:sys16_tile_bank0);
- if (!shinobl_kludge)
- {
- SET_TILE_INFO(
- 0,
- tile_number,
- (data>>6)&0x7f,
- 0);
- }
- else
- {
- SET_TILE_INFO(
- 0,
- tile_number,
- (data>>5)&0x7f,
- 0);
- }
-
- switch(sys16_fg_priority_mode){
- case 1: // alien syndrome
- tileinfo->category = (data&0x8000)?1:0;
- break;
-
- case 3:
- tileinfo->category = ((data&0xff00) >= sys16_fg_priority_value)?1:0;
- break;
-
- default:
- if( sys16_fg_priority_mode>=0 ){
- tileinfo->category = (data&0x8000)?1:0;
- }
- break;
- }
+ SET_TILE_INFO(
+ 0,
+ tile_number,
+ (data>>6)&0x7f,
+ 0);
}
static TILE_GET_INFO( get_bg2_tile_info ){
@@ -648,8 +447,6 @@ static TILE_GET_INFO( get_bg2_tile_info ){
tile_number,
(data>>6)&0x7f,
0);
-
- tileinfo->category = 0;
}
static TILE_GET_INFO( get_fg2_tile_info ){
@@ -662,9 +459,6 @@ static TILE_GET_INFO( get_fg2_tile_info ){
tile_number,
(data>>6)&0x7f,
0);
-
- if((data&0xff00) >= sys16_fg_priority_value) tileinfo->category = 1;
- else tileinfo->category = 0;
}
WRITE16_HANDLER( sys16_tileram_w ){
@@ -735,15 +529,9 @@ WRITE16_HANDLER( sys16_textram_w ){
/***************************************************************************/
-VIDEO_START( system16 ){
- static const int bank_default[16] = {
- 0x0,0x1,0x2,0x3,
- 0x4,0x5,0x6,0x7,
- 0x8,0x9,0xa,0xb,
- 0xc,0xd,0xe,0xf
- };
- if (!sys16_obj_bank)
- sys16_obj_bank = bank_default;
+VIDEO_START( system16 )
+{
+ setup_system16_bootleg_video(machine);
/* Normal colors */
compute_resistor_weights(0, 255, -1.0,
@@ -807,9 +595,7 @@ VIDEO_START( system16 ){
sys16_refreshenable = 1;
/* common defaults */
- sys16_spritesystem = sys16_sprite_shinobi;
- if (!sys16_sprxoffset)
- sys16_sprxoffset = -0xb8;
+
sys16_bgxoffset = 0;
sys16_bg_priority_mode=0;
sys16_fg_priority_mode=0;
@@ -823,10 +609,18 @@ VIDEO_START( system16 ){
sys16_18_mode=0;
}
+
+ segaic16_palette_init(0x800);
+ segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16B, 0x400,system16_bootleg_sprite_xoffs);
+ setup_system16_bootleg_spritebanking(machine);
+
+
}
VIDEO_START( system18old )
{
+ VIDEO_START_CALL(system16);
+
sys16_bg1_trans=1;
background2 = tilemap_create(machine,
@@ -843,7 +637,6 @@ VIDEO_START( system18old )
8,8,
64*2,32*2 );
- VIDEO_START_CALL(system16);
tilemap_set_transparent_pen( foreground2, 0 );
@@ -866,6 +659,8 @@ VIDEO_START( system18old )
sys16_fg_priority_mode=3;
sys16_bg_priority_value=0x1800;
sys16_fg_priority_value=0x2000;
+
+
}
@@ -972,6 +767,8 @@ WRITE16_HANDLER( system16a_bootleg_tilemapselect_w )
VIDEO_START( system16a_bootleg )
{
+ setup_system16_bootleg_video(machine);
+
/* Normal colors */
compute_resistor_weights(0, 255, -1.0,
6, resistances_normal, weights[0][0], 0, 0,
@@ -997,8 +794,30 @@ VIDEO_START( system16a_bootleg )
tilemap_set_transparent_pen( system16a_bootleg_text_tilemap, 0 );
tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[0], 0 );
tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[1], 0 );
+
+ segaic16_palette_init(0x800);
+
+}
+VIDEO_START( system16a_bootleg_wb3bl )
+{
+ VIDEO_START_CALL(system16a_bootleg);
+ segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL, 0x400, system16_bootleg_sprite_xoffs);
+ setup_system16_bootleg_spritebanking(machine);
+}
+VIDEO_START( system16a_bootleg_shinobi )
+{
+ VIDEO_START_CALL(system16a_bootleg);
+ segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD, 0x400, system16_bootleg_sprite_xoffs);
+ setup_system16_bootleg_spritebanking(machine);
+}
+
+VIDEO_START( system16a_bootleg_passsht )
+{
+ VIDEO_START_CALL(system16a_bootleg);
+ segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL, 0x400, system16_bootleg_sprite_xoffs);
+ setup_system16_bootleg_spritebanking(machine);
}
// Passing Shot (2 player), Shinobi (Datsu), Wonderboy 3
@@ -1027,26 +846,35 @@ VIDEO_UPDATE( system16a_bootleg )
if ((system16a_bootleg_tilemapselect&0xff) == 0x12)
{
tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrollx+offset_bg1x );
- tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y );
+ tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y+system16_bootleg_back_tilemap_yscroll );
tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrollx+offset_bg0x );
- tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y );
+ tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y+system16_bootleg_fore_tilemap_yscroll );
tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0 );
tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], 0, 0 );
+
+ tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, system16_bootleg_text_tilemap_yscroll );
+
tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
}
else if ((system16a_bootleg_tilemapselect&0xff) == 0x21)
{
tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrollx+187 );
- tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrolly );
+ tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrolly+system16_bootleg_back_tilemap_yscroll );
tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrollx+187 );
- tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrolly+1 );
+ tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrolly+1+system16_bootleg_fore_tilemap_yscroll );
tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], TILEMAP_DRAW_OPAQUE, 0 );
tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], 0, 0 );
+
+ tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, system16_bootleg_text_tilemap_yscroll );
+
tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
}
+ /* draw the sprites */
+ segaic16_sprites_draw(screen, bitmap, cliprect, 0);
+
return 0;
}
@@ -1085,6 +913,9 @@ VIDEO_UPDATE( system16a_bootleg_passht4b )
tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
}
+ /* draw the sprites */
+ segaic16_sprites_draw(screen, bitmap, cliprect, 0);
+
return 0;
}
@@ -1103,38 +934,40 @@ VIDEO_UPDATE( system16 )
bitmap_fill(priority_bitmap,cliprect,0);
- // draw bg
- {
- tilemap_set_scrollx( background, 0, -320-sys16_bg_scrollx+sys16_bgxoffset );
- tilemap_set_scrolly( background, 0, -256+sys16_bg_scrolly );
+ tilemap_set_scrollx( background, 0, -320-sys16_bg_scrollx+sys16_bgxoffset );
+ tilemap_set_scrolly( background, 0, -256+sys16_bg_scrolly+system16_bootleg_back_tilemap_yscroll );
+ tilemap_set_scrollx( foreground, 0, -320-sys16_fg_scrollx+sys16_fgxoffset );
+ tilemap_set_scrolly( foreground, 0, -256+sys16_fg_scrolly+system16_bootleg_fore_tilemap_yscroll );
- tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0x00 );
+ tilemap_set_scrollx( text_layer, 0, 0 );
+ tilemap_set_scrolly( text_layer, 0, 0+system16_bootleg_text_tilemap_yscroll );
- if(sys16_bg_priority_mode)
- {
- tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0x00 );
- }
+ tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0x00 );
- if( sys16_bg_priority_mode==2 )
- {
- tilemap_draw( bitmap,cliprect, background, 1, 0x01 );// body slam (& wrestwar??)
- }
- else if ( sys16_bg_priority_mode==1 )
- {
- tilemap_draw( bitmap,cliprect, background, 1, 0x03 );// alien syndrome / aurail
- }
+ /* Background */
+
+ if(sys16_bg_priority_mode)
+ {
+ tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0x00 );
}
- // draw fg
+ if( sys16_bg_priority_mode==2 )
{
- tilemap_set_scrollx( foreground, 0, -320-sys16_fg_scrollx+sys16_fgxoffset );
- tilemap_set_scrolly( foreground, 0, -256+sys16_fg_scrolly );
-
- tilemap_draw( bitmap,cliprect, foreground, 0, 0x03 );
- tilemap_draw( bitmap,cliprect, foreground, 1, 0x07 );
+ tilemap_draw( bitmap,cliprect, background, 1, 0x01 );// body slam (& wrestwar??)
+ }
+ else if ( sys16_bg_priority_mode==1 )
+ {
+ tilemap_draw( bitmap,cliprect, background, 1, 0x03 );// alien syndrome / aurail
}
+ /* Foreground */
+
+ tilemap_draw( bitmap,cliprect, foreground, 0, 0x03 );
+ tilemap_draw( bitmap,cliprect, foreground, 1, 0x07 );
+
+ /* Text Layer */
+
if( sys16_textlayer_lo_max!=0 )
{
tilemap_draw( bitmap,cliprect, text_layer, 1, 7 );// needed for Body Slam
@@ -1142,7 +975,10 @@ VIDEO_UPDATE( system16 )
tilemap_draw( bitmap,cliprect, text_layer, 0, 0xf );
- draw_sprites(screen->machine, bitmap,cliprect,0 );
+ //draw_sprites(screen->machine, bitmap,cliprect,0 );
+
+ /* draw the sprites */
+ segaic16_sprites_draw(screen, bitmap, cliprect, 0);
return 0;
}
@@ -1186,6 +1022,8 @@ VIDEO_UPDATE( system18old )
tilemap_draw( bitmap,cliprect, text_layer, 1, 0x7 );
tilemap_draw( bitmap,cliprect, text_layer, 0, 0xf );
- draw_sprites(screen->machine, bitmap,cliprect, 0 );
+ /* draw the sprites */
+ segaic16_sprites_draw(screen, bitmap, cliprect, 0);
+
return 0;
}