mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
playmark.cpp, powerbal.cpp: preliminary minor cleanups in preparation of subclassing and adding of the new wbeachvl MCU dumps
This commit is contained in:
parent
b7529f790b
commit
f1a25bd8a2
4 changed files with 461 additions and 516 deletions
File diff suppressed because it is too large
Load diff
|
@ -47,19 +47,19 @@ protected:
|
|||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
int m_tilebank;
|
||||
int m_bg_yoffset;
|
||||
u8 m_tilebank;
|
||||
s8 m_bg_yoffset;
|
||||
|
||||
TILE_GET_INFO_MEMBER(powerbal_get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
DECLARE_VIDEO_START(powerbal);
|
||||
DECLARE_VIDEO_START(atombjt);
|
||||
uint32_t screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites_powerbal( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void magicstk_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void magicstk_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void tile_banking_w(uint16_t data);
|
||||
void atombjt_tile_banking_w(uint16_t data);
|
||||
void oki_banking(uint16_t data);
|
||||
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void magicstk_coin_eeprom_w(u8 data);
|
||||
void bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void tile_banking_w(u16 data);
|
||||
void atombjt_tile_banking_w(u16 data);
|
||||
void oki_banking(u16 data);
|
||||
void magicstk_main_map(address_map &map);
|
||||
void oki_map(address_map &map);
|
||||
void powerbal_main_map(address_map &map);
|
||||
|
@ -67,25 +67,22 @@ private:
|
|||
};
|
||||
|
||||
|
||||
void powerbal_state::magicstk_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void powerbal_state::magicstk_coin_eeprom_w(u8 data)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x20);
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x20);
|
||||
|
||||
m_eeprom->cs_write((data & 8) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->di_write((data & 2) >> 1);
|
||||
m_eeprom->clk_write((data & 4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
m_eeprom->cs_write((data & 8) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_eeprom->di_write((data & 2) >> 1);
|
||||
m_eeprom->clk_write((data & 4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
void powerbal_state::magicstk_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void powerbal_state::bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram1[offset]);
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void powerbal_state::tile_banking_w(uint16_t data)
|
||||
void powerbal_state::tile_banking_w(u16 data)
|
||||
{
|
||||
if (((data >> 12) & 0x0f) != m_tilebank)
|
||||
{
|
||||
|
@ -94,7 +91,7 @@ void powerbal_state::tile_banking_w(uint16_t data)
|
|||
}
|
||||
}
|
||||
|
||||
void powerbal_state::atombjt_tile_banking_w(uint16_t data)
|
||||
void powerbal_state::atombjt_tile_banking_w(u16 data)
|
||||
{
|
||||
if ((data & 0x0f) != m_tilebank)
|
||||
{
|
||||
|
@ -103,7 +100,7 @@ void powerbal_state::atombjt_tile_banking_w(uint16_t data)
|
|||
}
|
||||
}
|
||||
|
||||
void powerbal_state::oki_banking(uint16_t data)
|
||||
void powerbal_state::oki_banking(u16 data)
|
||||
{
|
||||
int bank = data & 3;
|
||||
m_okibank->set_entry(bank & (m_oki_numbanks - 1));
|
||||
|
@ -116,10 +113,11 @@ void powerbal_state::magicstk_main_map(address_map &map)
|
|||
map(0x094000, 0x094001).nopw();
|
||||
map(0x094002, 0x094003).nopw();
|
||||
map(0x094004, 0x094005).w(FUNC(powerbal_state::tile_banking_w));
|
||||
map(0x098180, 0x09917f).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1");
|
||||
map(0x098180, 0x09917f).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1");
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
map(0x0c2014, 0x0c2015).portr("IN2").w(FUNC(powerbal_state::magicstk_coin_eeprom_w));
|
||||
map(0x0c2014, 0x0c2015).portr("IN2");
|
||||
map(0x0c2015, 0x0c2015).w(FUNC(powerbal_state::magicstk_coin_eeprom_w));
|
||||
map(0x0c2016, 0x0c2017).portr("DSW1");
|
||||
map(0x0c2018, 0x0c2019).portr("DSW2");
|
||||
map(0x0c201c, 0x0c201d).w(FUNC(powerbal_state::oki_banking));
|
||||
|
@ -136,7 +134,7 @@ void powerbal_state::powerbal_main_map(address_map &map)
|
|||
map(0x094000, 0x094001).nopw();
|
||||
map(0x094002, 0x094003).nopw();
|
||||
map(0x094004, 0x094005).w(FUNC(powerbal_state::tile_banking_w));
|
||||
map(0x098000, 0x098fff).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1");
|
||||
map(0x098000, 0x098fff).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1");
|
||||
map(0x099000, 0x09bfff).ram(); // not used
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
|
@ -159,8 +157,8 @@ void powerbal_state::atombjt_map(address_map &map)
|
|||
map(0x080014, 0x080015).noprw(); // always 1 in this bootleg. Flip-screen switch not present according to dip sheet.
|
||||
map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
map(0x094000, 0x094001).w(FUNC(powerbal_state::atombjt_tile_banking_w));
|
||||
map(0x094002, 0x094003).noprw(); /* IRQ enable? */
|
||||
map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1");
|
||||
map(0x094002, 0x094003).noprw(); // IRQ enable?
|
||||
map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1");
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
map(0x0c2014, 0x0c2015).portr("IN2");
|
||||
|
@ -244,7 +242,7 @@ static INPUT_PORTS_START( powerbal )
|
|||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) /* Manual shows this as "Weapon" Off for Yes and On for No - Meaning is unknown */
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) // Manual shows this as "Weapon" Off for Yes and On for No - Meaning is unknown
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Language ) )
|
||||
|
@ -284,7 +282,7 @@ static INPUT_PORTS_START( magicstk )
|
|||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
@ -352,8 +350,8 @@ static INPUT_PORTS_START( magicstk )
|
|||
PORT_DIPSETTING( 0xa0, "Hard 7" )
|
||||
PORT_DIPSETTING( 0x20, "Very Hard 6" )
|
||||
PORT_DIPSETTING( 0xc0, "Very Hard 5" )
|
||||
// PORT_DIPSETTING( 0x80, "Very Hard 4" )
|
||||
// PORT_DIPSETTING( 0x40, "Very Hard 4" )
|
||||
PORT_DIPSETTING( 0x80, "Very Hard 4" )
|
||||
PORT_DIPSETTING( 0x40, "Very Hard 4" )
|
||||
PORT_DIPSETTING( 0x00, "Very Hard 4" )
|
||||
PORT_DIPSETTING( 0x60, "Normal 8" )
|
||||
PORT_DIPSETTING( 0xe0, "Easy 9" )
|
||||
|
@ -381,7 +379,7 @@ static INPUT_PORTS_START( hotminda )
|
|||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
@ -446,9 +444,9 @@ static INPUT_PORTS_START( atombjt ) // verified with dip sheet
|
|||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* shown in service mode, but no effect */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // shown in service mode, but no effect
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Maybe unused
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Maybe unused
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
|
@ -522,34 +520,32 @@ static INPUT_PORTS_START( atombjt ) // verified with dip sheet
|
|||
INPUT_PORTS_END
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(powerbal_state::powerbal_get_bg_tile_info)
|
||||
TILE_GET_INFO_MEMBER(powerbal_state::get_bg_tile_info)
|
||||
{
|
||||
int code = (m_videoram1[tile_index] & 0x07ff) + m_tilebank * 0x800;
|
||||
int colr = m_videoram1[tile_index] & 0xf000;
|
||||
int code = (m_videoram[0][tile_index] & 0x07ff) + m_tilebank * 0x800;
|
||||
int colr = m_videoram[0][tile_index] & 0xf000;
|
||||
|
||||
if (m_videoram1[tile_index] & 0x800)
|
||||
if (m_videoram[0][tile_index] & 0x800)
|
||||
code |= 0x8000;
|
||||
|
||||
tileinfo.set(1, code, colr >> 12, 0);
|
||||
}
|
||||
|
||||
void powerbal_state::draw_sprites_powerbal(bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
void powerbal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
int height = m_gfxdecode->gfx(0)->height();
|
||||
|
||||
for (int offs = 4; offs < m_spriteram.bytes() / 2; offs += 4)
|
||||
{
|
||||
int sx, sy, code, color, flipx;
|
||||
|
||||
sy = m_spriteram[offs + 3 - 4]; /* typical Playmark style... */
|
||||
int sy = m_spriteram[offs + 3 - 4]; // typical Playmark style...
|
||||
if (sy & 0x8000)
|
||||
return; /* end of list marker */
|
||||
return; // end of list marker
|
||||
|
||||
flipx = sy & 0x4000;
|
||||
sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
int flipx = sy & 0x4000;
|
||||
int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
sy = (256 - 8 - height - sy) & 0xff;
|
||||
code = m_spriteram[offs + 2];
|
||||
color = (m_spriteram[offs + 1] & 0xf000) >> 12;
|
||||
int code = m_spriteram[offs + 2];
|
||||
int color = (m_spriteram[offs + 1] & 0xf000) >> 12;
|
||||
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
|
@ -561,7 +557,7 @@ void powerbal_state::draw_sprites_powerbal(bitmap_ind16 &bitmap, const rectangle
|
|||
|
||||
VIDEO_START_MEMBER(powerbal_state,powerbal)
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::powerbal_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
m_xoffset = -20;
|
||||
|
||||
|
@ -570,7 +566,7 @@ VIDEO_START_MEMBER(powerbal_state,powerbal)
|
|||
|
||||
VIDEO_START_MEMBER(powerbal_state,atombjt)
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::powerbal_get_bg_tile_info)), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::get_bg_tile_info)), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
|
||||
|
||||
m_xoffset = 0x23;
|
||||
m_yoffset = 0x09;
|
||||
|
@ -579,10 +575,10 @@ VIDEO_START_MEMBER(powerbal_state,atombjt)
|
|||
m_bg_tilemap->set_scrollx(0, -64);
|
||||
}
|
||||
|
||||
uint32_t powerbal_state::screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 powerbal_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
draw_sprites_powerbal(bitmap, cliprect);
|
||||
draw_sprites(bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -613,8 +609,8 @@ static const gfx_layout tilelayout =
|
|||
|
||||
|
||||
static GFXDECODE_START( gfx_powerbal )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x100, 16 ) /* colors 0x100-0x1ff */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, magicstk_charlayout, 0x000, 16 ) /* colors 0x000-0x0ff */
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x100, 16 ) // colors 0x100-0x1ff
|
||||
GFXDECODE_ENTRY( "gfx1", 0, magicstk_charlayout, 0x000, 16 ) // colors 0x000-0x0ff
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
|
@ -632,18 +628,18 @@ void powerbal_state::machine_reset()
|
|||
|
||||
void powerbal_state::powerbal(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M68000(config, m_maincpu, 12000000); /* 12 MHz */
|
||||
// basic machine hardware
|
||||
M68000(config, m_maincpu, 12_MHz_XTAL);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::powerbal_main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(61);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
screen.set_size(128*8, 64*8);
|
||||
screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
|
||||
screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal));
|
||||
screen.set_screen_update(FUNC(powerbal_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
|
||||
|
@ -651,30 +647,30 @@ void powerbal_state::powerbal(machine_config &config)
|
|||
|
||||
MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH);
|
||||
OKIM6295(config, m_oki, 1_MHz_XTAL, okim6295_device::PIN7_HIGH);
|
||||
m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
m_oki->set_addrmap(0, &powerbal_state::oki_map);
|
||||
}
|
||||
|
||||
void powerbal_state::magicstk(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M68000(config, m_maincpu, 12000000); /* 12 MHz */
|
||||
// basic machine hardware
|
||||
M68000(config, m_maincpu, 12_MHz_XTAL);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::magicstk_main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold));
|
||||
|
||||
EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(61);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
|
||||
screen.set_size(128*8, 64*8);
|
||||
screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
|
||||
screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal));
|
||||
screen.set_screen_update(FUNC(powerbal_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
|
||||
|
@ -682,10 +678,10 @@ void powerbal_state::magicstk(machine_config &config)
|
|||
|
||||
MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH);
|
||||
OKIM6295(config, m_oki, 1_MHz_XTAL, okim6295_device::PIN7_HIGH);
|
||||
m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
m_oki->set_addrmap(0, &powerbal_state::oki_map);
|
||||
}
|
||||
|
@ -753,7 +749,7 @@ Notes:
|
|||
*/
|
||||
|
||||
ROM_START( powerbal )
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "3.u67", 0x00000, 0x40000, CRC(3aecdde4) SHA1(e78373246d55f120e8d94f4606da874df439b823) )
|
||||
ROM_LOAD16_BYTE( "2.u66", 0x00001, 0x40000, CRC(a4552a19) SHA1(88b84daa1fd36d5c683cf0d6dce341aedbc360d1) )
|
||||
|
||||
|
@ -769,21 +765,20 @@ ROM_START( powerbal )
|
|||
ROM_LOAD( "10.u84", 0x100000, 0x80000, CRC(90412135) SHA1(499619c72613a1dd63a6504e39b159a18a71f4fa) )
|
||||
ROM_LOAD( "11.u83", 0x180000, 0x80000, CRC(92d7d40a) SHA1(81879945790feb9aeb45750e9b5ded3356571503) )
|
||||
|
||||
/* $00000-$20000 stays the same in all sound banks, */
|
||||
/* the second half of the bank is the area that gets switched */
|
||||
ROM_REGION( 0x80000, "oki", 0 ) /* OKI Samples */
|
||||
// $00000-$20000 stays the same in all sound banks, the second half of the bank is the area that gets switched
|
||||
ROM_REGION( 0x80000, "oki", 0 ) // OKI Samples
|
||||
ROM_LOAD( "1.u16", 0x00000, 0x80000, CRC(12776dbc) SHA1(9ab9930fd581296642834d2cb4ba65264a588af3) )
|
||||
|
||||
ROM_REGION( 0x1200, "plds", 0 )
|
||||
ROM_LOAD( "palce16v8h.u102", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */
|
||||
ROM_LOAD( "palce22v10h.u183", 0x0200, 0x02dd, NO_DUMP ) /* PAL is read protected */
|
||||
ROM_LOAD( "palce22v10h.u211", 0x0600, 0x02dd, NO_DUMP ) /* PAL is read protected */
|
||||
ROM_LOAD( "palce22v10h.bin", 0x0a00, 0x02dd, NO_DUMP ) /* PAL is soldered */
|
||||
ROM_LOAD( "pal22v10a.bin", 0x0e00, 0x02dd, NO_DUMP ) /* PAL is soldered */
|
||||
ROM_LOAD( "palce16v8h.u102", 0x0000, 0x0117, NO_DUMP ) // PAL is read protected
|
||||
ROM_LOAD( "palce22v10h.u183", 0x0200, 0x02dd, NO_DUMP ) // PAL is read protected
|
||||
ROM_LOAD( "palce22v10h.u211", 0x0600, 0x02dd, NO_DUMP ) // PAL is read protected
|
||||
ROM_LOAD( "palce22v10h.bin", 0x0a00, 0x02dd, NO_DUMP ) // PAL is soldered
|
||||
ROM_LOAD( "pal22v10a.bin", 0x0e00, 0x02dd, NO_DUMP ) // PAL is soldered
|
||||
ROM_END
|
||||
|
||||
ROM_START( magicstk )
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "12.u67", 0x00000, 0x20000, CRC(70a9c66f) SHA1(0cf4b2d0f796e35881d68adc69eca4360d6ad693) )
|
||||
ROM_LOAD16_BYTE( "11.u66", 0x00001, 0x20000, CRC(a9d7c90e) SHA1(e12517776dc14747b4bbe49f93c4d7e83e8eae01) )
|
||||
|
||||
|
@ -799,18 +794,18 @@ ROM_START( magicstk )
|
|||
ROM_LOAD( "19.u84", 0x40000, 0x20000, CRC(ee12d5b2) SHA1(872edff5a35d2725e3dd752a5f609aca995bfeff) )
|
||||
ROM_LOAD( "20.u83", 0x60000, 0x20000, CRC(a07f542b) SHA1(0c17629142a90687460b4c951f2062f5c7de8921) )
|
||||
|
||||
ROM_REGION( 0x40000, "oki", 0 ) /* OKI Samples */
|
||||
ROM_REGION( 0x40000, "oki", 0 ) // OKI Samples
|
||||
ROM_LOAD( "10.u16", 0x00000, 0x20000, CRC(1e4a03ef) SHA1(6a134daa9a6d8dbda51cab348627f078c3dde8c7) )
|
||||
|
||||
ROM_REGION( 0x0800, "plds", 0 )
|
||||
ROM_LOAD( "palce16v8.u33", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */
|
||||
ROM_LOAD( "palce16v8.u58", 0x0200, 0x0117, NO_DUMP ) /* PAL is read protected */
|
||||
ROM_LOAD( "gal22v10b.bin", 0x0400, 0x02e5, NO_DUMP ) /* GAL is soldered */
|
||||
ROM_LOAD( "palce16v8.u33", 0x0000, 0x0117, NO_DUMP ) // PAL is read protected
|
||||
ROM_LOAD( "palce16v8.u58", 0x0200, 0x0117, NO_DUMP ) // PAL is read protected
|
||||
ROM_LOAD( "gal22v10b.bin", 0x0400, 0x02e5, NO_DUMP ) // GAL is soldered
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( hotminda )
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "rom1.rom", 0x00001, 0x20000, CRC(33aaceba) SHA1(a914400b081eabd869f1ca2c843a91b03af510b1) )
|
||||
ROM_LOAD16_BYTE( "rom2.rom", 0x00000, 0x20000, CRC(f5accd9f) SHA1(12194ea7c35263be9afd91f0abe2041998528af9) )
|
||||
|
||||
|
@ -826,7 +821,7 @@ ROM_START( hotminda )
|
|||
ROM_LOAD( "rom19.rom", 0x40000, 0x20000, CRC(223ad90f) SHA1(57b4e364f21aeea24a99deb6bab13019846e8f9b) )
|
||||
ROM_LOAD( "rom20.rom", 0x60000, 0x20000, CRC(ab37a273) SHA1(2051ee99a7ff3f4fc2b91c2c9d4e4da2f12db256) )
|
||||
|
||||
ROM_REGION( 0x40000, "oki", 0 ) /* OKI Samples */
|
||||
ROM_REGION( 0x40000, "oki", 0 ) // OKI Samples
|
||||
ROM_LOAD( "rom10.rom", 0x00000, 0x40000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) )
|
||||
ROM_END
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@ public:
|
|||
playmark_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_bgvideoram(*this, "bgvideoram"),
|
||||
m_videoram1(*this, "videoram1"),
|
||||
m_videoram2(*this, "videoram2"),
|
||||
m_videoram3(*this, "videoram3"),
|
||||
m_videoram(*this, "videoram%u", 1U),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_rowscroll(*this, "rowscroll"),
|
||||
m_sprtranspen(0),
|
||||
|
@ -49,66 +47,71 @@ protected:
|
|||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
/* memory pointers */
|
||||
optional_shared_ptr<uint16_t> m_bgvideoram;
|
||||
required_shared_ptr<uint16_t> m_videoram1;
|
||||
optional_shared_ptr<uint16_t> m_videoram2;
|
||||
optional_shared_ptr<uint16_t> m_videoram3;
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
optional_shared_ptr<uint16_t> m_rowscroll;
|
||||
// memory pointers
|
||||
optional_shared_ptr<u16> m_bgvideoram;
|
||||
optional_shared_ptr_array<u16, 3> m_videoram;
|
||||
required_shared_ptr<u16> m_spriteram;
|
||||
optional_shared_ptr<u16> m_rowscroll;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_tx_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_bgscrollx;
|
||||
int m_bgscrolly;
|
||||
int m_bg_enable;
|
||||
int m_bg_full_size;
|
||||
int m_fgscrollx;
|
||||
int m_fg_rowscroll_enable;
|
||||
// video-related
|
||||
tilemap_t *m_tx_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
s32 m_bgscrollx;
|
||||
s16 m_bgscrolly;
|
||||
bool m_bg_enable;
|
||||
bool m_bg_full_size;
|
||||
u32 m_fgscrollx;
|
||||
bool m_fg_rowscroll_enable;
|
||||
|
||||
int m_xoffset;
|
||||
int m_yoffset;
|
||||
int m_pri_masks[3];
|
||||
uint16_t m_scroll[7];
|
||||
int m_sprtranspen;
|
||||
s8 m_xoffset;
|
||||
s8 m_yoffset;
|
||||
u16 m_pri_masks[3];
|
||||
u16 m_scroll[7];
|
||||
u8 m_sprtranspen;
|
||||
|
||||
/* misc */
|
||||
uint16_t m_snd_command;
|
||||
uint16_t m_snd_flag;
|
||||
uint8_t m_oki_control;
|
||||
uint8_t m_oki_command;
|
||||
uint8_t m_dispenser_latch;
|
||||
int m_oki_numbanks;
|
||||
// misc
|
||||
u16 m_snd_command;
|
||||
u16 m_snd_flag;
|
||||
u8 m_oki_control;
|
||||
u8 m_oki_command;
|
||||
u8 m_dispenser_latch;
|
||||
u8 m_oki_numbanks;
|
||||
void configure_oki_banks();
|
||||
|
||||
/* devices */
|
||||
// devices
|
||||
required_device<okim6295_device> m_oki;
|
||||
optional_memory_bank m_okibank;
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
void coinctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void wbeachvl_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hotmind_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void luckboomh_dispenser_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hrdtimes_coin_w(uint16_t data);
|
||||
void playmark_snd_command_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
uint8_t playmark_snd_command_r();
|
||||
uint8_t playmark_snd_flag_r();
|
||||
void playmark_oki_w(uint8_t data);
|
||||
void playmark_snd_control_w(uint8_t data);
|
||||
void hrdtimes_snd_control_w(uint8_t data);
|
||||
void wbeachvl_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void wbeachvl_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void wbeachvl_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hrdtimes_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hrdtimes_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hrdtimes_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void bigtwin_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void wbeachvl_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void excelsr_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void hrdtimes_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void playmark_oki_banking_w(uint8_t data);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<pic16c57_device> m_audiocpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<ticket_dispenser_device> m_ticket;
|
||||
optional_device<ticket_dispenser_device> m_token;
|
||||
|
||||
private:
|
||||
void coinctrl_w(u8 data);
|
||||
void wbeachvl_coin_eeprom_w(u8 data);
|
||||
void hotmind_coin_eeprom_w(u8 data);
|
||||
void luckboomh_dispenser_w(u8 data);
|
||||
void playmark_snd_command_w(u8 data);
|
||||
u8 playmark_snd_command_r();
|
||||
u8 playmark_snd_flag_r();
|
||||
void playmark_oki_w(u8 data);
|
||||
void playmark_snd_control_w(u8 data);
|
||||
void hrdtimes_snd_control_w(u8 data);
|
||||
void wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void playmark_oki_banking_w(u8 data);
|
||||
TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info);
|
||||
TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info);
|
||||
|
@ -126,22 +129,16 @@ protected:
|
|||
DECLARE_VIDEO_START(hrdtimes);
|
||||
DECLARE_VIDEO_START(luckboomh);
|
||||
TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages);
|
||||
uint32_t screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift );
|
||||
void bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift );
|
||||
void draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
uint8_t playmark_asciitohex(uint8_t data);
|
||||
u8 playmark_asciitohex(u8 data);
|
||||
void playmark_decode_pic_hex_dump(void);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<pic16c57_device> m_audiocpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<ticket_dispenser_device> m_ticket;
|
||||
optional_device<ticket_dispenser_device> m_token;
|
||||
|
||||
void bigtwin_main_map(address_map &map);
|
||||
void bigtwinb_main_map(address_map &map);
|
||||
|
|
|
@ -13,39 +13,39 @@
|
|||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_tx_tile_info)
|
||||
{
|
||||
uint16_t code = m_videoram1[2 * tile_index];
|
||||
uint16_t color = m_videoram1[2 * tile_index + 1];
|
||||
u16 code = m_videoram[0][2 * tile_index];
|
||||
u16 color = m_videoram[0][2 * tile_index + 1];
|
||||
tileinfo.set(2, code, color, 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_fg_tile_info)
|
||||
{
|
||||
uint16_t code = m_videoram2[2 * tile_index];
|
||||
uint16_t color = m_videoram2[2 * tile_index + 1];
|
||||
u16 code = m_videoram[1][2 * tile_index];
|
||||
u16 color = m_videoram[1][2 * tile_index + 1];
|
||||
tileinfo.set(1, code, color, 0);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_tx_tile_info)
|
||||
{
|
||||
uint16_t code = m_videoram1[2 * tile_index];
|
||||
uint16_t color = m_videoram1[2 * tile_index + 1];
|
||||
u16 code = m_videoram[0][2 * tile_index];
|
||||
u16 color = m_videoram[0][2 * tile_index + 1];
|
||||
|
||||
tileinfo.set(2, code, (color >> 2), 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_fg_tile_info)
|
||||
{
|
||||
uint16_t code = m_videoram2[2 * tile_index];
|
||||
uint16_t color = m_videoram2[2 * tile_index + 1];
|
||||
u16 code = m_videoram[1][2 * tile_index];
|
||||
u16 color = m_videoram[1][2 * tile_index + 1];
|
||||
|
||||
tileinfo.set(1, (code & 0x7fff), (color >> 2) + 8, (code & 0x8000) ? TILE_FLIPX : 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_bg_tile_info)
|
||||
{
|
||||
uint16_t code = m_videoram3[2 * tile_index];
|
||||
uint16_t color = m_videoram3[2 * tile_index + 1];
|
||||
u16 code = m_videoram[2][2 * tile_index];
|
||||
u16 color = m_videoram[2][2 * tile_index + 1];
|
||||
|
||||
tileinfo.set(1, (code & 0x7fff), (color >> 2), (code & 0x8000) ? TILE_FLIPX : 0);
|
||||
}
|
||||
|
@ -53,24 +53,24 @@ TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_bg_tile_info)
|
|||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_tx_tile_info)
|
||||
{
|
||||
int code = m_videoram1[tile_index] & 0x0fff;
|
||||
int colr = m_videoram1[tile_index] & 0xe000;
|
||||
int code = m_videoram[0][tile_index] & 0x0fff;
|
||||
int colr = m_videoram[0][tile_index] & 0xe000;
|
||||
|
||||
tileinfo.set(3, code, (colr >> 13), 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_fg_tile_info)
|
||||
{
|
||||
int code = m_videoram2[tile_index] & 0x1fff;
|
||||
int colr = m_videoram2[tile_index] & 0xe000;
|
||||
int code = m_videoram[1][tile_index] & 0x1fff;
|
||||
int colr = m_videoram[1][tile_index] & 0xe000;
|
||||
|
||||
tileinfo.set(2, code, (colr >> 13) + 8, 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_bg_tile_info)
|
||||
{
|
||||
int code = m_videoram3[tile_index] & 0x1fff;
|
||||
int colr = m_videoram3[tile_index] & 0xe000;
|
||||
int code = m_videoram[2][tile_index] & 0x1fff;
|
||||
int colr = m_videoram[2][tile_index] & 0xe000;
|
||||
|
||||
tileinfo.set(1, code, (colr >> 13), 0);
|
||||
}
|
||||
|
@ -78,8 +78,8 @@ TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_bg_tile_info)
|
|||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::bigtwinb_get_tx_tile_info)
|
||||
{
|
||||
int code = m_videoram1[tile_index] & 0x0fff;
|
||||
int colr = m_videoram1[tile_index] & 0xf000;
|
||||
int code = m_videoram[0][tile_index] & 0x0fff;
|
||||
int colr = m_videoram[0][tile_index] & 0xf000;
|
||||
|
||||
tileinfo.set(3, code, (colr >> 12), 0);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ VIDEO_START_MEMBER(playmark_state,luckboomh)
|
|||
|
||||
|
||||
|
||||
// hard times level 2-4 boss(truck) needs this.. or something similar.
|
||||
// Hard Times level 2-4 boss(truck) needs this.. or something similar.
|
||||
#define TILES_PER_PAGE_Y (0x20)
|
||||
#define TILES_PER_PAGE_X (0x20)
|
||||
#define PAGES_PER_TMAP_Y (0x1)
|
||||
|
@ -217,7 +217,7 @@ TILEMAP_MAPPER_MEMBER(playmark_state::playmark_tilemap_scan_pages)
|
|||
(row % TILES_PER_PAGE_Y) * TILES_PER_PAGE_X;
|
||||
}
|
||||
|
||||
// theres enough ram for 64*128 on each tilemap..
|
||||
// there's enough ram for 64*128 on each tilemap..
|
||||
|
||||
VIDEO_START_MEMBER(playmark_state,hrdtimes)
|
||||
{
|
||||
|
@ -246,96 +246,96 @@ VIDEO_START_MEMBER(playmark_state,hrdtimes)
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
void playmark_state::wbeachvl_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram1[offset]);
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
m_tx_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram2[offset]);
|
||||
COMBINE_DATA(&m_videoram[1][offset]);
|
||||
m_fg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram3[offset]);
|
||||
COMBINE_DATA(&m_videoram[2][offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram1[offset]);
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
m_tx_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram2[offset]);
|
||||
COMBINE_DATA(&m_videoram[1][offset]);
|
||||
m_fg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram3[offset]);
|
||||
COMBINE_DATA(&m_videoram[2][offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void playmark_state::bigtwin_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_tx_tilemap->set_scrollx(0, data + 2); break;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_bgscrollx = -(data + 4); break;
|
||||
case 3: m_bgscrolly = (-data) & 0x1ff;
|
||||
m_bg_enable = data & 0x0200;
|
||||
m_bg_full_size = data & 0x0400;
|
||||
break;
|
||||
case 4: m_fg_tilemap->set_scrollx(0, data + 6); break;
|
||||
case 5: m_fg_tilemap->set_scrolly(0, data); break;
|
||||
}
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_tx_tilemap->set_scrollx(0, data + 2); break;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_fgscrollx = data + 4;break;
|
||||
case 3: m_fg_tilemap->set_scrolly(0, data & 0x3ff);
|
||||
m_fg_rowscroll_enable = data & 0x0800;
|
||||
break;
|
||||
case 4: m_bg_tilemap->set_scrollx(0, data + 6); break;
|
||||
case 5: m_bg_tilemap->set_scrolly(0, data); break;
|
||||
}
|
||||
}
|
||||
|
||||
void playmark_state::excelsr_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_tx_tilemap->set_scrollx(0, data + 2); break;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_bgscrollx = -data; break;
|
||||
case 3: m_bgscrolly = (-data + 2)& 0x1ff;
|
||||
m_bg_enable = data & 0x0200;
|
||||
m_bg_full_size = data & 0x0400;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_bgscrollx = -(data + 4); break;
|
||||
case 3: m_bgscrolly = (-data) & 0x1ff;
|
||||
m_bg_enable = BIT(data, 9);
|
||||
m_bg_full_size = BIT(data, 10);
|
||||
break;
|
||||
case 4: m_fg_tilemap->set_scrollx(0, data + 6); break;
|
||||
case 5: m_fg_tilemap->set_scrolly(0, data); break;
|
||||
}
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_tx_tilemap->set_scrollx(0, data + 2); break;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_fgscrollx = data + 4; break;
|
||||
case 3: m_fg_tilemap->set_scrolly(0, data & 0x3ff);
|
||||
m_fg_rowscroll_enable = BIT(data, 11);
|
||||
break;
|
||||
case 4: m_bg_tilemap->set_scrollx(0, data + 6); break;
|
||||
case 5: m_bg_tilemap->set_scrolly(0, data); break;
|
||||
}
|
||||
}
|
||||
|
||||
void playmark_state::excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_tx_tilemap->set_scrollx(0, data + 2); break;
|
||||
case 1: m_tx_tilemap->set_scrolly(0, data); break;
|
||||
case 2: m_bgscrollx = -data; break;
|
||||
case 3: m_bgscrolly = (-data + 2) & 0x1ff;
|
||||
m_bg_enable = BIT(data, 9);
|
||||
m_bg_full_size = BIT(data, 10);
|
||||
break;
|
||||
case 4: m_fg_tilemap->set_scrollx(0, data + 6); break;
|
||||
case 5: m_fg_tilemap->set_scrolly(0, data); break;
|
||||
}
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
void playmark_state::hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
data = COMBINE_DATA(&m_scroll[offset]);
|
||||
|
||||
|
@ -361,12 +361,11 @@ void playmark_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
|
|||
int offs, start_offset = m_spriteram.bytes() / 2 - 4;
|
||||
int height = m_gfxdecode->gfx(0)->height();
|
||||
int colordiv = m_gfxdecode->gfx(0)->granularity() / 16;
|
||||
uint16_t *spriteram = m_spriteram;
|
||||
|
||||
// find the "end of list" to draw the sprites in reverse order
|
||||
for (offs = 4; offs < m_spriteram.bytes() / 2; offs += 4)
|
||||
{
|
||||
if (spriteram[offs + 3 - 4] == 0x2000) /* end of list marker */
|
||||
if (m_spriteram[offs + 3 - 4] == 0x2000) // end of list marker
|
||||
{
|
||||
start_offset = offs - 4;
|
||||
break;
|
||||
|
@ -375,16 +374,14 @@ void playmark_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
|
|||
|
||||
for (offs = start_offset; offs >= 4; offs -= 4)
|
||||
{
|
||||
int sx, sy, code, color, flipx, pri;
|
||||
int sy = m_spriteram[offs + 3 - 4]; // -4? what the... ???
|
||||
|
||||
sy = spriteram[offs + 3 - 4]; /* -4? what the... ??? */
|
||||
|
||||
flipx = sy & 0x4000;
|
||||
sx = (spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
int flipx = sy & 0x4000;
|
||||
int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
sy = (256 - 8 - height - sy) & 0xff;
|
||||
code = spriteram[offs + 2] >> codeshift;
|
||||
color = ((spriteram[offs + 1] & 0x3e00) >> 9) / colordiv;
|
||||
pri = (spriteram[offs + 1] & 0x8000) >> 15;
|
||||
int code = m_spriteram[offs + 2] >> codeshift;
|
||||
int color = ((m_spriteram[offs + 1] & 0x3e00) >> 9) / colordiv;
|
||||
int pri = (m_spriteram[offs + 1] & 0x8000) >> 15;
|
||||
|
||||
if(!pri && (color & 0x0c) == 0x0c)
|
||||
pri = 2;
|
||||
|
@ -403,12 +400,11 @@ void playmark_state::bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16
|
|||
{
|
||||
int offs, start_offset = m_spriteram.bytes() / 2 - 4;
|
||||
int height = m_gfxdecode->gfx(0)->height();
|
||||
uint16_t *spriteram = m_spriteram;
|
||||
|
||||
// find the "end of list" to draw the sprites in reverse order
|
||||
for (offs = 4; offs < m_spriteram.bytes() / 2; offs += 4)
|
||||
{
|
||||
if (spriteram[offs + 3 - 4] == 0x2000) /* end of list marker */
|
||||
if (m_spriteram[offs + 3 - 4] == 0x2000) // end of list marker
|
||||
{
|
||||
start_offset = offs - 4;
|
||||
break;
|
||||
|
@ -417,15 +413,13 @@ void playmark_state::bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16
|
|||
|
||||
for (offs = start_offset; offs >= 4; offs -= 4)
|
||||
{
|
||||
int sx, sy, code, color, flipx;
|
||||
int sy = m_spriteram[offs + 3 - 4]; // -4? what the... ???
|
||||
|
||||
sy = spriteram[offs + 3 - 4]; /* -4? what the... ??? */
|
||||
|
||||
flipx = sy & 0x4000;
|
||||
sx = (spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
int flipx = sy & 0x4000;
|
||||
int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7;
|
||||
sy = (256 - 8 - height - sy) & 0xff;
|
||||
code = spriteram[offs + 2] >> codeshift;
|
||||
color = ((spriteram[offs + 1] & 0xf000) >> 12);
|
||||
int code = m_spriteram[offs + 2] >> codeshift;
|
||||
int color = ((m_spriteram[offs + 1] & 0xf000) >> 12);
|
||||
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
|
@ -450,17 +444,17 @@ void playmark_state::draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, c
|
|||
{
|
||||
bitmap.pix((y + m_bgscrolly) & 0x1ff, (x + m_bgscrollx) & 0x1ff) = 0x100 + color;
|
||||
|
||||
uint8_t *const pri = &screen.priority().pix((y + m_bgscrolly) & 0x1ff);
|
||||
u8 *const pri = &screen.priority().pix((y + m_bgscrolly) & 0x1ff);
|
||||
pri[(x + m_bgscrollx) & 0x1ff] |= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 50% size */
|
||||
// 50% size
|
||||
if(!(x % 2) && !(y % 2))
|
||||
{
|
||||
bitmap.pix((y / 2 + m_bgscrolly) & 0x1ff, (x / 2 + m_bgscrollx) & 0x1ff) = 0x100 + color;
|
||||
|
||||
uint8_t *const pri = &screen.priority().pix((y / 2 + m_bgscrolly) & 0x1ff);
|
||||
u8 *const pri = &screen.priority().pix((y / 2 + m_bgscrolly) & 0x1ff);
|
||||
pri[(x / 2 + m_bgscrollx) & 0x1ff] |= 2;
|
||||
}
|
||||
}
|
||||
|
@ -471,7 +465,7 @@ void playmark_state::draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, c
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
screen.priority().fill(0, cliprect);
|
||||
|
||||
|
@ -484,7 +478,7 @@ uint32_t playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind
|
|||
}
|
||||
|
||||
|
||||
uint32_t playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// video enabled
|
||||
if (m_scroll[6] & 1)
|
||||
|
@ -499,7 +493,7 @@ uint32_t playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_in
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint32_t playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
screen.priority().fill(0, cliprect);
|
||||
|
||||
|
@ -511,7 +505,7 @@ uint32_t playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint32_t playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_fg_rowscroll_enable)
|
||||
{
|
||||
|
@ -536,7 +530,7 @@ uint32_t playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_in
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint32_t playmark_state::screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
u32 playmark_state::screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
screen.priority().fill(0, cliprect);
|
||||
|
||||
|
|
Loading…
Reference in a new issue