summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-12-03 02:33:33 +1100
committer Vas Crabb <vas@vastheman.com>2018-12-03 02:33:33 +1100
commit26da0fedf25aa67e84ae279c106fd2df7318f93d (patch)
treefef6b192e303b97379f6073bec13491b974b9d53
parent57a07821363208b46e6905752c1575727d457ea0 (diff)
(nw) more header cleanup, split up some more all-in-one state classes
-rw-r--r--src/mame/drivers/lvcards.cpp59
-rw-r--r--src/mame/drivers/ninjakd2.cpp30
-rw-r--r--src/mame/drivers/toaplan2.cpp4
-rw-r--r--src/mame/drivers/twincobr.cpp2
-rw-r--r--src/mame/drivers/wardner.cpp2
-rw-r--r--src/mame/drivers/yunsun16.cpp94
-rw-r--r--src/mame/includes/bagman.h2
-rw-r--r--src/mame/includes/bombjack.h16
-rw-r--r--src/mame/includes/cheekyms.h18
-rw-r--r--src/mame/includes/cosmic.h13
-rw-r--r--src/mame/includes/docastle.h8
-rw-r--r--src/mame/includes/drgnmst.h17
-rw-r--r--src/mame/includes/fromanc2.h9
-rw-r--r--src/mame/includes/fromance.h21
-rw-r--r--src/mame/includes/gaiden.h7
-rw-r--r--src/mame/includes/gstriker.h16
-rw-r--r--src/mame/includes/ladybug.h6
-rw-r--r--src/mame/includes/laserbat.h8
-rw-r--r--src/mame/includes/lucky74.h17
-rw-r--r--src/mame/includes/lvcards.h43
-rw-r--r--src/mame/includes/mouser.h19
-rw-r--r--src/mame/includes/mrdo.h31
-rw-r--r--src/mame/includes/ninjakd2.h13
-rw-r--r--src/mame/includes/ojankohs.h11
-rw-r--r--src/mame/includes/paradise.h45
-rw-r--r--src/mame/includes/pbaction.h13
-rw-r--r--src/mame/includes/redclash.h8
-rw-r--r--src/mame/includes/rpunch.h6
-rw-r--r--src/mame/includes/senjyo.h8
-rw-r--r--src/mame/includes/silkroad.h18
-rw-r--r--src/mame/includes/snowbros.h8
-rw-r--r--src/mame/includes/solomon.h19
-rw-r--r--src/mame/includes/spbactn.h12
-rw-r--r--src/mame/includes/spcforce.h11
-rw-r--r--src/mame/includes/suprridr.h18
-rw-r--r--src/mame/includes/suprslam.h17
-rw-r--r--src/mame/includes/tail2nos.h21
-rw-r--r--src/mame/includes/tankbust.h21
-rw-r--r--src/mame/includes/taotaido.h9
-rw-r--r--src/mame/includes/tbowl.h21
-rw-r--r--src/mame/includes/tecmo.h13
-rw-r--r--src/mame/includes/tecmosys.h15
-rw-r--r--src/mame/includes/tehkanwc.h23
-rw-r--r--src/mame/includes/thepit.h19
-rw-r--r--src/mame/includes/tiamc1.h6
-rw-r--r--src/mame/includes/timelimt.h6
-rw-r--r--src/mame/includes/toaplan1.h17
-rw-r--r--src/mame/includes/toaplan2.h8
-rw-r--r--src/mame/includes/twincobr.h3
-rw-r--r--src/mame/includes/unico.h6
-rw-r--r--src/mame/includes/wc90.h16
-rw-r--r--src/mame/includes/wc90b.h20
-rw-r--r--src/mame/includes/welltris.h20
-rw-r--r--src/mame/includes/xxmissio.h21
-rw-r--r--src/mame/includes/yunsun16.h86
-rw-r--r--src/mame/includes/zac2650.h4
-rw-r--r--src/mame/includes/zaccaria.h15
-rw-r--r--src/mame/video/ladybug.cpp2
-rw-r--r--src/mame/video/lvcards.cpp4
-rw-r--r--src/mame/video/twincobr.cpp2
60 files changed, 681 insertions, 346 deletions
diff --git a/src/mame/drivers/lvcards.cpp b/src/mame/drivers/lvcards.cpp
index 87c91a8a173..4b35471febf 100644
--- a/src/mame/drivers/lvcards.cpp
+++ b/src/mame/drivers/lvcards.cpp
@@ -83,59 +83,63 @@ TODO:
#include "speaker.h"
-MACHINE_START_MEMBER(lvcards_state,lvpoker)
+void lvpoker_state::machine_start()
{
+ lvcards_state::machine_start();
+
save_item(NAME(m_payout));
save_item(NAME(m_pulse));
save_item(NAME(m_result));
}
-MACHINE_RESET_MEMBER(lvcards_state,lvpoker)
+void lvpoker_state::machine_reset()
{
+ lvcards_state::machine_reset();
+
m_payout = 0;
m_pulse = 0;
m_result = 0;
}
-WRITE8_MEMBER(lvcards_state::control_port_2_w)
+WRITE8_MEMBER(lvpoker_state::control_port_2_w)
{
switch (data)
{
- case 0x60:
+ case 0x60:
m_payout = 1;
break;
- case 0xc0:
+ case 0xc0:
m_payout = 1;
break;
- default:
+ default:
m_payout = 0;
break;
}
}
-WRITE8_MEMBER(lvcards_state::control_port_2a_w)
+WRITE8_MEMBER(lvpoker_state::control_port_2a_w)
{
switch (data)
{
- case 0x60:
+ case 0x60:
m_payout = 1;
break;
- case 0x80:
+ case 0x80:
m_payout = 1;
break;
- default:
+ default:
m_payout = 0;
break;
}
}
-READ8_MEMBER(lvcards_state::payout_r)
+READ8_MEMBER(lvpoker_state::payout_r)
{
m_result = ioport("IN2")->read();
if (m_payout)
{
- if ( m_pulse < 3 )
+ if (m_pulse < 3)
{
m_result = m_result | 0x40;
m_pulse++;
@@ -148,23 +152,23 @@ READ8_MEMBER(lvcards_state::payout_r)
return m_result;
}
-void lvcards_state::ponttehk_map(address_map &map)
+void lvpoker_state::ponttehk_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
- map(0x8000, 0x83ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
- map(0x8400, 0x87ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
+ map(0x8000, 0x83ff).ram().w(FUNC(lvpoker_state::videoram_w)).share("videoram");
+ map(0x8400, 0x87ff).ram().w(FUNC(lvpoker_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw(); // lamps
- map(0xa002, 0xa002).r(FUNC(lvcards_state::payout_r)).w(FUNC(lvcards_state::control_port_2a_w));//AM_WRITENOP // ???
+ map(0xa002, 0xa002).r(FUNC(lvpoker_state::payout_r)).w(FUNC(lvpoker_state::control_port_2a_w));//AM_WRITENOP // ???
}
void lvcards_state::lvcards_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
- map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
- map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
+ map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::videoram_w)).share("videoram");
+ map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw();
map(0xa002, 0xa002).portr("IN2").nopw();
@@ -178,15 +182,15 @@ void lvcards_state::lvcards_io_map(address_map &map)
map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::data_address_w));
}
-void lvcards_state::lvpoker_map(address_map &map)
+void lvpoker_state::lvpoker_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x67ff).ram().share("nvram");
- map(0x9000, 0x93ff).ram().w(FUNC(lvcards_state::lvcards_videoram_w)).share("videoram");
- map(0x9400, 0x97ff).ram().w(FUNC(lvcards_state::lvcards_colorram_w)).share("colorram");
+ map(0x9000, 0x93ff).ram().w(FUNC(lvpoker_state::videoram_w)).share("videoram");
+ map(0x9400, 0x97ff).ram().w(FUNC(lvpoker_state::colorram_w)).share("colorram");
map(0xa000, 0xa000).portr("IN0");
map(0xa001, 0xa001).portr("IN1").nopw(); // lamps
- map(0xa002, 0xa002).r(FUNC(lvcards_state::payout_r)).w(FUNC(lvcards_state::control_port_2_w));
+ map(0xa002, 0xa002).r(FUNC(lvpoker_state::payout_r)).w(FUNC(lvpoker_state::control_port_2_w));
map(0xc000, 0xdfff).rom();
}
@@ -484,25 +488,22 @@ MACHINE_CONFIG_START(lvcards_state::lvcards)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(lvcards_state::lvpoker)
+MACHINE_CONFIG_START(lvpoker_state::lvpoker)
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(lvpoker_map)
- MCFG_MACHINE_START_OVERRIDE(lvcards_state,lvpoker)
- MCFG_MACHINE_RESET_OVERRIDE(lvcards_state,lvpoker)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(lvcards_state::ponttehk)
+MACHINE_CONFIG_START(lvpoker_state::ponttehk)
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ponttehk_map)
- MCFG_MACHINE_RESET_OVERRIDE(lvcards_state,lvpoker)
// video hardware
MCFG_DEVICE_REMOVE("palette")
@@ -571,5 +572,5 @@ ROM_START( ponttehk )
ROM_END
GAME( 1985, lvcards, 0, lvcards, lvcards, lvcards_state, empty_init, ROT0, "Tehkan", "Lovely Cards", 0 )
-GAME( 1985, lvpoker, lvcards, lvpoker, lvpoker, lvcards_state, empty_init, ROT0, "Tehkan", "Lovely Poker [BET]", 0 )
-GAME( 1985, ponttehk, 0, ponttehk, ponttehk, lvcards_state, empty_init, ROT0, "Tehkan", "Pontoon (Tehkan)", 0 )
+GAME( 1985, lvpoker, lvcards, lvpoker, lvpoker, lvpoker_state, empty_init, ROT0, "Tehkan", "Lovely Poker [BET]", 0 )
+GAME( 1985, ponttehk, 0, ponttehk, ponttehk, lvpoker_state, empty_init, ROT0, "Tehkan", "Pontoon (Tehkan)", 0 )
diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp
index 86d890d2fb1..fae4c66587a 100644
--- a/src/mame/drivers/ninjakd2.cpp
+++ b/src/mame/drivers/ninjakd2.cpp
@@ -434,8 +434,8 @@ void mnight_state::mnight_main_cpu(address_map &map)
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xd9ff).ram();
map(0xda00, 0xdfff).ram().share("spriteram");
- map(0xe000, 0xe7ff).ram().w(FUNC(ninjakd2_state::ninjakd2_bgvideoram_w)).share("bg_videoram");
- map(0xe800, 0xefff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
+ map(0xe000, 0xe7ff).ram().w(FUNC(mnight_state::ninjakd2_bgvideoram_w)).share("bg_videoram");
+ map(0xe800, 0xefff).ram().w(FUNC(mnight_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xf000, 0xf5ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xf800, 0xf800).portr("KEYCOIN");
map(0xf801, 0xf801).portr("PAD1");
@@ -443,10 +443,10 @@ void mnight_state::mnight_main_cpu(address_map &map)
map(0xf803, 0xf803).portr("DIPSW1");
map(0xf804, 0xf804).portr("DIPSW2");
map(0xfa00, 0xfa00).w("soundlatch", FUNC(generic_latch_8_device::write));
- map(0xfa01, 0xfa01).w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
- map(0xfa02, 0xfa02).w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
- map(0xfa03, 0xfa03).w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
- map(0xfa08, 0xfa0c).w(FUNC(ninjakd2_state::ninjakd2_bg_ctrl_w));
+ map(0xfa01, 0xfa01).w(FUNC(mnight_state::ninjakd2_soundreset_w));
+ map(0xfa02, 0xfa02).w(FUNC(mnight_state::ninjakd2_bankselect_w));
+ map(0xfa03, 0xfa03).w(FUNC(mnight_state::ninjakd2_sprite_overdraw_w));
+ map(0xfa08, 0xfa0c).w(FUNC(mnight_state::ninjakd2_bg_ctrl_w));
}
@@ -455,14 +455,14 @@ void robokid_state::robokid_main_cpu(address_map &map)
map(0x0000, 0x7fff).rom();
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xc7ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
- map(0xc800, 0xcfff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
+ map(0xc800, 0xcfff).ram().w(FUNC(robokid_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xd000, 0xd3ff).rw(FUNC(robokid_state::robokid_bg_videoram_r<2>), FUNC(robokid_state::robokid_bg_videoram_w<2>)); // banked
map(0xd400, 0xd7ff).rw(FUNC(robokid_state::robokid_bg_videoram_r<1>), FUNC(robokid_state::robokid_bg_videoram_w<1>)); // banked
map(0xd800, 0xdbff).rw(FUNC(robokid_state::robokid_bg_videoram_r<0>), FUNC(robokid_state::robokid_bg_videoram_w<0>)); // banked
map(0xdc00, 0xdc00).portr("KEYCOIN").w("soundlatch", FUNC(generic_latch_8_device::write));
- map(0xdc01, 0xdc01).portr("PAD1").w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
- map(0xdc02, 0xdc02).portr("PAD2").w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
- map(0xdc03, 0xdc03).portr("DIPSW1").w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
+ map(0xdc01, 0xdc01).portr("PAD1").w(FUNC(robokid_state::ninjakd2_soundreset_w));
+ map(0xdc02, 0xdc02).portr("PAD2").w(FUNC(robokid_state::ninjakd2_bankselect_w));
+ map(0xdc03, 0xdc03).portr("DIPSW1").w(FUNC(robokid_state::ninjakd2_sprite_overdraw_w));
map(0xdc04, 0xdc04).portr("DIPSW2");
map(0xdd00, 0xdd04).w(FUNC(robokid_state::robokid_bg_ctrl_w<0>));
map(0xdd05, 0xdd05).w(FUNC(robokid_state::robokid_bg_bank_w<0>));
@@ -481,9 +481,9 @@ void omegaf_state::omegaf_main_cpu(address_map &map)
map(0x8000, 0xbfff).bankr("mainbank");
map(0xc000, 0xc000).portr("KEYCOIN").w("soundlatch", FUNC(generic_latch_8_device::write));
map(0xc001, 0xc003).r(FUNC(omegaf_state::io_protection_r));
- map(0xc001, 0xc001).w(FUNC(ninjakd2_state::ninjakd2_soundreset_w));
- map(0xc002, 0xc002).w(FUNC(ninjakd2_state::ninjakd2_bankselect_w));
- map(0xc003, 0xc003).w(FUNC(ninjakd2_state::ninjakd2_sprite_overdraw_w));
+ map(0xc001, 0xc001).w(FUNC(omegaf_state::ninjakd2_soundreset_w));
+ map(0xc002, 0xc002).w(FUNC(omegaf_state::ninjakd2_bankselect_w));
+ map(0xc003, 0xc003).w(FUNC(omegaf_state::ninjakd2_sprite_overdraw_w));
map(0xc004, 0xc006).w(FUNC(omegaf_state::io_protection_w));
map(0xc100, 0xc104).w(FUNC(omegaf_state::robokid_bg_ctrl_w<0>));
map(0xc105, 0xc105).w(FUNC(omegaf_state::robokid_bg_bank_w<0>));
@@ -495,7 +495,7 @@ void omegaf_state::omegaf_main_cpu(address_map &map)
map(0xc400, 0xc7ff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<0>), FUNC(omegaf_state::robokid_bg_videoram_w<0>)); // banked
map(0xc800, 0xcbff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<1>), FUNC(omegaf_state::robokid_bg_videoram_w<1>)); // banked
map(0xcc00, 0xcfff).rw(FUNC(omegaf_state::robokid_bg_videoram_r<2>), FUNC(omegaf_state::robokid_bg_videoram_w<2>)); // banked
- map(0xd000, 0xd7ff).ram().w(FUNC(ninjakd2_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
+ map(0xd000, 0xd7ff).ram().w(FUNC(omegaf_state::ninjakd2_fgvideoram_w)).share("fg_videoram");
map(0xd800, 0xdfff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0xe000, 0xf9ff).ram();
map(0xfa00, 0xffff).ram().share("spriteram");
@@ -983,7 +983,7 @@ MACHINE_CONFIG_START(ninjakd2_state::ninjakd2_core)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(ninjakd2_state, screen_update_ninjakd2)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ninjakd2_state, screen_vblank_ninjakd2))
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ninjakd2)
MCFG_PALETTE_ADD("palette", 0x300)
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index 2bfab0c13e7..8f13ff3e719 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -403,6 +403,10 @@ To reset the NVRAM in Othello Derby, hold P1 Button 1 down while booting.
#define UNICODE_YEN "\xC2\xA5"
#define PWRKICK_HOPPER_PULSE 50 // time between hopper pulses in milliseconds (probably wrong)
+//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
+
+constexpr unsigned toaplan2_state::T2PALETTE_LENGTH;
+
/***************************************************************************
Initialisation handlers
diff --git a/src/mame/drivers/twincobr.cpp b/src/mame/drivers/twincobr.cpp
index f60ab4b4eef..36eb59236aa 100644
--- a/src/mame/drivers/twincobr.cpp
+++ b/src/mame/drivers/twincobr.cpp
@@ -708,8 +708,6 @@ MACHINE_CONFIG_START(twincobr_state::twincobr)
MCFG_PALETTE_ADD("palette", 1792)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_VIDEO_START_OVERRIDE(twincobr_state,toaplan0)
-
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/wardner.cpp b/src/mame/drivers/wardner.cpp
index 7b6e4cab331..18855f257f6 100644
--- a/src/mame/drivers/wardner.cpp
+++ b/src/mame/drivers/wardner.cpp
@@ -438,8 +438,6 @@ MACHINE_CONFIG_START(wardner_state::wardner)
MCFG_PALETTE_ADD("palette", 4096)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_VIDEO_START_OVERRIDE(wardner_state,toaplan0)
-
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/yunsun16.cpp b/src/mame/drivers/yunsun16.cpp
index c87de46da8e..c5bad89274d 100644
--- a/src/mame/drivers/yunsun16.cpp
+++ b/src/mame/drivers/yunsun16.cpp
@@ -105,7 +105,7 @@ Stephh's notes (based on the games M68000 code and some tests) :
***************************************************************************/
-WRITE8_MEMBER(yunsun16_state::sound_bank_w)
+WRITE8_MEMBER(shocking_state::sound_bank_w)
{
m_okibank->set_entry(data & 3);
}
@@ -132,7 +132,6 @@ void yunsun16_state::main_map(address_map &map)
map(0x80010c, 0x80010f).ram().share("scrollram_1"); // Scrolling
map(0x800114, 0x800117).ram().share("scrollram_0"); // Scrolling
map(0x800154, 0x800155).ram().share("priorityram"); // Priority
- map(0x800181, 0x800181).w(FUNC(yunsun16_state::sound_bank_w)); // Sound
map(0x800189, 0x800189).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound
map(0x8001fe, 0x8001ff).nopw(); // ? 0 (during int)
map(0x900000, 0x903fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette
@@ -142,29 +141,30 @@ void yunsun16_state::main_map(address_map &map)
map(0xff0000, 0xffffff).ram();
}
+void magicbub_state::main_map(address_map &map)
+{
+ yunsun16_state::main_map(map);
+ map(0x800189, 0x800189).w(FUNC(magicbub_state::magicbub_sound_command_w));
+}
-WRITE16_MEMBER(yunsun16_state::magicbub_sound_command_w)
+void shocking_state::main_map(address_map &map)
{
- if (ACCESSING_BITS_0_7)
- {
-/*
-HACK: the game continuously sends this. It'll play the oki sample
-number 0 on each voice. That sample is 00000-00000.
-*/
- if ((data & 0xff) != 0x3a)
- {
- m_soundlatch->write(space, 0, data & 0xff);
- m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
- }
- }
+ yunsun16_state::main_map(map);
+ map(0x800181, 0x800181).w(FUNC(shocking_state::sound_bank_w)); // Sound
}
-void yunsun16_state::init_magicbub()
+
+WRITE8_MEMBER(magicbub_state::magicbub_sound_command_w)
{
- m_maincpu->space(AS_PROGRAM).unmap_write(0x800180, 0x800181);
- m_maincpu->space(AS_PROGRAM).install_write_handler(0x800188, 0x800189, write16_delegate(FUNC(yunsun16_state::magicbub_sound_command_w), this));
+ // HACK: the game continuously sends this. It'll play the oki sample number 0 on each voice. That sample is 00000-00000.
+ if ((data & 0xff) != 0x3a)
+ {
+ m_soundlatch->write(space, 0, data & 0xff);
+ m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
+ }
}
+
/***************************************************************************
@@ -173,13 +173,13 @@ void yunsun16_state::init_magicbub()
***************************************************************************/
-void yunsun16_state::sound_map(address_map &map)
+void magicbub_state::sound_map(address_map &map)
{
map(0x0000, 0xdfff).rom();
map(0xe000, 0xe7ff).ram();
}
-void yunsun16_state::sound_port_map(address_map &map)
+void magicbub_state::sound_port_map(address_map &map)
{
map.global_mask(0xff);
map(0x10, 0x11).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write));
@@ -187,11 +187,11 @@ void yunsun16_state::sound_port_map(address_map &map)
map(0x1c, 0x1c).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295
}
-void yunsun16_state::oki_map(address_map &map)
+void shocking_state::oki_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("okibank");
- }
+}
/***************************************************************************
@@ -572,32 +572,36 @@ void yunsun16_state::machine_start()
{
save_item(NAME(m_sprites_scrolldx));
save_item(NAME(m_sprites_scrolldy));
- if (m_okibank)
- {
- m_okibank->configure_entries(0, 0x80000 / 0x20000, memregion("oki")->base(), 0x20000);
- }
}
void yunsun16_state::machine_reset()
{
m_sprites_scrolldx = -0x40;
m_sprites_scrolldy = -0x0f;
- if (m_okibank)
- {
- m_okibank->set_entry(0);
- }
+}
+
+void shocking_state::machine_start()
+{
+ yunsun16_state::machine_start();
+ m_okibank->configure_entries(0, 0x80000 / 0x20000, memregion("oki")->base(), 0x20000);
+}
+
+void shocking_state::machine_reset()
+{
+ yunsun16_state::machine_reset();
+ m_okibank->set_entry(0);
}
/***************************************************************************
Magic Bubble
***************************************************************************/
-MACHINE_CONFIG_START(yunsun16_state::magicbub)
+MACHINE_CONFIG_START(magicbub_state::magicbub)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000))
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magicbub_state, irq2_line_hold)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/4)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
@@ -606,7 +610,7 @@ MACHINE_CONFIG_START(yunsun16_state::magicbub)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(16'000'000)/2, 512, 0x20, 0x180-0x20, 260, 0, 0xe0) /* TODO: completely inaccurate */
- MCFG_SCREEN_UPDATE_DRIVER(yunsun16_state, screen_update)
+ MCFG_SCREEN_UPDATE_DRIVER(magicbub_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_yunsun16)
@@ -634,17 +638,17 @@ MACHINE_CONFIG_END
Shocking
***************************************************************************/
-MACHINE_CONFIG_START(yunsun16_state::shocking)
+MACHINE_CONFIG_START(shocking_state::shocking)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000))
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", yunsun16_state, irq2_line_hold)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shocking_state, irq2_line_hold)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(16'000'000)/2, 512, 0, 0x180-4, 260, 0, 0xe0) /* TODO: completely inaccurate */
- MCFG_SCREEN_UPDATE_DRIVER(yunsun16_state, screen_update)
+ MCFG_SCREEN_UPDATE_DRIVER(shocking_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_yunsun16)
@@ -1021,12 +1025,12 @@ ROM_END
***************************************************************************/
-GAME( 199?, magicbub, 0, magicbub, magicbub, yunsun16_state, init_magicbub, ROT0, "Yun Sung", "Magic Bubble", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 199?, magicbuba, magicbub, magicbub, magicbua, yunsun16_state, init_magicbub, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-1302 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 199?, magicbubb, magicbub, shocking, magicbua, yunsun16_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-0211 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1996, paprazzi, 0, shocking, paprazzi, yunsun16_state, empty_init, ROT270, "Yun Sung", "Paparazzi", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, shocking, 0, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, shockingk, shocking, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, shockingko, shocking, shocking, shocking, yunsun16_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1998, bombkick, 0, shocking, bombkick, yunsun16_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1998, bombkicka, bombkick, shocking, bombkick, yunsun16_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 199?, magicbub, 0, magicbub, magicbub, magicbub_state, empty_init, ROT0, "Yun Sung", "Magic Bubble", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 199?, magicbuba, magicbub, magicbub, magicbua, magicbub_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-1302 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 199?, magicbubb, magicbub, shocking, magicbua, shocking_state, empty_init, ROT0, "Yun Sung", "Magic Bubble (Adult version, YS-0211 PCB)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1996, paprazzi, 0, shocking, paprazzi, shocking_state, empty_init, ROT270, "Yun Sung", "Paparazzi", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, shocking, 0, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, shockingk, shocking, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, shockingko, shocking, shocking, shocking, shocking_state, empty_init, ROT0, "Yun Sung", "Shocking (Korea, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1998, bombkick, 0, shocking, bombkick, shocking_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1998, bombkicka, bombkick, shocking, bombkick, shocking_state, empty_init, ROT0, "Yun Sung", "Bomb Kick (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/bagman.h b/src/mame/includes/bagman.h
index 135596da4b3..b25cdfb65df 100644
--- a/src/mame/includes/bagman.h
+++ b/src/mame/includes/bagman.h
@@ -26,7 +26,6 @@ public:
m_spriteram(*this, "spriteram")
{ }
- void bagman_base(machine_config &config);
void botanic(machine_config &config);
void sbagman(machine_config &config);
void bagman(machine_config &config);
@@ -63,6 +62,7 @@ protected:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void update_pal();
+ void bagman_base(machine_config &config);
void main_map(address_map &map);
void main_portmap(address_map &map);
void pickin_map(address_map &map);
diff --git a/src/mame/includes/bombjack.h b/src/mame/includes/bombjack.h
index ae3d055d617..b9940c9a041 100644
--- a/src/mame/includes/bombjack.h
+++ b/src/mame/includes/bombjack.h
@@ -27,6 +27,14 @@ public:
m_soundlatch(*this, "soundlatch")
{ }
+ void bombjack(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+private:
DECLARE_READ8_MEMBER(soundlatch_read_and_clear);
DECLARE_WRITE8_MEMBER(irq_mask_w);
DECLARE_WRITE8_MEMBER(bombjack_videoram_w);
@@ -35,19 +43,15 @@ public:
DECLARE_WRITE8_MEMBER(bombjack_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_bombjack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
TIMER_CALLBACK_MEMBER(soundlatch_callback);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
- void bombjack(machine_config &config);
void audio_io_map(address_map &map);
void audio_map(address_map &map);
void main_map(address_map &map);
-private:
+
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h
index c4655c01398..7ab54184d3e 100644
--- a/src/mame/includes/cheekyms.h
+++ b/src/mame/includes/cheekyms.h
@@ -31,10 +31,18 @@ public:
{
}
+ DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
+
+ void cheekyms(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+private:
DECLARE_WRITE8_MEMBER(port_40_w);
DECLARE_WRITE8_MEMBER(port_80_w);
- DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
INTERRUPT_GEN_MEMBER(vblank_irq);
TILE_GET_INFO_MEMBER(get_tile_info);
@@ -42,17 +50,11 @@ public:
DECLARE_PALETTE_INIT(cheekyms);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, int flip);
- void cheekyms(machine_config &config);
void io_map(address_map &map);
void main_map(address_map &map);
-protected:
- virtual void machine_start() override;
- virtual void video_start() override;
-
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, int flip);
-private:
// devices
required_device<cpu_device> m_maincpu;
required_device<cheekyms_audio_device> m_sound_board;
diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h
index ae11aa0d10b..074b788c4c6 100644
--- a/src/mame/includes/cosmic.h
+++ b/src/mame/includes/cosmic.h
@@ -5,6 +5,10 @@
Cosmic Guerilla & other Universal boards (in cosmic.c)
*************************************************************************/
+#ifndef MAME_INCLUDES_COSMIC_H
+#define MAME_INCLUDES_COSMIC_H
+
+#pragma once
#include "machine/timer.h"
#include "sound/samples.h"
@@ -19,8 +23,8 @@
class cosmic_state : public driver_device
{
public:
- cosmic_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ cosmic_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_in_ports(*this, "IN%u", 0),
@@ -30,7 +34,8 @@ public:
m_dac(*this, "dac"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@@ -122,3 +127,5 @@ public:
void magspot_map(address_map &map);
void panic_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_COSMIC_H
diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h
index 0a7e4fac548..328c263da4f 100644
--- a/src/mame/includes/docastle.h
+++ b/src/mame/includes/docastle.h
@@ -37,6 +37,11 @@ public:
void idsoccer(machine_config &config);
void docastle(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* devices */
required_device<cpu_device> m_maincpu;
@@ -78,9 +83,6 @@ private:
DECLARE_READ8_MEMBER(idsoccer_adpcm_status_r);
DECLARE_WRITE8_MEMBER(idsoccer_adpcm_w);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(docastle);
DECLARE_VIDEO_START(dorunrun);
uint32_t screen_update_docastle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/drgnmst.h b/src/mame/includes/drgnmst.h
index 1aaa25532c0..a42ad4eeca7 100644
--- a/src/mame/includes/drgnmst.h
+++ b/src/mame/includes/drgnmst.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_DRGNMST_H
+#define MAME_INCLUDES_DRGNMST_H
+
+#pragma once
#include "cpu/pic16c5x/pic16c5x.h"
#include "sound/okim6295.h"
@@ -22,12 +26,18 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
void drgnmst(machine_config &config);
void init_drgnmst();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_vidregs;
@@ -74,9 +84,6 @@ private:
TILEMAP_MAPPER_MEMBER(md_tilemap_scan_cols);
TILEMAP_MAPPER_MEMBER(bg_tilemap_scan_cols);
DECLARE_PALETTE_DECODER(drgnmst_IIIIRRRRGGGGBBBB);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
uint8_t drgnmst_asciitohex( uint8_t data );
@@ -87,3 +94,5 @@ private:
void drgnmst_main_map(address_map &map);
void drgnmst_oki1_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_DRGNMST_H
diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h
index 8ef889fe92f..6bf0456c7f2 100644
--- a/src/mame/includes/fromanc2.h
+++ b/src/mame/includes/fromanc2.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Takahiro Nogi, Uki
+#ifndef MAME_INCLUDES_FROMANC2_H
+#define MAME_INCLUDES_FROMANC2_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "machine/eepromser.h"
@@ -20,7 +24,8 @@ public:
m_rpalette(*this, "rpalette"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2"),
- m_uart(*this, "uart") { }
+ m_uart(*this, "uart")
+ { }
void fromanc2(machine_config &config);
void fromancr(machine_config &config);
@@ -122,3 +127,5 @@ private:
void fromanc4_main_map(address_map &map);
void fromancr_main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_FROMANC2_H
diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h
index bdcda416618..108730614a3 100644
--- a/src/mame/includes/fromance.h
+++ b/src/mame/includes/fromance.h
@@ -8,6 +8,10 @@
and Bryan McPhail, Nicola Salmoria, Aaron Giles
***************************************************************************/
+#ifndef MAME_INCLUDES_FROMANCE_H
+#define MAME_INCLUDES_FROMANCE_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@@ -19,8 +23,8 @@
class fromance_state : public driver_device
{
public:
- fromance_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ fromance_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_spriteram(*this, "spriteram"),
@@ -76,6 +80,10 @@ private:
/* memory pointers (used by pipedrm) */
optional_shared_ptr<uint8_t> m_videoram;
+ optional_device<generic_latch_8_device> m_sublatch;
+ optional_device<msm5205_device> m_msm;
+ required_device<screen_device> m_screen;
+
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
@@ -110,13 +118,10 @@ private:
DECLARE_VIDEO_START(nekkyoku);
DECLARE_VIDEO_START(fromance);
TIMER_CALLBACK_MEMBER(crtc_interrupt_gen);
- inline void get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer );
- inline void get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer );
+ inline void get_fromance_tile_info(tile_data &tileinfo, int tile_index, int layer);
+ inline void get_nekkyoku_tile_info(tile_data &tileinfo, int tile_index, int layer);
void crtc_refresh();
DECLARE_WRITE_LINE_MEMBER(fromance_adpcm_int);
- optional_device<generic_latch_8_device> m_sublatch;
- optional_device<msm5205_device> m_msm;
- required_device<screen_device> m_screen;
void fromance_main_map(address_map &map);
void fromance_sub_io_map(address_map &map);
void fromance_sub_map(address_map &map);
@@ -125,3 +130,5 @@ private:
void nekkyoku_sub_io_map(address_map &map);
void nekkyoku_sub_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_FROMANCE_H
diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h
index 4b15168682b..36d7c102c0f 100644
--- a/src/mame/includes/gaiden.h
+++ b/src/mame/includes/gaiden.h
@@ -52,6 +52,10 @@ public:
void init_shadoww();
void init_wildfang();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
/* memory pointers */
required_shared_ptr_array<uint16_t, 3> m_videoram;
@@ -146,9 +150,6 @@ private:
void mastninj_map(address_map &map);
void mastninj_sound_map(address_map &map);
void sound_map(address_map &map);
-protected:
- virtual void machine_start() override;
- virtual void machine_reset() override;
};
#endif // MAME_INCLUDES_GAIDEN_H
diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h
index 1a077467976..bde2245aff5 100644
--- a/src/mame/includes/gstriker.h
+++ b/src/mame/includes/gstriker.h
@@ -1,9 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Farfetch'd, David Haywood
-
#ifndef MAME_INCLUDES_GSTRIKER_H
#define MAME_INCLUDES_GSTRIKER_H
+#pragma once
+
#include "machine/6850acia.h"
#include "machine/gen_latch.h"
#include "machine/mb3773.h"
@@ -18,8 +19,8 @@
class gstriker_state : public driver_device
{
public:
- gstriker_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ gstriker_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_spr(*this, "vsystem_spr"),
@@ -46,6 +47,10 @@ public:
void init_twcup94a();
void init_twcup94b();
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -84,9 +89,6 @@ private:
DECLARE_READ16_MEMBER(vbl_toggle_r);
DECLARE_WRITE16_MEMBER(vbl_toggle_w);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
@@ -97,4 +99,4 @@ private:
void twcup94_map(address_map &map);
};
-#endif
+#endif // MAME_INCLUDES_GSTRIKER_H
diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h
index a7f7cd5ccdc..f34bd6b34d1 100644
--- a/src/mame/includes/ladybug.h
+++ b/src/mame/includes/ladybug.h
@@ -19,7 +19,11 @@ class ladybug_base_state : public driver_device
protected:
using driver_device::driver_device;
- void palette_init_common(palette_device &palette, const uint8_t *color_prom, int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1);
+ void palette_init_common(
+ palette_device &palette, const uint8_t *color_prom,
+ int r_bit0, int r_bit1,
+ int g_bit0, int g_bit1,
+ int b_bit0, int b_bit1) const;
};
diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h
index 03b24b62c7b..56dbd070952 100644
--- a/src/mame/includes/laserbat.h
+++ b/src/mame/includes/laserbat.h
@@ -5,6 +5,10 @@
Laser Battle / Lazarian - Cat and Mouse
*************************************************************************/
+#ifndef MAME_INCLUDES_LASERBAT_H
+#define MAME_INCLUDES_LASERBAT_H
+
+#pragma once
#include "audio/zaccaria.h"
@@ -23,7 +27,6 @@
class laserbat_state_base : public driver_device
{
public:
-
laserbat_state_base(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_mux_ports(*this, {"ROW0", "ROW1", "SW1", "SW2"})
@@ -164,7 +167,6 @@ public:
void laserbat(machine_config &config);
protected:
-
// initialisation/startup
virtual void machine_start() override;
@@ -206,3 +208,5 @@ protected:
required_device<zac1b11107_audio_device> m_audiopcb;
};
+
+#endif // MAME_INCLUDES_LASERBAT_H
diff --git a/src/mame/includes/lucky74.h b/src/mame/includes/lucky74.h
index 72326fb54c4..2608f448bcf 100644
--- a/src/mame/includes/lucky74.h
+++ b/src/mame/includes/lucky74.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Roberto Fresca
+#ifndef MAME_INCLUDES_LUCKY74_H
+#define MAME_INCLUDES_LUCKY74_H
+
+#pragma once
#include "sound/msm5205.h"
#include "emupal.h"
@@ -21,6 +25,12 @@ public:
void lucky74(machine_config &config);
+protected:
+ virtual void machine_start() override { m_lamps.resolve(); }
+ virtual void video_start() override;
+ virtual void machine_reset() override;
+ virtual void sound_start() override;
+
private:
DECLARE_READ8_MEMBER(custom_09R81P_port_r);
DECLARE_WRITE8_MEMBER(custom_09R81P_port_w);
@@ -44,11 +54,6 @@ private:
void lucky74_map(address_map &map);
void lucky74_portmap(address_map &map);
- virtual void machine_start() override { m_lamps.resolve(); }
- virtual void video_start() override;
- virtual void machine_reset() override;
- virtual void sound_start() override;
-
uint8_t m_ym2149_portb;
uint8_t m_usart_8251;
uint8_t m_copro_sm7831;
@@ -68,3 +73,5 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
output_finder<12> m_lamps;
};
+
+#endif // MAME_INCLUDES_LUCKY74_H
diff --git a/src/mame/includes/lvcards.h b/src/mame/includes/lvcards.h
index a49cf3f371d..44160a7b89c 100644
--- a/src/mame/includes/lvcards.h
+++ b/src/mame/includes/lvcards.h
@@ -18,34 +18,51 @@ public:
m_gfxdecode(*this, "gfxdecode")
{ }
- void lvpoker(machine_config &config);
void lvcards(machine_config &config);
- void ponttehk(machine_config &config);
+
+protected:
+ virtual void video_start() override;
+
+ DECLARE_WRITE8_MEMBER(videoram_w);
+ DECLARE_WRITE8_MEMBER(colorram_w);
private:
- uint8_t m_payout;
- uint8_t m_pulse;
- uint8_t m_result;
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
tilemap_t *m_bg_tilemap;
- DECLARE_WRITE8_MEMBER(control_port_2_w);
- DECLARE_WRITE8_MEMBER(control_port_2a_w);
- DECLARE_READ8_MEMBER(payout_r);
- DECLARE_WRITE8_MEMBER(lvcards_videoram_w);
- DECLARE_WRITE8_MEMBER(lvcards_colorram_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(lvcards);
- DECLARE_MACHINE_START(lvpoker);
- DECLARE_MACHINE_RESET(lvpoker);
uint32_t screen_update_lvcards(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
void lvcards_io_map(address_map &map);
void lvcards_map(address_map &map);
+};
+
+
+class lvpoker_state : public lvcards_state
+{
+public:
+ using lvcards_state::lvcards_state;
+
+ void lvpoker(machine_config &config);
+ void ponttehk(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ DECLARE_WRITE8_MEMBER(control_port_2_w);
+ DECLARE_WRITE8_MEMBER(control_port_2a_w);
+ DECLARE_READ8_MEMBER(payout_r);
+
void lvpoker_map(address_map &map);
void ponttehk_map(address_map &map);
+
+ uint8_t m_payout;
+ uint8_t m_pulse;
+ uint8_t m_result;
};
#endif // MAME_INCLUDES_LVCARDS_H
diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h
index 0e5972e2038..657b7d28737 100644
--- a/src/mame/includes/mouser.h
+++ b/src/mame/includes/mouser.h
@@ -5,14 +5,18 @@
Mouser
*************************************************************************/
+#ifndef MAME_INCLUDES_MOUSER_H
+#define MAME_INCLUDES_MOUSER_H
+
+#pragma once
#include "emupal.h"
class mouser_state : public driver_device
{
public:
- mouser_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mouser_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_spriteram(*this, "spriteram"),
@@ -20,12 +24,17 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_decrypted_opcodes(*this, "decrypted_opcodes") { }
+ m_decrypted_opcodes(*this, "decrypted_opcodes")
+ { }
void mouser(machine_config &config);
void init_mouser();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@@ -46,8 +55,6 @@ private:
DECLARE_WRITE8_MEMBER(mouser_sound_nmi_clear_w);
DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w);
DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
DECLARE_PALETTE_INIT(mouser);
uint32_t screen_update_mouser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(mouser_nmi_interrupt);
@@ -57,3 +64,5 @@ private:
void mouser_sound_io_map(address_map &map);
void mouser_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MOUSER_H
diff --git a/src/mame/includes/mrdo.h b/src/mame/includes/mrdo.h
index a14c9db7961..86861aaaae9 100644
--- a/src/mame/includes/mrdo.h
+++ b/src/mame/includes/mrdo.h
@@ -5,34 +5,47 @@
Mr. Do
*************************************************************************/
+#ifndef MAME_INCLUDES_MRDO_H
+#define MAME_INCLUDES_MRDO_H
+
+#pragma once
#include "emupal.h"
class mrdo_state : public driver_device
{
public:
- mrdo_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mrdo_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
- void mrlo(machine_config &config);
void mrdo(machine_config &config);
+ void mrlo(machine_config &config);
+
+protected:
+ virtual void video_start() override;
private:
- /* memory pointers */
+ // memory pointers
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
required_shared_ptr<uint8_t> m_spriteram;
- /* video-related */
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+
+ // video-related
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_flipscreen;
+
DECLARE_READ8_MEMBER(mrdo_SECRE_r);
DECLARE_WRITE8_MEMBER(mrdo_bgvideoram_w);
DECLARE_WRITE8_MEMBER(mrdo_fgvideoram_w);
@@ -41,12 +54,10 @@ private:
DECLARE_WRITE8_MEMBER(mrdo_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(mrdo);
uint32_t screen_update_mrdo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MRDO_H
diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h
index eaf04a0f602..9d481375383 100644
--- a/src/mame/includes/ninjakd2.h
+++ b/src/mame/includes/ninjakd2.h
@@ -5,10 +5,11 @@
UPL "sprite framebuffer" hardware
******************************************************************************/
-
#ifndef MAME_INCLUDES_NINJAKD2_H
#define MAME_INCLUDES_NINJAKD2_H
+#pragma once
+
#include "sound/samples.h"
#include "emupal.h"
#include "screen.h"
@@ -34,11 +35,11 @@ public:
void ninjakd2b(machine_config &config);
void ninjakd2(machine_config &config);
- void ninjakd2_core(machine_config &config);
void init_ninjakd2();
void init_bootleg();
+protected:
DECLARE_WRITE8_MEMBER(ninjakd2_bgvideoram_w);
DECLARE_WRITE8_MEMBER(ninjakd2_fgvideoram_w);
DECLARE_WRITE8_MEMBER(ninjakd2_bg_ctrl_w);
@@ -47,7 +48,6 @@ public:
DECLARE_WRITE8_MEMBER(ninjakd2_bankselect_w);
DECLARE_WRITE8_MEMBER(ninjakd2_soundreset_w);
-protected:
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
optional_shared_ptr<uint8_t> m_bg_videoram;
@@ -81,6 +81,8 @@ protected:
virtual void machine_reset() override;
virtual void video_start() override;
+ void ninjakd2_core(machine_config &config);
+
private:
required_device<cpu_device> m_soundcpu;
optional_device<samples_device> m_pcm;
@@ -134,7 +136,6 @@ public:
{ }
void robokid(machine_config &config);
- void robokid_main_cpu(address_map &map);
void init_robokid();
void init_robokidj();
@@ -150,6 +151,8 @@ protected:
TILEMAP_MAPPER_MEMBER(robokid_bg_scan);
template<int Layer> TILE_GET_INFO_MEMBER(robokid_get_bg_tile_info);
+ void robokid_main_cpu(address_map &map);
+
private:
DECLARE_READ8_MEMBER(motion_error_verbose_r);
@@ -198,4 +201,4 @@ private:
int m_io_protection_tick;
};
-#endif
+#endif // MAME_INCLUDES_NINJAKD2_H
diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h
index 747d3ea058b..1a0dca5c8ba 100644
--- a/src/mame/includes/ojankohs.h
+++ b/src/mame/includes/ojankohs.h
@@ -5,6 +5,11 @@
Ojanko High School & other Video System mahjong series
*************************************************************************/
+#ifndef MAME_INCLUDES_OJANKOHS_H
+#define MAME_INCLUDES_OJANKOHS_H
+
+#pragma once
+
#include "sound/msm5205.h"
#include "emupal.h"
#include "screen.h"
@@ -36,6 +41,9 @@ public:
void ojankoc(machine_config &config);
void ojankoy(machine_config &config);
+protected:
+ virtual void machine_reset() override;
+
private:
/* memory pointers */
optional_shared_ptr<uint8_t> m_videoram;
@@ -100,7 +108,6 @@ private:
DECLARE_READ8_MEMBER(ojankohs_dipsw2_r);
TILE_GET_INFO_MEMBER(ojankohs_get_tile_info);
TILE_GET_INFO_MEMBER(ojankoy_get_tile_info);
- virtual void machine_reset() override;
DECLARE_MACHINE_START(ojankohs);
DECLARE_VIDEO_START(ojankohs);
DECLARE_MACHINE_START(ojankoy);
@@ -123,3 +130,5 @@ private:
void ojankoy_io_map(address_map &map);
void ojankoy_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_OJANKOHS_H
diff --git a/src/mame/includes/paradise.h b/src/mame/includes/paradise.h
index be2583b568f..54cd338d76d 100644
--- a/src/mame/includes/paradise.h
+++ b/src/mame/includes/paradise.h
@@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Luca Elia
+#ifndef MAME_INCLUDES_PARADISE_H
+#define MAME_INCLUDES_PARADISE_H
+
+#pragma once
+
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
@@ -7,8 +12,8 @@
class paradise_state : public driver_device
{
public:
- paradise_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ paradise_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_oki2(*this, "oki2"),
m_gfxdecode(*this, "gfxdecode"),
@@ -19,8 +24,26 @@ public:
m_vram_2(*this, "vram_2"),
m_videoram(*this, "videoram"),
m_paletteram(*this, "paletteram"),
- m_spriteram(*this, "spriteram") { }
+ m_spriteram(*this, "spriteram")
+ { }
+
+ void penkyi(machine_config &config);
+ void tgtball(machine_config &config);
+ void paradise(machine_config &config);
+ void madball(machine_config &config);
+ void torus(machine_config &config);
+ void penky(machine_config &config);
+
+ void init_torus();
+ void init_paradise();
+ void init_tgtball();
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+private:
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<okim6295_device> m_oki2;
@@ -68,18 +91,10 @@ public:
// tgtball specific
DECLARE_WRITE8_MEMBER(tgtball_flipscreen_w);
- void init_torus();
- void init_paradise();
- void init_tgtball();
-
TILE_GET_INFO_MEMBER(get_tile_info_0);
TILE_GET_INFO_MEMBER(get_tile_info_1);
TILE_GET_INFO_MEMBER(get_tile_info_2);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
-
uint32_t screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -88,12 +103,6 @@ public:
void update_pix_palbank();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
- void penkyi(machine_config &config);
- void tgtball(machine_config &config);
- void paradise(machine_config &config);
- void madball(machine_config &config);
- void torus(machine_config &config);
- void penky(machine_config &config);
void base_map(address_map &map);
void paradise_io_map(address_map &map);
void paradise_map(address_map &map);
@@ -101,3 +110,5 @@ public:
void torus_io_map(address_map &map);
void torus_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_PARADISE_H
diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h
index 58ab46dd00d..f5038b82d73 100644
--- a/src/mame/includes/pbaction.h
+++ b/src/mame/includes/pbaction.h
@@ -5,6 +5,10 @@
Pinball Action
*************************************************************************/
+#ifndef MAME_INCLUDES_PBACTION_H
+#define MAME_INCLUDES_PBACTION_H
+
+#pragma once
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
@@ -14,8 +18,8 @@
class pbaction_state : public driver_device
{
public:
- pbaction_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ pbaction_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_videoram2(*this, "videoram2"),
m_colorram(*this, "colorram"),
@@ -28,7 +32,8 @@ public:
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_ctc(*this, "ctc"),
- m_decrypted_opcodes(*this, "decrypted_opcodes") { }
+ m_decrypted_opcodes(*this, "decrypted_opcodes")
+ { }
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@@ -128,3 +133,5 @@ private:
uint8_t m_outlatch;
uint32_t m_outdata;
};
+
+#endif // MAME_INCLUDES_PBACTION_H
diff --git a/src/mame/includes/redclash.h b/src/mame/includes/redclash.h
index 27b568749c0..72f5259e686 100644
--- a/src/mame/includes/redclash.h
+++ b/src/mame/includes/redclash.h
@@ -36,6 +36,11 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
DECLARE_WRITE_LINE_MEMBER(screen_vblank_redclash);
DECLARE_WRITE8_MEMBER(redclash_videoram_w);
@@ -47,9 +52,6 @@ private:
DECLARE_PALETTE_INIT(redclash);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_redclash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void redclash_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void redclash_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/rpunch.h b/src/mame/includes/rpunch.h
index a1bb240ff9b..3a8f2b2409a 100644
--- a/src/mame/includes/rpunch.h
+++ b/src/mame/includes/rpunch.h
@@ -38,6 +38,10 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(hi_bits_r);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -72,8 +76,6 @@ private:
DECLARE_WRITE8_MEMBER(upd_data_w);
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
DECLARE_VIDEO_START(rpunch);
DECLARE_VIDEO_START(svolley);
diff --git a/src/mame/includes/senjyo.h b/src/mame/includes/senjyo.h
index 2d59c9401ce..2bd07c8402e 100644
--- a/src/mame/includes/senjyo.h
+++ b/src/mame/includes/senjyo.h
@@ -50,6 +50,11 @@ public:
void init_starfore();
void init_starforc();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* devices */
required_device<cpu_device> m_maincpu;
@@ -113,9 +118,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
TILE_GET_INFO_MEMBER(get_bg3_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_bgbitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_radar(bitmap_rgb32 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/silkroad.h b/src/mame/includes/silkroad.h
index 597eb304dd8..e6c68f80a96 100644
--- a/src/mame/includes/silkroad.h
+++ b/src/mame/includes/silkroad.h
@@ -1,13 +1,18 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, R. Belmont
+#ifndef MAME_INCLUDES_SILKROAD_H
+#define MAME_INCLUDES_SILKROAD_H
+
+#pragma once
+
#include "sound/okim6295.h"
#include "emupal.h"
class silkroad_state : public driver_device
{
public:
- silkroad_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ silkroad_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -19,6 +24,10 @@ public:
void silkroad(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -38,11 +47,10 @@ private:
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void cpu_map(address_map &map);
void oki_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_SILKROAD_H
diff --git a/src/mame/includes/snowbros.h b/src/mame/includes/snowbros.h
index 9611cec6dcb..8ab85ad38d5 100644
--- a/src/mame/includes/snowbros.h
+++ b/src/mame/includes/snowbros.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Mike Coates
+#ifndef MAME_INCLUDES_SNOWBROS_H
+#define MAME_INCLUDES_SNOWBROS_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "machine/timer.h"
@@ -21,7 +25,7 @@ public:
m_pandora(*this, "pandora"),
m_hyperpac_ram(*this, "hyperpac_ram"),
m_bootleg_spriteram16(*this, "spriteram16b")
- { }
+ { }
void _4in1(machine_config &config);
void semiprot(machine_config &config);
@@ -108,3 +112,5 @@ private:
void wintbob_map(address_map &map);
void yutnori_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_SNOWBROS_H
diff --git a/src/mame/includes/solomon.h b/src/mame/includes/solomon.h
index aad7b75fc90..4fb5cf33f90 100644
--- a/src/mame/includes/solomon.h
+++ b/src/mame/includes/solomon.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Mirko Buffoni
+#ifndef MAME_INCLUDES_SOLOMON_H
+#define MAME_INCLUDES_SOLOMON_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "emupal.h"
@@ -7,8 +11,8 @@
class solomon_state : public driver_device
{
public:
- solomon_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ solomon_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
@@ -18,10 +22,14 @@ public:
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch") { }
+ m_soundlatch(*this, "soundlatch")
+ { }
void solomon(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_videoram;
@@ -43,10 +51,9 @@ private:
DECLARE_WRITE8_MEMBER(solomon_flipscreen_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void video_start() override;
uint32_t screen_update_solomon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_irq);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -57,3 +64,5 @@ private:
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
+
+#endif // MAME_INCLUDES_SOLOMON_H
diff --git a/src/mame/includes/spbactn.h b/src/mame/includes/spbactn.h
index 221a4d09c6d..4b0975858f7 100644
--- a/src/mame/includes/spbactn.h
+++ b/src/mame/includes/spbactn.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_SPBACTN_H
+#define MAME_INCLUDES_SPBACTN_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "video/tecmo_spr.h"
@@ -10,8 +14,8 @@
class spbactn_state : public driver_device
{
public:
- spbactn_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ spbactn_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@@ -25,7 +29,7 @@ public:
m_spvideoram(*this, "spvideoram"),
m_extraram(*this, "extraram"),
m_extraram2(*this, "extraram2")
- { }
+ { }
void spbactn(machine_config &config);
void spbactnp(machine_config &config);
@@ -92,3 +96,5 @@ private:
void spbactnp_extra_map(address_map &map);
void spbactnp_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_SPBACTN_H
diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h
index ebda843b00b..0ec5c8316e0 100644
--- a/src/mame/includes/spcforce.h
+++ b/src/mame/includes/spcforce.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Zsolt Vasvari
+#ifndef MAME_INCLUDES_SPCFORCE_H
+#define MAME_INCLUDES_SPCFORCE_H
+
+#pragma once
#include "machine/74259.h"
#include "sound/sn76496.h"
@@ -27,6 +31,9 @@ public:
void meteors(machine_config &config);
void spcforce(machine_config &config);
+protected:
+ virtual void machine_start() override;
+
private:
DECLARE_WRITE8_MEMBER(SN76496_latch_w);
DECLARE_READ8_MEMBER(SN76496_select_r);
@@ -50,8 +57,6 @@ private:
void spcforce_map(address_map &map);
void spcforce_sound_map(address_map &map);
- virtual void machine_start() override;
-
required_device<cpu_device> m_maincpu;
required_device<ls259_device> m_mainlatch;
required_device<cpu_device> m_audiocpu;
@@ -73,3 +78,5 @@ private:
int m_sn3_ready;
uint8_t m_irq_mask;
};
+
+#endif // MAME_INCLUDES_SPCFORCE_H
diff --git a/src/mame/includes/suprridr.h b/src/mame/includes/suprridr.h
index 50ff0f28ac2..4bbe6a1a4ae 100644
--- a/src/mame/includes/suprridr.h
+++ b/src/mame/includes/suprridr.h
@@ -5,6 +5,10 @@
Venture Line Super Rider driver
**************************************************************************/
+#ifndef MAME_INCLUDES_SUPRRIDR_H
+#define MAME_INCLUDES_SUPRRIDR_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "emupal.h"
@@ -12,8 +16,8 @@
class suprridr_state : public driver_device
{
public:
- suprridr_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ suprridr_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_soundlatch(*this, "soundlatch"),
@@ -28,6 +32,11 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(control_r);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -61,9 +70,6 @@ private:
INTERRUPT_GEN_MEMBER(main_nmi_gen);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(suprridr);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -74,3 +80,5 @@ private:
void sound_map(address_map &map);
void sound_portmap(address_map &map);
};
+
+#endif // MAME_INCLUDES_SUPRRIDR_H
diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h
index 3295c7e08bd..6086505018d 100644
--- a/src/mame/includes/suprslam.h
+++ b/src/mame/includes/suprslam.h
@@ -8,6 +8,8 @@
#ifndef MAME_INCLUDES_SUPRSLAM_H
#define MAME_INCLUDES_SUPRSLAM_H
+#pragma once
+
#include "video/vsystem_spr.h"
#include "machine/gen_latch.h"
#include "video/k053936.h"
@@ -15,8 +17,8 @@
class suprslam_state : public driver_device
{
public:
- suprslam_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ suprslam_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_screen_videoram(*this, "screen_videoram"),
m_bg_videoram(*this, "bg_videoram"),
m_sp_videoram(*this, "sp_videoram"),
@@ -28,10 +30,16 @@ public:
m_spr(*this, "vsystem_spr"),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
- m_soundlatch(*this, "soundlatch") { }
+ m_soundlatch(*this, "soundlatch")
+ { }
void suprslam(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_screen_videoram;
@@ -64,9 +72,6 @@ private:
DECLARE_WRITE8_MEMBER(spr_ctrl_w);
TILE_GET_INFO_MEMBER(get_suprslam_tile_info);
TILE_GET_INFO_MEMBER(get_suprslam_bg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_suprslam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void sound_io_map(address_map &map);
diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h
index 3ea1b7e97dd..8410d827090 100644
--- a/src/mame/includes/tail2nos.h
+++ b/src/mame/includes/tail2nos.h
@@ -5,6 +5,10 @@
Tail to Nose / Super Formula
*************************************************************************/
+#ifndef MAME_INCLUDES_TAIL2NOS_H
+#define MAME_INCLUDES_TAIL2NOS_H
+
+#pragma once
#include "machine/6850acia.h"
#include "machine/gen_latch.h"
@@ -14,8 +18,8 @@
class tail2nos_state : public driver_device
{
public:
- tail2nos_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tail2nos_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_txvideoram(*this, "txvideoram"),
m_spriteram(*this, "spriteram"),
m_zoomram(*this, "k051316"),
@@ -25,12 +29,18 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
- m_acia(*this, "acia") { }
+ m_acia(*this, "acia")
+ { }
void tail2nos(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_txvideoram;
@@ -59,9 +69,6 @@ private:
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_READ8_MEMBER(sound_semaphore_r);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_tail2nos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void tail2nos_postload();
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
@@ -70,3 +77,5 @@ private:
void sound_map(address_map &map);
void sound_port_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TAIL2NOS_H
diff --git a/src/mame/includes/tankbust.h b/src/mame/includes/tankbust.h
index 55eb41245bb..09995cab17a 100644
--- a/src/mame/includes/tankbust.h
+++ b/src/mame/includes/tankbust.h
@@ -1,13 +1,17 @@
// license:GPL-2.0+
// copyright-holders:Jarek Burczynski
+#ifndef MAME_INCLUDES_TANKBUST_H
+#define MAME_INCLUDES_TANKBUST_H
+
+#pragma once
#include "emupal.h"
class tankbust_state : public driver_device
{
public:
- tankbust_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tankbust_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_gfxdecode(*this, "gfxdecode"),
@@ -15,10 +19,16 @@ public:
m_txtram(*this, "txtram"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
- m_spriteram(*this, "spriteram") { }
+ m_spriteram(*this, "spriteram")
+ { }
void tankbust(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@@ -55,9 +65,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_txt_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(tankbust);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -71,3 +78,5 @@ private:
void map_cpu2(address_map &map);
void port_map_cpu2(address_map &map);
};
+
+#endif // MAME_INCLUDES_TANKBUST_H
diff --git a/src/mame/includes/taotaido.h b/src/mame/includes/taotaido.h
index a964a17fde1..5a19f50a0e7 100644
--- a/src/mame/includes/taotaido.h
+++ b/src/mame/includes/taotaido.h
@@ -3,6 +3,8 @@
#ifndef MAME_INCLUDES_TAOTAIDO_H
#define MAME_INCLUDES_TAOTAIDO_H
+#pragma once
+
#include "video/vsystem_spr.h"
#include "machine/gen_latch.h"
#include "machine/mb3773.h"
@@ -28,6 +30,10 @@ public:
void taotaido(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -62,9 +68,6 @@ private:
TILE_GET_INFO_MEMBER(bg_tile_info);
TILEMAP_MAPPER_MEMBER(tilemap_scan_rows);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
uint32_t tile_callback( uint32_t code );
diff --git a/src/mame/includes/tbowl.h b/src/mame/includes/tbowl.h
index 3aa1070dd3a..538e85b5861 100644
--- a/src/mame/includes/tbowl.h
+++ b/src/mame/includes/tbowl.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_TBOWL_H
+#define MAME_INCLUDES_TBOWL_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@@ -9,8 +13,8 @@
class tbowl_state : public driver_device
{
public:
- tbowl_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tbowl_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_msm1(*this, "msm1"),
@@ -23,10 +27,15 @@ public:
m_bgvideoram(*this, "bgvideoram"),
m_bg2videoram(*this, "bg2videoram"),
m_spriteram(*this, "spriteram")
- { }
+ { }
void tbowl(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -76,10 +85,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
-
uint32_t screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -91,3 +96,5 @@ private:
void _6206B_map(address_map &map);
void _6206C_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TBOWL_H
diff --git a/src/mame/includes/tecmo.h b/src/mame/includes/tecmo.h
index 4693b0cf307..66579f650e3 100644
--- a/src/mame/includes/tecmo.h
+++ b/src/mame/includes/tecmo.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+#ifndef MAME_INCLUDES_TECMO_H
+#define MAME_INCLUDES_TECMO_H
+
+#pragma once
#include "sound/msm5205.h"
#include "video/tecmo_spr.h"
@@ -9,8 +13,8 @@
class tecmo_state : public driver_device
{
public:
- tecmo_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tecmo_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_msm(*this, "msm"),
@@ -25,7 +29,8 @@ public:
m_fgscroll(*this, "fgscroll"),
m_bgscroll(*this, "bgscroll"),
m_adpcm_rom(*this, "adpcm"),
- m_mainbank(*this, "mainbank") { }
+ m_mainbank(*this, "mainbank")
+ { }
void geminib(machine_config &config);
void backfirt(machine_config &config);
@@ -102,3 +107,5 @@ private:
void silkwormp_sound_map(address_map &map);
void backfirt_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TECMO_H
diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h
index e8d12358ffe..d04175c69e4 100644
--- a/src/mame/includes/tecmosys.h
+++ b/src/mame/includes/tecmosys.h
@@ -5,6 +5,10 @@
tecmosys protection simulation
***************************************************************************/
+#ifndef MAME_INCLUDES_TECMOSYS_H
+#define MAME_INCLUDES_TECMOSYS_H
+
+#pragma once
#include "machine/eepromser.h"
#include "machine/gen_latch.h"
@@ -45,6 +49,10 @@ public:
void init_deroon();
void init_tkdensho();
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -94,16 +102,13 @@ private:
DECLARE_READ16_MEMBER(eeprom_r);
DECLARE_WRITE16_MEMBER(eeprom_w);
- virtual void machine_start() override;
- virtual void video_start() override;
-
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void prot_init(int which);
void prot_reset();
inline void set_color_555(pen_t color, int rshift, int gshift, int bshift, uint16_t data);
- void render_sprites_to_bitmap(bitmap_rgb32 &bitmap, uint16_t extrax, uint16_t extray );
+ void render_sprites_to_bitmap(bitmap_rgb32 &bitmap, uint16_t extrax, uint16_t extray);
void tilemap_copy_to_compose(uint16_t pri, const rectangle &cliprect);
void do_final_mix(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void descramble();
@@ -113,3 +118,5 @@ private:
void oki_map(address_map &map);
void sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TECMOSYS_H
diff --git a/src/mame/includes/tehkanwc.h b/src/mame/includes/tehkanwc.h
index ca1d8fe509e..7f8dfb7aad4 100644
--- a/src/mame/includes/tehkanwc.h
+++ b/src/mame/includes/tehkanwc.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi, Roberto Fresca
+#ifndef MAME_INCLUDES_TEHKANWC_H
+#define MAME_INCLUDES_TEHKANWC_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@@ -8,8 +12,8 @@
class tehkanwc_state : public driver_device
{
public:
- tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_subcpu(*this, "sub"),
@@ -30,12 +34,18 @@ public:
void init_teedoff();
-private:
+protected:
enum
{
TIMER_RESET
};
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<cpu_device> m_subcpu;
@@ -89,9 +99,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t led,int player);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -100,6 +107,6 @@ private:
void sound_mem(address_map &map);
void sound_port(address_map &map);
void sub_mem(address_map &map);
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
+
+#endif // MAME_INCLUDES_TEHKANWC_H
diff --git a/src/mame/includes/thepit.h b/src/mame/includes/thepit.h
index 7c09fc849b9..d886aa0d9ae 100644
--- a/src/mame/includes/thepit.h
+++ b/src/mame/includes/thepit.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Zsolt Vasvari
+#ifndef MAME_INCLUDES_THEPIT_H
+#define MAME_INCLUDES_THEPIT_H
+
+#pragma once
#include "machine/74259.h"
#include "emupal.h"
@@ -7,8 +11,8 @@
class thepit_state : public driver_device
{
public:
- thepit_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ thepit_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_mainlatch(*this, "mainlatch"),
m_gfxdecode(*this, "gfxdecode"),
@@ -16,7 +20,8 @@ public:
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_attributesram(*this, "attributesram"),
- m_spriteram(*this, "spriteram") { }
+ m_spriteram(*this, "spriteram")
+ { }
void suprmous(machine_config &config);
void desertdn(machine_config &config);
@@ -26,6 +31,10 @@ public:
void init_rtriv();
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<ls259_device> m_mainlatch;
@@ -66,8 +75,6 @@ private:
TILE_GET_INFO_MEMBER(solid_get_tile_info);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(thepit);
DECLARE_PALETTE_INIT(suprmous);
@@ -83,3 +90,5 @@ private:
void intrepid_main_map(address_map &map);
void thepit_main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_THEPIT_H
diff --git a/src/mame/includes/tiamc1.h b/src/mame/includes/tiamc1.h
index 3788460ebe6..e7000f885bf 100644
--- a/src/mame/includes/tiamc1.h
+++ b/src/mame/includes/tiamc1.h
@@ -23,6 +23,10 @@ public:
void kot(machine_config &config);
void tiamc1(machine_config &config);
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
std::unique_ptr<uint8_t[]> m_videoram;
uint8_t *m_tileram;
@@ -56,8 +60,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_VIDEO_START(kot);
DECLARE_PALETTE_INIT(tiamc1);
uint32_t screen_update_tiamc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/timelimt.h b/src/mame/includes/timelimt.h
index 28bab011a61..b6aac719d7d 100644
--- a/src/mame/includes/timelimt.h
+++ b/src/mame/includes/timelimt.h
@@ -24,6 +24,10 @@ public:
void timelimt(machine_config &config);
protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -51,8 +55,6 @@ protected:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(timelimt);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h
index 8a9f37f0b46..496d337a2f5 100644
--- a/src/mame/includes/toaplan1.h
+++ b/src/mame/includes/toaplan1.h
@@ -4,6 +4,10 @@
ToaPlan game hardware from 1988-1991
------------------------------------
****************************************************************************/
+#ifndef MAME_INCLUDES_TOAPLAN1_H
+#define MAME_INCLUDES_TOAPLAN1_H
+
+#pragma once
#include "cpu/m68000/m68000.h"
#include "sound/3812intf.h"
@@ -14,8 +18,8 @@
class toaplan1_state : public driver_device
{
public:
- toaplan1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ toaplan1_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_bgpaletteram(*this, "bgpalette"),
m_fgpaletteram(*this, "fgpalette"),
m_sharedram(*this, "sharedram"),
@@ -26,7 +30,8 @@ public:
m_dsp(*this, "dsp"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
void demonwld(machine_config &config);
void samesame(machine_config &config);
@@ -204,8 +209,8 @@ protected:
class toaplan1_rallybik_state : public toaplan1_state
{
public:
- toaplan1_rallybik_state(const machine_config &mconfig, device_type type, const char *tag)
- : toaplan1_state(mconfig, type, tag),
+ toaplan1_rallybik_state(const machine_config &mconfig, device_type type, const char *tag) :
+ toaplan1_state(mconfig, type, tag),
m_spritegen(*this, "scu")
{
}
@@ -226,3 +231,5 @@ private:
void rallybik_main_map(address_map &map);
void rallybik_sound_io_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TOAPLAN1_H
diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h
index cfb517020ee..37b4cc3f557 100644
--- a/src/mame/includes/toaplan2.h
+++ b/src/mame/includes/toaplan2.h
@@ -18,10 +18,6 @@
#include "screen.h"
/**************** Machine stuff ******************/
-//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
-
-// We encode priority with colour in the tilemaps, so need a larger palette
-#define T2PALETTE_LENGTH 0x10000
class toaplan2_state : public driver_device
{
@@ -92,6 +88,9 @@ protected:
virtual void device_post_load() override;
private:
+ // We encode priority with colour in the tilemaps, so need a larger palette
+ static constexpr unsigned T2PALETTE_LENGTH = 0x10000;
+
optional_shared_ptr<uint8_t> m_shared_ram; // 8 bit RAM shared between 68K and sound CPU
optional_shared_ptr<uint16_t> m_tx_videoram;
optional_shared_ptr<uint16_t> m_tx_lineselect;
@@ -195,7 +194,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(toaplan2_reset);
-
void batrider_68k_mem(address_map &map);
void batrider_dma_mem(address_map &map);
void batrider_sound_z80_mem(address_map &map);
diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h
index 16f687075af..6cd75e8e917 100644
--- a/src/mame/includes/twincobr.h
+++ b/src/mame/includes/twincobr.h
@@ -42,6 +42,8 @@ public:
void init_twincobr();
protected:
+ virtual void video_start() override;
+
optional_shared_ptr<uint8_t> m_sharedram;
optional_device<buffered_spriteram8_device> m_spriteram8;
optional_device<buffered_spriteram16_device> m_spriteram16;
@@ -121,7 +123,6 @@ protected:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
DECLARE_MACHINE_RESET(twincobr);
- DECLARE_VIDEO_START(toaplan0);
uint32_t screen_update_toaplan0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(twincobr_vblank_irq);
DECLARE_WRITE_LINE_MEMBER(wardner_vblank_irq);
diff --git a/src/mame/includes/unico.h b/src/mame/includes/unico.h
index 42e6a9697c0..524cfe855f2 100644
--- a/src/mame/includes/unico.h
+++ b/src/mame/includes/unico.h
@@ -16,13 +16,13 @@ public:
unico_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_palette(*this, "palette"),
+ m_gfxdecode(*this, "gfxdecode"),
m_leds(*this, "led%u", 0U),
m_vram(*this, "vram", 0),
m_scroll(*this, "scroll", 0),
m_spriteram(*this, "spriteram", 0),
m_maincpu(*this, "maincpu"),
- m_oki(*this, "oki"),
- m_gfxdecode(*this, "gfxdecode")
+ m_oki(*this, "oki")
{ }
void burglarx(machine_config &config);
@@ -46,6 +46,7 @@ protected:
void burglarx_map(address_map &map);
required_device<palette_device> m_palette;
+ required_device<gfxdecode_device> m_gfxdecode;
output_finder<2> m_leds;
private:
@@ -58,7 +59,6 @@ private:
required_device<cpu_device> m_maincpu;
optional_device<okim6295_device> m_oki;
- required_device<gfxdecode_device> m_gfxdecode;
};
class zeropnt_state : public unico_state
diff --git a/src/mame/includes/wc90.h b/src/mame/includes/wc90.h
index 16588b3cb48..854d877977e 100644
--- a/src/mame/includes/wc90.h
+++ b/src/mame/includes/wc90.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
+#ifndef MAME_INCLUDES_WC90_H
+#define MAME_INCLUDES_WC90_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "video/tecmo_spr.h"
@@ -8,8 +12,8 @@
class wc90_state : public driver_device
{
public:
- wc90_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ wc90_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
@@ -40,6 +44,10 @@ public:
void wc90(machine_config &config);
void pac90(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -84,8 +92,6 @@ private:
TILE_GET_INFO_MEMBER(track_get_bg_tile_info);
TILE_GET_INFO_MEMBER(track_get_fg_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_VIDEO_START(wc90t);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -94,3 +100,5 @@ private:
void wc90_map_1(address_map &map);
void wc90_map_2(address_map &map);
};
+
+#endif // MAME_INCLUDES_WC90_H
diff --git a/src/mame/includes/wc90b.h b/src/mame/includes/wc90b.h
index cb39b39b774..29d33d5f278 100644
--- a/src/mame/includes/wc90b.h
+++ b/src/mame/includes/wc90b.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
+#ifndef MAME_INCLUDES_WC90B_H
+#define MAME_INCLUDES_WC90B_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
@@ -8,8 +12,8 @@
class wc90b_state : public driver_device
{
public:
- wc90b_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ wc90b_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_audiocpu(*this, "audiocpu"),
@@ -25,10 +29,15 @@ public:
m_scroll1y(*this, "scroll1y"),
m_scroll2y(*this, "scroll2y"),
m_scroll_x_lo(*this, "scroll_x_lo"),
- m_spriteram(*this, "spriteram") { }
+ m_spriteram(*this, "spriteram")
+ { }
void wc90b(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@@ -70,9 +79,6 @@ private:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority );
@@ -80,3 +86,5 @@ private:
void wc90b_map1(address_map &map);
void wc90b_map2(address_map &map);
};
+
+#endif // MAME_INCLUDES_WC90B_H
diff --git a/src/mame/includes/welltris.h b/src/mame/includes/welltris.h
index 7ff69828a85..34d026d1665 100644
--- a/src/mame/includes/welltris.h
+++ b/src/mame/includes/welltris.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_WELLTRIS_H
+#define MAME_INCLUDES_WELLTRIS_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "video/vsystem_spr2.h"
@@ -7,8 +11,8 @@
class welltris_state : public driver_device
{
public:
- welltris_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ welltris_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_spr_old(*this, "vsystem_spr_old"),
@@ -16,7 +20,8 @@ public:
m_soundlatch(*this, "soundlatch"),
m_spriteram(*this, "spriteram"),
m_pixelram(*this, "pixelram"),
- m_charvideoram(*this, "charvideoram") { }
+ m_charvideoram(*this, "charvideoram")
+ { }
void quiz18k(machine_config &config);
void welltris(machine_config &config);
@@ -24,6 +29,10 @@ public:
void init_quiz18k();
void init_welltris();
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@@ -49,9 +58,6 @@ private:
DECLARE_WRITE16_MEMBER(scrollreg_w);
DECLARE_WRITE16_MEMBER(charvideoram_w);
- virtual void machine_start() override;
- virtual void video_start() override;
-
TILE_GET_INFO_MEMBER(get_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -60,3 +66,5 @@ private:
void sound_map(address_map &map);
void sound_port_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_WELLTRIS_H
diff --git a/src/mame/includes/xxmissio.h b/src/mame/includes/xxmissio.h
index 4e7816b619a..61047b5041f 100644
--- a/src/mame/includes/xxmissio.h
+++ b/src/mame/includes/xxmissio.h
@@ -1,25 +1,34 @@
// license:BSD-3-Clause
// copyright-holders:Uki
+#ifndef MAME_INCLUDES_XXMISSIO_H
+#define MAME_INCLUDES_XXMISSIO_H
+
+#pragma once
#include "emupal.h"
class xxmissio_state : public driver_device
{
public:
- xxmissio_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ xxmissio_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_bgram(*this, "bgram"),
m_fgram(*this, "fgram"),
- m_spriteram(*this, "spriteram") { }
+ m_spriteram(*this, "spriteram")
+ { }
void xxmissio(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(status_r);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
@@ -46,16 +55,12 @@ private:
DECLARE_WRITE8_MEMBER(scroll_x_w);
DECLARE_WRITE8_MEMBER(scroll_y_w);
-
DECLARE_WRITE_LINE_MEMBER(interrupt_m);
INTERRUPT_GEN_MEMBER(interrupt_s);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
-
DECLARE_PALETTE_DECODER(BBGGRRII);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -64,3 +69,5 @@ private:
void map1(address_map &map);
void map2(address_map &map);
};
+
+#endif // MAME_INCLUDES_XXMISSIO_H
diff --git a/src/mame/includes/yunsun16.h b/src/mame/includes/yunsun16.h
index b2466fff2c9..6da9e985cd6 100644
--- a/src/mame/includes/yunsun16.h
+++ b/src/mame/includes/yunsun16.h
@@ -6,6 +6,10 @@
Yun Sung 16 Bit Games
*************************************************************************/
+#ifndef MAME_INCLUDES_YUNSUN16_H
+#define MAME_INCLUDES_YUNSUN16_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "screen.h"
@@ -13,62 +17,100 @@
class yunsun16_state : public driver_device
{
-public:
- yunsun16_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+protected:
+ yunsun16_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch"),
m_vram(*this, "vram_%u", 0U),
m_scrollram(*this, "scrollram_%u", 0U),
m_priorityram(*this, "priorityram"),
- m_spriteram(*this, "spriteram"),
- m_okibank(*this, "okibank") { }
+ m_spriteram(*this, "spriteram")
+ { }
- void magicbub(machine_config &config);
- void shocking(machine_config &config);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
- void init_magicbub();
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ void main_map(address_map &map);
-private:
/* devices */
required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- optional_device<generic_latch_8_device> m_soundlatch; // magicbub
+private:
/* memory pointers */
required_shared_ptr_array<uint16_t, 2> m_vram;
required_shared_ptr_array<uint16_t, 2> m_scrollram;
required_shared_ptr<uint16_t> m_priorityram;
required_shared_ptr<uint16_t> m_spriteram;
- optional_memory_bank m_okibank;
-
/* other video-related elements */
tilemap_t *m_tilemap[2];
int m_sprites_scrolldx;
int m_sprites_scrolldy;
- DECLARE_WRITE8_MEMBER(sound_bank_w);
- DECLARE_WRITE16_MEMBER(magicbub_sound_command_w);
template<int Layer> DECLARE_WRITE16_MEMBER(vram_w);
TILEMAP_MAPPER_MEMBER(tilemap_scan_pages);
template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
+ void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+};
+
+
+class magicbub_state : public yunsun16_state
+{
+public:
+ magicbub_state(const machine_config &mconfig, device_type type, const char *tag) :
+ yunsun16_state(mconfig, type, tag),
+ m_audiocpu(*this, "audiocpu"),
+ m_soundlatch(*this, "soundlatch")
+ { }
+
+ void magicbub(machine_config &config);
+
+protected:
+ void main_map(address_map &map);
+
+private:
+ DECLARE_WRITE8_MEMBER(magicbub_sound_command_w);
+
+ void sound_map(address_map &map);
+ void sound_port_map(address_map &map);
+
+ required_device<cpu_device> m_audiocpu;
+ required_device<generic_latch_8_device> m_soundlatch;
+};
+
+
+class shocking_state : public yunsun16_state
+{
+public:
+ shocking_state(const machine_config &mconfig, device_type type, const char *tag) :
+ yunsun16_state(mconfig, type, tag),
+ m_okibank(*this, "okibank")
+ { }
+
+ void shocking(machine_config &config);
+
+protected:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
void main_map(address_map &map);
+
+private:
+ DECLARE_WRITE8_MEMBER(sound_bank_w);
+
void oki_map(address_map &map);
- void sound_map(address_map &map);
- void sound_port_map(address_map &map);
+
+ required_memory_bank m_okibank;
};
+
+#endif // MAME_INCLUDES_YUNSUN16_H
diff --git a/src/mame/includes/zac2650.h b/src/mame/includes/zac2650.h
index 7d88e0edf62..5ca4c5a3bfd 100644
--- a/src/mame/includes/zac2650.h
+++ b/src/mame/includes/zac2650.h
@@ -25,6 +25,9 @@ public:
void tinvader(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
/* devices */
required_device<cpu_device> m_maincpu;
@@ -49,7 +52,6 @@ private:
DECLARE_WRITE8_MEMBER(zac_s2636_w);
DECLARE_READ8_MEMBER(tinvader_port_0_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(zac2650);
uint32_t screen_update_tinvader(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
int SpriteCollision(int first,int second);
diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h
index 729a7003762..2069dab3521 100644
--- a/src/mame/includes/zaccaria.h
+++ b/src/mame/includes/zaccaria.h
@@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+#ifndef MAME_INCLUDES_ZACCARIA_H
+#define MAME_INCLUDES_ZACCARIA_H
+
+#pragma once
+
#include "audio/zaccaria.h"
#include "emupal.h"
@@ -21,6 +26,11 @@ public:
void zaccaria(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
DECLARE_READ8_MEMBER(dsw_r);
DECLARE_READ8_MEMBER(prot1_r);
@@ -33,9 +43,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
DECLARE_WRITE8_MEMBER(dsw_sel_w);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(zaccaria);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
@@ -59,3 +66,5 @@ private:
tilemap_t *m_bg_tilemap;
uint8_t m_nmi_mask;
};
+
+#endif // MAME_INCLUDES_ZACCARIA_H
diff --git a/src/mame/video/ladybug.cpp b/src/mame/video/ladybug.cpp
index 13c64dda857..ddb0f709924 100644
--- a/src/mame/video/ladybug.cpp
+++ b/src/mame/video/ladybug.cpp
@@ -273,7 +273,7 @@ void zerohour_stars_device::device_reset()
***************************************************************************/
void ladybug_base_state::palette_init_common(palette_device &palette, const uint8_t *color_prom,
- int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1)
+ int r_bit0, int r_bit1, int g_bit0, int g_bit1, int b_bit0, int b_bit1) const
{
static const int resistances[2] = { 470, 220 };
double rweights[2], gweights[2], bweights[2];
diff --git a/src/mame/video/lvcards.cpp b/src/mame/video/lvcards.cpp
index d7e9ad81758..d1d3200710a 100644
--- a/src/mame/video/lvcards.cpp
+++ b/src/mame/video/lvcards.cpp
@@ -48,13 +48,13 @@ PALETTE_INIT_MEMBER(lvcards_state, lvcards)//Ever so slightly different, but dif
}
}
-WRITE8_MEMBER(lvcards_state::lvcards_videoram_w)
+WRITE8_MEMBER(lvcards_state::videoram_w)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(lvcards_state::lvcards_colorram_w)
+WRITE8_MEMBER(lvcards_state::colorram_w)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
diff --git a/src/mame/video/twincobr.cpp b/src/mame/video/twincobr.cpp
index e4be34470bb..61951369a1b 100644
--- a/src/mame/video/twincobr.cpp
+++ b/src/mame/video/twincobr.cpp
@@ -82,7 +82,7 @@ void twincobr_state::twincobr_create_tilemaps()
m_tx_tilemap->set_transparent_pen(0);
}
-VIDEO_START_MEMBER(twincobr_state,toaplan0)
+void twincobr_state::video_start()
{
m_spritegen->alloc_sprite_bitmap(*m_screen);