mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
playmark.cpp, powerbal.cpp: started splitting in derived classes
This commit is contained in:
parent
94e8f8215b
commit
dd0fb5b2a5
@ -260,13 +260,13 @@ void playmark_state::bigtwin_main_map(address_map &map)
|
||||
map(0x000000, 0x0fffff).rom();
|
||||
map(0x304000, 0x304001).noprw(); // watchdog? irq ack?
|
||||
map(0x440000, 0x4403ff).ram().share("spriteram");
|
||||
map(0x500000, 0x500fff).w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share("videoram2");
|
||||
map(0x500000, 0x500fff).w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x501000, 0x501fff).nopw(); // unused RAM?
|
||||
map(0x502000, 0x503fff).w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1");
|
||||
map(0x502000, 0x503fff).w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x504000, 0x50ffff).nopw(); // unused RAM?
|
||||
map(0x510000, 0x51000b).w(FUNC(playmark_state::bigtwin_scroll_w));
|
||||
map(0x51000c, 0x51000d).nopw(); // always 3?
|
||||
map(0x600000, 0x67ffff).ram().share("bgvideoram");
|
||||
map(0x600000, 0x67ffff).ram().share(m_bgvideoram);
|
||||
map(0x700010, 0x700011).portr("SYSTEM");
|
||||
map(0x700012, 0x700013).portr("P1");
|
||||
map(0x700014, 0x700015).portr("P2");
|
||||
@ -282,9 +282,9 @@ void playmark_state::bigtwin_main_map(address_map &map)
|
||||
void playmark_state::bigtwinb_main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share("videoram3");
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share("videoram2");
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share("videoram1");
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x110000, 0x11000d).w(FUNC(playmark_state::hrdtimes_scroll_w));
|
||||
map(0x201000, 0x2013ff).ram().share("spriteram");
|
||||
map(0x280000, 0x2807ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
@ -302,10 +302,10 @@ void playmark_state::wbeachvl_main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x07ffff).rom();
|
||||
map(0x440000, 0x440fff).ram().share("spriteram");
|
||||
map(0x500000, 0x501fff).ram().w(FUNC(playmark_state::wbeachvl_bgvideoram_w)).share("videoram3");
|
||||
map(0x504000, 0x505fff).ram().w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share("videoram2");
|
||||
map(0x508000, 0x509fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1");
|
||||
map(0x50f000, 0x50ffff).ram().share("rowscroll");
|
||||
map(0x500000, 0x501fff).ram().w(FUNC(playmark_state::wbeachvl_bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x504000, 0x505fff).ram().w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x508000, 0x509fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x50f000, 0x50ffff).ram().share(m_rowscroll);
|
||||
map(0x510000, 0x51000b).w(FUNC(playmark_state::wbeachvl_scroll_w));
|
||||
map(0x51000c, 0x51000d).nopw(); // 2 and 3
|
||||
// map(0x700000, 0x700001) ?? written on startup
|
||||
@ -326,11 +326,11 @@ void playmark_state::excelsr_main_map(address_map &map)
|
||||
map(0x000000, 0x2fffff).rom();
|
||||
map(0x304000, 0x304001).nopw(); // watchdog? irq ack?
|
||||
map(0x440000, 0x440cff).ram().share("spriteram");
|
||||
map(0x500000, 0x500fff).ram().w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share("videoram2");
|
||||
map(0x501000, 0x501fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1");
|
||||
map(0x500000, 0x500fff).ram().w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x501000, 0x501fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x510000, 0x51000b).w(FUNC(playmark_state::excelsr_scroll_w));
|
||||
map(0x51000c, 0x51000d).nopw(); // 2 and 3
|
||||
map(0x600000, 0x67ffff).ram().share("bgvideoram");
|
||||
map(0x600000, 0x67ffff).ram().share(m_bgvideoram);
|
||||
map(0x700010, 0x700011).portr("SYSTEM");
|
||||
map(0x700012, 0x700013).portr("P1");
|
||||
map(0x700014, 0x700015).portr("P2");
|
||||
@ -347,11 +347,11 @@ void playmark_state::hrdtimes_main_map(address_map &map)
|
||||
map(0x000000, 0x07ffff).rom();
|
||||
map(0x080000, 0x0bffff).ram();
|
||||
map(0x0c0000, 0x0fffff).rom().region("maincpu", 0x0c0000);
|
||||
map(0x100000, 0x1007ff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share("videoram3"); // 32*32?
|
||||
map(0x100000, 0x1007ff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share(m_bgvideoram); // 32*32?
|
||||
map(0x100800, 0x103fff).ram();
|
||||
map(0x104000, 0x105fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share("videoram2"); // 128*32?
|
||||
map(0x104000, 0x105fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share(m_fgvideoram); // 128*32?
|
||||
map(0x106000, 0x107fff).ram();
|
||||
map(0x108000, 0x109fff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share("videoram1"); // 64*64?
|
||||
map(0x108000, 0x109fff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share(m_txtvideoram); // 64*64?
|
||||
map(0x10a000, 0x10bfff).ram();
|
||||
map(0x10c000, 0x10ffff).ram(); // Unused
|
||||
map(0x110000, 0x11000d).w(FUNC(playmark_state::hrdtimes_scroll_w));
|
||||
@ -371,9 +371,9 @@ void playmark_state::hrdtimes_main_map(address_map &map)
|
||||
void playmark_state::hotmind_main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share("videoram3");
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share("videoram2");
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share("videoram1");
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x110000, 0x11000d).w(FUNC(playmark_state::hrdtimes_scroll_w));
|
||||
map(0x200000, 0x200fff).ram().share("spriteram");
|
||||
map(0x280000, 0x2807ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
@ -391,9 +391,9 @@ void playmark_state::hotmind_main_map(address_map &map)
|
||||
void playmark_state::luckboomh_main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share("videoram3");
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share("videoram2");
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share("videoram1");
|
||||
map(0x100000, 0x103fff).ram().w(FUNC(playmark_state::hrdtimes_bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x104000, 0x107fff).ram().w(FUNC(playmark_state::hrdtimes_fgvideoram_w)).share(m_fgvideoram);
|
||||
map(0x108000, 0x10ffff).ram().w(FUNC(playmark_state::hrdtimes_txvideoram_w)).share(m_txtvideoram);
|
||||
map(0x110000, 0x11000d).w(FUNC(playmark_state::hrdtimes_scroll_w));
|
||||
map(0x200000, 0x200fff).ram().share("spriteram");
|
||||
map(0x280000, 0x2807ff).w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
@ -411,7 +411,7 @@ void playmark_state::luckboomh_main_map(address_map &map)
|
||||
void playmark_state::oki_map(address_map &map)
|
||||
{
|
||||
map(0x00000, 0x1ffff).rom();
|
||||
map(0x20000, 0x3ffff).bankr("okibank");
|
||||
map(0x20000, 0x3ffff).bankr(m_okibank);
|
||||
}
|
||||
|
||||
|
||||
@ -985,7 +985,7 @@ static GFXDECODE_START( gfx_bigtwinb )
|
||||
GFXDECODE_ENTRY( "gfx1", 0x40000, hotmind_charlayout, 0x200, 16 ) // colors 0x200-0x2ff
|
||||
GFXDECODE_END
|
||||
|
||||
void playmark_state::configure_oki_banks()
|
||||
void playmark_base_state::configure_oki_banks()
|
||||
{
|
||||
if (m_okibank)
|
||||
{
|
||||
@ -1428,7 +1428,7 @@ ROM_START( wbeachvl2 )
|
||||
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( wbeachvl3 )
|
||||
ROM_START( wbeachvl3 ) // PCB marked PM285
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "2.u16", 0x000000, 0x40000, CRC(f0f4c282) SHA1(94850b45368c3d09629852adc8ca08164b7a7a94) )
|
||||
ROM_LOAD16_BYTE( "3.u15", 0x000001, 0x40000, CRC(99775c21) SHA1(fa80a81c59142abcf751352d7a7f9e0d3b5172c9) )
|
||||
@ -1457,7 +1457,7 @@ ROM_START( wbeachvl3 )
|
||||
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( excelsr )
|
||||
ROM_START( excelsr ) // PCB marked EXC
|
||||
ROM_REGION( 0x300000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "22.u301", 0x000001, 0x80000, CRC(f0aa1c1b) SHA1(5ed68181defe6cde6f4979508f0cfce9e9743912) ) // sldh w/excelsra
|
||||
ROM_LOAD16_BYTE( "19.u302", 0x000000, 0x80000, CRC(9a8acddc) SHA1(c7868317998bb98c630685a0b242ffd1fbdc54ed) ) // sldh w/excelsra
|
||||
@ -1521,7 +1521,7 @@ ROM_START( excelsra )
|
||||
ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( hrdtimes )
|
||||
ROM_START( hrdtimes ) // PCB marked Hard Times 28-06-94
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "31.u67", 0x00000, 0x80000, CRC(53eb041b) SHA1(7437da1ceb26e9518a3085560b8a42f37e77ace9) )
|
||||
ROM_LOAD16_BYTE( "32.u66", 0x00001, 0x80000, CRC(f2c6b382) SHA1(d73affed091a261c4bfe17f409657e0a46b6c163) )
|
||||
@ -1618,7 +1618,7 @@ Notes:
|
||||
HSync - 14.25kHz
|
||||
*/
|
||||
|
||||
ROM_START( hotmind )
|
||||
ROM_START( hotmind ) // PCB marked Hard Times 28-06-94
|
||||
ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "21.u67", 0x00000, 0x20000, CRC(e9000f7f) SHA1(c19fee7b774d3f30f4d4025a63ec396ec119c855) )
|
||||
ROM_LOAD16_BYTE( "22.u66", 0x00001, 0x20000, CRC(2c518ec5) SHA1(6d9e81ddb5793d64e22dc0254519b947f6ec6954) )
|
||||
|
@ -28,46 +28,82 @@ Magic Sticks:
|
||||
|
||||
namespace {
|
||||
|
||||
class powerbal_state : public playmark_state
|
||||
class powerbal_state : public playmark_base_state
|
||||
{
|
||||
public:
|
||||
powerbal_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: playmark_state(mconfig, type, tag)
|
||||
: playmark_base_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void init_powerbal();
|
||||
void init_magicstk();
|
||||
|
||||
void magicstk(machine_config &config);
|
||||
void powerbal(machine_config &config);
|
||||
void atombjt(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
u8 m_tilebank;
|
||||
s8 m_bg_yoffset;
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
DECLARE_VIDEO_START(powerbal);
|
||||
DECLARE_VIDEO_START(atombjt);
|
||||
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);
|
||||
void atombjt_map(address_map &map);
|
||||
|
||||
private:
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
class atombjt_state : public powerbal_state
|
||||
{
|
||||
public:
|
||||
atombjt_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: powerbal_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void powerbal_state::magicstk_coin_eeprom_w(u8 data)
|
||||
void atombjt(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
void tile_banking_w(u16 data);
|
||||
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
class magicstk_state : public powerbal_state
|
||||
{
|
||||
public:
|
||||
magicstk_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: powerbal_state(mconfig, type, tag),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_ticket(*this, "ticket"),
|
||||
m_token(*this, "token")
|
||||
{ }
|
||||
|
||||
void init_magicstk();
|
||||
|
||||
void magicstk(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
required_device<ticket_dispenser_device> m_ticket;
|
||||
required_device<ticket_dispenser_device> m_token;
|
||||
|
||||
void coin_eeprom_w(u8 data);
|
||||
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
void magicstk_state::coin_eeprom_w(u8 data)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x20);
|
||||
|
||||
@ -78,7 +114,7 @@ void powerbal_state::magicstk_coin_eeprom_w(u8 data)
|
||||
|
||||
void powerbal_state::bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
COMBINE_DATA(&m_bgvideoram[offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
@ -91,7 +127,7 @@ void powerbal_state::tile_banking_w(u16 data)
|
||||
}
|
||||
}
|
||||
|
||||
void powerbal_state::atombjt_tile_banking_w(u16 data)
|
||||
void atombjt_state::tile_banking_w(u16 data)
|
||||
{
|
||||
if ((data & 0x0f) != m_tilebank)
|
||||
{
|
||||
@ -106,35 +142,35 @@ void powerbal_state::oki_banking(u16 data)
|
||||
m_okibank->set_entry(bank & (m_oki_numbanks - 1));
|
||||
}
|
||||
|
||||
void powerbal_state::magicstk_main_map(address_map &map)
|
||||
void magicstk_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
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::bgvideoram_w)).share("videoram1");
|
||||
map(0x094004, 0x094005).w(FUNC(magicstk_state::tile_banking_w));
|
||||
map(0x098180, 0x09917f).ram().w(FUNC(magicstk_state::bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
map(0x0c2014, 0x0c2015).portr("IN2");
|
||||
map(0x0c2015, 0x0c2015).w(FUNC(powerbal_state::magicstk_coin_eeprom_w));
|
||||
map(0x0c2015, 0x0c2015).w(FUNC(magicstk_state::coin_eeprom_w));
|
||||
map(0x0c2016, 0x0c2017).portr("DSW1");
|
||||
map(0x0c2018, 0x0c2019).portr("DSW2");
|
||||
map(0x0c201c, 0x0c201d).w(FUNC(powerbal_state::oki_banking));
|
||||
map(0x0c201c, 0x0c201d).w(FUNC(magicstk_state::oki_banking));
|
||||
map(0x0c201f, 0x0c201f).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
|
||||
map(0x0c4000, 0x0c4001).nopw();
|
||||
map(0x0e0000, 0x0fffff).ram();
|
||||
map(0x100000, 0x100fff).ram().share("spriteram");
|
||||
map(0x100000, 0x100fff).ram().share(m_spriteram);
|
||||
}
|
||||
|
||||
void powerbal_state::powerbal_main_map(address_map &map)
|
||||
void powerbal_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x07ffff).rom();
|
||||
map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
||||
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::bgvideoram_w)).share("videoram1");
|
||||
map(0x098000, 0x098fff).ram().w(FUNC(powerbal_state::bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x099000, 0x09bfff).ram(); // not used
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
@ -145,37 +181,37 @@ void powerbal_state::powerbal_main_map(address_map &map)
|
||||
map(0x0c201f, 0x0c201f).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
|
||||
map(0x0c4000, 0x0c4001).nopw();
|
||||
map(0x0f0000, 0x0fffff).ram();
|
||||
map(0x101000, 0x101fff).ram().share("spriteram");
|
||||
map(0x101000, 0x101fff).ram().share(m_spriteram);
|
||||
map(0x102000, 0x10200d).nopw(); // not used scroll regs?
|
||||
map(0x103000, 0x103fff).ram();
|
||||
}
|
||||
|
||||
void powerbal_state::atombjt_map(address_map &map)
|
||||
void atombjt_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x080008, 0x080009).nopr(); // remnant of the original?
|
||||
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(0x094000, 0x094001).w(FUNC(atombjt_state::tile_banking_w));
|
||||
map(0x094002, 0x094003).noprw(); // IRQ enable?
|
||||
map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1");
|
||||
map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(atombjt_state::bgvideoram_w)).share(m_bgvideoram);
|
||||
map(0x0c2010, 0x0c2011).portr("IN0");
|
||||
map(0x0c2012, 0x0c2013).portr("IN1");
|
||||
map(0x0c2014, 0x0c2015).portr("IN2");
|
||||
map(0x0c2016, 0x0c2017).portr("DSW1");
|
||||
map(0x0c2018, 0x0c2019).portr("DSW2");
|
||||
map(0x0c201c, 0x0c201d).w(FUNC(powerbal_state::oki_banking));
|
||||
map(0x0c201c, 0x0c201d).w(FUNC(atombjt_state::oki_banking));
|
||||
map(0x0c201f, 0x0c201f).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
|
||||
map(0x0c4000, 0x0c4001).nopw(); // always 0?
|
||||
map(0x0f0000, 0x0fffff).ram().share("mainram");
|
||||
map(0x0f0000, 0x0fffff).ram();
|
||||
map(0x100000, 0x100fff).ram();
|
||||
map(0x101000, 0x101fff).ram().share("spriteram");
|
||||
map(0x101000, 0x101fff).ram().share(m_spriteram);
|
||||
}
|
||||
|
||||
void powerbal_state::oki_map(address_map &map)
|
||||
{
|
||||
map(0x00000, 0x1ffff).rom();
|
||||
map(0x20000, 0x3ffff).bankr("okibank");
|
||||
map(0x20000, 0x3ffff).bankr(m_okibank);
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( powerbal )
|
||||
@ -295,33 +331,33 @@ static INPUT_PORTS_START( magicstk )
|
||||
PORT_DIPNAME( 0x01, 0x01, "Coin Mode" )
|
||||
PORT_DIPSETTING( 0x01, "Mode 1" )
|
||||
PORT_DIPSETTING( 0x00, "Mode 2" )
|
||||
PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x1a, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 8C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x1c, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 5C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 3C_2C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x1e, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x12, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01)
|
||||
PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01)
|
||||
PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x1a, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 8C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x1c, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 5C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 3C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x1e, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x12, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
|
||||
PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1" ,0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, NOTEQUALS, 0x01)
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -522,16 +558,16 @@ INPUT_PORTS_END
|
||||
|
||||
TILE_GET_INFO_MEMBER(powerbal_state::get_bg_tile_info)
|
||||
{
|
||||
int code = (m_videoram[0][tile_index] & 0x07ff) + m_tilebank * 0x800;
|
||||
int colr = m_videoram[0][tile_index] & 0xf000;
|
||||
int code = (m_bgvideoram[tile_index] & 0x07ff) + m_tilebank * 0x800;
|
||||
int colr = m_bgvideoram[tile_index] & 0xf000;
|
||||
|
||||
if (m_videoram[0][tile_index] & 0x800)
|
||||
if (m_bgvideoram[tile_index] & 0x800)
|
||||
code |= 0x8000;
|
||||
|
||||
tileinfo.set(1, code, colr >> 12, 0);
|
||||
}
|
||||
|
||||
void powerbal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
void powerbal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int height = m_gfxdecode->gfx(0)->height();
|
||||
|
||||
@ -547,15 +583,15 @@ void powerbal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
int code = m_spriteram[offs + 2];
|
||||
int color = (m_spriteram[offs + 1] & 0xf000) >> 12;
|
||||
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
|
||||
m_gfxdecode->gfx(0)->transpen(bitmap, cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx,0,
|
||||
sx + m_xoffset,sy + m_yoffset,m_sprtranspen);
|
||||
sx + m_xoffset, sy + m_yoffset, m_sprtranspen);
|
||||
}
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(powerbal_state,powerbal)
|
||||
void powerbal_state::video_start()
|
||||
{
|
||||
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);
|
||||
|
||||
@ -564,9 +600,9 @@ VIDEO_START_MEMBER(powerbal_state,powerbal)
|
||||
m_bg_tilemap->set_scrolly(0, m_bg_yoffset);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(powerbal_state,atombjt)
|
||||
void atombjt_state::video_start()
|
||||
{
|
||||
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_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(atombjt_state::get_bg_tile_info)), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
|
||||
|
||||
m_xoffset = 0x23;
|
||||
m_yoffset = 0x09;
|
||||
@ -630,7 +666,7 @@ void powerbal_state::powerbal(machine_config &config)
|
||||
{
|
||||
// basic machine hardware
|
||||
M68000(config, m_maincpu, 12_MHz_XTAL);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::powerbal_main_map);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold));
|
||||
|
||||
// video hardware
|
||||
@ -645,8 +681,6 @@ void powerbal_state::powerbal(machine_config &config)
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 512);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)
|
||||
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
@ -655,12 +689,12 @@ void powerbal_state::powerbal(machine_config &config)
|
||||
m_oki->set_addrmap(0, &powerbal_state::oki_map);
|
||||
}
|
||||
|
||||
void powerbal_state::magicstk(machine_config &config)
|
||||
void magicstk_state::magicstk(machine_config &config)
|
||||
{
|
||||
// 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));
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &magicstk_state::main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(magicstk_state::irq2_line_hold));
|
||||
|
||||
EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
|
||||
|
||||
@ -670,33 +704,32 @@ void powerbal_state::magicstk(machine_config &config)
|
||||
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));
|
||||
screen.set_screen_update(FUNC(magicstk_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal);
|
||||
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 512);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal)
|
||||
TICKET_DISPENSER(config, m_ticket, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
|
||||
TICKET_DISPENSER(config, m_token, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
|
||||
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
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);
|
||||
m_oki->set_addrmap(0, &magicstk_state::oki_map);
|
||||
}
|
||||
|
||||
void powerbal_state::atombjt(machine_config &config)
|
||||
void atombjt_state::atombjt(machine_config &config)
|
||||
{
|
||||
powerbal(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::atombjt_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq6_line_hold));
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &atombjt_state::main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(atombjt_state::irq6_line_hold));
|
||||
|
||||
subdevice<screen_device>("screen")->set_size(512, 256);
|
||||
subdevice<screen_device>("screen")->set_visarea(0*8, 48*8-1, 2*8, 30*8-1);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(powerbal_state,atombjt)
|
||||
}
|
||||
|
||||
/*
|
||||
@ -778,7 +811,7 @@ ROM_START( powerbal )
|
||||
ROM_END
|
||||
|
||||
ROM_START( magicstk )
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_REGION( 0x40000, "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) )
|
||||
|
||||
@ -805,7 +838,7 @@ ROM_END
|
||||
|
||||
|
||||
ROM_START( hotminda )
|
||||
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
|
||||
ROM_REGION( 0x40000, "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) )
|
||||
|
||||
@ -853,7 +886,7 @@ void powerbal_state::init_powerbal()
|
||||
m_yoffset = -8;
|
||||
}
|
||||
|
||||
void powerbal_state::init_magicstk()
|
||||
void magicstk_state::init_magicstk()
|
||||
{
|
||||
m_bg_yoffset = 0;
|
||||
m_yoffset = -5;
|
||||
@ -868,6 +901,6 @@ void powerbal_state::init_magicstk()
|
||||
|
||||
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
|
||||
GAME( 1994, powerbal, 0, powerbal, powerbal, powerbal_state, init_powerbal, ROT0, "Playmark", "Power Balls", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995, magicstk, 0, magicstk, magicstk, powerbal_state, init_magicstk, ROT0, "Playmark", "Magic Sticks", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995, hotminda, hotmind, magicstk, hotminda, powerbal_state, init_magicstk, ROT0, "Playmark", "Hot Mind (adjustable prize)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, atombjt, bjtwin, atombjt, atombjt, powerbal_state, empty_init, ROT270, "bootleg (Kyon K.)", "Atom (bootleg of Bombjack Twin)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // some non-trivial mods to the gfx and sound hw wrt nmk16 hw original, does this really support flip screen?
|
||||
GAME( 1995, magicstk, 0, magicstk, magicstk, magicstk_state, init_magicstk, ROT0, "Playmark", "Magic Sticks", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1995, hotminda, hotmind, magicstk, hotminda, magicstk_state, init_magicstk, ROT0, "Playmark", "Hot Mind (adjustable prize)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, atombjt, bjtwin, atombjt, atombjt, atombjt_state, empty_init, ROT270, "bootleg (Kyon K.)", "Atom (bootleg of Bombjack Twin)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // some non-trivial mods to the gfx and sound hw wrt nmk16 hw original
|
||||
|
@ -12,23 +12,55 @@
|
||||
#include "emupal.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
class playmark_state : public driver_device
|
||||
class playmark_base_state : public driver_device // base class for powerbal.cpp, too
|
||||
{
|
||||
public:
|
||||
playmark_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
playmark_base_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_bgvideoram(*this, "bgvideoram"),
|
||||
m_videoram(*this, "videoram%u", 1U),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_rowscroll(*this, "rowscroll"),
|
||||
m_sprtranspen(0),
|
||||
m_oki(*this, "oki"),
|
||||
m_okibank(*this, "okibank"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// memory pointers
|
||||
required_shared_ptr<u16> m_bgvideoram;
|
||||
required_shared_ptr<u16> m_spriteram;
|
||||
|
||||
// video-related
|
||||
tilemap_t *m_bg_tilemap;
|
||||
|
||||
s8 m_xoffset;
|
||||
s8 m_yoffset;
|
||||
u8 m_sprtranspen;
|
||||
|
||||
// misc
|
||||
u8 m_oki_numbanks;
|
||||
void configure_oki_banks();
|
||||
|
||||
// devices
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_memory_bank m_okibank;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
};
|
||||
|
||||
class playmark_state : public playmark_base_state
|
||||
{
|
||||
public:
|
||||
playmark_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
playmark_base_state(mconfig, type, tag),
|
||||
m_fgvideoram(*this, "fgvideoram"),
|
||||
m_txtvideoram(*this, "txtvideoram"),
|
||||
m_rowscroll(*this, "rowscroll"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_ticket(*this, "ticket"),
|
||||
m_token(*this, "token")
|
||||
{ }
|
||||
@ -47,80 +79,75 @@ protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
// 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;
|
||||
required_shared_ptr<u16> m_fgvideoram;
|
||||
required_shared_ptr<u16> m_txtvideoram;
|
||||
optional_shared_ptr<u16> m_rowscroll;// wbeachvl
|
||||
|
||||
// video-related
|
||||
tilemap_t *m_tx_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
tilemap_t *m_tx_tilemap;
|
||||
|
||||
// bigtwin and excelsr
|
||||
s32 m_bgscrollx;
|
||||
s16 m_bgscrolly;
|
||||
bool m_bg_enable;
|
||||
bool m_bg_full_size;
|
||||
|
||||
// wbeachvl
|
||||
u32 m_fgscrollx;
|
||||
bool m_fg_rowscroll_enable;
|
||||
|
||||
s8 m_xoffset;
|
||||
s8 m_yoffset;
|
||||
// all
|
||||
u16 m_pri_masks[3];
|
||||
u16 m_scroll[7];
|
||||
u8 m_sprtranspen;
|
||||
|
||||
// misc
|
||||
u16 m_snd_command;
|
||||
u16 m_snd_flag;
|
||||
// all
|
||||
u8 m_snd_command;
|
||||
u8 m_snd_flag;
|
||||
u8 m_oki_control;
|
||||
u8 m_oki_command;
|
||||
u8 m_dispenser_latch;
|
||||
u8 m_oki_numbanks;
|
||||
void configure_oki_banks();
|
||||
|
||||
u8 m_dispenser_latch; // hotmind luckboomh
|
||||
|
||||
// devices
|
||||
required_device<okim6295_device> m_oki;
|
||||
optional_memory_bank m_okibank;
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
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;
|
||||
required_device<pic16c57_device> m_audiocpu; // all
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom; // wbeachvl hotmind
|
||||
optional_device<ticket_dispenser_device> m_ticket; // hotmind luckboomh
|
||||
optional_device<ticket_dispenser_device> m_token; // hotmind luckboomh
|
||||
|
||||
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 coinctrl_w(u8 data); // bigtwin excelsr hrdtimes
|
||||
void wbeachvl_coin_eeprom_w(u8 data); // wbeachvl
|
||||
void hotmind_coin_eeprom_w(u8 data); // hotmind
|
||||
void luckboomh_dispenser_w(u8 data); // hotmind luckboomh
|
||||
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 hrdtimes_snd_control_w(u8 data); // hrdtimes, hotmind, luckboomh
|
||||
void wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin, wbeachvl, excelsr
|
||||
void wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin, wbeachvl, excelsr
|
||||
void wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // wbeachvl
|
||||
void hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
void hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
void hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
void bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin
|
||||
void wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // wbeachvk
|
||||
void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // excelsr
|
||||
void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
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);
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_tx_tile_info);
|
||||
TILE_GET_INFO_MEMBER(bigtwinb_get_tx_tile_info);
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info); // bigtwin, excelsr
|
||||
TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info); // bigtwin, excelsr
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info); // wbeachvk
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_fg_tile_info); // wbeachvk
|
||||
TILE_GET_INFO_MEMBER(wbeachvl_get_bg_tile_info); // wbeachvk
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_tx_tile_info); // hrdtimes, hotmind, luckboomh
|
||||
TILE_GET_INFO_MEMBER(bigtwinb_get_tx_tile_info); // bigtwinb
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_fg_tile_info); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
TILE_GET_INFO_MEMBER(hrdtimes_get_bg_tile_info); // bigtwinb, hrdtimes, hotmind, luckboomh
|
||||
DECLARE_VIDEO_START(bigtwin);
|
||||
DECLARE_VIDEO_START(bigtwinb);
|
||||
DECLARE_VIDEO_START(wbeachvl);
|
||||
@ -128,15 +155,15 @@ private:
|
||||
DECLARE_VIDEO_START(hotmind);
|
||||
DECLARE_VIDEO_START(hrdtimes);
|
||||
DECLARE_VIDEO_START(luckboomh);
|
||||
TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages);
|
||||
TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages); // hrdtimes
|
||||
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 );
|
||||
u32 screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // hrdtimes, hotmind, luckboomh
|
||||
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift); // all but bigtwinb
|
||||
void bigtwinb_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift); // bigtwinb
|
||||
void draw_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // bigtwin, excelsr
|
||||
u8 playmark_asciitohex(u8 data);
|
||||
void playmark_decode_pic_hex_dump(void);
|
||||
|
||||
|
@ -13,39 +13,39 @@
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_tx_tile_info)
|
||||
{
|
||||
u16 code = m_videoram[0][2 * tile_index];
|
||||
u16 color = m_videoram[0][2 * tile_index + 1];
|
||||
u16 code = m_txtvideoram[2 * tile_index];
|
||||
u16 color = m_txtvideoram[2 * tile_index + 1];
|
||||
tileinfo.set(2, code, color, 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_fg_tile_info)
|
||||
{
|
||||
u16 code = m_videoram[1][2 * tile_index];
|
||||
u16 color = m_videoram[1][2 * tile_index + 1];
|
||||
u16 code = m_fgvideoram[2 * tile_index];
|
||||
u16 color = m_fgvideoram[2 * tile_index + 1];
|
||||
tileinfo.set(1, code, color, 0);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_tx_tile_info)
|
||||
{
|
||||
u16 code = m_videoram[0][2 * tile_index];
|
||||
u16 color = m_videoram[0][2 * tile_index + 1];
|
||||
u16 code = m_txtvideoram[2 * tile_index];
|
||||
u16 color = m_txtvideoram[2 * tile_index + 1];
|
||||
|
||||
tileinfo.set(2, code, (color >> 2), 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_fg_tile_info)
|
||||
{
|
||||
u16 code = m_videoram[1][2 * tile_index];
|
||||
u16 color = m_videoram[1][2 * tile_index + 1];
|
||||
u16 code = m_fgvideoram[2 * tile_index];
|
||||
u16 color = m_fgvideoram[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)
|
||||
{
|
||||
u16 code = m_videoram[2][2 * tile_index];
|
||||
u16 color = m_videoram[2][2 * tile_index + 1];
|
||||
u16 code = m_bgvideoram[2 * tile_index];
|
||||
u16 color = m_bgvideoram[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_videoram[0][tile_index] & 0x0fff;
|
||||
int colr = m_videoram[0][tile_index] & 0xe000;
|
||||
int code = m_txtvideoram[tile_index] & 0x0fff;
|
||||
int colr = m_txtvideoram[tile_index] & 0xe000;
|
||||
|
||||
tileinfo.set(3, code, (colr >> 13), 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_fg_tile_info)
|
||||
{
|
||||
int code = m_videoram[1][tile_index] & 0x1fff;
|
||||
int colr = m_videoram[1][tile_index] & 0xe000;
|
||||
int code = m_fgvideoram[tile_index] & 0x1fff;
|
||||
int colr = m_fgvideoram[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_videoram[2][tile_index] & 0x1fff;
|
||||
int colr = m_videoram[2][tile_index] & 0xe000;
|
||||
int code = m_bgvideoram[tile_index] & 0x1fff;
|
||||
int colr = m_bgvideoram[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_videoram[0][tile_index] & 0x0fff;
|
||||
int colr = m_videoram[0][tile_index] & 0xf000;
|
||||
int code = m_txtvideoram[tile_index] & 0x0fff;
|
||||
int colr = m_txtvideoram[tile_index] & 0xf000;
|
||||
|
||||
tileinfo.set(3, code, (colr >> 12), 0);
|
||||
}
|
||||
@ -248,37 +248,37 @@ VIDEO_START_MEMBER(playmark_state,hrdtimes)
|
||||
|
||||
void playmark_state::wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
COMBINE_DATA(&m_txtvideoram[offset]);
|
||||
m_tx_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[1][offset]);
|
||||
COMBINE_DATA(&m_fgvideoram[offset]);
|
||||
m_fg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[2][offset]);
|
||||
COMBINE_DATA(&m_bgvideoram[offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[0][offset]);
|
||||
COMBINE_DATA(&m_txtvideoram[offset]);
|
||||
m_tx_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[1][offset]);
|
||||
COMBINE_DATA(&m_fgvideoram[offset]);
|
||||
m_fg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void playmark_state::hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_videoram[2][offset]);
|
||||
COMBINE_DATA(&m_bgvideoram[offset]);
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
@ -509,10 +509,8 @@ u32 playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &
|
||||
{
|
||||
if (m_fg_rowscroll_enable)
|
||||
{
|
||||
int i;
|
||||
|
||||
m_fg_tilemap->set_scroll_rows(512);
|
||||
for (i = 0; i < 256; i++)
|
||||
for (int i = 0; i < 256; i++)
|
||||
m_fg_tilemap->set_scrollx(i + 1, m_rowscroll[8 * i]);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user