legionna.cpp : Updates

Simplify handlers, Simplify gfxdecodes, Reduce unnecessary regions, Unnecessary lines, Duplicates, Fix tilemap dirty behavior when tilemap bank is changed, Fix spacings, Namings, Notes, Use shorter / Correct type values
This commit is contained in:
cam900 2019-05-08 10:43:37 +09:00
parent 16828b749a
commit c825e91773
3 changed files with 405 additions and 615 deletions

View File

@ -195,10 +195,10 @@ void legionna_state::legionna_map(address_map &map)
map(0x100744, 0x100745).portr("PLAYERS12");
map(0x100748, 0x100749).portr("PLAYERS34");
map(0x10074c, 0x10074d).portr("SYSTEM");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x104000, 0x104fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette"); /* palette xRRRRxGGGGxBBBBx ? */
map(0x105000, 0x105fff).ram().share("spriteram");
map(0x106000, 0x107fff).ram();
@ -221,10 +221,10 @@ void legionna_state::heatbrl_map(address_map &map)
map(0x1007c0, 0x1007df).lrw8("seibu_sound_rw",
[this](offs_t offset) { return m_seibu_sound->main_r(offset >> 1); },
[this](offs_t offset, u8 data) { m_seibu_sound->main_w(offset >> 1, data); }).umask16(0x00ff);
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x103000, 0x103fff).ram().share("spriteram");
map(0x104000, 0x104fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette");
map(0x108000, 0x11ffff).ram();
@ -235,7 +235,7 @@ void legionna_state::godzilla_map(address_map &map)
legionna_cop_map(map);
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x1003ff).ram();
map(0x100470, 0x100471).w(FUNC(legionna_state::denjinmk_setgfxbank));
map(0x100470, 0x100471).w(FUNC(legionna_state::heatbrl_setgfxbank));
map(0x100600, 0x10064f).rw(m_crtc, FUNC(seibu_crtc_device::read), FUNC(seibu_crtc_device::write));
map(0x100680, 0x100681).nopw(); // irq ack?
map(0x100700, 0x10071f).lrw8("seibu_sound_rw",
@ -246,10 +246,10 @@ void legionna_state::godzilla_map(address_map &map)
map(0x100748, 0x100749).portr("PLAYERS34");
map(0x10074c, 0x10074d).portr("SYSTEM");
map(0x100800, 0x100fff).ram();
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x104000, 0x104fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette");
map(0x105000, 0x105fff).ram().share("spriteram");
map(0x106000, 0x1067ff).ram();
@ -262,7 +262,7 @@ void legionna_state::godzilla_map(address_map &map)
// additional z80 i/o port, present only in Godzilla (512KB OKI ROM vs 256KB)
// Notice Denjin Makai has a 512KB OKI ROM too but latter half is empty
WRITE8_MEMBER(legionna_state::godzilla_oki_bank_w)
void legionna_state::godzilla_oki_bank_w(u8 data)
{
// bit 1 used, unknown purpose (always on?)
m_oki->set_rom_bank(data & 1);
@ -278,7 +278,7 @@ void legionna_state::godzilla_sound_io_map(address_map &map)
// Denjin Makai: Looks like they specifically swapped address line A1 in this range?
// Initially thought it was a palette DMA mode 4 but it doesn't apply for Godzilla, causing color bugs in the background tilemap.
WRITE16_MEMBER(legionna_state::palette_swap_w)
void legionna_state::palette_swap_w(offs_t offset, u16 data, u16 mem_mask)
{
offset^=1;
COMBINE_DATA(&m_swappal[offset]);
@ -300,10 +300,10 @@ void legionna_state::denjinmk_map(address_map &map)
map(0x10074c, 0x10074d).portr("SYSTEM");
map(0x10075c, 0x10075d).portr("DSW2");
map(0x100800, 0x100fff).ram();
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x102000, 0x1027ff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102800, 0x103fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x104000, 0x104fff).ram().w(FUNC(legionna_state::palette_swap_w)).share("swappal");
map(0x105000, 0x105fff).ram().share("spriteram");
map(0x106000, 0x107fff).ram();
@ -328,10 +328,10 @@ void legionna_state::grainbow_map(address_map &map)
map(0x100748, 0x100749).portr("PLAYERS34");
map(0x10074c, 0x10074d).portr("SYSTEM");
map(0x10075c, 0x10075d).portr("DSW2");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x103000, 0x103fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette");
map(0x104000, 0x104fff).ram(); // .w(FUNC(legionna_state::paletteram_xBBBBBGGGGGRRRRR_word_w)).share("paletteram");
map(0x105000, 0x105fff).ram();
@ -355,10 +355,10 @@ void legionna_state::cupsoc_map(address_map &map)
map(0x100748, 0x100749).portr("PLAYERS34");
map(0x10074c, 0x10074d).portr("SYSTEM");
map(0x10075c, 0x10075d).portr("DSW2");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x103000, 0x103fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette");
map(0x104000, 0x104fff).ram();
map(0x105000, 0x106fff).ram();
@ -391,10 +391,10 @@ void legionna_state::cupsocs_map(address_map &map)
map(0x100740, 0x10075f).lrw8("seibu_sound_rw",
[this](offs_t offset) { return m_seibu_sound->main_r(offset >> 1); },
[this](offs_t offset, u8 data) { m_seibu_sound->main_w(offset >> 1, data); }).umask16(0x00ff);
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::legionna_background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::legionna_foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::legionna_midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::legionna_text_w).share("textram");
map(0x100800, 0x100fff).ram(); // .w(FUNC(legionna_state::background_w)).share("back_data");
map(0x101000, 0x1017ff).ram(); // .w(FUNC(legionna_state::foreground_w).share("fore_data");
map(0x101800, 0x101fff).ram(); // .w(FUNC(legionna_state::midground_w).share("mid_data");
map(0x102000, 0x102fff).ram(); // .w(FUNC(legionna_state::text_w).share("textram");
map(0x103000, 0x103fff).ram(); // .w("palette", FUNC(palette_device::write)).share("palette");
map(0x104000, 0x104fff).ram();
map(0x105000, 0x106fff).ram();
@ -1082,27 +1082,26 @@ INPUT_PORTS_END
/*****************************************************************************/
static const gfx_layout legionna_new_charlayout =
static const gfx_layout charlayout =
{
8,8,
RGN_FRAC(1,1),
4,
{ 0, 4, 8, 12 },
{ 3, 2, 1, 0, 16+3, 16+2, 16+1, 16+0 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8
{ STEP4(0, 4) },
{ STEP4(3, -1), STEP4(4*4+3, -1) },
{ STEP8(0, 4*8) },
8*8*4
};
void legionna_state::descramble_legionnaire_gfx(uint8_t* src)
void legionna_state::descramble_legionnaire_gfx(u8* src)
{
int len = 0x10000;
/* rearrange gfx */
std::vector<uint8_t> buffer(len);
std::vector<u8> buffer(len);
{
int i;
for (i = 0;i < len; i++)
for (int i = 0; i < len; i++)
{
buffer[i] = src[bitswap<24>(i,
23,22,21,20,
@ -1114,84 +1113,33 @@ void legionna_state::descramble_legionnaire_gfx(uint8_t* src)
}
memcpy(src,&buffer[0],len);
}
}
static const gfx_layout legionna_tilelayout =
static const gfx_layout tilelayout =
{
16,16,
RGN_FRAC(1,1),
4,
{ 2*4, 3*4, 0*4, 1*4 },
{ 3, 2, 1, 0, 16+3, 16+2, 16+1, 16+0,
64*8+3, 64*8+2, 64*8+1, 64*8+0, 64*8+16+3, 64*8+16+2, 64*8+16+1, 64*8+16+0 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
128*8
{ STEP4(0, 4) },
{ STEP4(3, -1), STEP4(4*4+3, -1), STEP4(4*8*16+3, -1), STEP4(4*8*16+4*4+3, -1) },
{ STEP16(0, 4*8) },
16*16*4
};
static const gfx_layout legionna_tilelayout2 =
{
16,16,
RGN_FRAC(1,1),
4,
{ 0*4, 1*4, 2*4, 3*4 },
{ 3, 2, 1, 0, 16+3, 16+2, 16+1, 16+0,
64*8+3, 64*8+2, 64*8+1, 64*8+0, 64*8+16+3, 64*8+16+2, 64*8+16+1, 64*8+16+0 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
128*8
};
static const gfx_layout legionna_spritelayout =
{
16,16,
RGN_FRAC(1,1),
4,
{ 2*4, 3*4, 0*4, 1*4 },
{ 3, 2, 1, 0, 16+3, 16+2, 16+1, 16+0,
64*8+3, 64*8+2, 64*8+1, 64*8+0, 64*8+16+3, 64*8+16+2, 64*8+16+1, 64*8+16+0 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
128*8
};
static GFXDECODE_START( gfx_legionna )
GFXDECODE_ENTRY( "char", 0, legionna_new_charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "gfx3", 0, legionna_tilelayout, 0*16, 16 )
GFXDECODE_ENTRY( "gfx4", 0, legionna_tilelayout, 32*16, 16 )
GFXDECODE_ENTRY( "sprite", 0, legionna_spritelayout, 0*16, 8*16 )
GFXDECODE_ENTRY( "gfx5", 0, legionna_tilelayout2, 32*16, 16 )
GFXDECODE_ENTRY( "gfx6", 0, legionna_tilelayout, 16*16, 16 )
static GFXDECODE_START( gfx_legionna ) // Background and Midground has shared ROM
GFXDECODE_ENTRY( "sprite", 0, tilelayout, 64*16, 64 )
GFXDECODE_ENTRY( "char", 0, charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "back", 0, tilelayout, 0, 32 )
GFXDECODE_ENTRY( "fore", 0, tilelayout, 32*16, 16 )
GFXDECODE_END
static GFXDECODE_START( gfx_heatbrl )
GFXDECODE_ENTRY( "char", 0, legionna_new_charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "gfx3", 0, legionna_tilelayout, 0*16, 16 )
GFXDECODE_ENTRY( "gfx4", 0, legionna_tilelayout, 32*16, 16 ) /* unused */
GFXDECODE_ENTRY( "sprite", 0, legionna_spritelayout, 0*16, 8*16 )
GFXDECODE_ENTRY( "gfx5", 0, legionna_tilelayout, 32*16, 16 )
GFXDECODE_ENTRY( "gfx6", 0, legionna_tilelayout, 16*16, 16 )
GFXDECODE_END
static GFXDECODE_START( gfx_cupsoc )
GFXDECODE_ENTRY( "char", 0, legionna_new_charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "gfx3", 0, legionna_tilelayout, 0, 32 )
GFXDECODE_ENTRY( "gfx4", 0, legionna_tilelayout, 32*16, 16 ) /* unused */
GFXDECODE_ENTRY( "sprite", 0, legionna_spritelayout, 0*16, 8*16 )
GFXDECODE_ENTRY( "gfx5", 0, legionna_tilelayout, 32*16, 16 )
GFXDECODE_ENTRY( "gfx6", 0, legionna_tilelayout, 16*16, 16 )
GFXDECODE_END
static GFXDECODE_START( gfx_grainbow )
GFXDECODE_ENTRY( "char", 0, legionna_new_charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "gfx3", 0, legionna_tilelayout, 0*16, 16 )
GFXDECODE_ENTRY( "gfx4", 0, legionna_tilelayout, 32*16, 16 ) /* unused */
GFXDECODE_ENTRY( "sprite", 0, legionna_spritelayout, 0*16, 8*16 )
GFXDECODE_ENTRY( "gfx5", 0, legionna_tilelayout, 32*16, 16 )
GFXDECODE_ENTRY( "gfx6", 0, legionna_tilelayout, 16*16, 16 )
static GFXDECODE_START( gfx_heatbrl ) // Midground has independent ROM
GFXDECODE_ENTRY( "sprite", 0, tilelayout, 64*16, 64 )
GFXDECODE_ENTRY( "char", 0, charlayout, 48*16, 16 )
GFXDECODE_ENTRY( "back", 0, tilelayout, 0*16, 16 )
GFXDECODE_ENTRY( "fore", 0, tilelayout, 32*16, 16 )
GFXDECODE_ENTRY( "mid", 0, tilelayout, 16*16, 16 )
GFXDECODE_END
/*****************************************************************************/
@ -1335,7 +1283,7 @@ void legionna_state::godzilla(machine_config &config)
m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w));
m_crtc->layer_scroll_base_callback().set(FUNC(legionna_state::tile_scroll_base_w));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_heatbrl);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_legionna);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xBGR_555, 128*16);
MCFG_VIDEO_START_OVERRIDE(legionna_state,godzilla)
@ -1443,7 +1391,7 @@ void legionna_state::grainbow(machine_config &config)
m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w));
m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_grainbow);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_legionna);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xBGR_555, 128*16);
MCFG_VIDEO_START_OVERRIDE(legionna_state,grainbow)
@ -1497,7 +1445,7 @@ void legionna_state::cupsoc(machine_config &config)
m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w));
m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cupsoc);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_legionna);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xBGR_555, 128*16);
MCFG_VIDEO_START_OVERRIDE(legionna_state,cupsoc)
@ -1554,24 +1502,15 @@ ROM_START( legionna )
ROM_REGION( 0x010000, "char", 0 ) /* FG Tiles */
ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
ROM_REGION( 0x010000, "gfx5", 0 ) /* BK3 */
ROM_REGION( 0x010000, "fore", 0 ) /* BK3 */
ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_LOAD16_WORD_SWAP( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD16_WORD_SWAP( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_REGION( 0x100000, "user2", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_REGION( 0x80000, "gfx3", 0 ) /* MBK */
ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
/* Not Used */
ROM_REGION( 0x80000, "gfx6", 0 ) /* LBK */
ROM_COPY( "user2", 0x080000, 0x000000, 0x78000 )
ROM_REGION( 0x100000, "back", 0 ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_LOAD16_WORD_SWAP( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "5.u106", 0x00000, 0x20000, CRC(21d09bde) SHA1(8dce5011e083706ac7b57c5aee4b79d30fa8d4cb) )
@ -1602,24 +1541,15 @@ ROM_START( legionnaj )
ROM_REGION( 0x010000, "char", 0 ) /* FG Tiles */
ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
ROM_REGION( 0x010000, "gfx5", 0 ) /* BK3 */
ROM_REGION( 0x010000, "fore", 0 ) /* BK3 */
ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_LOAD16_WORD_SWAP( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD16_WORD_SWAP( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_REGION( 0x100000, "user2", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_REGION( 0x80000, "gfx3", 0 ) /* MBK */
ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
/* Not Used */
ROM_REGION( 0x80000, "gfx6", 0 ) /* LBK */
ROM_COPY( "user2", 0x080000, 0x000000, 0x78000 )
ROM_REGION( 0x100000, "back", 0 ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_LOAD16_WORD_SWAP( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "5.u106", 0x00000, 0x20000, CRC(21d09bde) SHA1(8dce5011e083706ac7b57c5aee4b79d30fa8d4cb) )
@ -1650,24 +1580,15 @@ ROM_START( legionnau )
ROM_REGION( 0x010000, "char", 0 ) /* FG Tiles */
ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
ROM_REGION( 0x010000, "gfx5", 0 ) /* BK3 */
ROM_REGION( 0x010000, "fore", 0 ) /* BK3 */
ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_LOAD16_WORD_SWAP( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
ROM_LOAD16_WORD_SWAP( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
ROM_REGION( 0x100000, "user2", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_REGION( 0x80000, "gfx3", 0 ) /* MBK */
ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
/* Not Used */
ROM_REGION( 0x80000, "gfx6", 0 ) /* LBK */
ROM_COPY( "user2", 0x080000, 0x000000, 0x78000 )
ROM_REGION( 0x100000, "back", 0 ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_LOAD16_WORD_SWAP( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "5.u106", 0x00000, 0x20000, CRC(21d09bde) SHA1(8dce5011e083706ac7b57c5aee4b79d30fa8d4cb) )
@ -1696,20 +1617,17 @@ ROM_START( heatbrl )
ROM_LOAD16_BYTE( "barrel_5.u072", 0x000001, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) )
ROM_REGION( 0x200000, "sprite", 0 ) /* sprites */
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", 0 ) /* not used? */
ROM_COPY( "char", 0x010000, 0x000000, 0x010000 ) // this is just corrupt tiles if we decode it
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -1738,20 +1656,17 @@ ROM_START( heatbrl2 )
ROM_LOAD16_BYTE( "barrel_5.u072", 0x000001, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) )
ROM_REGION( 0x200000, "sprite", 0 ) /* sprites */
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", 0 ) /* not used? */
ROM_COPY( "char", 0x010000, 0x000000, 0x010000 ) // this is just corrupt tiles if we decode it
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -1780,20 +1695,17 @@ ROM_START( heatbrl3 ) // only the maincpu and audiocpu ROMs were provided for th
ROM_LOAD16_BYTE( "barrel_5.u072.5v", 0x000001, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) )
ROM_REGION( 0x200000, "sprite", 0 ) /* sprites */
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", 0 ) /* not used? */
ROM_COPY( "char", 0x010000, 0x000000, 0x010000 ) // this is just corrupt tiles if we decode it
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -1827,19 +1739,17 @@ barrel1,2,3,4.OBJ
barrel1,2,3,4.BG */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -1868,19 +1778,17 @@ ROM_START( heatbrlu )
ROM_LOAD16_BYTE( "barrel_5.u072", 0x000001, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -1913,20 +1821,17 @@ ROM_START( heatbrle )
ROM_LOAD16_BYTE( "barrel_5.u072", 0x000001, 0x10000, CRC(5604d155) SHA1(afc30347b1e1316ec25056c0c1576f78be5f1a72) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj1.u085", 0x000000, 0x100000, CRC(f7a7c31c) SHA1(683e5c7a0732ff5fd56167dd82035ca050de0507) )
ROM_LOAD16_WORD_SWAP( "heated-barrel_obj2.u0814", 0x100000, 0x100000, CRC(24236116) SHA1(b27bd771cacd1587d4927e3f489c4f54b5dec110) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-1.u075", 0x000000, 0x100000, CRC(2f5d8baa) SHA1(0bf687c46c603150eadb304adcd78d53a338e615) )
ROM_REGION( 0x020000, "gfx4", 0 ) /* not used? */
ROM_COPY( "char", 0x010000, 0x000000, 0x010000 ) // this is just corrupt tiles if we decode it
ROM_REGION( 0x080000, "mid", 0 ) /* LBK tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_LOAD( "heated-barrel_bg-2.u074", 0x000000, 0x080000, CRC(77ee4c6f) SHA1(a0072331bc970ba448ac5bb1ae5caa0332c82a99) )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "heated-barrel_bg-3.u076", 0x000000, 0x080000, CRC(83850e2d) SHA1(cdc2df8e3bc58319c50768ea2a05b9c7ddc2a652) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "barrel_8.u106", 0x00000, 0x20000, CRC(489e5b1d) SHA1(ecd69d87ed354d1d08dbe6c2890af5f05d9d67d0) )
@ -2006,21 +1911,16 @@ ROM_START( godzilla )
ROM_LOAD16_BYTE( "10.615", 0x000001, 0x010000, CRC(9c22bc13) SHA1(a94d9ed63ee1f5e358ebcaf517e6a1c986fa5d96) )
ROM_REGION( 0x800000, "sprite", ROMREGION_ERASE00 )
ROM_LOAD( "obj1.748", 0x000000, 0x200000, CRC(0dfaf26d) SHA1(2af3ea06369c40ae89c2f8362c273f4801db8e68) )
ROM_LOAD( "obj2.756", 0x200000, 0x200000, CRC(32b1516a) SHA1(4adcf4b957f6b9baf1a5b8807b381db664de632d) )
ROM_LOAD( "obj3.743", 0x400000, 0x100000, CRC(5af0114e) SHA1(9362de9ade6db67ab0e3a2dfea580e688bbf7729) )
ROM_LOAD( "obj4.757", 0x500000, 0x100000, CRC(7448b054) SHA1(5c08319329eb8c90b63e5393c0011bc39911ebbb) )
ROM_LOAD16_WORD_SWAP( "obj1.748", 0x000000, 0x200000, CRC(0dfaf26d) SHA1(2af3ea06369c40ae89c2f8362c273f4801db8e68) )
ROM_LOAD16_WORD_SWAP( "obj2.756", 0x200000, 0x200000, CRC(32b1516a) SHA1(4adcf4b957f6b9baf1a5b8807b381db664de632d) )
ROM_LOAD16_WORD_SWAP( "obj3.743", 0x400000, 0x100000, CRC(5af0114e) SHA1(9362de9ade6db67ab0e3a2dfea580e688bbf7729) )
ROM_LOAD16_WORD_SWAP( "obj4.757", 0x500000, 0x100000, CRC(7448b054) SHA1(5c08319329eb8c90b63e5393c0011bc39911ebbb) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "bg1.618", 0x000000, 0x100000, CRC(78fbbb84) SHA1(b1f5d4041bb88c5b2a561949239b11c3fd7c5fbc) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "bg1.618", 0x000000, 0x100000, CRC(78fbbb84) SHA1(b1f5d4041bb88c5b2a561949239b11c3fd7c5fbc) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x100000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "bg2.619", 0x000000, 0x100000, CRC(8ac192a5) SHA1(54b557e81a704c70a651e6b8da70207a2a70530f) )
ROM_REGION( 0x100000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx3", 0x80000, 0x00000, 0x080000 )
ROM_REGION( 0x100000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "bg2.619", 0x000000, 0x100000, CRC(8ac192a5) SHA1(54b557e81a704c70a651e6b8da70207a2a70530f) ) // 1xxxxxxxxxxxxxxxxxxx = 0xff filled
ROM_REGION( 0x080000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "pcm.922", 0x000000, 0x080000, CRC(59cbef10) SHA1(6b89b7286f80f9c903dfb81dc93a03c38dff707c) )
@ -2124,22 +2024,19 @@ ROM_START( denjinmk )
ROM_LOAD16_BYTE( "rom8.615", 0x000001, 0x010000, CRC(cc36af0d) SHA1(69c2ae38f03be79be4d138fcc73a6a86407eb285) )
ROM_REGION( 0x500000, "sprite", 0 )
ROM_LOAD( "obj-0-3.748", 0x000000, 0x200000, CRC(67c26a67) SHA1(20543ca9dcf3fed0884968b5249b34b59a14b791) ) /* banks 0,1,2,3 */
ROM_LOAD( "obj-4-5.756", 0x200000, 0x100000, CRC(01f8d4e6) SHA1(25b69da693be8c3404f750b419c330a7a56e88ec) ) /* 4,5 */
ROM_LOAD( "obj-6-7.743", 0x300000, 0x100000, CRC(e5805757) SHA1(9d392c27eef7c1fcda560dac17ba9d7ae2287ac8) ) /* 6,7 */
ROM_LOAD( "obj-8-9.757", 0x400000, 0x100000, CRC(c8f7e1c9) SHA1(a746d187b50a0ecdd5a7f687a2601e5dc8bfe272) ) /* 8,9 */
ROM_LOAD16_WORD_SWAP( "obj-0-3.748", 0x000000, 0x200000, CRC(67c26a67) SHA1(20543ca9dcf3fed0884968b5249b34b59a14b791) ) /* banks 0,1,2,3 */
ROM_LOAD16_WORD_SWAP( "obj-4-5.756", 0x200000, 0x100000, CRC(01f8d4e6) SHA1(25b69da693be8c3404f750b419c330a7a56e88ec) ) /* 4,5 */
ROM_LOAD16_WORD_SWAP( "obj-6-7.743", 0x300000, 0x100000, CRC(e5805757) SHA1(9d392c27eef7c1fcda560dac17ba9d7ae2287ac8) ) /* 6,7 */
ROM_LOAD16_WORD_SWAP( "obj-8-9.757", 0x400000, 0x100000, CRC(c8f7e1c9) SHA1(a746d187b50a0ecdd5a7f687a2601e5dc8bfe272) ) /* 8,9 */
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "bg-1-ab.618", 0x000000, 0x100000, CRC(eaad151a) SHA1(bdd1d83ee8497efe20f21baf873e786446372bcb) )
ROM_REGION( 0x100000, "back", 0 ) /* MBK tiles */
ROM_LOAD16_WORD_SWAP( "bg-1-ab.618", 0x000000, 0x100000, CRC(eaad151a) SHA1(bdd1d83ee8497efe20f21baf873e786446372bcb) )
ROM_REGION( 0x100000, "gfx4", 0 ) /* BK2 used */
ROM_LOAD( "bg-2-ab.617", 0x000000, 0x100000, CRC(40938f74) SHA1(d68b0f8245a8b390ad5d4e6ebc7514a939b8ac51) )
ROM_REGION( 0x100000, "mid", 0 ) /* BK2 used (or LBK; just identification string differs?) */
ROM_LOAD16_WORD_SWAP( "bg-2-ab.617", 0x000000, 0x100000, CRC(40938f74) SHA1(d68b0f8245a8b390ad5d4e6ebc7514a939b8ac51) )
ROM_REGION( 0x100000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "bg-3-ab.619", 0x000000, 0x100000, CRC(de7366ee) SHA1(0c3969d15f3cd963e579d4164b6e0a6b4012c9c6) )
ROM_REGION( 0x100000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx4", 0x000000, 0x00000, 0x100000 )
ROM_REGION( 0x100000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "bg-3-ab.619", 0x000000, 0x100000, CRC(de7366ee) SHA1(0c3969d15f3cd963e579d4164b6e0a6b4012c9c6) )
ROM_REGION( 0x080000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "rom6.922", 0x000000, 0x040000, CRC(09e13213) SHA1(9500e057104c6b83da0467938e46d9efa2f49f4c) )
@ -2220,20 +2117,14 @@ ROM_START( grainbow )
ROM_LOAD16_BYTE( "rb-f2.615", 0x000001, 0x010000, CRC(a30e0903) SHA1(b9e7646da1ccab6dadaca6beda08125b34946653) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "rb-spr01.748", 0x000000, 0x100000, CRC(11a3479d) SHA1(4d2d06d62da02c6e9884735de8c319f37ca1715c) )
ROM_LOAD( "rb-spr23.756", 0x100000, 0x100000, CRC(fd08a761) SHA1(3297a2bfaabef17ed9320e24e9a4ffa2f3eb3a44) )
ROM_LOAD16_WORD_SWAP( "rb-spr01.748", 0x000000, 0x100000, CRC(11a3479d) SHA1(4d2d06d62da02c6e9884735de8c319f37ca1715c) )
ROM_LOAD16_WORD_SWAP( "rb-spr23.756", 0x100000, 0x100000, CRC(fd08a761) SHA1(3297a2bfaabef17ed9320e24e9a4ffa2f3eb3a44) )
ROM_REGION( 0x100000, "gfx3", 0 )
ROM_LOAD( "rb-bg-01.618", 0x000000, 0x100000, CRC(6a4ca7e7) SHA1(13612d29f8f04cf62b4357b69b81240dd1eceae4) )
ROM_REGION( 0x100000, "back", 0 )
ROM_LOAD16_WORD_SWAP( "rb-bg-01.618", 0x000000, 0x100000, CRC(6a4ca7e7) SHA1(13612d29f8f04cf62b4357b69b81240dd1eceae4) )
ROM_REGION( 0x040000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x100000, "gfx5", 0 )
ROM_LOAD( "rb-bg-2.619", 0x000000, 0x100000, CRC(a9b5c85e) SHA1(0ae044e05730e8080d94f1f6758f8dd051b03c41) )
ROM_REGION( 0x100000, "gfx6", 0 )
//#define ROM_COPY(rgn,srcoffset,offset,length)
ROM_COPY( "gfx3", 0x80000, 0x00000, 0x80000 )
ROM_REGION( 0x100000, "fore", 0 )
ROM_LOAD16_WORD_SWAP( "rb-bg-2.619", 0x000000, 0x100000, CRC(a9b5c85e) SHA1(0ae044e05730e8080d94f1f6758f8dd051b03c41) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "rb-ad.922", 0x000000, 0x020000, CRC(a364cb42) SHA1(c527b39a1627ecee20a2c4df4cf2b5f2ba729081) )
@ -2260,20 +2151,14 @@ ROM_START( grainbowk )
ROM_LOAD16_BYTE( "rb-f2.615", 0x000001, 0x010000, CRC(a30e0903) SHA1(b9e7646da1ccab6dadaca6beda08125b34946653) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "rb-spr01.748", 0x000000, 0x100000, CRC(11a3479d) SHA1(4d2d06d62da02c6e9884735de8c319f37ca1715c) )
ROM_LOAD( "rb-spr23.756", 0x100000, 0x100000, CRC(fd08a761) SHA1(3297a2bfaabef17ed9320e24e9a4ffa2f3eb3a44) )
ROM_LOAD16_WORD_SWAP( "rb-spr01.748", 0x000000, 0x100000, CRC(11a3479d) SHA1(4d2d06d62da02c6e9884735de8c319f37ca1715c) )
ROM_LOAD16_WORD_SWAP( "rb-spr23.756", 0x100000, 0x100000, CRC(fd08a761) SHA1(3297a2bfaabef17ed9320e24e9a4ffa2f3eb3a44) )
ROM_REGION( 0x100000, "gfx3", 0 )
ROM_LOAD( "rb-bg-01.618", 0x000000, 0x100000, CRC(6a4ca7e7) SHA1(13612d29f8f04cf62b4357b69b81240dd1eceae4) )
ROM_REGION( 0x100000, "back", 0 )
ROM_LOAD16_WORD_SWAP( "rb-bg-01.618", 0x000000, 0x100000, CRC(6a4ca7e7) SHA1(13612d29f8f04cf62b4357b69b81240dd1eceae4) )
ROM_REGION( 0x040000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x100000, "gfx5", 0 )
ROM_LOAD( "rb-bg-2.619", 0x000000, 0x100000, CRC(a9b5c85e) SHA1(0ae044e05730e8080d94f1f6758f8dd051b03c41) )
ROM_REGION( 0x100000, "gfx6", 0 )
//#define ROM_COPY(rgn,srcoffset,offset,length)
ROM_COPY( "gfx3", 0x80000, 0x00000, 0x80000 )
ROM_REGION( 0x100000, "fore", 0 )
ROM_LOAD16_WORD_SWAP( "rb-bg-2.619", 0x000000, 0x100000, CRC(a9b5c85e) SHA1(0ae044e05730e8080d94f1f6758f8dd051b03c41) )
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "rb-ad.922", 0x000000, 0x020000, CRC(a364cb42) SHA1(c527b39a1627ecee20a2c4df4cf2b5f2ba729081) )
@ -2299,18 +2184,13 @@ ROM_START( cupsoc )
ROM_LOAD16_BYTE( "scc_05.bin", 0x000001, 0x010000, CRC(c0358503) SHA1(e87991c6a6f3e060a1b03b4899fa891510fca15f) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2339,18 +2219,13 @@ ROM_START( cupsoca )
ROM_LOAD16_BYTE( "soca_5.bin", 0x000001, 0x010000, CRC(73a3e024) SHA1(aeb359dd2dc9eb96330f494c44123bab3f5986a4) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2379,18 +2254,13 @@ ROM_START( cupsocb )
ROM_LOAD16_BYTE( "soca_5.bin", 0x000001, 0x010000, CRC(73a3e024) SHA1(aeb359dd2dc9eb96330f494c44123bab3f5986a4) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2419,18 +2289,13 @@ ROM_START( cupsocs )
ROM_LOAD16_BYTE( "5_7y.bin", 0x000001, 0x010000, CRC(26cbfaf0) SHA1(1ba7bc1cecb4bd06ba5c2d3eaa9c9e38e2106cd2) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "8_7a.bin", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2461,18 +2326,13 @@ ROM_START( cupsocs2 )
ROM_LOAD16_BYTE( "seibu5.7y", 0x000001, 0x010000, CRC(955d9fd7) SHA1(782451e8e85f7ba285d6cacd9d3fdcf48bde60bc) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2501,18 +2361,13 @@ ROM_START( olysoc92 )
ROM_LOAD16_BYTE( "seibu5.7y", 0x000001, 0x010000, CRC(955d9fd7) SHA1(782451e8e85f7ba285d6cacd9d3fdcf48bde60bc) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2541,18 +2396,13 @@ ROM_START( olysoc92a )
ROM_LOAD16_BYTE( "5_7y.bin", 0x000001, 0x010000, CRC(26cbfaf0) SHA1(1ba7bc1cecb4bd06ba5c2d3eaa9c9e38e2106cd2) )
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2582,18 +2432,13 @@ ROM_START( olysoc92b )
ROM_LOAD16_BYTE( "5", 0x000001, 0x010000, CRC(ec21c8dc) SHA1(93a9bf13d7c53e76762307c028f427ff2888629c) ) // sldh
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_LOAD16_WORD_SWAP( "obj.8c", 0x000000, 0x100000, CRC(e2377895) SHA1(1d1c7f31a08a464139cdaf383a5e1ade0717dc9f) )
ROM_REGION( 0x100000, "gfx3", 0 ) /* MBK tiles */
ROM_LOAD( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x100000, "back", 0 ) /* 2 sets of tiles ('MBK','LBK') */
ROM_LOAD16_WORD_SWAP( "back-1.4y", 0x000000, 0x100000, CRC(3dfea0ec) SHA1(8f41d267e488e07831946ef898d593897f10bfe2) )
ROM_REGION( 0x020000, "gfx4", ROMREGION_ERASEFF ) /* not used */
ROM_REGION( 0x080000, "gfx5", 0 ) /* BK3 tiles */
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
ROM_COPY( "gfx5", 0x000000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "fore", 0 ) /* BK3 tiles */
ROM_LOAD16_WORD_SWAP( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "8", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@ -2629,7 +2474,7 @@ ROM_END
void legionna_state::init_cupsoc_debug()
{
#if CUPSOC_DEBUG_MODE
uint16_t *ROM = (uint16_t *)memregion("maincpu")->base();
u16 *ROM = (u16 *)memregion("maincpu")->base();
ROM[0xffffa/2] = 0x0000;
ROM[0xffff6/2] ^= 0x00ff;
#endif
@ -2637,7 +2482,7 @@ void legionna_state::init_cupsoc_debug()
void legionna_state::init_olysoc92()
{
uint16_t *ROM = (uint16_t *)memregion("maincpu")->base();
u16 *ROM = (u16 *)memregion("maincpu")->base();
ROM[0xffffe/2] ^= 0x0003; // show Olympic Soccer '92 title
init_cupsoc_debug();
@ -2645,7 +2490,7 @@ void legionna_state::init_olysoc92()
void legionna_state::init_cupsocs()
{
uint16_t *ROM = (uint16_t *)memregion("maincpu")->base();
u16 *ROM = (u16 *)memregion("maincpu")->base();
ROM[0xffffa/2] = 0x00ff; // disable debug text (this is already 0x00ff in the bootleg sets for the same reason)
init_cupsoc_debug();
@ -2660,12 +2505,12 @@ void legionna_state::init_cupsoc()
void legionna_state::init_legiongfx()
{
descramble_legionnaire_gfx(memregion("gfx5")->base() );
descramble_legionnaire_gfx(memregion("fore")->base() );
}
void legionna_state::init_godzilla()
{
uint16_t *ROM = (uint16_t *)memregion("maincpu")->base();
u16 *ROM = (u16 *)memregion("maincpu")->base();
// TODO: some game elements don't collide properly, @see seibucop.cpp
ROM[(0xbe0e + 0x0a)/2] = 0xb000;
ROM[(0xbe0e + 0x1a)/2] = 0xb800;

View File

@ -12,6 +12,8 @@
#include "video/seibu_crtc.h"
#include "emupal.h"
#include <algorithm>
class legionna_state : public driver_device, public seibu_sound_common
{
public:
@ -32,7 +34,7 @@ public:
, m_crtc(*this, "crtc")
, m_raiden2cop(*this, "raiden2cop")
{
memset(scrollvals, 0, sizeof(uint16_t)*6);
std::fill(std::begin(m_scrollvals), std::end(m_scrollvals), 0);
}
void cupsocs(machine_config &config);
@ -51,52 +53,49 @@ public:
void init_olysoc92();
private:
required_shared_ptr<uint16_t> m_spriteram;
optional_shared_ptr<uint16_t> m_swappal;
std::unique_ptr<uint16_t[]> m_back_data;
std::unique_ptr<uint16_t[]> m_fore_data;
std::unique_ptr<uint16_t[]> m_mid_data;
std::unique_ptr<uint16_t[]> m_textram;
std::unique_ptr<uint16_t[]> m_scrollram16;
std::unique_ptr<uint16_t[]> m_paletteram;
uint16_t m_layer_disable;
std::unique_ptr<uint16_t[]> m_layer_config;
required_shared_ptr<u16> m_spriteram;
optional_shared_ptr<u16> m_swappal;
std::unique_ptr<u16[]> m_back_data;
std::unique_ptr<u16[]> m_fore_data;
std::unique_ptr<u16[]> m_mid_data;
std::unique_ptr<u16[]> m_textram;
std::unique_ptr<u16[]> m_scrollram16;
std::unique_ptr<u16[]> m_paletteram;
u16 m_layer_disable;
std::unique_ptr<u16[]> m_layer_config;
int m_sprite_xoffs;
int m_sprite_yoffs;
tilemap_t *m_background_layer;
tilemap_t *m_foreground_layer;
tilemap_t *m_midground_layer;
tilemap_t *m_text_layer;
int m_has_extended_banking;
int m_has_extended_priority;
uint16_t m_sprite_pri_mask[4];
uint16_t m_back_gfx_bank;
uint16_t m_fore_gfx_bank;
uint16_t m_mid_gfx_bank;
uint16_t scrollvals[6];
DECLARE_WRITE16_MEMBER(tilemap_enable_w);
DECLARE_WRITE16_MEMBER(tile_scroll_w);
DECLARE_WRITE16_MEMBER(tile_scroll_base_w);
DECLARE_WRITE16_MEMBER(tile_vreg_1a_w);
DECLARE_WRITE16_MEMBER(videowrite_cb_w);
DECLARE_WRITE16_MEMBER(wordswapram_w);
DECLARE_WRITE16_MEMBER(legionna_background_w);
DECLARE_WRITE16_MEMBER(legionna_midground_w);
DECLARE_WRITE16_MEMBER(legionna_foreground_w);
DECLARE_WRITE16_MEMBER(legionna_text_w);
bool m_has_extended_banking;
bool m_has_extended_priority;
u16 m_sprite_pri_mask[4];
u16 m_back_gfx_bank;
u16 m_fore_gfx_bank;
u16 m_mid_gfx_bank;
u16 m_scrollvals[6];
void tilemap_enable_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void tile_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void tile_scroll_base_w(offs_t offset, u16 data);
void tile_vreg_1a_w(u16 data);
void videowrite_cb_w(offs_t offset, u16 data);
void background_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void midground_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void foreground_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void text_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u8 denjinmk_sound_comms_r(offs_t offset);
DECLARE_WRITE8_MEMBER(godzilla_oki_bank_w);
DECLARE_WRITE16_MEMBER(denjinmk_setgfxbank);
DECLARE_WRITE16_MEMBER(heatbrl_setgfxbank);
DECLARE_WRITE16_MEMBER(grainbow_layer_config_w);
DECLARE_WRITE16_MEMBER(palette_swap_w);
void godzilla_oki_bank_w(u8 data);
void denjinmk_setgfxbank(u16 data);
void heatbrl_setgfxbank(u16 data);
void grainbow_layer_config_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void palette_swap_w(offs_t offset, u16 data, u16 mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_back_tile_info);
TILE_GET_INFO_MEMBER(get_mid_tile_info);
TILE_GET_INFO_MEMBER(get_mid_tile_info_denji);
TILE_GET_INFO_MEMBER(get_mid_tile_info_cupsoc);
TILE_GET_INFO_MEMBER(get_mid_tile_info_split);
TILE_GET_INFO_MEMBER(get_mid_tile_info_share_bgrom);
TILE_GET_INFO_MEMBER(get_fore_tile_info);
TILE_GET_INFO_MEMBER(get_fore_tile_info_denji);
TILE_GET_INFO_MEMBER(get_text_tile_info);
DECLARE_VIDEO_START(legionna);
DECLARE_VIDEO_START(heatbrl);
@ -104,13 +103,13 @@ private:
DECLARE_VIDEO_START(denjinmk);
DECLARE_VIDEO_START(grainbow);
DECLARE_VIDEO_START(cupsoc);
uint32_t screen_update_legionna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_heatbrl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_godzilla(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_grainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_legionna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_heatbrl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_godzilla(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_grainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
void descramble_legionnaire_gfx(uint8_t* src);
void common_video_start();
void descramble_legionnaire_gfx(u8* src);
void common_video_start(bool split, bool has_extended_banking, bool has_extended_priority);
void common_video_allocate_ptr();
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;

View File

@ -26,115 +26,133 @@
/******************************************************************************/
WRITE16_MEMBER(legionna_state::tilemap_enable_w)
void legionna_state::tilemap_enable_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_layer_disable);
}
WRITE16_MEMBER(legionna_state::tile_scroll_w)
void legionna_state::tile_scroll_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(scrollvals + offset);
data = scrollvals[offset];
COMBINE_DATA(m_scrollvals + offset);
data = m_scrollvals[offset];
tilemap_t *tm = nullptr;
switch(offset/2) {
switch (offset/2)
{
case 0: tm = m_background_layer; break;
case 1: tm = m_midground_layer; break;
case 2: tm = m_foreground_layer; break;
}
if(offset & 1)
if (offset & 1)
tm->set_scrolly(0, data);
else
tm->set_scrollx(0, data);
}
WRITE16_MEMBER(legionna_state::tile_vreg_1a_w)
void legionna_state::tile_vreg_1a_w(u16 data)
{
flip_screen_set(data & 1);
// TODO: other bits ...
}
WRITE16_MEMBER(legionna_state::tile_scroll_base_w)
void legionna_state::tile_scroll_base_w(offs_t offset, u16 data)
{
// TODO: specific for Godzilla, needs visible area changes.
if(offset == 7)
if (offset == 7)
m_text_layer->set_scrolldy(0x1ef - data,0x1ef - data);
//printf("%02x %04x\n",offset,data);
}
WRITE16_MEMBER(legionna_state::heatbrl_setgfxbank)
void legionna_state::heatbrl_setgfxbank(u16 data)
{
m_back_gfx_bank = (data &0x4000) >> 2;
unsigned newbank = (data & 0x4000) >> 2;
if (m_back_gfx_bank != newbank)
{
m_back_gfx_bank = newbank;
m_background_layer->mark_all_dirty();
}
}
/*xxx- --- ---- ---- banking*/
WRITE16_MEMBER(legionna_state::denjinmk_setgfxbank)
void legionna_state::denjinmk_setgfxbank(u16 data)
{
m_fore_gfx_bank = (data &0x2000) >> 1;//???
m_back_gfx_bank = (data &0x4000) >> 2;
m_mid_gfx_bank = (data &0x8000) >> 3;//???
unsigned newbank = (data & 0x2000) >> 1;//???
if (m_fore_gfx_bank != newbank)
{
m_fore_gfx_bank = newbank;
m_foreground_layer->mark_all_dirty();
}
m_background_layer->mark_all_dirty();
m_foreground_layer->mark_all_dirty();
m_midground_layer->mark_all_dirty();
m_text_layer->mark_all_dirty();
newbank = (data & 0x4000) >> 2;
if (m_back_gfx_bank != newbank)
{
m_back_gfx_bank = newbank;
m_background_layer->mark_all_dirty();
}
newbank = (data & 0x8000) >> 3;//???
if (m_mid_gfx_bank != newbank)
{
m_mid_gfx_bank = newbank;
m_midground_layer->mark_all_dirty();
}
}
WRITE16_MEMBER(legionna_state::videowrite_cb_w)
void legionna_state::videowrite_cb_w(offs_t offset, u16 data)
{
// AM_RANGE(0x101000, 0x1017ff) AM_RAM // _WRITE(legionna_background_w) AM_SHARE("back_data")
// AM_RANGE(0x101800, 0x101fff) AM_RAM // _WRITE(legionna_foreground_w) AM_SHARE("fore_data")
// AM_RANGE(0x102000, 0x1027ff) AM_RAM // _WRITE(legionna_midground_w) AM_SHARE("mid_data")
// AM_RANGE(0x102800, 0x1037ff) AM_RAM // _WRITE(legionna_text_w) AM_SHARE("textram")
// AM_RANGE(0x101000, 0x1017ff) AM_RAM // _WRITE(background_w) AM_SHARE("back_data")
// AM_RANGE(0x101800, 0x101fff) AM_RAM // _WRITE(foreground_w) AM_SHARE("fore_data")
// AM_RANGE(0x102000, 0x1027ff) AM_RAM // _WRITE(midground_w) AM_SHARE("mid_data")
// AM_RANGE(0x102800, 0x1037ff) AM_RAM // _WRITE(text_w) AM_SHARE("textram")
if (offset < 0x800 / 2)
{
legionna_background_w(space, offset, data, 0xffff);
background_w(offset, data);
}
else if (offset < 0x1000 /2)
{
offset -= 0x800 / 2;
legionna_foreground_w(space, offset, data, 0xffff);
foreground_w(offset, data);
}
else if (offset < 0x1800/2)
{
offset -= 0x1000 / 2;
legionna_midground_w(space, offset, data, 0xffff);
midground_w(offset, data);
}
else if (offset < 0x2800/2)
{
offset -= 0x1800 / 2;
legionna_text_w(space, offset, data, 0xffff);
text_w(offset, data);
}
}
// TODO: move to COP device
WRITE16_MEMBER(legionna_state::grainbow_layer_config_w)
void legionna_state::grainbow_layer_config_w(offs_t offset, u16 data, u16 mem_mask)
{
// (0x8000|0x1ff), 0x200, 0x1ff, 0x200 written in sequence at startup
COMBINE_DATA(&m_layer_config[offset]);
}
WRITE16_MEMBER(legionna_state::legionna_background_w)
void legionna_state::background_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_back_data[offset]);
m_background_layer->mark_tile_dirty(offset);
}
WRITE16_MEMBER(legionna_state::legionna_midground_w)
void legionna_state::midground_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_mid_data[offset]);
m_midground_layer->mark_tile_dirty(offset);
}
WRITE16_MEMBER(legionna_state::legionna_foreground_w)
void legionna_state::foreground_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_fore_data[offset]);
m_foreground_layer->mark_tile_dirty(offset);
}
WRITE16_MEMBER(legionna_state::legionna_text_w)
void legionna_state::text_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_textram[offset]);
m_text_layer->mark_tile_dirty(offset);
@ -142,89 +160,43 @@ WRITE16_MEMBER(legionna_state::legionna_text_w)
TILE_GET_INFO_MEMBER(legionna_state::get_back_tile_info)
{
int tile=m_back_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
tile |= m_back_gfx_bank; /* Heatbrl uses banking */
SET_TILE_INFO_MEMBER(1,tile,color,0);
const u16 tile = m_back_data[tile_index];
SET_TILE_INFO_MEMBER(2, (tile & 0xfff) | m_back_gfx_bank, (tile >> 12) & 0xf, 0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_mid_tile_info)
TILE_GET_INFO_MEMBER(legionna_state::get_mid_tile_info_split)
{
int tile=m_mid_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
SET_TILE_INFO_MEMBER(5,tile,color,0);
const u16 tile = m_mid_data[tile_index];
SET_TILE_INFO_MEMBER(4, (tile & 0xfff) | m_mid_gfx_bank, (tile >> 12) & 0xf, 0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_mid_tile_info_denji)
TILE_GET_INFO_MEMBER(legionna_state::get_mid_tile_info_share_bgrom)
{
int tile=m_mid_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
tile |= m_mid_gfx_bank;
SET_TILE_INFO_MEMBER(5,tile,color,0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_mid_tile_info_cupsoc)
{
int tile=m_mid_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
tile |= 0x1000;
color += 0x10;
SET_TILE_INFO_MEMBER(1,tile,color,0);
const u16 tile = m_mid_data[tile_index];
SET_TILE_INFO_MEMBER(2, (tile & 0xfff) | 0x1000, ((tile >> 12) & 0xf) | 0x10, 0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_fore_tile_info)
{
int tile=m_fore_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
SET_TILE_INFO_MEMBER(4,tile,color,0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_fore_tile_info_denji)
{
int tile=m_fore_data[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
tile |= m_fore_gfx_bank;
SET_TILE_INFO_MEMBER(4,tile,color,0);
const u16 tile = m_fore_data[tile_index];
SET_TILE_INFO_MEMBER(3, (tile & 0xfff) | m_fore_gfx_bank, (tile >> 12) & 0xf, 0);
}
TILE_GET_INFO_MEMBER(legionna_state::get_text_tile_info)
{
int tile = m_textram[tile_index];
int color=(tile>>12)&0xf;
tile &= 0xfff;
SET_TILE_INFO_MEMBER(0,tile,color,0);
const u16 tile = m_textram[tile_index];
SET_TILE_INFO_MEMBER(1, tile & 0xfff, (tile >> 12) & 0xf, 0);
}
void legionna_state::common_video_allocate_ptr()
{
m_back_data = make_unique_clear<uint16_t[]>(0x800/2);
m_fore_data = make_unique_clear<uint16_t[]>(0x800/2);
m_mid_data = make_unique_clear<uint16_t[]>(0x800/2);
m_textram = make_unique_clear<uint16_t[]>(0x1000/2);
m_scrollram16 = std::make_unique<uint16_t[]>(0x60/2);
m_paletteram = make_unique_clear<uint16_t[]>(0x1000/2);
m_palette->basemem().set(m_paletteram.get(), 0x1000/2 * sizeof(uint16_t), 16, ENDIANNESS_BIG, 2);
m_back_data = make_unique_clear<u16[]>(0x800/2);
m_fore_data = make_unique_clear<u16[]>(0x800/2);
m_mid_data = make_unique_clear<u16[]>(0x800/2);
m_textram = make_unique_clear<u16[]>(0x1000/2);
m_scrollram16 = std::make_unique<u16[]>(0x60/2);
m_paletteram = make_unique_clear<u16[]>(0x1000/2);
m_palette->basemem().set(m_paletteram.get(), 0x1000/2 * sizeof(u16), 16, ENDIANNESS_BIG, 2);
m_sprite_xoffs = 0;
m_sprite_yoffs = 0;
@ -242,17 +214,24 @@ void legionna_state::common_video_allocate_ptr()
save_item(NAME(m_layer_disable));
}
void legionna_state::common_video_start()
void legionna_state::common_video_start(bool split, bool has_extended_banking, bool has_extended_priority)
{
common_video_allocate_ptr();
m_background_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_back_tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_midground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_mid_tile_info),this), TILEMAP_SCAN_ROWS,16,16,32,32);
m_foreground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_fore_tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_text_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_text_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,64,32);
m_background_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_back_tile_info),this), TILEMAP_SCAN_ROWS,16,16,32,32);
if (split)
{
m_midground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_mid_tile_info_split),this), TILEMAP_SCAN_ROWS,16,16,32,32);
}
else
{
m_midground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_mid_tile_info_share_bgrom),this), TILEMAP_SCAN_ROWS,16,16,32,32);
}
m_foreground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_fore_tile_info),this), TILEMAP_SCAN_ROWS,16,16,32,32);
m_text_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_text_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8,64,32);
m_has_extended_banking = 0;
m_has_extended_priority = 0;
m_has_extended_banking = has_extended_banking;
m_has_extended_priority = has_extended_priority;
m_background_layer->set_transparent_pen(15);
m_midground_layer->set_transparent_pen(15);
@ -262,7 +241,7 @@ void legionna_state::common_video_start()
VIDEO_START_MEMBER(legionna_state,legionna)
{
common_video_start();
common_video_start(false, false, false);
m_sprite_pri_mask[0] = 0x0000;
m_sprite_pri_mask[1] = 0xfff0;
@ -272,7 +251,7 @@ VIDEO_START_MEMBER(legionna_state,legionna)
VIDEO_START_MEMBER(legionna_state,heatbrl)
{
common_video_start();
common_video_start(true, false, false);
m_sprite_pri_mask[0] = 0xfff0;
m_sprite_pri_mask[1] = 0xfffc;
@ -283,10 +262,7 @@ VIDEO_START_MEMBER(legionna_state,heatbrl)
VIDEO_START_MEMBER(legionna_state,godzilla)
{
VIDEO_START_CALL_MEMBER(legionna);
m_has_extended_banking = 1;
m_has_extended_priority = 0;
common_video_start(false, true, false);
m_sprite_pri_mask[0] = 0xfff0;
m_sprite_pri_mask[1] = 0xfffc;
@ -297,54 +273,27 @@ VIDEO_START_MEMBER(legionna_state,godzilla)
VIDEO_START_MEMBER(legionna_state,denjinmk)
{
common_video_allocate_ptr();
m_background_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_back_tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_midground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_mid_tile_info_denji),this), TILEMAP_SCAN_ROWS,16,16,32,32);
m_foreground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_fore_tile_info_denji),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_text_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_text_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,64,32);
m_has_extended_banking = 1;
m_has_extended_priority = 0;
common_video_start(true, true, false);
m_sprite_pri_mask[0] = 0xfff0; // normal sprites
m_sprite_pri_mask[1] = 0xfffc; // luna park horse rides
m_sprite_pri_mask[2] = 0xfffe; // door at the end of sewers part in level 1
m_sprite_pri_mask[3] = 0x0000; // briefing guy in pre-stage and portraits before a boss fight
m_background_layer->set_transparent_pen(15);
m_midground_layer->set_transparent_pen(15);
m_foreground_layer->set_transparent_pen(15);
m_text_layer->set_transparent_pen(7);//?
}
VIDEO_START_MEMBER(legionna_state,cupsoc)
{
common_video_allocate_ptr();
m_background_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_back_tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_midground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_mid_tile_info_cupsoc),this), TILEMAP_SCAN_ROWS,16,16,32,32);
m_foreground_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_fore_tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
m_text_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(legionna_state::get_text_tile_info),this),TILEMAP_SCAN_ROWS, 8,8,64,32);
m_has_extended_banking = 0;
m_has_extended_priority = 1;
m_background_layer->set_transparent_pen(15);
m_midground_layer->set_transparent_pen(15);
m_foreground_layer->set_transparent_pen(15);
m_text_layer->set_transparent_pen(15);
common_video_start(false, false, true);
}
VIDEO_START_MEMBER(legionna_state,grainbow)
{
VIDEO_START_CALL_MEMBER(legionna);
common_video_start(false, false, true);
m_sprite_xoffs = m_sprite_yoffs = 16;
m_has_extended_banking = 0;
m_has_extended_priority = 1;
m_layer_config = std::make_unique<uint16_t[]>(0x8/2);
m_layer_config = std::make_unique<u16[]>(0x8/2);
}
/*************************************************************************
@ -375,23 +324,21 @@ VIDEO_START_MEMBER(legionna_state,grainbow)
void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect)
{
uint16_t *spriteram16 = m_spriteram;
int offs,fx,fy,x,y,color,sprite,cur_pri;
int dx,dy,ax,ay;
int pri_mask;
u16 *spriteram16 = m_spriteram;
for (offs = 0;offs < 0x400;offs += 4)
for (int offs = 0; offs < 0x400; offs += 4)
{
uint16_t data = spriteram16[offs];
if (!(data &0x8000)) continue;
const u16 data = spriteram16[offs];
if (!(data & 0x8000)) continue;
pri_mask = 0;
u8 cur_pri = 0;
int pri_mask = 0;
if (m_has_extended_priority)
{
cur_pri = (spriteram16[offs+1] & 0xc000) >> 14;
if(data & 0x0040)
if (data & 0x0040)
{
cur_pri |= 0x4; // definitely seems to be needed by grainbow
}
@ -424,44 +371,44 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
cur_pri = (spriteram16[offs+1] & 0xc000) >> 14;
pri_mask = m_sprite_pri_mask[cur_pri];
#if 0
static uint8_t pri_test;
static u8 pri_test;
if(machine().input().code_pressed_once(KEYCODE_A))
if (machine().input().code_pressed_once(KEYCODE_A))
pri_test++;
if(machine().input().code_pressed_once(KEYCODE_S))
if (machine().input().code_pressed_once(KEYCODE_S))
pri_test--;
pri_test&=3;
popmessage("%02x",pri_test);
// quick and dirty priority tester
if(cur_pri == pri_test)
if (cur_pri == pri_test)
{
static uint16_t test = 0xffff;
static u16 test = 0xffff;
if(machine().input().code_pressed_once(KEYCODE_Q))
if (machine().input().code_pressed_once(KEYCODE_Q))
test^=1;
if(machine().input().code_pressed_once(KEYCODE_W))
if (machine().input().code_pressed_once(KEYCODE_W))
test^=2;
if(machine().input().code_pressed_once(KEYCODE_E))
if (machine().input().code_pressed_once(KEYCODE_E))
test^=4;
if(machine().input().code_pressed_once(KEYCODE_R))
if (machine().input().code_pressed_once(KEYCODE_R))
test^=8;
if(machine().input().code_pressed_once(KEYCODE_T))
if (machine().input().code_pressed_once(KEYCODE_T))
test^=0x10;
if(machine().input().code_pressed_once(KEYCODE_Y))
if (machine().input().code_pressed_once(KEYCODE_Y))
test^=0x20;
if(machine().input().code_pressed_once(KEYCODE_U))
if (machine().input().code_pressed_once(KEYCODE_U))
test^=0x40;
if(machine().input().code_pressed_once(KEYCODE_I))
if (machine().input().code_pressed_once(KEYCODE_I))
test^=0x80;
pri_mask = 0xffff & test;
@ -472,61 +419,60 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
#endif
}
sprite = spriteram16[offs+1];
u32 sprite = spriteram16[offs+1];
sprite &= 0x3fff;
if (m_has_extended_banking)
{
if(data & 0x0040)
if (data & 0x0040)
{
sprite |= 0x4000;//tile banking,used in Denjin Makai
}
if(spriteram16[offs+3] & 0x8000)
if (spriteram16[offs+3] & 0x8000)
{
sprite |= 0x8000;//tile banking?,used in Denjin Makai
}
}
y = spriteram16[offs+3];
x = spriteram16[offs+2];
int y = spriteram16[offs+3];
int x = spriteram16[offs+2];
/* heated barrel hardware seems to need 0x1ff with 0x100 sign bit for sprite wrap,
this doesn't work on denjin makai as the visible area is larger */
if (cliprect.max_x<(320-1))
{
x&=0x1ff;
y&=0x1ff;
x &= 0x1ff;
y &= 0x1ff;
if (x&0x100) x-=0x200;
if (y&0x100) y-=0x200;
if (x & 0x100) x -= 0x200;
if (y & 0x100) y -= 0x200;
}
else
{
x&=0xfff;
y&=0xfff;
x &= 0xfff;
y &= 0xfff;
if (x&0x800) x-=0x1000;
if (y&0x800) y-=0x1000;
if (x & 0x800) x -= 0x1000;
if (y & 0x800) y -= 0x1000;
}
color = (data &0x3f) + 0x40;
fx = (data &0x4000) >> 14;
fy = (data &0x2000) >> 13;
dy = ((data &0x0380) >> 7) + 1;
dx = ((data &0x1c00) >> 10) + 1;
const u32 color = (data & 0x003f);
const u8 fx = (data & 0x4000) >> 14;
const u8 fy = (data & 0x2000) >> 13;
const u8 dy = ((data & 0x0380) >> 7) + 1;
const u8 dx = ((data & 0x1c00) >> 10) + 1;
if (!fx)
{
if(!fy)
if (!fy)
{
for (ax=0; ax<dx; ax++)
for (ay=0; ay<dy; ay++)
for (int ax = 0; ax < dx; ax++)
for (int ay = 0; ay < dy; ay++)
{
m_gfxdecode->gfx(3)->prio_transpen(bitmap,cliprect,
m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
sprite++,
color,fx,fy,(x+ax*16)+m_sprite_xoffs,y+ay*16+m_sprite_yoffs,
screen.priority(),pri_mask, 15);
@ -534,10 +480,10 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
}
else
{
for (ax=0; ax<dx; ax++)
for (ay=0; ay<dy; ay++)
for (int ax = 0; ax < dx; ax++)
for (int ay = 0; ay < dy; ay++)
{
m_gfxdecode->gfx(3)->prio_transpen(bitmap,cliprect,
m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
sprite++,
color,fx,fy,(x+ax*16)+m_sprite_xoffs,y+(dy-ay-1)*16+m_sprite_yoffs,
screen.priority(),pri_mask,15);
@ -546,12 +492,12 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
}
else
{
if(!fy)
if (!fy)
{
for (ax=0; ax<dx; ax++)
for (ay=0; ay<dy; ay++)
for (int ax = 0; ax < dx; ax++)
for (int ay = 0; ay < dy; ay++)
{
m_gfxdecode->gfx(3)->prio_transpen(bitmap,cliprect,
m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
sprite++,
color,fx,fy,(x+(dx-ax-1)*16)+m_sprite_xoffs,y+ay*16+m_sprite_yoffs,
screen.priority(),pri_mask,15);
@ -559,10 +505,10 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
}
else
{
for (ax=0; ax<dx; ax++)
for (ay=0; ay<dy; ay++)
for (int ax = 0; ax < dx; ax++)
for (int ay = 0; ay < dy; ay++)
{
m_gfxdecode->gfx(3)->prio_transpen(bitmap,cliprect,
m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
sprite++,
color,fx,fy,(x+(dx-ax-1)*16)+m_sprite_xoffs,y+(dy-ay-1)*16+m_sprite_yoffs,
screen.priority(),pri_mask, 15);
@ -572,18 +518,18 @@ void legionna_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co
}
}
uint32_t legionna_state::screen_update_legionna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
u32 legionna_state::screen_update_legionna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* Setup the tilemaps */
screen.priority().fill(0, cliprect);
bitmap.fill(m_palette->black_pen(), cliprect); /* wrong color? */
if (!(m_layer_disable&0x0001)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable&0x0002)) m_background_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable&0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable&0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable & 0x0001)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable & 0x0002)) m_background_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable & 0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable & 0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable&0x0010))
if (!(m_layer_disable & 0x0010))
draw_sprites(screen,bitmap,cliprect);
//if (machine().input().code_pressed_once(KEYCODE_Z))
@ -592,19 +538,19 @@ uint32_t legionna_state::screen_update_legionna(screen_device &screen, bitmap_in
return 0;
}
uint32_t legionna_state::screen_update_heatbrl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
u32 legionna_state::screen_update_heatbrl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* Setup the tilemaps */
screen.priority().fill(0, cliprect);
bitmap.fill(m_palette->black_pen(), cliprect); /* wrong color? */
// TODO: priority order is different than anything else?
if (!(m_layer_disable&0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable&0x0002)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable&0x0001)) m_background_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable&0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable & 0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable & 0x0002)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable & 0x0001)) m_background_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable & 0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable&0x0010))
if (!(m_layer_disable & 0x0010))
draw_sprites(screen,bitmap,cliprect);
//if (machine().input().code_pressed_once(KEYCODE_Z))
@ -614,18 +560,18 @@ uint32_t legionna_state::screen_update_heatbrl(screen_device &screen, bitmap_ind
}
uint32_t legionna_state::screen_update_godzilla(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
u32 legionna_state::screen_update_godzilla(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
screen.priority().fill(0, cliprect);
// matches PCB recording for Denjin Makai, settable thru CRTC?
bitmap.fill(0xff, cliprect);
if (!(m_layer_disable&0x0001)) m_background_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable&0x0002)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable&0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable&0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable & 0x0001)) m_background_layer->draw(screen, bitmap, cliprect, 0, 0);
if (!(m_layer_disable & 0x0002)) m_midground_layer->draw(screen, bitmap, cliprect, 0, 1);
if (!(m_layer_disable & 0x0004)) m_foreground_layer->draw(screen, bitmap, cliprect, 0, 2);
if (!(m_layer_disable & 0x0008)) m_text_layer->draw(screen, bitmap, cliprect, 0, 4);
if (!(m_layer_disable&0x0010))
if (!(m_layer_disable & 0x0010))
draw_sprites(screen,bitmap,cliprect);
//if (machine().input().code_pressed_once(KEYCODE_Z))
@ -635,24 +581,24 @@ uint32_t legionna_state::screen_update_godzilla(screen_device &screen, bitmap_in
return 0;
}
uint32_t legionna_state::screen_update_grainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
u32 legionna_state::screen_update_grainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(m_palette->black_pen(), cliprect);
screen.priority().fill(0, cliprect);
if(!(m_layer_disable & 1))
if (!(m_layer_disable & 1))
m_background_layer->draw(screen, bitmap, cliprect, 0,1);
if(!(m_layer_disable & 2))
if (!(m_layer_disable & 2))
m_midground_layer->draw(screen, bitmap, cliprect, 0,2);
if(!(m_layer_disable & 4))
if (!(m_layer_disable & 4))
m_foreground_layer->draw(screen, bitmap, cliprect, 0,4);
if(!(m_layer_disable & 8))
if (!(m_layer_disable & 8))
m_text_layer->draw(screen, bitmap, cliprect, 0,8);
if (!(m_layer_disable&0x0010))
if (!(m_layer_disable & 0x0010))
draw_sprites(screen,bitmap,cliprect);
//if (machine().input().code_pressed_once(KEYCODE_Z))