From 2b0eec6adfa7a4904646056ce4290835a68c5e5e Mon Sep 17 00:00:00 2001 From: David Haywood Date: Sat, 30 Jun 2018 05:21:17 +0100 Subject: more private: use (K,L,M) (#3714) --- src/mame/drivers/k1003.cpp | 6 +- src/mame/drivers/k28.cpp | 9 +- src/mame/drivers/k8915.cpp | 9 +- src/mame/drivers/kas89.cpp | 9 +- src/mame/drivers/kdt6.cpp | 7 +- src/mame/drivers/kenseim.cpp | 22 ++-- src/mame/drivers/kingpin.cpp | 7 +- src/mame/drivers/kissproto.cpp | 6 +- src/mame/drivers/koftball.cpp | 7 +- src/mame/drivers/koikoi.cpp | 4 +- src/mame/drivers/konamigq.cpp | 7 +- src/mame/drivers/konamigv.cpp | 8 +- src/mame/drivers/konamim2.cpp | 9 +- src/mame/drivers/konblands.cpp | 9 +- src/mame/drivers/konendev.cpp | 3 +- src/mame/drivers/konin.cpp | 6 +- src/mame/drivers/konmedal.cpp | 11 +- src/mame/drivers/konmedal68k.cpp | 7 +- src/mame/drivers/kontest.cpp | 8 +- src/mame/drivers/kron.cpp | 41 ++++---- src/mame/drivers/krz2000.cpp | 3 +- src/mame/drivers/ksys573.cpp | 141 +++++++++++++------------ src/mame/drivers/kungfur.cpp | 5 +- src/mame/drivers/kurukuru.cpp | 6 +- src/mame/drivers/laser3k.cpp | 6 +- src/mame/drivers/laserbas.cpp | 6 +- src/mame/drivers/lastbank.cpp | 11 +- src/mame/drivers/lastfght.cpp | 10 +- src/mame/drivers/laz_aftrshok.cpp | 4 +- src/mame/drivers/laz_awetoss.cpp | 4 +- src/mame/drivers/laz_ribrac.cpp | 4 +- src/mame/drivers/lb186.cpp | 3 +- src/mame/drivers/lbeach.cpp | 4 +- src/mame/drivers/lcmate2.cpp | 4 +- src/mame/drivers/leapster.cpp | 8 +- src/mame/drivers/learnwin.cpp | 6 +- src/mame/drivers/lft.cpp | 6 +- src/mame/drivers/lg-dvd.cpp | 4 +- src/mame/drivers/lgp.cpp | 7 +- src/mame/drivers/lilith.cpp | 6 +- src/mame/drivers/limenko.cpp | 22 ++-- src/mame/drivers/lindbergh.cpp | 4 +- src/mame/drivers/littlerb.cpp | 10 +- src/mame/drivers/lola8a.cpp | 6 +- src/mame/drivers/looping.cpp | 6 +- src/mame/drivers/ltd.cpp | 12 ++- src/mame/drivers/luckybal.cpp | 7 +- src/mame/drivers/lwriter.cpp | 7 +- src/mame/drivers/m14.cpp | 12 ++- src/mame/drivers/m20.cpp | 7 +- src/mame/drivers/m24.cpp | 5 +- src/mame/drivers/m3.cpp | 8 +- src/mame/drivers/m63.cpp | 13 ++- src/mame/drivers/m6805evs.cpp | 4 +- src/mame/drivers/m79152pc.cpp | 6 +- src/mame/drivers/mac128.cpp | 15 +-- src/mame/drivers/macs.cpp | 13 ++- src/mame/drivers/madmotor.cpp | 6 +- src/mame/drivers/magic10.cpp | 26 ++--- src/mame/drivers/magicard.cpp | 9 +- src/mame/drivers/magicfly.cpp | 8 +- src/mame/drivers/magtouch.cpp | 4 +- src/mame/drivers/majorpkr.cpp | 8 +- src/mame/drivers/manohman.cpp | 3 +- src/mame/drivers/marinedt.cpp | 7 +- src/mame/drivers/marywu.cpp | 6 +- src/mame/drivers/maxaflex.cpp | 6 +- src/mame/drivers/maygayep.cpp | 8 +- src/mame/drivers/maygaysw.cpp | 5 +- src/mame/drivers/maygayv1.cpp | 9 +- src/mame/drivers/mazerbla.cpp | 12 ++- src/mame/drivers/mbc200.cpp | 6 +- src/mame/drivers/mc10.cpp | 11 +- src/mame/drivers/mc1000.cpp | 4 +- src/mame/drivers/mc8020.cpp | 6 +- src/mame/drivers/mc8030.cpp | 6 +- src/mame/drivers/mcb216.cpp | 8 +- src/mame/drivers/mccpm.cpp | 4 +- src/mame/drivers/meadwttl.cpp | 9 +- src/mame/drivers/megaphx.cpp | 17 +-- src/mame/drivers/megaplay.cpp | 9 +- src/mame/drivers/meijinsn.cpp | 6 +- src/mame/drivers/mekd2.cpp | 6 +- src/mame/drivers/mephisto.cpp | 15 +-- src/mame/drivers/mephisto_montec.cpp | 16 +-- src/mame/drivers/mephistp.cpp | 6 +- src/mame/drivers/merit.cpp | 44 ++++---- src/mame/drivers/mes.cpp | 6 +- src/mame/drivers/metlfrzr.cpp | 7 +- src/mame/drivers/meyc8080.cpp | 5 +- src/mame/drivers/mfabfz.cpp | 13 +-- src/mame/drivers/mgames.cpp | 5 +- src/mame/drivers/mgavegas.cpp | 16 ++- src/mame/drivers/mgolf.cpp | 3 +- src/mame/drivers/mice.cpp | 3 +- src/mame/drivers/micral.cpp | 7 +- src/mame/drivers/micro20.cpp | 6 +- src/mame/drivers/microdec.cpp | 9 +- src/mame/drivers/microkit.cpp | 6 +- src/mame/drivers/micropin.cpp | 11 +- src/mame/drivers/microterm.cpp | 8 +- src/mame/drivers/microvsn.cpp | 6 +- src/mame/drivers/midas.cpp | 9 +- src/mame/drivers/midqslvr.cpp | 4 +- src/mame/drivers/midzeus.cpp | 15 +-- src/mame/drivers/mightyframe.cpp | 8 +- src/mame/drivers/mikrosha.cpp | 4 +- src/mame/drivers/milwaukee.cpp | 8 +- src/mame/drivers/mini2440.cpp | 10 +- src/mame/drivers/miniboy7.cpp | 6 +- src/mame/drivers/minicom.cpp | 9 +- src/mame/drivers/miniforce.cpp | 11 +- src/mame/drivers/miniframe.cpp | 6 +- src/mame/drivers/minitel_2_rpic.cpp | 6 +- src/mame/drivers/minivadr.cpp | 4 +- src/mame/drivers/mirage.cpp | 6 +- src/mame/drivers/mirax.cpp | 7 +- src/mame/drivers/missb2.cpp | 11 +- src/mame/drivers/missile.cpp | 17 +-- src/mame/drivers/mits680b.cpp | 6 +- src/mame/drivers/mjsenpu.cpp | 7 +- src/mame/drivers/mjsister.cpp | 16 +-- src/mame/drivers/mk1.cpp | 6 +- src/mame/drivers/mk14.cpp | 6 +- src/mame/drivers/mk2.cpp | 7 +- src/mame/drivers/mk85.cpp | 4 +- src/mame/drivers/mk90.cpp | 4 +- src/mame/drivers/mkit09.cpp | 13 ++- src/mame/drivers/mlanding.cpp | 20 ++-- src/mame/drivers/mmagic.cpp | 7 +- src/mame/drivers/mmd1.cpp | 10 +- src/mame/drivers/mmm.cpp | 6 +- src/mame/drivers/mmodular.cpp | 11 +- src/mame/drivers/mod8.cpp | 6 +- src/mame/drivers/modellot.cpp | 6 +- src/mame/drivers/mogura.cpp | 4 +- src/mame/drivers/mole.cpp | 4 +- src/mame/drivers/molecular.cpp | 6 +- src/mame/drivers/monacogp.cpp | 9 +- src/mame/drivers/monty.cpp | 3 +- src/mame/drivers/monzagp.cpp | 6 +- src/mame/drivers/mps1230.cpp | 7 +- src/mame/drivers/mpu12wbk.cpp | 7 +- src/mame/drivers/mpu2.cpp | 3 +- src/mame/drivers/mpu3.cpp | 6 +- src/mame/drivers/mpu4dealem.cpp | 4 +- src/mame/drivers/mpu4plasma.cpp | 4 +- src/mame/drivers/mpu4vid.cpp | 51 ++++----- src/mame/drivers/mpu5.cpp | 3 +- src/mame/drivers/mquake.cpp | 6 +- src/mame/drivers/mrgame.cpp | 9 +- src/mame/drivers/ms0515.cpp | 7 +- src/mame/drivers/ms9540.cpp | 6 +- src/mame/drivers/msbc1.cpp | 3 +- src/mame/drivers/mstation.cpp | 4 +- src/mame/drivers/mt735.cpp | 4 +- src/mame/drivers/mtouchxl.cpp | 5 +- src/mame/drivers/multi16.cpp | 18 ++-- src/mame/drivers/multi8.cpp | 6 +- src/mame/drivers/multigam.cpp | 20 ++-- src/mame/drivers/murogem.cpp | 4 +- src/mame/drivers/murogmbl.cpp | 8 +- src/mame/drivers/mvme147.cpp | 6 +- src/mame/drivers/mw18w.cpp | 9 +- src/mame/drivers/mwarr.cpp | 4 +- src/mame/drivers/mwsub.cpp | 2 +- src/mame/drivers/mx2178.cpp | 6 +- src/mame/drivers/myb3k.cpp | 18 ++-- src/mame/drivers/mycom.cpp | 9 +- src/mame/drivers/myvision.cpp | 6 +- src/mame/drivers/mz2000.cpp | 8 +- src/mame/drivers/mz3500.cpp | 6 +- src/mame/drivers/mz6500.cpp | 4 +- src/mame/drivers/mzr8105.cpp | 3 +- src/mame/includes/kchamp.h | 11 +- src/mame/includes/kickgoal.h | 12 ++- src/mame/includes/kim1.h | 3 +- src/mame/includes/kingobox.h | 11 +- src/mame/includes/klax.h | 3 +- src/mame/includes/kncljoe.h | 4 +- src/mame/includes/kopunch.h | 10 +- src/mame/includes/kramermc.h | 7 +- src/mame/includes/ksayakyu.h | 4 +- src/mame/includes/kyocera.h | 25 +++-- src/mame/includes/kyugo.h | 21 ++-- src/mame/includes/labyrunr.h | 4 +- src/mame/includes/ladyfrog.h | 6 +- src/mame/includes/lasso.h | 15 +-- src/mame/includes/lastduel.h | 6 +- src/mame/includes/lazercmd.h | 11 +- src/mame/includes/lc80.h | 11 +- src/mame/includes/legionna.h | 29 ++--- src/mame/includes/leland.h | 165 ++++++++++++++++------------- src/mame/includes/lemmings.h | 4 +- src/mame/includes/lethal.h | 6 +- src/mame/includes/lethalj.h | 18 ++-- src/mame/includes/liberate.h | 21 ++-- src/mame/includes/liberatr.h | 3 +- src/mame/includes/lisa.h | 15 +-- src/mame/includes/lkage.h | 11 +- src/mame/includes/llc.h | 13 ++- src/mame/includes/lordgun.h | 12 ++- src/mame/includes/lsasquad.h | 8 +- src/mame/includes/lucky74.h | 5 +- src/mame/includes/lvcards.h | 8 +- src/mame/includes/lviv.h | 2 +- src/mame/includes/lwings.h | 15 +-- src/mame/includes/lynx.h | 35 +++--- src/mame/includes/m10.h | 30 +++--- src/mame/includes/m107.h | 17 +-- src/mame/includes/m5.h | 99 +++++++++-------- src/mame/includes/m52.h | 6 +- src/mame/includes/m57.h | 4 +- src/mame/includes/m58.h | 4 +- src/mame/includes/m62.h | 42 ++++---- src/mame/includes/m72.h | 54 +++++----- src/mame/includes/m79amb.h | 2 +- src/mame/includes/m90.h | 27 ++--- src/mame/includes/m92.h | 46 ++++---- src/mame/includes/mac.h | 199 ++++++++++++++++++----------------- src/mame/includes/macpci.h | 6 +- src/mame/includes/macrossp.h | 11 +- src/mame/includes/madalien.h | 9 +- src/mame/includes/mainevt.h | 7 +- src/mame/includes/mainsnk.h | 4 +- src/mame/includes/mappy.h | 27 ++--- src/mame/includes/marineb.h | 16 +-- src/mame/includes/mario.h | 12 ++- src/mame/includes/markham.h | 11 +- src/mame/includes/matmania.h | 6 +- src/mame/includes/maygay1b.h | 17 +-- src/mame/includes/mbc55x.h | 17 +-- src/mame/includes/mbee.h | 51 ++++----- src/mame/includes/mc1502.h | 9 +- src/mame/includes/mcatadv.h | 6 +- src/mame/includes/mcr68.h | 36 ++++--- src/mame/includes/meadows.h | 16 +-- src/mame/includes/megadriv_acbl.h | 17 +-- src/mame/includes/megasys1.h | 78 +++++++------- src/mame/includes/megazone.h | 4 +- src/mame/includes/mermaid.h | 6 +- src/mame/includes/metalmx.h | 3 +- src/mame/includes/metlclsh.h | 7 +- src/mame/includes/metro.h | 113 ++++++++++---------- src/mame/includes/mexico86.h | 8 +- src/mame/includes/mhavoc.h | 28 ++--- src/mame/includes/micro3d.h | 28 ++--- src/mame/includes/micronic.h | 6 +- src/mame/includes/microtan.h | 9 +- src/mame/includes/midtunit.h | 77 ++++++++------ src/mame/includes/midvunit.h | 60 ++++++----- src/mame/includes/midwunit.h | 28 ++--- src/mame/includes/midxunit.h | 9 +- src/mame/includes/midyunit.h | 69 ++++++------ src/mame/includes/mikie.h | 4 +- src/mame/includes/mikro80.h | 15 +-- src/mame/includes/mikromik.h | 10 +- src/mame/includes/mitchell.h | 59 ++++++----- src/mame/includes/mjkjidai.h | 7 +- src/mame/includes/model1.h | 84 +++++++-------- src/mame/includes/model3.h | 82 ++++++++------- src/mame/includes/momoko.h | 4 +- src/mame/includes/moo.h | 8 +- src/mame/includes/mosaic.h | 6 +- src/mame/includes/mouser.h | 7 +- src/mame/includes/mpf1.h | 18 ++-- src/mame/includes/mpz80.h | 4 +- src/mame/includes/mrdo.h | 6 +- src/mame/includes/mrflea.h | 4 +- src/mame/includes/mrjong.h | 4 +- src/mame/includes/msisaac.h | 4 +- src/mame/includes/msx.h | 94 +++++++++-------- src/mame/includes/mtx.h | 8 +- src/mame/includes/mugsmash.h | 4 +- src/mame/includes/multfish.h | 40 +++---- src/mame/includes/munchmo.h | 2 +- src/mame/includes/mustache.h | 7 +- src/mame/includes/mw8080bw.h | 173 ++++++++++++++++-------------- src/mame/includes/mystston.h | 8 +- src/mame/includes/mystwarr.h | 14 +-- src/mame/includes/mz2500.h | 4 +- src/mame/includes/mz700.h | 12 ++- src/mame/includes/mz80.h | 12 ++- 283 files changed, 2372 insertions(+), 1782 deletions(-) diff --git a/src/mame/drivers/k1003.cpp b/src/mame/drivers/k1003.cpp index 2ae7770bc22..06f58a76d64 100644 --- a/src/mame/drivers/k1003.cpp +++ b/src/mame/drivers/k1003.cpp @@ -55,16 +55,18 @@ public: , m_digits(*this, "digit%u", 0U) { } + void k1003(machine_config &config); + +private: DECLARE_READ8_MEMBER(port2_r); DECLARE_READ8_MEMBER(key_r); DECLARE_WRITE8_MEMBER(disp_1_w); DECLARE_WRITE8_MEMBER(disp_2_w); DECLARE_WRITE8_MEMBER(disp_w); - void k1003(machine_config &config); void k1003_io(address_map &map); void k1003_mem(address_map &map); -private: + uint8_t m_disp_1; uint8_t m_disp_2; uint8_t bit_to_dec(uint8_t val); diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp index cba6a6ab8ce..8d5b2e43da0 100644 --- a/src/mame/drivers/k28.cpp +++ b/src/mame/drivers/k28.cpp @@ -47,6 +47,11 @@ public: m_display_maxx(0) { } + void k28(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(power_on); + +private: // devices required_device m_maincpu; required_device m_tms6100; @@ -89,12 +94,8 @@ public: DECLARE_WRITE8_MEMBER(mcu_p2_w); DECLARE_WRITE_LINE_MEMBER(mcu_prog_w); - DECLARE_INPUT_CHANGED_MEMBER(power_on); void power_off(); - void k28(machine_config &config); - -protected: virtual void machine_start() override; virtual void machine_reset() override; }; diff --git a/src/mame/drivers/k8915.cpp b/src/mame/drivers/k8915.cpp index b5047dcdcb2..c28625d3584 100644 --- a/src/mame/drivers/k8915.cpp +++ b/src/mame/drivers/k8915.cpp @@ -29,14 +29,17 @@ public: , m_p_chargen(*this, "chargen") { } - DECLARE_WRITE8_MEMBER(k8915_a8_w); + void k8915(machine_config &config); + void init_k8915(); + +private: + DECLARE_WRITE8_MEMBER(k8915_a8_w); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void k8915(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + uint8_t m_framecnt; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/kas89.cpp b/src/mame/drivers/kas89.cpp index 4f7bef01d91..639c11189fa 100644 --- a/src/mame/drivers/kas89.cpp +++ b/src/mame/drivers/kas89.cpp @@ -226,6 +226,11 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void kas89(machine_config &config); + + void init_kas89(); + +private: DECLARE_WRITE8_MEMBER(mux_w); DECLARE_READ8_MEMBER(mux_r); DECLARE_WRITE8_MEMBER(control_w); @@ -233,17 +238,13 @@ public: DECLARE_WRITE8_MEMBER(int_ack_w); DECLARE_WRITE8_MEMBER(led_mux_data_w); DECLARE_WRITE8_MEMBER(led_mux_select_w); - void init_kas89(); TIMER_DEVICE_CALLBACK_MEMBER(kas89_nmi_cb); TIMER_DEVICE_CALLBACK_MEMBER(kas89_sound_nmi_cb); - void kas89(machine_config &config); void audio_io(address_map &map); void audio_map(address_map &map); void kas89_io(address_map &map); void kas89_map(address_map &map); - -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/kdt6.cpp b/src/mame/drivers/kdt6.cpp index 33b90dd6c0d..8aeb0c48814 100644 --- a/src/mame/drivers/kdt6.cpp +++ b/src/mame/drivers/kdt6.cpp @@ -67,6 +67,9 @@ public: m_video_address(0) { } + void psi98(machine_config &config); + +private: DECLARE_WRITE_LINE_MEMBER(busreq_w); DECLARE_READ8_MEMBER(memory_r); DECLARE_WRITE8_MEMBER(memory_w); @@ -106,14 +109,12 @@ public: DECLARE_WRITE_LINE_MEMBER(rs232b_rx_w); DECLARE_WRITE_LINE_MEMBER(siob_tx_w); - void psi98(machine_config &config); void psi98_io(address_map &map); void psi98_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: required_device m_cpu; required_device m_dma; required_device m_sio; diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp index d7d1dea5769..d47473dfc07 100644 --- a/src/mame/drivers/kenseim.cpp +++ b/src/mame/drivers/kenseim.cpp @@ -168,6 +168,17 @@ public: } } + void kenseim(machine_config &config); + + void init_kenseim(); + + DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_1234_r); + DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_5678_r); + DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_9_r); + DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_req_r); + DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_LVm_r); + +private: void mole_up(int side, int mole) { if (side == 0) @@ -201,10 +212,8 @@ public: } } - /* kenseim */ DECLARE_WRITE16_MEMBER(cps1_kensei_w); - void init_kenseim(); // certain @@ -224,20 +233,11 @@ public: WRITE8_MEMBER(mb8936_portb_w); // maybe molesb output? (6-bits?) WRITE8_MEMBER(mb8936_portf_w); // maybe strobe output? - - DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_1234_r); - DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_5678_r); - DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_9_r); - DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_req_r); - DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_LVm_r); - void set_leds(uint32_t ledstates); - void kenseim(machine_config &config); void kenseim_io_map(address_map &map); void kenseim_map(address_map &map); -private: uint8_t m_to_68k_cmd_low; uint8_t m_to_68k_cmd_d9; uint8_t m_to_68k_cmd_req; diff --git a/src/mame/drivers/kingpin.cpp b/src/mame/drivers/kingpin.cpp index 721febc25b6..fac0f3e346a 100644 --- a/src/mame/drivers/kingpin.cpp +++ b/src/mame/drivers/kingpin.cpp @@ -51,15 +51,16 @@ public: , m_soundlatch(*this, "soundlatch") { } - DECLARE_WRITE8_MEMBER(sound_nmi_w); void kingpin(machine_config &config); + void dealracl(machine_config &config); + +private: + DECLARE_WRITE8_MEMBER(sound_nmi_w); void kingpin_io_map(address_map &map); void kingpin_program_map(address_map &map); void kingpin_sound_map(address_map &map); - void dealracl(machine_config &config); void dealracl_program_map(address_map &map); -private: required_device m_maincpu; required_device m_audiocpu; required_device m_soundlatch; diff --git a/src/mame/drivers/kissproto.cpp b/src/mame/drivers/kissproto.cpp index a8c9b79bcb3..c1d956907f0 100644 --- a/src/mame/drivers/kissproto.cpp +++ b/src/mame/drivers/kissproto.cpp @@ -21,15 +21,15 @@ public: void kissp(machine_config &config); void kissp_map(address_map &map); -protected: + void init_kissp(); + +private: // devices required_device m_maincpu; // driver_device overrides virtual void machine_reset() override; -public: - void init_kissp(); }; diff --git a/src/mame/drivers/koftball.cpp b/src/mame/drivers/koftball.cpp index 014056e3a0c..e8a7ca4acde 100644 --- a/src/mame/drivers/koftball.cpp +++ b/src/mame/drivers/koftball.cpp @@ -53,6 +53,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void koftball(machine_config &config); + + void init_koftball(); + +private: required_device m_maincpu; required_shared_ptr m_main_ram; required_shared_ptr m_bmc_1_videoram; @@ -68,13 +73,11 @@ public: DECLARE_WRITE16_MEMBER(prot_w); DECLARE_WRITE16_MEMBER(bmc_1_videoram_w); DECLARE_WRITE16_MEMBER(bmc_2_videoram_w); - void init_koftball(); TILE_GET_INFO_MEMBER(get_t1_tile_info); TILE_GET_INFO_MEMBER(get_t2_tile_info); virtual void video_start() override; uint32_t screen_update_koftball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(bmc_interrupt); - void koftball(machine_config &config); void koftball_mem(address_map &map); void ramdac_map(address_map &map); }; diff --git a/src/mame/drivers/koikoi.cpp b/src/mame/drivers/koikoi.cpp index b23d944678a..555a20f7e7d 100644 --- a/src/mame/drivers/koikoi.cpp +++ b/src/mame/drivers/koikoi.cpp @@ -59,6 +59,9 @@ public: m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode") { } + void koikoi(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; @@ -83,7 +86,6 @@ public: uint32_t screen_update_koikoi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; - void koikoi(machine_config &config); void koikoi_io_map(address_map &map); void koikoi_map(address_map &map); }; diff --git a/src/mame/drivers/konamigq.cpp b/src/mame/drivers/konamigq.cpp index c5d9e2f5601..144272e586f 100644 --- a/src/mame/drivers/konamigq.cpp +++ b/src/mame/drivers/konamigq.cpp @@ -98,6 +98,11 @@ public: { } + void konamigq(machine_config &config); + + void init_konamigq(); + +private: required_device m_maincpu; required_device m_soundcpu; required_device m_dasp; @@ -117,7 +122,6 @@ public: DECLARE_WRITE16_MEMBER(tms57002_data_word_w); DECLARE_READ16_MEMBER(tms57002_status_word_r); DECLARE_WRITE16_MEMBER(tms57002_control_word_w); - void init_konamigq(); DECLARE_MACHINE_START(konamigq); DECLARE_MACHINE_RESET(konamigq); INTERRUPT_GEN_MEMBER(tms_sync); @@ -125,7 +129,6 @@ public: void scsi_dma_read( uint32_t *p_n_psxram, uint32_t n_address, int32_t n_size ); void scsi_dma_write( uint32_t *p_n_psxram, uint32_t n_address, int32_t n_size ); - void konamigq(machine_config &config); void konamigq_dasp_map(address_map &map); void konamigq_k054539_map(address_map &map); void konamigq_map(address_map &map); diff --git a/src/mame/drivers/konamigv.cpp b/src/mame/drivers/konamigv.cpp index 58fbcecf564..92c48c9296a 100644 --- a/src/mame/drivers/konamigv.cpp +++ b/src/mame/drivers/konamigv.cpp @@ -156,11 +156,10 @@ public: void konamigv(machine_config &config); protected: - virtual void machine_start() override; - void konamigv_map(address_map &map); -private: + virtual void machine_start() override; + DECLARE_WRITE16_MEMBER(btc_trackball_w); DECLARE_READ16_MEMBER(tokimeki_serial_r); DECLARE_WRITE16_MEMBER(tokimeki_serial_w); @@ -191,10 +190,9 @@ public: void simpbowl(machine_config &config); -protected: +private: virtual void machine_start() override; -private: DECLARE_READ16_MEMBER(flash_r); DECLARE_WRITE16_MEMBER(flash_w); diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp index 09045ed0005..8cd8a3345b2 100644 --- a/src/mame/drivers/konamim2.cpp +++ b/src/mame/drivers/konamim2.cpp @@ -220,6 +220,12 @@ public: m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub") { } + void m2(machine_config &config); + void _3do_m2(machine_config &config); + + void init_m2(); + +private: required_shared_ptr m_main_ram; required_device m_terminal; required_ioport m_in_country; @@ -270,7 +276,6 @@ public: DECLARE_READ8_MEMBER(id6_r); DECLARE_READ8_MEMBER(id7_r); - void init_m2(); virtual void video_start() override; virtual void machine_reset() override; uint32_t screen_update_m2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -281,8 +286,6 @@ public: void cde_dma_transfer(address_space &space, int channel, int next); required_device m_maincpu; required_device m_subcpu; - void m2(machine_config &config); - void _3do_m2(machine_config &config); void _3do_m2_main(address_map &map); void _3do_m2_main_m(address_map &map); void _3do_m2_main_s(address_map &map); diff --git a/src/mame/drivers/konblands.cpp b/src/mame/drivers/konblands.cpp index 4c891edbf70..1f3dc2c8fac 100644 --- a/src/mame/drivers/konblands.cpp +++ b/src/mame/drivers/konblands.cpp @@ -40,6 +40,10 @@ public: { } + void konblands(machine_config &config); + void konblandsh(machine_config &config); + +private: // screen updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_PALETTE_INIT(konblands); @@ -52,18 +56,15 @@ public: INTERRUPT_GEN_MEMBER(timer_irq); DECLARE_WRITE_LINE_MEMBER(ld_command_strobe_cb); - void konblands(machine_config &config); - void konblandsh(machine_config &config); void konblands_map(address_map &map); void konblandsh_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: // devices required_device m_maincpu; required_device m_laserdisc; diff --git a/src/mame/drivers/konendev.cpp b/src/mame/drivers/konendev.cpp index 35c2f7a519b..c7778e1a663 100644 --- a/src/mame/drivers/konendev.cpp +++ b/src/mame/drivers/konendev.cpp @@ -59,7 +59,7 @@ public: void konendev(machine_config &config); -protected: +private: DECLARE_READ32_MEMBER(mcu2_r); DECLARE_READ32_MEMBER(ifu2_r); DECLARE_READ32_MEMBER(ctrl0_r); @@ -80,7 +80,6 @@ protected: void konendev_map(address_map &map); -private: // devices required_device m_maincpu; required_device m_gcu; diff --git a/src/mame/drivers/konin.cpp b/src/mame/drivers/konin.cpp index 7f7a257ff98..82e0a43ec90 100644 --- a/src/mame/drivers/konin.cpp +++ b/src/mame/drivers/konin.cpp @@ -62,13 +62,15 @@ public: , m_iopit(*this, "iopit") { } + void konin(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(picu_b_w); DECLARE_WRITE_LINE_MEMBER(picu_r3_w); - void konin(machine_config &config); void konin_io(address_map &map); void konin_mem(address_map &map); -private: + virtual void machine_start() override; required_device m_maincpu; required_device m_picu; diff --git a/src/mame/drivers/konmedal.cpp b/src/mame/drivers/konmedal.cpp index d360091442a..d587335a6e5 100644 --- a/src/mame/drivers/konmedal.cpp +++ b/src/mame/drivers/konmedal.cpp @@ -57,6 +57,11 @@ public: m_oki(*this, "oki") { } + void shuriboy(machine_config &config); + void ddboy(machine_config &config); + void tsukande(machine_config &config); + +private: DECLARE_PALETTE_INIT(konmedal); DECLARE_MACHINE_START(shuriboy); @@ -86,18 +91,14 @@ public: DECLARE_READ8_MEMBER(shuri_irq_r); DECLARE_WRITE8_MEMBER(shuri_irq_w); - void shuriboy(machine_config &config); - void ddboy(machine_config &config); - void tsukande(machine_config &config); void ddboy_main(address_map &map); void medal_main(address_map &map); void shuriboy_main(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: required_device m_maincpu; optional_device m_k056832; optional_device m_k052109; diff --git a/src/mame/drivers/konmedal68k.cpp b/src/mame/drivers/konmedal68k.cpp index fe9c4fa123a..1aac51c4767 100644 --- a/src/mame/drivers/konmedal68k.cpp +++ b/src/mame/drivers/konmedal68k.cpp @@ -45,10 +45,12 @@ public: m_ymz(*this, "ymz") { } + void kzaurus(machine_config &config); + +private: uint32_t screen_update_konmedal68k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void fill_backcolor(bitmap_ind16 &bitmap, const rectangle &cliprect, int pen_idx, int mode); - void kzaurus(machine_config &config); K056832_CB_MEMBER(tile_callback); TIMER_DEVICE_CALLBACK_MEMBER(scanline); @@ -80,14 +82,13 @@ public: } void kzaurus_main(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; static constexpr int NUM_LAYERS = 4; -private: required_device m_maincpu; required_device m_k056832; required_device m_k055555; diff --git a/src/mame/drivers/kontest.cpp b/src/mame/drivers/kontest.cpp index 47bfdc30e79..5b23ce7827e 100644 --- a/src/mame/drivers/kontest.cpp +++ b/src/mame/drivers/kontest.cpp @@ -39,6 +39,9 @@ public: m_palette(*this, "palette") { } + void kontest(machine_config &config); + +private: // devices required_device m_maincpu; required_shared_ptr m_ram; @@ -53,16 +56,15 @@ public: // member functions DECLARE_WRITE8_MEMBER(control_w); - void kontest(machine_config &config); void kontest_io(address_map &map); void kontest_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -public: + DECLARE_PALETTE_INIT(kontest); INTERRUPT_GEN_MEMBER(kontest_interrupt); }; diff --git a/src/mame/drivers/kron.cpp b/src/mame/drivers/kron.cpp index 0feca30d3f6..1660034a8af 100644 --- a/src/mame/drivers/kron.cpp +++ b/src/mame/drivers/kron.cpp @@ -128,35 +128,38 @@ class kron180_state : public driver_device { public: -kron180_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device (mconfig, type, tag) - ,m_maincpu (*this, "maincpu") - ,m_videoram(*this, "videoram") - ,m_keyboard(*this, "pc_keyboard") + kron180_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_videoram(*this, "videoram") + , m_keyboard(*this, "pc_keyboard") { } - uint8_t *m_char_ptr; + + void kron180(machine_config &config); + +private: + uint8_t * m_char_ptr; uint8_t *m_vram; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(keyb_interrupt); - DECLARE_WRITE8_MEMBER( sn74259_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset & 0x07, offset & 0x08 ? 1 : 0)); } - DECLARE_WRITE8_MEMBER( ap5_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - DECLARE_READ8_MEMBER( ap5_r ){ LOGIO(("%s() %02x = %02x\n", FUNCNAME, offset, 1)); return 1; } - DECLARE_WRITE8_MEMBER( wkb_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - DECLARE_WRITE8_MEMBER( sn74299_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - DECLARE_READ8_MEMBER( sn74299_r ){ LOGIO(("%s() %02x = %02x\n", FUNCNAME, offset, 1)); return 1; } - DECLARE_WRITE8_MEMBER( txen_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - DECLARE_WRITE8_MEMBER( kbd_reset_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - DECLARE_WRITE8_MEMBER( dreq_w ){ LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } - void kron180(machine_config &config); + DECLARE_WRITE8_MEMBER(sn74259_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset & 0x07, offset & 0x08 ? 1 : 0)); } + DECLARE_WRITE8_MEMBER(ap5_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } + DECLARE_READ8_MEMBER(ap5_r) { LOGIO(("%s() %02x = %02x\n", FUNCNAME, offset, 1)); return 1; } + DECLARE_WRITE8_MEMBER(wkb_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } + DECLARE_WRITE8_MEMBER(sn74299_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } + DECLARE_READ8_MEMBER(sn74299_r) { LOGIO(("%s() %02x = %02x\n", FUNCNAME, offset, 1)); return 1; } + DECLARE_WRITE8_MEMBER(txen_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } + DECLARE_WRITE8_MEMBER(kbd_reset_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } + DECLARE_WRITE8_MEMBER(dreq_w) { LOGIO(("%s %02x = %02x\n", FUNCNAME, offset, data)); } void kron180_iomap(address_map &map); void kron180_mem(address_map &map); -protected: + required_device m_maincpu; required_shared_ptr m_videoram; required_device m_keyboard; uint8_t m_kbd_data; -private: - virtual void machine_start () override; + + virtual void machine_start() override; }; void kron180_state::kron180_mem(address_map &map) diff --git a/src/mame/drivers/krz2000.cpp b/src/mame/drivers/krz2000.cpp index b67eaf2f441..dd38918ea8f 100644 --- a/src/mame/drivers/krz2000.cpp +++ b/src/mame/drivers/krz2000.cpp @@ -36,13 +36,12 @@ public: void k2000(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; void k2000_map(address_map &map); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp index e035454d0bb..f89461f3f4c 100644 --- a/src/mame/drivers/ksys573.cpp +++ b/src/mame/drivers/ksys573.cpp @@ -403,71 +403,6 @@ public: m_lamps(*this, "lamp%u", 0U) { } - double m_pad_position[ 6 ]; - optional_ioport m_pads; - - DECLARE_CUSTOM_INPUT_MEMBER( gn845pwbb_read ); - DECLARE_CUSTOM_INPUT_MEMBER( gunmania_tank_shutter_sensor ); - DECLARE_CUSTOM_INPUT_MEMBER( gunmania_cable_holder_sensor ); - DECLARE_READ16_MEMBER( control_r ); - DECLARE_WRITE16_MEMBER( control_w ); - DECLARE_WRITE16_MEMBER( atapi_reset_w ); - DECLARE_WRITE16_MEMBER( security_w ); - DECLARE_READ16_MEMBER( security_r ); - DECLARE_READ16_MEMBER( ge765pwbba_r ); - DECLARE_WRITE16_MEMBER( ge765pwbba_w ); - DECLARE_READ16_MEMBER( gx700pwbf_io_r ); - DECLARE_WRITE16_MEMBER( gx700pwbf_io_w ); - DECLARE_WRITE16_MEMBER( gunmania_w ); - DECLARE_READ16_MEMBER( gunmania_r ); - void init_salarymc(); - void init_pnchmn(); - void init_ddr(); - void init_hyperbbc(); - void init_drmn(); - DECLARE_MACHINE_RESET( konami573 ); - WRITE_LINE_MEMBER( h8_clk_w ); - DECLARE_READ_LINE_MEMBER( h8_d0_r ); - DECLARE_READ_LINE_MEMBER( h8_d1_r ); - DECLARE_READ_LINE_MEMBER( h8_d2_r ); - DECLARE_READ_LINE_MEMBER( h8_d3_r ); - DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b7 ); - DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b6 ); - DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b5 ); - DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b4 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b0 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b1 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b2 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b3 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b4 ); - DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b5 ); - DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b3 ); - DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b4 ); - DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b5 ); - DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_rst ); - DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_d ); - DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_clk ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_red ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_green ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_blue ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_start ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe1 ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe2 ); - DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe3 ); - DECLARE_WRITE_LINE_MEMBER( ata_interrupt ); - TIMER_CALLBACK_MEMBER( atapi_xfer_end ); - DECLARE_WRITE8_MEMBER( ddr_output_callback ); - DECLARE_WRITE8_MEMBER( ddrsolo_output_callback ); - DECLARE_WRITE8_MEMBER( drmn_output_callback ); - DECLARE_WRITE8_MEMBER( dmx_output_callback ); - DECLARE_WRITE8_MEMBER( mamboagg_output_callback ); - DECLARE_WRITE8_MEMBER( punchmania_output_callback ); - ADC083X_INPUT_CB(analogue_inputs_callback); - - void cdrom_dma_read( uint32_t *ram, uint32_t n_address, int32_t n_size ); - void cdrom_dma_write( uint32_t *ram, uint32_t n_address, int32_t n_size ); - void sys573_vblank( screen_device &screen, bool vblank_state ); - void gtfrk10mb(machine_config &config); void ddr(machine_config &config); void pnchmn(machine_config &config); @@ -517,6 +452,79 @@ public: void casszi(machine_config &config); void cassxzi(machine_config &config); + void init_salarymc(); + void init_pnchmn(); + void init_ddr(); + void init_hyperbbc(); + void init_drmn(); + + DECLARE_CUSTOM_INPUT_MEMBER( gn845pwbb_read ); + DECLARE_CUSTOM_INPUT_MEMBER( gunmania_tank_shutter_sensor ); + DECLARE_CUSTOM_INPUT_MEMBER( gunmania_cable_holder_sensor ); + + DECLARE_READ_LINE_MEMBER( h8_d0_r ); + DECLARE_READ_LINE_MEMBER( h8_d1_r ); + DECLARE_READ_LINE_MEMBER( h8_d2_r ); + DECLARE_READ_LINE_MEMBER( h8_d3_r ); + + DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b7 ); + DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b6 ); + DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b5 ); + DECLARE_WRITE_LINE_MEMBER( gtrfrks_lamps_b4 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b0 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b1 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b2 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b3 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b4 ); + DECLARE_WRITE_LINE_MEMBER( dmx_lamps_b5 ); + DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b3 ); + DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b4 ); + DECLARE_WRITE_LINE_MEMBER( mamboagg_lamps_b5 ); + DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_rst ); + DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_d ); + DECLARE_WRITE_LINE_MEMBER( salarymc_lamp_clk ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_red ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_green ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_blue ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_start ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe1 ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe2 ); + DECLARE_WRITE_LINE_MEMBER( hyperbbc_lamp_strobe3 ); + + WRITE_LINE_MEMBER( h8_clk_w ); + + double m_pad_position[ 6 ]; + optional_ioport m_pads; + +private: + + DECLARE_READ16_MEMBER( control_r ); + DECLARE_WRITE16_MEMBER( control_w ); + DECLARE_WRITE16_MEMBER( atapi_reset_w ); + DECLARE_WRITE16_MEMBER( security_w ); + DECLARE_READ16_MEMBER( security_r ); + DECLARE_READ16_MEMBER( ge765pwbba_r ); + DECLARE_WRITE16_MEMBER( ge765pwbba_w ); + DECLARE_READ16_MEMBER( gx700pwbf_io_r ); + DECLARE_WRITE16_MEMBER( gx700pwbf_io_w ); + DECLARE_WRITE16_MEMBER( gunmania_w ); + DECLARE_READ16_MEMBER( gunmania_r ); + DECLARE_MACHINE_RESET( konami573 ); + DECLARE_WRITE_LINE_MEMBER( ata_interrupt ); + + TIMER_CALLBACK_MEMBER( atapi_xfer_end ); + DECLARE_WRITE8_MEMBER( ddr_output_callback ); + DECLARE_WRITE8_MEMBER( ddrsolo_output_callback ); + DECLARE_WRITE8_MEMBER( drmn_output_callback ); + DECLARE_WRITE8_MEMBER( dmx_output_callback ); + DECLARE_WRITE8_MEMBER( mamboagg_output_callback ); + DECLARE_WRITE8_MEMBER( punchmania_output_callback ); + ADC083X_INPUT_CB(analogue_inputs_callback); + + void cdrom_dma_read( uint32_t *ram, uint32_t n_address, int32_t n_size ); + void cdrom_dma_write( uint32_t *ram, uint32_t n_address, int32_t n_size ); + void sys573_vblank( screen_device &screen, bool vblank_state ); + void punchmania_cassette_install(device_t *device); void salarymc_cassette_install(device_t *device); void hyperbbc_cassette_install(device_t *device); @@ -529,7 +537,7 @@ public: void konami573_map(address_map &map); void konami573a_map(address_map &map); void konami573d_map(address_map &map); -protected: + virtual void machine_start() override { m_lamps.resolve(); } virtual void driver_start() override; @@ -538,7 +546,6 @@ protected: required_ioport m_analog2; required_ioport m_analog3; -private: inline void ATTR_PRINTF( 3,4 ) verboselog( int n_level, const char *s_fmt, ... ); void update_disc(); void gx700pwbf_output( int offset, uint8_t data ); diff --git a/src/mame/drivers/kungfur.cpp b/src/mame/drivers/kungfur.cpp index 3a50028b76e..97c26686d6a 100644 --- a/src/mame/drivers/kungfur.cpp +++ b/src/mame/drivers/kungfur.cpp @@ -77,6 +77,9 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void kungfur(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(kungfur_output_w); DECLARE_WRITE8_MEMBER(kungfur_latch1_w); DECLARE_WRITE8_MEMBER(kungfur_latch2_w); @@ -87,10 +90,8 @@ public: INTERRUPT_GEN_MEMBER(kungfur_irq); DECLARE_WRITE_LINE_MEMBER(kfr_adpcm1_int); DECLARE_WRITE_LINE_MEMBER(kfr_adpcm2_int); - void kungfur(machine_config &config); void kungfur_map(address_map &map); -private: uint8_t m_latch[3]; uint8_t m_control; uint32_t m_adpcm_pos[2]; diff --git a/src/mame/drivers/kurukuru.cpp b/src/mame/drivers/kurukuru.cpp index a116d963c00..57aeb1317b9 100644 --- a/src/mame/drivers/kurukuru.cpp +++ b/src/mame/drivers/kurukuru.cpp @@ -410,6 +410,10 @@ public: m_bank1(*this, "bank1") { } + void ppj(machine_config &config); + void kurukuru(machine_config &config); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_v9938; @@ -431,8 +435,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; DECLARE_WRITE_LINE_MEMBER(kurukuru_msm5205_vck); - void ppj(machine_config &config); - void kurukuru(machine_config &config); void kurukuru_audio_io(address_map &map); void kurukuru_audio_map(address_map &map); void kurukuru_io(address_map &map); diff --git a/src/mame/drivers/laser3k.cpp b/src/mame/drivers/laser3k.cpp index a9990f8d274..38b2953294b 100644 --- a/src/mame/drivers/laser3k.cpp +++ b/src/mame/drivers/laser3k.cpp @@ -84,6 +84,9 @@ public: , m_kbspecial(*this, "keyb_special") { } + void laser3k(machine_config &config); + +private: required_device m_maincpu; required_device m_screen; required_device m_ram; @@ -114,10 +117,9 @@ public: DECLARE_READ_LINE_MEMBER(ay3600_control_r); DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w); - void laser3k(machine_config &config); void banks_map(address_map &map); void laser3k_map(address_map &map); -private: + uint8_t m_bank0val, m_bank1val, m_bank2val, m_bank3val; int m_flash; int m_speaker_state; diff --git a/src/mame/drivers/laserbas.cpp b/src/mame/drivers/laserbas.cpp index ae0c543c84f..a40e0af7211 100644 --- a/src/mame/drivers/laserbas.cpp +++ b/src/mame/drivers/laserbas.cpp @@ -83,8 +83,11 @@ public: m_dac4(*this, "dac4"), m_dac5(*this, "dac5"), m_dac6(*this, "dac6") - { } + { } + void laserbas(machine_config &config); + +private: /* misc */ int m_dac_data; int m_counter[6]; @@ -126,7 +129,6 @@ public: required_device m_dac4; required_device m_dac5; required_device m_dac6; - void laserbas(machine_config &config); void laserbas_io(address_map &map); void laserbas_memory(address_map &map); }; diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp index 921b151535e..bd1f3ea5110 100644 --- a/src/mame/drivers/lastbank.cpp +++ b/src/mame/drivers/lastbank.cpp @@ -38,6 +38,13 @@ public: , m_mainbank(*this, "mainbank") { } + void lastbank(machine_config &config); + + void init_lastbank(); + + DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); + +private: required_device m_maincpu; required_device m_vdp; required_device m_oki; @@ -64,7 +71,6 @@ public: DECLARE_READ8_MEMBER(mux_0_r); DECLARE_WRITE8_MEMBER(mux_w); DECLARE_WRITE8_MEMBER(sound_flags_w); - DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); DECLARE_READ8_MEMBER(rom_bank_r); DECLARE_WRITE8_MEMBER(rom_bank_w); @@ -75,10 +81,7 @@ public: DECLARE_READ8_MEMBER(irq_enable_r); DECLARE_WRITE8_MEMBER(irq_enable_w); - void init_lastbank(); - TIMER_DEVICE_CALLBACK_MEMBER(irq_scanline); - void lastbank(machine_config &config); void lastbank_audio_io(address_map &map); void lastbank_audio_map(address_map &map); void lastbank_map(address_map &map); diff --git a/src/mame/drivers/lastfght.cpp b/src/mame/drivers/lastfght.cpp index c5cfe528906..a94b41bb5ee 100644 --- a/src/mame/drivers/lastfght.cpp +++ b/src/mame/drivers/lastfght.cpp @@ -82,6 +82,11 @@ public: m_palette(*this, "palette") { } + void lastfght(machine_config &config); + + void init_lastfght(); + +private: /* memory */ DECLARE_WRITE16_MEMBER(hi_w); DECLARE_WRITE16_MEMBER(x_w); @@ -100,18 +105,15 @@ public: DECLARE_WRITE16_MEMBER(c00006_w); DECLARE_READ16_MEMBER(sound_r); DECLARE_WRITE16_MEMBER(sound_w); - void init_lastfght(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void lastfght(machine_config &config); void lastfght_map(address_map &map); void ramdac_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: /* video-related */ bitmap_ind16 m_bitmap[2]; int m_dest; diff --git a/src/mame/drivers/laz_aftrshok.cpp b/src/mame/drivers/laz_aftrshok.cpp index c37c65a3b82..ac70499d7ac 100644 --- a/src/mame/drivers/laz_aftrshok.cpp +++ b/src/mame/drivers/laz_aftrshok.cpp @@ -42,10 +42,12 @@ public: // ,m_maincpu(*this, "maincpu") { } + void aftrshok(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void aftrshok(machine_config &config); // required_device m_maincpu; }; diff --git a/src/mame/drivers/laz_awetoss.cpp b/src/mame/drivers/laz_awetoss.cpp index e8c6e15bf21..6de09c4ecbf 100644 --- a/src/mame/drivers/laz_awetoss.cpp +++ b/src/mame/drivers/laz_awetoss.cpp @@ -22,10 +22,12 @@ public: // ,m_maincpu(*this, "maincpu") { } + void awetoss(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void awetoss(machine_config &config); // required_device m_maincpu; }; diff --git a/src/mame/drivers/laz_ribrac.cpp b/src/mame/drivers/laz_ribrac.cpp index e3113e7ff0a..2003a22860a 100644 --- a/src/mame/drivers/laz_ribrac.cpp +++ b/src/mame/drivers/laz_ribrac.cpp @@ -26,10 +26,12 @@ public: // ,m_maincpu(*this, "maincpu") { } + void laz_ribrac(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void laz_ribrac(machine_config &config); // required_device m_maincpu; }; diff --git a/src/mame/drivers/lb186.cpp b/src/mame/drivers/lb186.cpp index 53a0ff9ffae..dccfc5b05a4 100644 --- a/src/mame/drivers/lb186.cpp +++ b/src/mame/drivers/lb186.cpp @@ -25,7 +25,7 @@ public: void lb186(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(sio_out_w); DECLARE_WRITE8_MEMBER(drive_sel_w); DECLARE_READ8_MEMBER(scsi_dack_r); @@ -35,7 +35,6 @@ protected: void lb186_io(address_map &map); void lb186_map(address_map &map); -private: required_device m_maincpu; required_device m_fdc; required_device m_scsi; diff --git a/src/mame/drivers/lbeach.cpp b/src/mame/drivers/lbeach.cpp index 10a501d8d70..a493b8b9b71 100644 --- a/src/mame/drivers/lbeach.cpp +++ b/src/mame/drivers/lbeach.cpp @@ -50,6 +50,9 @@ public: m_palette(*this, "palette") { } + void lbeach(machine_config &config); + +private: /* devices / memory pointers */ required_device m_maincpu; required_shared_ptr m_bg_vram; @@ -80,7 +83,6 @@ public: virtual void video_start() override; DECLARE_PALETTE_INIT(lbeach); uint32_t screen_update_lbeach(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void lbeach(machine_config &config); void lbeach_map(address_map &map); }; diff --git a/src/mame/drivers/lcmate2.cpp b/src/mame/drivers/lcmate2.cpp index cebedff6629..bb90638333d 100644 --- a/src/mame/drivers/lcmate2.cpp +++ b/src/mame/drivers/lcmate2.cpp @@ -52,6 +52,9 @@ public: m_speaker(*this, "speaker") { } + void lcmate2(machine_config &config); + +private: required_device m_maincpu; required_device m_lcdc; required_device m_rtc; @@ -63,7 +66,6 @@ public: DECLARE_WRITE8_MEMBER( speaker_w ); DECLARE_WRITE8_MEMBER( bankswitch_w ); DECLARE_PALETTE_INIT(lcmate2); - void lcmate2(machine_config &config); void lcmate2_io(address_map &map); void lcmate2_mem(address_map &map); }; diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp index eec600d1495..4da6dee7175 100644 --- a/src/mame/drivers/leapster.cpp +++ b/src/mame/drivers/leapster.cpp @@ -223,13 +223,16 @@ public: m_cart(*this, "cartslot") { } + void leapster(machine_config &config); + + void init_leapster(); +private: virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_leapster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(leapster_cart); - void init_leapster(); DECLARE_READ32_MEMBER(leapster_random_r) { @@ -241,10 +244,9 @@ public: printf("leapster_aux004b_w %04x\n", data); } - void leapster(machine_config &config); void leapster_aux(address_map &map); void leapster_map(address_map &map); -protected: + required_device m_maincpu; required_device m_cart; diff --git a/src/mame/drivers/learnwin.cpp b/src/mame/drivers/learnwin.cpp index d00f482e090..9c84fa6dc3b 100644 --- a/src/mame/drivers/learnwin.cpp +++ b/src/mame/drivers/learnwin.cpp @@ -58,13 +58,15 @@ public: { } + void learnwin(machine_config &config); + +private: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { bitmap.fill(rgb_t::black(), cliprect); return 0; } - void learnwin(machine_config &config); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/lft.cpp b/src/mame/drivers/lft.cpp index 511c1fcd2c7..b59c8b09ed3 100644 --- a/src/mame/drivers/lft.cpp +++ b/src/mame/drivers/lft.cpp @@ -22,15 +22,17 @@ public: { } + void lft(machine_config &config); + +private: void kbd_put(u8 data); DECLARE_WRITE16_MEMBER(term_w); DECLARE_READ16_MEMBER(keyin_r); DECLARE_READ16_MEMBER(status_r); - void lft(machine_config &config); void lft_io(address_map &map); void lft_mem(address_map &map); -private: + uint8_t m_term_data; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/lg-dvd.cpp b/src/mame/drivers/lg-dvd.cpp index c5fa1fb67e2..73f29b2c73c 100644 --- a/src/mame/drivers/lg-dvd.cpp +++ b/src/mame/drivers/lg-dvd.cpp @@ -18,8 +18,10 @@ public: { } void lg(machine_config &config); + +private: void lg_dvd_map(address_map &map); -protected: + required_device m_maincpu; }; diff --git a/src/mame/drivers/lgp.cpp b/src/mame/drivers/lgp.cpp index a281e9cc116..0c275ad37d2 100644 --- a/src/mame/drivers/lgp.cpp +++ b/src/mame/drivers/lgp.cpp @@ -85,12 +85,16 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void lgp(machine_config &config); + + void init_lgp(); + +private: required_device m_laserdisc; required_shared_ptr m_tile_ram; required_shared_ptr m_tile_control_ram; DECLARE_READ8_MEMBER(ldp_read); DECLARE_WRITE8_MEMBER(ldp_write); - void init_lgp(); virtual void machine_start() override; uint32_t screen_update_lgp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_callback_lgp); @@ -99,7 +103,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void lgp(machine_config &config); void main_io_map(address_map &map); void main_program_map(address_map &map); void sound_io_map(address_map &map); diff --git a/src/mame/drivers/lilith.cpp b/src/mame/drivers/lilith.cpp index 0c8982626e4..d909b4b5264 100644 --- a/src/mame/drivers/lilith.cpp +++ b/src/mame/drivers/lilith.cpp @@ -15,12 +15,12 @@ class lilith_state : public driver_device public: lilith_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void lilith(machine_config &config); + void lilith(machine_config &config); private: -// required_device m_maincpu; + // required_device m_maincpu; }; static INPUT_PORTS_START( lilith ) diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp index 4b68e7eecb6..1a1661d8e81 100644 --- a/src/mame/drivers/limenko.cpp +++ b/src/mame/drivers/limenko.cpp @@ -55,6 +55,18 @@ public: { } + void limenko(machine_config &config); + void spotty(machine_config &config); + + void init_common(); + void init_sb2003(); + void init_dynabomb(); + void init_legendoh(); + void init_spotty(); + + DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r); + +private: required_device m_maincpu; optional_device m_oki; required_device m_gfxdecode; @@ -95,14 +107,6 @@ public: DECLARE_WRITE8_MEMBER(qs1000_p2_w); DECLARE_WRITE8_MEMBER(qs1000_p3_w); - DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r); - - void init_common(); - void init_sb2003(); - void init_dynabomb(); - void init_legendoh(); - void init_spotty(); - TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_md_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -112,8 +116,6 @@ public: void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,uint32_t code,uint32_t color,int flipx,int flipy,int sx,int sy,int priority); void draw_sprites(const rectangle &cliprect); void copy_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &sprites_bitmap, bitmap_ind8 &priority_bitmap, const rectangle &cliprect); - void limenko(machine_config &config); - void spotty(machine_config &config); void limenko_io_map(address_map &map); void limenko_map(address_map &map); void spotty_io_map(address_map &map); diff --git a/src/mame/drivers/lindbergh.cpp b/src/mame/drivers/lindbergh.cpp index afb5c9f486f..2c3c2172dab 100644 --- a/src/mame/drivers/lindbergh.cpp +++ b/src/mame/drivers/lindbergh.cpp @@ -373,9 +373,11 @@ class lindbergh_state : public driver_device public: lindbergh_state(const machine_config &mconfig, device_type type, const char *tag); + void lindbergh(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void lindbergh(machine_config &config); }; lindbergh_state::lindbergh_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp index 78c1345f531..c1c426b824f 100644 --- a/src/mame/drivers/littlerb.cpp +++ b/src/mame/drivers/littlerb.cpp @@ -117,6 +117,13 @@ public: { } + void littlerb(machine_config &config); + + void init_littlerb(); + + DECLARE_CUSTOM_INPUT_MEMBER(littlerb_frame_step_r); + +private: required_device m_maincpu; required_device m_indervid; @@ -126,7 +133,6 @@ public: uint16_t m_sound_pointer_l,m_sound_pointer_r; int m_soundframe; - DECLARE_CUSTOM_INPUT_MEMBER(littlerb_frame_step_r); DECLARE_WRITE16_MEMBER(littlerb_l_sound_w); DECLARE_WRITE16_MEMBER(littlerb_r_sound_w); uint8_t sound_data_shift(); @@ -134,8 +140,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(littlerb_sound_step_cb); TIMER_DEVICE_CALLBACK_MEMBER(littlerb_sound_cb); - void init_littlerb(); - void littlerb(machine_config &config); void littlerb_main(address_map &map); }; diff --git a/src/mame/drivers/lola8a.cpp b/src/mame/drivers/lola8a.cpp index 6f6aab6ae1c..ec804f1da91 100644 --- a/src/mame/drivers/lola8a.cpp +++ b/src/mame/drivers/lola8a.cpp @@ -49,6 +49,9 @@ public: , m_p_videoram(*this, "videoram") { } + void lola8a(machine_config &config); + +private: DECLARE_READ8_MEMBER(lola8a_port_a_r); DECLARE_WRITE8_MEMBER(lola8a_port_b_w); DECLARE_WRITE_LINE_MEMBER(crtc_vsync); @@ -57,10 +60,9 @@ public: DECLARE_READ8_MEMBER(keyboard_r); MC6845_UPDATE_ROW(crtc_update_row); - void lola8a(machine_config &config); void lola8a_io(address_map &map); void lola8a_mem(address_map &map); -private: + uint8_t m_portb; virtual void machine_reset() override { m_maincpu->set_pc(0x8000); } required_device m_maincpu; diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp index 3ecc1ed2380..386932a671c 100644 --- a/src/mame/drivers/looping.cpp +++ b/src/mame/drivers/looping.cpp @@ -123,10 +123,11 @@ public: m_watchdog(*this, "watchdog") { } - void init_looping(); void looping(machine_config &config); -protected: + void init_looping(); + +private: DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w); DECLARE_WRITE8_MEMBER(looping_videoram_w); @@ -164,7 +165,6 @@ protected: void looping_sound_io_map(address_map &map); void looping_sound_map(address_map &map); -private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; diff --git a/src/mame/drivers/ltd.cpp b/src/mame/drivers/ltd.cpp index 0ac0cd7b132..0cf43061aa8 100644 --- a/src/mame/drivers/ltd.cpp +++ b/src/mame/drivers/ltd.cpp @@ -61,10 +61,17 @@ public: , m_digits(*this, "digit%u", 0U) { } + void ltd4(machine_config &config); + void ltd3(machine_config &config); + void init_atla_ltd(); void init_bhol_ltd(); void init_zephy(); void init_ltd(); + + DECLARE_INPUT_CHANGED_MEMBER(ficha); + +private: DECLARE_READ8_MEMBER(io_r); DECLARE_WRITE8_MEMBER(io_w); DECLARE_READ8_MEMBER(port1_r); @@ -72,14 +79,11 @@ public: DECLARE_READ8_MEMBER(port2_r); DECLARE_WRITE8_MEMBER(port2_w); DECLARE_WRITE8_MEMBER(count_reset_w); - DECLARE_INPUT_CHANGED_MEMBER(ficha); TIMER_DEVICE_CALLBACK_MEMBER(timer_r); - void ltd4(machine_config &config); - void ltd3(machine_config &config); void ltd3_map(address_map &map); void ltd4_io(address_map &map); void ltd4_map(address_map &map); -private: + bool m_timer_r; bool m_clear; uint8_t m_counter; diff --git a/src/mame/drivers/luckybal.cpp b/src/mame/drivers/luckybal.cpp index 3afcb1b6898..70733df6007 100644 --- a/src/mame/drivers/luckybal.cpp +++ b/src/mame/drivers/luckybal.cpp @@ -296,6 +296,11 @@ public: , m_latch(*this, "latch%u", 1) { } + void luckybal(machine_config &config); + + void init_luckybal(); + +private: DECLARE_WRITE8_MEMBER(port90_bitswap_w); DECLARE_READ8_MEMBER(ppi_bitswap_r); DECLARE_WRITE8_MEMBER(ppi_bitswap_w); @@ -303,7 +308,6 @@ public: DECLARE_WRITE8_MEMBER(output_port_b_w); DECLARE_READ8_MEMBER(input_port_c_r); DECLARE_WRITE8_MEMBER(output_port_c_w); - void init_luckybal(); uint8_t daclatch; required_device m_v9938; @@ -312,7 +316,6 @@ public: required_device m_dac; required_device_array m_latch; - void luckybal(machine_config &config); void main_io(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/drivers/lwriter.cpp b/src/mame/drivers/lwriter.cpp index fec58d24a76..bfc357ae6ca 100644 --- a/src/mame/drivers/lwriter.cpp +++ b/src/mame/drivers/lwriter.cpp @@ -112,6 +112,10 @@ public: , m_via(*this, "via") , m_overlay(1) { } + + void lwriter(machine_config &config); + +private: DECLARE_READ16_MEMBER(bankedarea_r); DECLARE_WRITE16_MEMBER(bankedarea_w); DECLARE_WRITE8_MEMBER(led_out_w); @@ -127,9 +131,8 @@ public: //DECLARE_WRITE_LINE_MEMBER(scc_int); virtual void machine_start () override; virtual void machine_reset () override; - void lwriter(machine_config &config); void maincpu_map(address_map &map); -private: + required_device m_maincpu; required_device m_scc; diff --git a/src/mame/drivers/m14.cpp b/src/mame/drivers/m14.cpp index 8d9a3329d02..dbd075795b7 100644 --- a/src/mame/drivers/m14.cpp +++ b/src/mame/drivers/m14.cpp @@ -70,6 +70,12 @@ public: m_samples(*this,"samples") { } + void m14(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted); + DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted); + +private: /* devices */ required_device m_maincpu; required_device m_screen; @@ -88,9 +94,6 @@ public: DECLARE_WRITE8_MEMBER(paddle_x_w); DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted); - DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted); - TILE_GET_INFO_MEMBER(m14_get_tile_info); void draw_ball_and_paddle(bitmap_ind16 &bitmap, const rectangle &cliprect); virtual void machine_start() override; @@ -100,10 +103,9 @@ public: uint32_t screen_update_m14(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(m14_irq); - void m14(machine_config &config); void m14_io_map(address_map &map); void m14_map(address_map &map); -private: + /* video-related */ tilemap_t *m_m14_tilemap; diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp index e63629fdecb..f0410470e3b 100644 --- a/src/mame/drivers/m20.cpp +++ b/src/mame/drivers/m20.cpp @@ -79,6 +79,9 @@ public: { } + void m20(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; required_device m_kbdi8251; @@ -106,16 +109,14 @@ public: DECLARE_WRITE_LINE_MEMBER(int_w); MC6845_UPDATE_ROW(update_row); - void m20(machine_config &config); void m20_data_mem(address_map &map); void m20_io(address_map &map); void m20_program_mem(address_map &map); -private: + offs_t m_memsize; uint8_t m_port21; void install_memory(); -public: DECLARE_FLOPPY_FORMATS( floppy_formats ); IRQ_CALLBACK_MEMBER(m20_irq_callback); }; diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp index 2eb1e9659f1..0b494adce18 100644 --- a/src/mame/drivers/m24.cpp +++ b/src/mame/drivers/m24.cpp @@ -33,6 +33,10 @@ public: m_keyboard(*this, "keyboard"), m_z8000_apb(*this, "z8000_apb") { } + + void olivetti(machine_config &config); + +private: required_device m_maincpu; required_device m_mb; required_device m_kbc; @@ -56,7 +60,6 @@ public: uint8_t m_sysctl, m_pa, m_kbcin, m_kbcout; bool m_kbcibf, m_kbdata, m_i86_halt, m_i86_halt_perm; static void cfg_m20_format(device_t *device); - void olivetti(machine_config &config); void kbc_map(address_map &map); void m24_io(address_map &map); void m24_map(address_map &map); diff --git a/src/mame/drivers/m3.cpp b/src/mame/drivers/m3.cpp index 6e19a193b83..97be6b798eb 100644 --- a/src/mame/drivers/m3.cpp +++ b/src/mame/drivers/m3.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders: +// copyright-holders: TODO /*********************************************************************************************************************************** 2017-11-20 Skeleton @@ -28,12 +28,14 @@ public: , m_palette(*this, "palette") { } + void m3(machine_config &config); + +private: MC6845_UPDATE_ROW(crtc_update_row); - void m3(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + virtual void machine_reset() override; required_device m_maincpu; required_region_ptr m_p_chargen; diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp index b8b278a1aca..c393c38d3e3 100644 --- a/src/mame/drivers/m63.cpp +++ b/src/mame/drivers/m63.cpp @@ -149,6 +149,14 @@ public: { } + void atomboy(machine_config &config); + void m63(machine_config &config); + void fghtbskt(machine_config &config); + + void init_wilytowr(); + void init_fghtbskt(); + +private: required_shared_ptr m_spriteram; required_shared_ptr m_scrollram; required_shared_ptr m_videoram2; @@ -199,8 +207,6 @@ public: DECLARE_WRITE8_MEMBER(fghtbskt_samples_w); SAMPLES_START_CB_MEMBER(fghtbskt_sh_start); DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); - void init_wilytowr(); - void init_fghtbskt(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_MACHINE_START(m63); @@ -211,9 +217,6 @@ public: INTERRUPT_GEN_MEMBER(snd_irq); INTERRUPT_GEN_MEMBER(vblank_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void atomboy(machine_config &config); - void m63(machine_config &config); - void fghtbskt(machine_config &config); void fghtbskt_map(address_map &map); void i8039_map(address_map &map); void i8039_port_map(address_map &map); diff --git a/src/mame/drivers/m6805evs.cpp b/src/mame/drivers/m6805evs.cpp index 1fdf4179c16..96945bb8852 100644 --- a/src/mame/drivers/m6805evs.cpp +++ b/src/mame/drivers/m6805evs.cpp @@ -74,8 +74,10 @@ public: { } void m6805evs(machine_config &config); - void mem_map(address_map &map); + private: + void mem_map(address_map &map); + required_device m_maincpu; virtual void machine_reset() override; }; diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp index 19cebea3101..a4287e8e44a 100644 --- a/src/mame/drivers/m79152pc.cpp +++ b/src/mame/drivers/m79152pc.cpp @@ -32,12 +32,14 @@ public: , m_uart(*this, "uart") { } + void m79152pc(machine_config &config); + +private: uint32_t screen_update_m79152pc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void m79152pc(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + virtual void machine_reset() override; required_shared_ptr m_p_videoram; required_shared_ptr m_p_attributes; diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp index f80d366764b..5fe5c723093 100644 --- a/src/mame/drivers/mac128.cpp +++ b/src/mame/drivers/mac128.cpp @@ -161,6 +161,15 @@ public: { } + void mac512ke(machine_config &config); + void mac128k(machine_config &config); + void macplus(machine_config &config); + + void init_mac128k512k(); + void init_mac512ke(); + void init_macplus(); + +private: required_device m_maincpu; required_device m_via; required_device m_ram; @@ -238,9 +247,6 @@ public: DECLARE_WRITE_LINE_MEMBER(set_scc_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(mac_scanline); - void init_mac128k512k(); - void init_mac512ke(); - void init_macplus(); DECLARE_VIDEO_START(mac); DECLARE_PALETTE_INIT(mac); uint32_t screen_update_mac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -262,9 +268,6 @@ public: void mac_driver_init(mac128model_t model); void update_volume(); - void mac512ke(machine_config &config); - void mac128k(machine_config &config); - void macplus(machine_config &config); void mac512ke_map(address_map &map); void macplus_map(address_map &map); private: diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp index 98586d10a09..cffce4b66a1 100644 --- a/src/mame/drivers/macs.cpp +++ b/src/mame/drivers/macs.cpp @@ -77,6 +77,14 @@ public: m_rambank(*this, "rambank%u", 1) { } + void macs(machine_config &config); + + void init_macs(); + void init_kisekaeh(); + void init_kisekaem(); + void init_macs2(); + +private: uint8_t m_mux_data; uint8_t m_rev; uint8_t m_cart_bank; @@ -86,10 +94,6 @@ public: DECLARE_READ8_MEMBER(macs_input_r); DECLARE_WRITE8_MEMBER(macs_rom_bank_w); DECLARE_WRITE8_MEMBER(macs_output_w); - void init_macs(); - void init_kisekaeh(); - void init_kisekaem(); - void init_macs2(); DECLARE_MACHINE_RESET(macs); DECLARE_MACHINE_START(macs); ST0016_DMA_OFFS_CB(dma_offset); @@ -103,7 +107,6 @@ public: required_memory_bank_array<2> m_rombank; required_memory_bank_array<2> m_rambank; - void macs(machine_config &config); void macs_io(address_map &map); void macs_mem(address_map &map); }; diff --git a/src/mame/drivers/madmotor.cpp b/src/mame/drivers/madmotor.cpp index b3fd5eb0230..51877c3130b 100644 --- a/src/mame/drivers/madmotor.cpp +++ b/src/mame/drivers/madmotor.cpp @@ -43,15 +43,15 @@ public: m_spritegen(*this, "spritegen") { } - void init_madmotor(); void madmotor(machine_config &config); -protected: + void init_madmotor(); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void madmotor_map(address_map &map); void sound_map(address_map &map); -private: /* memory pointers */ required_shared_ptr m_spriteram; diff --git a/src/mame/drivers/magic10.cpp b/src/mame/drivers/magic10.cpp index 4b05885ef1b..e208bea6f89 100644 --- a/src/mame/drivers/magic10.cpp +++ b/src/mame/drivers/magic10.cpp @@ -123,6 +123,20 @@ public: m_lamps(*this, "lamp%u", 1U) { } + void magic102(machine_config &config); + void magic10a(machine_config &config); + void magic10(machine_config &config); + void hotslot(machine_config &config); + void sgsafari(machine_config &config); + + void init_sgsafari(); + void init_suprpool(); + void init_magic102(); + void init_magic10(); + void init_hotslot(); + void init_altaten(); + +private: DECLARE_WRITE16_MEMBER(layer0_videoram_w); DECLARE_WRITE16_MEMBER(layer1_videoram_w); DECLARE_WRITE16_MEMBER(layer2_videoram_w); @@ -130,28 +144,16 @@ public: DECLARE_READ16_MEMBER(hotslot_copro_r); DECLARE_WRITE16_MEMBER(hotslot_copro_w); DECLARE_WRITE16_MEMBER(magic10_out_w); - void init_sgsafari(); - void init_suprpool(); - void init_magic102(); - void init_magic10(); - void init_hotslot(); - void init_altaten(); TILE_GET_INFO_MEMBER(get_layer0_tile_info); TILE_GET_INFO_MEMBER(get_layer1_tile_info); TILE_GET_INFO_MEMBER(get_layer2_tile_info); uint32_t screen_update_magic10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void magic102(machine_config &config); - void magic10a(machine_config &config); - void magic10(machine_config &config); - void hotslot(machine_config &config); - void sgsafari(machine_config &config); void hotslot_map(address_map &map); void magic102_map(address_map &map); void magic10_map(address_map &map); void magic10a_map(address_map &map); void sgsafari_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; diff --git a/src/mame/drivers/magicard.cpp b/src/mame/drivers/magicard.cpp index 04f92c62a35..8039b842de8 100644 --- a/src/mame/drivers/magicard.cpp +++ b/src/mame/drivers/magicard.cpp @@ -429,6 +429,12 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void magicard(machine_config &config); + void hotslots(machine_config &config); + + void init_magicard(); + +private: required_shared_ptr m_magicram; required_shared_ptr m_magicramb; required_shared_ptr m_pcab_vregs; @@ -459,7 +465,6 @@ public: DECLARE_WRITE16_MEMBER(scc68070_dma_ch2_w); DECLARE_READ16_MEMBER(scc68070_mmu_r); DECLARE_WRITE16_MEMBER(scc68070_mmu_w); - void init_magicard(); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_magicard(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -467,8 +472,6 @@ public: required_device m_maincpu; required_device m_screen; required_device m_palette; - void magicard(machine_config &config); - void hotslots(machine_config &config); void hotslots_mem(address_map &map); void magicard_mem(address_map &map); void ramdac_map(address_map &map); diff --git a/src/mame/drivers/magicfly.cpp b/src/mame/drivers/magicfly.cpp index 1aada5b9553..7312b4b949b 100644 --- a/src/mame/drivers/magicfly.cpp +++ b/src/mame/drivers/magicfly.cpp @@ -465,6 +465,11 @@ public: m_dac(*this, "dac"), m_gfxdecode(*this, "gfxdecode") { } + void bchance(machine_config &config); + void magicfly(machine_config &config); + void _7mezzo(machine_config &config); + +private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; tilemap_t *m_bg_tilemap; @@ -483,9 +488,6 @@ public: required_device m_maincpu; required_device m_dac; required_device m_gfxdecode; - void bchance(machine_config &config); - void magicfly(machine_config &config); - void _7mezzo(machine_config &config); void magicfly_map(address_map &map); }; diff --git a/src/mame/drivers/magtouch.cpp b/src/mame/drivers/magtouch.cpp index a8f02b2a61e..1ae3ef97ef5 100644 --- a/src/mame/drivers/magtouch.cpp +++ b/src/mame/drivers/magtouch.cpp @@ -94,6 +94,9 @@ public: m_rombank(*this, "rombank"), m_in0(*this, "IN0"){ } + void magtouch(machine_config &config); + +private: required_device m_isabus; required_memory_bank m_rombank; required_ioport m_in0; @@ -103,7 +106,6 @@ public: DECLARE_WRITE8_MEMBER(dma8237_1_dack_w); virtual void machine_start() override; static void magtouch_sb_conf(device_t *device); - void magtouch(machine_config &config); void magtouch_io(address_map &map); void magtouch_map(address_map &map); }; diff --git a/src/mame/drivers/majorpkr.cpp b/src/mame/drivers/majorpkr.cpp index ee65f7c4889..21dad9a3913 100644 --- a/src/mame/drivers/majorpkr.cpp +++ b/src/mame/drivers/majorpkr.cpp @@ -484,6 +484,11 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void majorpkr(machine_config &config); + + void init_majorpkr(); + +private: DECLARE_WRITE8_MEMBER(rom_bank_w); DECLARE_WRITE8_MEMBER(palette_bank_w); DECLARE_WRITE8_MEMBER(vram_bank_w); @@ -496,17 +501,14 @@ public: DECLARE_WRITE8_MEMBER(lamps_a_w); DECLARE_WRITE8_MEMBER(lamps_b_w); DECLARE_WRITE8_MEMBER(pulses_w); - void init_majorpkr(); TILE_GET_INFO_MEMBER(bg_get_tile_info); TILE_GET_INFO_MEMBER(fg_get_tile_info); uint32_t screen_update_majorpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void majorpkr(machine_config &config); void map(address_map &map); void palettebanks(address_map &map); void portmap(address_map &map); void vrambanks(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; diff --git a/src/mame/drivers/manohman.cpp b/src/mame/drivers/manohman.cpp index cdf77c6a57f..c90d1e99a27 100644 --- a/src/mame/drivers/manohman.cpp +++ b/src/mame/drivers/manohman.cpp @@ -153,13 +153,12 @@ public: void manohman(machine_config &config); -protected: +private: virtual void machine_start() override; void mem_map(address_map &map); IRQ_CALLBACK_MEMBER(iack_handler); -private: required_device m_maincpu; required_device m_duart; required_device m_pit; diff --git a/src/mame/drivers/marinedt.cpp b/src/mame/drivers/marinedt.cpp index 5ca22be54b9..7f685c8cd03 100644 --- a/src/mame/drivers/marinedt.cpp +++ b/src/mame/drivers/marinedt.cpp @@ -121,6 +121,9 @@ public: { } + void marinedt(machine_config &config); + +private: // screen updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_PALETTE_INIT(marinedt); @@ -135,17 +138,15 @@ public: DECLARE_WRITE8_MEMBER(output_w); TILE_GET_INFO_MEMBER(get_tile_info); - void marinedt(machine_config &config); void marinedt_io(address_map &map); void marinedt_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: // devices required_device m_maincpu; required_device m_screen; diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp index ba5a66d5e8b..3d652fc57ad 100644 --- a/src/mame/drivers/marywu.cpp +++ b/src/mame/drivers/marywu.cpp @@ -33,6 +33,9 @@ public: , m_leds(*this, "led%u", 0U) { } + void marywu(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(display_7seg_data_w); DECLARE_WRITE8_MEMBER(multiplex_7seg_w); DECLARE_WRITE8_MEMBER(ay1_port_a_w); @@ -40,10 +43,9 @@ public: DECLARE_WRITE8_MEMBER(ay2_port_a_w); DECLARE_WRITE8_MEMBER(ay2_port_b_w); DECLARE_READ8_MEMBER(keyboard_r); - void marywu(machine_config &config); void io_map(address_map &map); void program_map(address_map &map); -private: + uint8_t m_selected_7seg_module; virtual void machine_start() override; output_finder<32> m_digits; diff --git a/src/mame/drivers/maxaflex.cpp b/src/mame/drivers/maxaflex.cpp index 54cdbd68b3a..dd6a9883f24 100644 --- a/src/mame/drivers/maxaflex.cpp +++ b/src/mame/drivers/maxaflex.cpp @@ -50,10 +50,11 @@ public: { } - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); void maxaflex(machine_config &config); -protected: + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: DECLARE_READ8_MEMBER(mcu_portA_r); DECLARE_WRITE8_MEMBER(mcu_portA_w); DECLARE_WRITE8_MEMBER(mcu_portB_w); @@ -70,7 +71,6 @@ protected: bool atari_input_disabled() const { return !BIT(m_portB_out, 7); } void mmu(uint8_t new_mmu); -private: void a600xl_mem(address_map &map); uint8_t m_portB_out; diff --git a/src/mame/drivers/maygayep.cpp b/src/mame/drivers/maygayep.cpp index 823cad2b01e..858796660b8 100644 --- a/src/mame/drivers/maygayep.cpp +++ b/src/mame/drivers/maygayep.cpp @@ -46,15 +46,15 @@ public: m_maincpu(*this, "maincpu") { } - void maygayep(machine_config &config); + + void init_maygayep(); + +private: void maygayep_map(address_map &map); -protected: // devices required_device m_maincpu; -public: - void init_maygayep(); }; // bp 29e58 in ep_simp reads the 'INITIALISE . . .' string diff --git a/src/mame/drivers/maygaysw.cpp b/src/mame/drivers/maygaysw.cpp index 23d1d144530..137b5b72fbc 100644 --- a/src/mame/drivers/maygaysw.cpp +++ b/src/mame/drivers/maygaysw.cpp @@ -108,9 +108,12 @@ public: maygayew_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu") { } - required_device m_maincpu; void maygayew(machine_config &config); + +private: void maygayew_map(address_map &map); + + required_device m_maincpu; }; diff --git a/src/mame/drivers/maygayv1.cpp b/src/mame/drivers/maygayv1.cpp index 33e88077d62..ae836ce6cdb 100644 --- a/src/mame/drivers/maygayv1.cpp +++ b/src/mame/drivers/maygayv1.cpp @@ -223,6 +223,11 @@ public: m_lamp(*this, "lamp%u", 0U) { } + void maygayv1(machine_config &config); + + void init_screenpl(); + +private: DECLARE_WRITE16_MEMBER(i82716_w); DECLARE_READ16_MEMBER(i82716_r); DECLARE_WRITE16_MEMBER(write_odd); @@ -235,25 +240,21 @@ public: DECLARE_WRITE8_MEMBER(strobe_w); DECLARE_WRITE8_MEMBER(lamp_data_w); DECLARE_READ8_MEMBER(kbd_r); - void init_screenpl(); uint32_t screen_update_maygayv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_maygayv1); DECLARE_WRITE8_MEMBER(data_from_i8031); DECLARE_READ8_MEMBER(data_to_i8031); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(duart_txa); - void maygayv1(machine_config &config); void main_map(address_map &map); void sound_data(address_map &map); void sound_io(address_map &map); void sound_prg(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: required_device m_maincpu; required_device m_soundcpu; required_device m_upd7759; diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp index c77403ca226..7639c9eb983 100644 --- a/src/mame/drivers/mazerbla.cpp +++ b/src/mame/drivers/mazerbla.cpp @@ -134,6 +134,13 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void greatgun(machine_config &config); + void mazerbla(machine_config &config); + + void init_mazerbla(); + void init_greatgun(); + +private: DECLARE_WRITE8_MEMBER(cfb_rom_bank_sel_w); DECLARE_WRITE8_MEMBER(cfb_zpu_int_req_set_w); DECLARE_READ8_MEMBER(cfb_zpu_int_req_clr); @@ -150,8 +157,6 @@ public: DECLARE_WRITE8_MEMBER(vsb_ls273_audio_control_w); DECLARE_WRITE8_MEMBER(sound_int_clear_w); DECLARE_WRITE8_MEMBER(gg_led_ctrl_w); - void init_mazerbla(); - void init_greatgun(); DECLARE_PALETTE_INIT(mazerbla); uint32_t screen_update_mazerbla(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); @@ -159,8 +164,6 @@ public: TIMER_CALLBACK_MEMBER(deferred_ls670_0_w); TIMER_CALLBACK_MEMBER(deferred_ls670_1_w); IRQ_CALLBACK_MEMBER(irq_callback); - void greatgun(machine_config &config); - void mazerbla(machine_config &config); void greatgun_cpu3_io_map(address_map &map); void greatgun_io_map(address_map &map); void greatgun_sound_map(address_map &map); @@ -171,7 +174,6 @@ public: void mazerbla_io_map(address_map &map); void mazerbla_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp index 4f7c87cd6a4..f075b140322 100644 --- a/src/mame/drivers/mbc200.cpp +++ b/src/mame/drivers/mbc200.cpp @@ -74,6 +74,9 @@ public: , m_floppy1(*this, "fdc:1") { } + void mbc200(machine_config &config); + +private: DECLARE_READ8_MEMBER(p2_porta_r); DECLARE_WRITE8_MEMBER(p1_portc_w); DECLARE_WRITE8_MEMBER(pm_porta_w); @@ -83,12 +86,11 @@ public: MC6845_UPDATE_ROW(update_row); required_device m_palette; - void mbc200(machine_config &config); void mbc200_io(address_map &map); void mbc200_mem(address_map &map); void mbc200_sub_io(address_map &map); void mbc200_sub_mem(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; uint8_t m_comm_latch; diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp index 0e08a9777ed..4ac0c245d3c 100644 --- a/src/mame/drivers/mc10.cpp +++ b/src/mame/drivers/mc10.cpp @@ -37,6 +37,11 @@ class mc10_state : public driver_device public: mc10_state(const machine_config &mconfig, device_type type, const char *tag); + void alice90(machine_config &config); + void alice32(machine_config &config); + void mc10(machine_config &config); + +private: DECLARE_READ8_MEMBER(mc10_bfff_r); DECLARE_WRITE8_MEMBER(mc10_bfff_w); DECLARE_READ8_MEMBER(mc10_port1_r); @@ -49,18 +54,14 @@ public: DECLARE_READ8_MEMBER(mc6847_videoram_r); TIMER_DEVICE_CALLBACK_MEMBER(alice32_scanline); - void alice90(machine_config &config); - void alice32(machine_config &config); - void mc10(machine_config &config); void alice32_mem(address_map &map); void alice90_mem(address_map &map); void mc10_io(address_map &map); void mc10_mem(address_map &map); -protected: + // device-level overrides virtual void driver_start() override; -private: //printer state enum class printer_state : uint8_t { diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp index f63ccddbdb6..6104723940a 100644 --- a/src/mame/drivers/mc1000.cpp +++ b/src/mame/drivers/mc1000.cpp @@ -69,6 +69,9 @@ public: m_joykeymap(*this, "JOYKEYMAP%u", 0) { } + void mc1000(machine_config &config); + +private: required_device m_maincpu; required_device m_vdg; optional_device m_crtc; @@ -122,7 +125,6 @@ public: void init_mc1000(); TIMER_DEVICE_CALLBACK_MEMBER(ne555_tick); - void mc1000(machine_config &config); void mc1000_banking_mem(address_map &map); void mc1000_io(address_map &map); void mc1000_mem(address_map &map); diff --git a/src/mame/drivers/mc8020.cpp b/src/mame/drivers/mc8020.cpp index 5a012a80438..302c0743a37 100644 --- a/src/mame/drivers/mc8020.cpp +++ b/src/mame/drivers/mc8020.cpp @@ -34,15 +34,17 @@ public: , m_keyboard(*this, "X%u", 0) { } + void mc8020(machine_config &config); + +private: DECLARE_READ8_MEMBER(port_b_r); DECLARE_WRITE8_MEMBER(port_a_w); DECLARE_WRITE8_MEMBER(port_b_w); uint32_t screen_update_mc8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mc8020(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + u8 m_row; required_shared_ptr m_p_videoram; required_device m_maincpu; diff --git a/src/mame/drivers/mc8030.cpp b/src/mame/drivers/mc8030.cpp index d53f919cc6d..2c9379d6c64 100644 --- a/src/mame/drivers/mc8030.cpp +++ b/src/mame/drivers/mc8030.cpp @@ -38,6 +38,9 @@ public: , m_maincpu(*this, "maincpu") { } + void mc8030(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(zve_write_protect_w); DECLARE_WRITE8_MEMBER(vis_w); DECLARE_WRITE8_MEMBER(eprom_prog_w); @@ -51,10 +54,9 @@ public: DECLARE_WRITE8_MEMBER(asp_port_b_w); uint32_t screen_update_mc8030(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mc8030(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_region_ptr m_p_videoram; required_device m_maincpu; }; diff --git a/src/mame/drivers/mcb216.cpp b/src/mame/drivers/mcb216.cpp index 200e6c121fd..af285312122 100644 --- a/src/mame/drivers/mcb216.cpp +++ b/src/mame/drivers/mcb216.cpp @@ -46,6 +46,10 @@ public: , m_tms5501(*this, "tms5501") { } + void mcb216(machine_config &config); + void cb308(machine_config &config); + +private: DECLARE_READ8_MEMBER(tms5501_status_r); DECLARE_MACHINE_RESET(mcb216); @@ -53,12 +57,10 @@ public: IRQ_CALLBACK_MEMBER(irq_callback); - void mcb216(machine_config &config); - void cb308(machine_config &config); void cb308_mem(address_map &map); void mcb216_io(address_map &map); void mcb216_mem(address_map &map); -private: + required_device m_maincpu; required_device m_tms5501; }; diff --git a/src/mame/drivers/mccpm.cpp b/src/mame/drivers/mccpm.cpp index e59f8bc4302..49fb1a5e083 100644 --- a/src/mame/drivers/mccpm.cpp +++ b/src/mame/drivers/mccpm.cpp @@ -44,9 +44,11 @@ public: { } void mccpm(machine_config &config); + +private: void mccpm_io(address_map &map); void mccpm_mem(address_map &map); -private: + virtual void machine_reset() override; required_device m_maincpu; required_shared_ptr m_p_ram; diff --git a/src/mame/drivers/meadwttl.cpp b/src/mame/drivers/meadwttl.cpp index 35cf395c682..f042a4b7f81 100644 --- a/src/mame/drivers/meadwttl.cpp +++ b/src/mame/drivers/meadwttl.cpp @@ -48,21 +48,18 @@ public: { } + void meadows(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void meadows(machine_config &config); -protected: - // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - -private: - }; diff --git a/src/mame/drivers/megaphx.cpp b/src/mame/drivers/megaphx.cpp index 072185b96b6..6c1bcf6a1bb 100644 --- a/src/mame/drivers/megaphx.cpp +++ b/src/mame/drivers/megaphx.cpp @@ -99,6 +99,16 @@ public: m_pic_to_ppi_clock(0), m_pic_to_ppi_data(0) { } + void megaphx(machine_config &config); + + void init_megaphx(); + +protected: + virtual void machine_reset() override; + + required_device m_indervid; + +private: DECLARE_READ8_MEMBER(pic_porta_r); DECLARE_WRITE8_MEMBER(pic_porta_w); DECLARE_READ8_MEMBER(pic_portb_r); @@ -107,15 +117,8 @@ public: DECLARE_WRITE8_MEMBER(ppi_portc_w); DECLARE_WRITE_LINE_MEMBER(dsw_w); - void init_megaphx(); - - void megaphx(machine_config &config); void megaphx_68k_map(address_map &map); -protected: - virtual void machine_reset() override; - required_device m_indervid; -private: required_device m_maincpu; required_shared_ptr m_mainram; required_device m_indersb; diff --git a/src/mame/drivers/megaplay.cpp b/src/mame/drivers/megaplay.cpp index 22c1b102c2a..75cf661c155 100644 --- a/src/mame/drivers/megaplay.cpp +++ b/src/mame/drivers/megaplay.cpp @@ -61,9 +61,15 @@ public: m_bioscpu(*this, "mtbios") { } + void megaplay(machine_config &config); + + void init_megaplay(); + DECLARE_READ_LINE_MEMBER(start1_r); DECLARE_READ_LINE_MEMBER(start2_r); +private: + DECLARE_READ16_MEMBER(extra_ram_r); DECLARE_WRITE16_MEMBER(extra_ram_w); DECLARE_WRITE8_MEMBER(bios_banksel_w); @@ -83,15 +89,12 @@ public: DECLARE_WRITE8_MEMBER(game_w); DECLARE_READ8_MEMBER(vdp1_count_r); - void init_megaplay(); DECLARE_VIDEO_START(megplay); DECLARE_MACHINE_RESET(megaplay); uint32_t screen_update_megplay(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void megaplay(machine_config &config); void megaplay_bios_io_map(address_map &map); void megaplay_bios_map(address_map &map); -private: uint32_t m_bios_mode; // determines whether ROM banks or Game data is to read from 0x8000-0xffff diff --git a/src/mame/drivers/meijinsn.cpp b/src/mame/drivers/meijinsn.cpp index cb2fe7fbd31..0a2eafda0c9 100644 --- a/src/mame/drivers/meijinsn.cpp +++ b/src/mame/drivers/meijinsn.cpp @@ -84,7 +84,9 @@ public: void meijinsn(machine_config &config); -protected: + void meijinsn_map(address_map &map); + +private: DECLARE_WRITE16_MEMBER(sound_w); DECLARE_READ16_MEMBER(alpha_mcu_r); DECLARE_PALETTE_INIT(meijinsn); @@ -94,11 +96,9 @@ protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - void meijinsn_map(address_map &map); void meijinsn_sound_io_map(address_map &map); void meijinsn_sound_map(address_map &map); -private: required_device m_maincpu; required_device m_soundlatch; /* memory pointers */ diff --git a/src/mame/drivers/mekd2.cpp b/src/mame/drivers/mekd2.cpp index 09920c273b9..811a6af1f56 100644 --- a/src/mame/drivers/mekd2.cpp +++ b/src/mame/drivers/mekd2.cpp @@ -105,6 +105,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void mekd2(machine_config &config); + +private: DECLARE_READ_LINE_MEMBER(mekd2_key40_r); DECLARE_READ8_MEMBER(mekd2_key_r); DECLARE_WRITE_LINE_MEMBER(mekd2_nmi_w); @@ -115,9 +118,8 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(mekd2_c); TIMER_DEVICE_CALLBACK_MEMBER(mekd2_p); - void mekd2(machine_config &config); void mekd2_mem(address_map &map); -private: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; uint8_t m_cass_data[4]; uint8_t m_segment; diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp index 82d26e6297b..ca28e53d464 100644 --- a/src/mame/drivers/mephisto.cpp +++ b/src/mame/drivers/mephisto.cpp @@ -85,6 +85,14 @@ public: , m_digits(*this, "digit%u", 0U) { } + void rebel5(machine_config &config); + void mm4tk(machine_config &config); + void mm2(machine_config &config); + void mephisto(machine_config &config); + + void init_mephisto(); + +private: required_device m_maincpu; required_device m_outlatch; required_device m_beep; @@ -96,7 +104,6 @@ public: //uint8_t *m_p_ram; uint8_t m_led7; uint8_t m_allowNMI; - void init_mephisto(); virtual void machine_start() override; virtual void machine_reset() override; DECLARE_MACHINE_START(mm2); @@ -104,14 +111,10 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(update_nmi_r5); TIMER_DEVICE_CALLBACK_MEMBER(update_irq); - void rebel5(machine_config &config); - void mm4tk(machine_config &config); - void mm2(machine_config &config); - void mephisto(machine_config &config); void mephisto_mem(address_map &map); void mm2_mem(address_map &map); void rebel5_mem(address_map &map); -protected: + required_ioport_array<8> m_key1; required_ioport_array<8> m_key2; output_finder<4> m_digits; diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index 14a0f4988f9..8fd5f522e2f 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -45,7 +45,14 @@ public: , m_high_leds(*this, "led%u", 100U) { } + void smondial(machine_config &config); + void mondial2(machine_config &config); + void smondial2(machine_config &config); + void montec(machine_config &config); + void monteciv(machine_config &config); + void megaiv(machine_config &config); +private: DECLARE_READ8_MEMBER(montec_input_r); DECLARE_READ8_MEMBER(montec_nmi_ack_r); DECLARE_WRITE8_MEMBER(montec_nmi_ack_w); @@ -66,22 +73,15 @@ public: DECLARE_WRITE8_MEMBER(mondial2_input_mux_w); TIMER_DEVICE_CALLBACK_MEMBER(refresh_leds); - void smondial(machine_config &config); - void mondial2(machine_config &config); - void smondial2(machine_config &config); - void montec(machine_config &config); - void monteciv(machine_config &config); - void megaiv(machine_config &config); void megaiv_mem(address_map &map); void mondial2_mem(address_map &map); void montec_mem(address_map &map); void smondial2_mem(address_map &map); void smondial_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: required_device m_maincpu; required_device m_board; required_device m_beeper; diff --git a/src/mame/drivers/mephistp.cpp b/src/mame/drivers/mephistp.cpp index 53033b319ea..5c38bc01add 100644 --- a/src/mame/drivers/mephistp.cpp +++ b/src/mame/drivers/mephistp.cpp @@ -33,6 +33,9 @@ public: , m_soundbank(*this, "soundbank") { } + void mephisto(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(shift_load_w); DECLARE_READ8_MEMBER(ay8910_read); DECLARE_WRITE8_MEMBER(ay8910_write); @@ -41,12 +44,11 @@ public: DECLARE_READ8_MEMBER(ay8910_inputs_r); DECLARE_WRITE8_MEMBER(sound_rombank_w); - void mephisto(machine_config &config); void mephisto_8051_io(address_map &map); void mephisto_8051_map(address_map &map); void mephisto_map(address_map &map); void sport2k_8051_io(address_map &map); -private: + u8 m_ay8910_data; bool m_ay8910_bdir; bool m_ay8910_bc1; diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp index 4b8c22f01b6..df5abfb4c9d 100644 --- a/src/mame/drivers/merit.cpp +++ b/src/mame/drivers/merit.cpp @@ -99,6 +99,29 @@ public: , m_leds(*this, "led%u", 0U) { } + void misdraw(machine_config &config); + void couple(machine_config &config); + void phrcraze(machine_config &config); + void dtrvwz5(machine_config &config); + void casino5(machine_config &config); + void dodge(machine_config &config); + void tictac(machine_config &config); + void trvwhiz(machine_config &config); + void trvwhziv(machine_config &config); + void bigappg(machine_config &config); + void pitboss(machine_config &config); + + void init_couple(); + void init_key_5(); + void init_key_4(); + void init_key_7(); + void init_key_0(); + void init_key_2(); + void init_dtrvwz5(); + + DECLARE_CUSTOM_INPUT_MEMBER(rndbit_r); + +private: void dodge_nvram_init(nvram_device &nvram, void *base, size_t size); DECLARE_READ8_MEMBER(questions_r); DECLARE_WRITE8_MEMBER(low_offset_w); @@ -107,33 +130,15 @@ public: DECLARE_READ8_MEMBER(palette_r); DECLARE_WRITE8_MEMBER(palette_w); DECLARE_WRITE8_MEMBER(casino5_bank_w); - DECLARE_CUSTOM_INPUT_MEMBER(rndbit_r); DECLARE_WRITE_LINE_MEMBER(hsync_changed); DECLARE_WRITE8_MEMBER(led1_w); DECLARE_WRITE8_MEMBER(led2_w); DECLARE_WRITE8_MEMBER(misc_w); DECLARE_WRITE8_MEMBER(misc_couple_w); - void init_couple(); - void init_key_5(); - void init_key_4(); - void init_key_7(); - void init_key_0(); - void init_key_2(); - void init_dtrvwz5(); + DECLARE_MACHINE_START(casino5); MC6845_BEGIN_UPDATE(crtc_begin_update); MC6845_UPDATE_ROW(crtc_update_row); - void misdraw(machine_config &config); - void couple(machine_config &config); - void phrcraze(machine_config &config); - void dtrvwz5(machine_config &config); - void casino5(machine_config &config); - void dodge(machine_config &config); - void tictac(machine_config &config); - void trvwhiz(machine_config &config); - void trvwhziv(machine_config &config); - void bigappg(machine_config &config); - void pitboss(machine_config &config); void bigappg_map(address_map &map); void casino5_map(address_map &map); void couple_map(address_map &map); @@ -149,7 +154,6 @@ public: void trvwhiz_map(address_map &map); void trvwhziv_map(address_map &map); -protected: virtual void machine_start() override; pen_t m_pens[NUM_PENS]; diff --git a/src/mame/drivers/mes.cpp b/src/mame/drivers/mes.cpp index e550616aad3..4a2476cfe29 100644 --- a/src/mame/drivers/mes.cpp +++ b/src/mame/drivers/mes.cpp @@ -28,15 +28,17 @@ public: , m_p_chargen(*this, "chargen") { } + void mes(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void kbd_put(u8 data); DECLARE_READ8_MEMBER(port00_r); DECLARE_READ8_MEMBER(port08_r); - void mes(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + u8 m_term_data; u8 m_port08; virtual void machine_reset() override; diff --git a/src/mame/drivers/metlfrzr.cpp b/src/mame/drivers/metlfrzr.cpp index aaf72b1d897..8b6da9c5e78 100644 --- a/src/mame/drivers/metlfrzr.cpp +++ b/src/mame/drivers/metlfrzr.cpp @@ -44,6 +44,11 @@ public: m_gfxdecode(*this, "gfxdecode") { } + void metlfrzr(machine_config &config); + + void init_metlfrzr(); + +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -59,12 +64,10 @@ public: required_device m_palette; required_device m_gfxdecode; - void init_metlfrzr(); DECLARE_WRITE8_MEMBER(output_w); TIMER_DEVICE_CALLBACK_MEMBER(scanline); uint8_t m_fg_tilebank; bool m_rowscroll_enable; - void metlfrzr(machine_config &config); void decrypted_opcodes_map(address_map &map); void metlfrzr_map(address_map &map); }; diff --git a/src/mame/drivers/meyc8080.cpp b/src/mame/drivers/meyc8080.cpp index c7476c5b2b7..b16f6503863 100644 --- a/src/mame/drivers/meyc8080.cpp +++ b/src/mame/drivers/meyc8080.cpp @@ -81,6 +81,9 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void meyc8080(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(lights_1_w); DECLARE_WRITE8_MEMBER(lights_2_w); DECLARE_WRITE8_MEMBER(counters_w); @@ -89,10 +92,8 @@ public: DECLARE_WRITE8_MEMBER(meyc8080_dac_3_w); DECLARE_WRITE8_MEMBER(meyc8080_dac_4_w); uint32_t screen_update_meyc8080(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void meyc8080(machine_config &config); void meyc8080_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } required_shared_ptr m_videoram_0; diff --git a/src/mame/drivers/mfabfz.cpp b/src/mame/drivers/mfabfz.cpp index 7b2eae360fb..f7f8120f55b 100644 --- a/src/mame/drivers/mfabfz.cpp +++ b/src/mame/drivers/mfabfz.cpp @@ -53,14 +53,15 @@ public: mfabfz_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - { } + { } + + void mfabfz85(machine_config &config); + void mfabfz(machine_config &config); - void mfabfz85(machine_config &config); - void mfabfz(machine_config &config); - void mfabfz85_io(address_map &map); - void mfabfz_io(address_map &map); - void mfabfz_mem(address_map &map); private: + void mfabfz85_io(address_map &map); + void mfabfz_io(address_map &map); + void mfabfz_mem(address_map &map); virtual void machine_reset() override; required_device m_maincpu; }; diff --git a/src/mame/drivers/mgames.cpp b/src/mame/drivers/mgames.cpp index 94218f32c5a..729b1eee708 100644 --- a/src/mame/drivers/mgames.cpp +++ b/src/mame/drivers/mgames.cpp @@ -235,6 +235,9 @@ public: m_lamps(*this, "lamp%u", 1U) { } + void mgames(machine_config &config); + +private: DECLARE_READ8_MEMBER(mixport_r); DECLARE_WRITE8_MEMBER(outport0_w); DECLARE_WRITE8_MEMBER(outport1_w); @@ -246,10 +249,8 @@ public: DECLARE_WRITE8_MEMBER(outport7_w); DECLARE_PALETTE_INIT(mgames); uint32_t screen_update_mgames(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mgames(machine_config &config); void main_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; diff --git a/src/mame/drivers/mgavegas.cpp b/src/mame/drivers/mgavegas.cpp index 1559beb1079..1c457b3a5b6 100644 --- a/src/mame/drivers/mgavegas.cpp +++ b/src/mame/drivers/mgavegas.cpp @@ -62,7 +62,13 @@ public: m_filter2(*this, "filter2") { } + void mgavegas(machine_config &config); + + void init_mgavegas(); + void init_mgavegas21(); + void init_mgavegas133(); +private: uint8_t m_int; //OUT1 @@ -136,16 +142,9 @@ public: DECLARE_READ8_MEMBER(ay8910_a_r); DECLARE_READ8_MEMBER(ay8910_b_r); - void init_mgavegas(); - void init_mgavegas21(); - void init_mgavegas133(); - TIMER_DEVICE_CALLBACK_MEMBER(int_0); - - void mgavegas(machine_config &config); void mgavegas_map(address_map &map); -protected: // devices required_device m_maincpu; @@ -159,9 +158,6 @@ protected: virtual void machine_reset() override; void update_custom(); void update_lamp(); - - -private: }; diff --git a/src/mame/drivers/mgolf.cpp b/src/mame/drivers/mgolf.cpp index b6a08b28860..5a75d7da045 100644 --- a/src/mame/drivers/mgolf.cpp +++ b/src/mame/drivers/mgolf.cpp @@ -30,7 +30,7 @@ public: void mgolf(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(vram_w); DECLARE_READ8_MEMBER(wram_r); DECLARE_READ8_MEMBER(dial_r); @@ -54,7 +54,6 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void cpu_map(address_map &map); -private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; diff --git a/src/mame/drivers/mice.cpp b/src/mame/drivers/mice.cpp index a37cc15e27c..8d21d5c1fbd 100644 --- a/src/mame/drivers/mice.cpp +++ b/src/mame/drivers/mice.cpp @@ -47,11 +47,12 @@ public: void mice2(machine_config &config); void mice(machine_config &config); + +private: void mice2_io(address_map &map); void mice2_mem(address_map &map); void mice_io(address_map &map); void mice_mem(address_map &map); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp index e29291dceb8..2dc7247c7a0 100644 --- a/src/mame/drivers/micral.cpp +++ b/src/mame/drivers/micral.cpp @@ -73,7 +73,11 @@ public: , m_crtc(*this, "crtc") { } + void micral(machine_config &config); + void init_micral(); + +private: DECLARE_MACHINE_RESET(micral); DECLARE_READ8_MEMBER(keyin_r); DECLARE_READ8_MEMBER(status_r); @@ -82,11 +86,10 @@ public: DECLARE_WRITE8_MEMBER(video_w); u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void micral(machine_config &config); void io_kbd(address_map &map); void mem_kbd(address_map &map); void mem_map(address_map &map); -private: + u16 s_curpos; u8 s_command; u8 s_data; diff --git a/src/mame/drivers/micro20.cpp b/src/mame/drivers/micro20.cpp index 920d59a3faf..1f0a56f679a 100644 --- a/src/mame/drivers/micro20.cpp +++ b/src/mame/drivers/micro20.cpp @@ -40,6 +40,9 @@ public: { } + void micro20(machine_config &config); + +private: required_device m_maincpu; required_memory_region m_rom; required_shared_ptr m_mainram; @@ -62,9 +65,8 @@ public: m_maincpu->set_input_line(M68K_IRQ_4, state); } - void micro20(machine_config &config); void micro20_map(address_map &map); -private: + u8 m_tin; u8 m_h4; }; diff --git a/src/mame/drivers/microdec.cpp b/src/mame/drivers/microdec.cpp index 2e20548a3c3..65e0d88e879 100644 --- a/src/mame/drivers/microdec.cpp +++ b/src/mame/drivers/microdec.cpp @@ -46,18 +46,21 @@ public: , m_floppy(nullptr) { } + void microdec(machine_config &config); + + void init_microdec(); + +private: DECLARE_READ8_MEMBER(portf5_r); DECLARE_READ8_MEMBER(portf6_r); DECLARE_WRITE8_MEMBER(portf6_w); DECLARE_READ8_MEMBER(portf7_r); DECLARE_WRITE8_MEMBER(portf7_w); DECLARE_WRITE8_MEMBER(portf8_w); - void init_microdec(); - void microdec(machine_config &config); void microdec_io(address_map &map); void microdec_mem(address_map &map); -private: + uint8_t m_portf8; bool m_fdc_rdy; virtual void machine_reset() override; diff --git a/src/mame/drivers/microkit.cpp b/src/mame/drivers/microkit.cpp index 03188716df2..312337dfcb7 100644 --- a/src/mame/drivers/microkit.cpp +++ b/src/mame/drivers/microkit.cpp @@ -49,14 +49,16 @@ public: , m_terminal(*this, "terminal") { } + void microkit(machine_config &config); + +private: DECLARE_READ_LINE_MEMBER(clear_r); DECLARE_WRITE8_MEMBER(ram_w); DECLARE_READ8_MEMBER(ram_r); - void microkit(machine_config &config); void microkit_io(address_map &map); void microkit_mem(address_map &map); -private: + virtual void machine_reset() override; uint8_t m_resetcnt; uint8_t m_ram_data; diff --git a/src/mame/drivers/micropin.cpp b/src/mame/drivers/micropin.cpp index 61411226ebf..e3326faa2ee 100644 --- a/src/mame/drivers/micropin.cpp +++ b/src/mame/drivers/micropin.cpp @@ -46,6 +46,12 @@ public: , m_digits(*this, "digit%u", 0U) { } + void pentacup2(machine_config &config); + void micropin(machine_config &config); + + void init_micropin(); + +private: DECLARE_READ8_MEMBER(pia51_r); DECLARE_WRITE8_MEMBER(pia51_w); DECLARE_READ8_MEMBER(p51b_r); @@ -56,14 +62,11 @@ public: DECLARE_WRITE8_MEMBER(p50a_w); DECLARE_WRITE8_MEMBER(p50b_w); DECLARE_WRITE8_MEMBER(p51a_w); - void init_micropin(); TIMER_DEVICE_CALLBACK_MEMBER(timer_a); - void pentacup2(machine_config &config); - void micropin(machine_config &config); void micropin_map(address_map &map); void pentacup2_io(address_map &map); void pentacup2_map(address_map &map); -private: + uint8_t m_row; uint8_t m_counter; uint8_t m_beep_time; diff --git a/src/mame/drivers/microterm.cpp b/src/mame/drivers/microterm.cpp index 5924dda5bd3..8c12b71b689 100644 --- a/src/mame/drivers/microterm.cpp +++ b/src/mame/drivers/microterm.cpp @@ -23,19 +23,21 @@ public: , m_p_chargen(*this, "chargen") { } + void mt420(machine_config &config); + void mt5510(machine_config &config); + +private: u32 mt5510_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER(c000_r); SCN2674_DRAW_CHARACTER_MEMBER(draw_character); - void mt420(machine_config &config); - void mt5510(machine_config &config); void mt420_io_map(address_map &map); void mt420_mem_map(address_map &map); void mt420_vram_map(address_map &map); void mt5510_io_map(address_map &map); void mt5510_mem_map(address_map &map); -private: + required_device m_maincpu; optional_region_ptr m_p_chargen; }; diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp index b4d6631ca77..d7acef85f9d 100644 --- a/src/mame/drivers/microvsn.cpp +++ b/src/mame/drivers/microvsn.cpp @@ -42,6 +42,9 @@ public: m_cart(*this, "cartslot") { } + void microvision(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_PALETTE_INIT(microvision); @@ -91,8 +94,7 @@ public: pcb_type m_pcb_type; rc_type m_rc_type; - void microvision(machine_config &config); -protected: + required_device m_dac; required_device m_i8021; required_device m_tms1100; diff --git a/src/mame/drivers/midas.cpp b/src/mame/drivers/midas.cpp index 4ef6848aadb..3ac21029920 100644 --- a/src/mame/drivers/midas.cpp +++ b/src/mame/drivers/midas.cpp @@ -78,6 +78,12 @@ public: m_zoomram(*this, "zoomtable") { } + void hammer(machine_config &config); + void livequiz(machine_config &config); + + void init_livequiz(); + +private: DECLARE_READ16_MEMBER(ret_ffff); DECLARE_WRITE16_MEMBER(midas_gfxregs_w); DECLARE_WRITE16_MEMBER(livequiz_coin_w); @@ -86,7 +92,6 @@ public: DECLARE_WRITE16_MEMBER(hammer_motor_w); DECLARE_WRITE16_MEMBER(midas_eeprom_w); DECLARE_WRITE16_MEMBER(midas_zoomtable_w); - void init_livequiz(); virtual void video_start() override; virtual void machine_start() override; virtual void machine_reset() override; @@ -105,8 +110,6 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank_midas); - void hammer(machine_config &config); - void livequiz(machine_config &config); void hammer_map(address_map &map); void livequiz_map(address_map &map); }; diff --git a/src/mame/drivers/midqslvr.cpp b/src/mame/drivers/midqslvr.cpp index a9c1445e43b..0ab33bda09c 100644 --- a/src/mame/drivers/midqslvr.cpp +++ b/src/mame/drivers/midqslvr.cpp @@ -40,6 +40,9 @@ public: { } + void midqslvr(machine_config &config); + +private: std::unique_ptr m_bios_ram; std::unique_ptr m_bios_ext1_ram; std::unique_ptr m_bios_ext2_ram; @@ -62,7 +65,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; void intel82439tx_init(); - void midqslvr(machine_config &config); void midqslvr_io(address_map &map); void midqslvr_map(address_map &map); diff --git a/src/mame/drivers/midzeus.cpp b/src/mame/drivers/midzeus.cpp index b636c930d92..e502c9cedf4 100644 --- a/src/mame/drivers/midzeus.cpp +++ b/src/mame/drivers/midzeus.cpp @@ -76,19 +76,21 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void thegrid(machine_config &config); + void crusnexo(machine_config &config); + void midzeus2(machine_config &config); + + void init_crusnexo(); + void init_thegrid(); + +private: DECLARE_WRITE_LINE_MEMBER(zeus_irq); DECLARE_READ32_MEMBER(zeus2_timekeeper_r); DECLARE_WRITE32_MEMBER(zeus2_timekeeper_w); DECLARE_READ32_MEMBER(crusnexo_leds_r); DECLARE_WRITE32_MEMBER(crusnexo_leds_w); - void thegrid(machine_config &config); - void crusnexo(machine_config &config); - void midzeus2(machine_config &config); void zeus2_map(address_map &map); - void init_crusnexo(); - void init_thegrid(); -protected: virtual void machine_start() override { MACHINE_START_CALL_MEMBER(midzeus); @@ -96,7 +98,6 @@ protected: m_lamps.resolve(); } -private: required_device m_zeus; output_finder<32> m_leds; output_finder<8> m_lamps; diff --git a/src/mame/drivers/mightyframe.cpp b/src/mame/drivers/mightyframe.cpp index fa36a14b7cf..e873ec63a7d 100644 --- a/src/mame/drivers/mightyframe.cpp +++ b/src/mame/drivers/mightyframe.cpp @@ -21,13 +21,13 @@ class mightyframe_state : public driver_device public: mightyframe_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void mightyframe(machine_config &config); -void mem_map(address_map &map); + void mightyframe(machine_config &config); private: -// required_device m_maincpu; + void mem_map(address_map &map); + // required_device m_maincpu; }; void mightyframe_state::mem_map(address_map &map) diff --git a/src/mame/drivers/mikrosha.cpp b/src/mame/drivers/mikrosha.cpp index ee793635da5..3a96d277854 100644 --- a/src/mame/drivers/mikrosha.cpp +++ b/src/mame/drivers/mikrosha.cpp @@ -32,11 +32,13 @@ public: : radio86_state(mconfig, type, tag) { } + void mikrosha(machine_config &config); + +private: DECLARE_WRITE_LINE_MEMBER(mikrosha_pit_out2); I8275_DRAW_CHARACTER_MEMBER(display_pixels); DECLARE_MACHINE_RESET(mikrosha); - void mikrosha(machine_config &config); void mikrosha_io(address_map &map); void mikrosha_mem(address_map &map); }; diff --git a/src/mame/drivers/milwaukee.cpp b/src/mame/drivers/milwaukee.cpp index dd9135740c0..774c6afc3f3 100644 --- a/src/mame/drivers/milwaukee.cpp +++ b/src/mame/drivers/milwaukee.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders: +// copyright-holders: TODO /*********************************************************************************************************************************** 2017-11-20 Skeleton @@ -29,13 +29,13 @@ public: //, m_p_chargen(*this, "chargen") { } - void milwaukee(machine_config &config); - void mem_map(address_map &map); + void milwaukee(machine_config &config); + private: + void mem_map(address_map &map); required_device m_maincpu; //required_region_ptr m_p_chargen; }; - void milwaukee_state::mem_map(address_map &map) { map(0x0000, 0xf7ff).ram(); diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp index b7bf93d24df..fd663f30d87 100644 --- a/src/mame/drivers/mini2440.cpp +++ b/src/mame/drivers/mini2440.cpp @@ -32,6 +32,13 @@ public: m_penx(*this, "PENX"), m_peny(*this, "PENY") { } + void mini2440(machine_config &config); + + void init_mini2440(); + + DECLARE_INPUT_CHANGED_MEMBER(mini2440_input_changed); + +private: required_device m_maincpu; required_device m_s3c2440; required_device m_nand; @@ -41,10 +48,8 @@ public: required_ioport m_peny; uint32_t m_port[9]; - void init_mini2440(); virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_INPUT_CHANGED_MEMBER(mini2440_input_changed); inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4); DECLARE_READ32_MEMBER(s3c2440_gpio_port_r); DECLARE_WRITE32_MEMBER(s3c2440_gpio_port_w); @@ -56,7 +61,6 @@ public: DECLARE_WRITE16_MEMBER(s3c2440_i2s_data_w ); DECLARE_READ32_MEMBER(s3c2440_adc_data_r ); - void mini2440(machine_config &config); void mini2440_map(address_map &map); }; diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp index 993924ac43d..5b2c97944cd 100644 --- a/src/mame/drivers/miniboy7.cpp +++ b/src/mame/drivers/miniboy7.cpp @@ -168,6 +168,9 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void miniboy7(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(ay_pa_w); DECLARE_WRITE8_MEMBER(ay_pb_w); DECLARE_READ8_MEMBER(pia_pb_r); @@ -177,14 +180,11 @@ public: MC6845_UPDATE_ROW(crtc_update_row); DECLARE_PALETTE_INIT(miniboy7); - void miniboy7(machine_config &config); void miniboy7_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void machine_reset() override; -private: required_shared_ptr m_videoram_a; required_shared_ptr m_colorram_a; required_shared_ptr m_videoram_b; diff --git a/src/mame/drivers/minicom.cpp b/src/mame/drivers/minicom.cpp index 9c0d4b089db..646cdcfd7fe 100644 --- a/src/mame/drivers/minicom.cpp +++ b/src/mame/drivers/minicom.cpp @@ -53,15 +53,18 @@ public: , m_digits(*this, "digit%u", 0U) { } + void minicom(machine_config &config); + + void init_minicom(); + +private: DECLARE_WRITE8_MEMBER(i87c52_p0_w); DECLARE_WRITE8_MEMBER(i87c52_p1_w); DECLARE_WRITE8_MEMBER(i87c52_p2_w); DECLARE_WRITE8_MEMBER(i87c52_p3_w); DECLARE_READ8_MEMBER(i87c52_p1_r); DECLARE_READ8_MEMBER(i87c52_p2_r); - void init_minicom(); - void minicom(machine_config &config); -private: + uint8_t m_p[4]; uint16_t m_display_data; int m_digit_index; diff --git a/src/mame/drivers/miniforce.cpp b/src/mame/drivers/miniforce.cpp index 7240c927f79..8578a3d3433 100644 --- a/src/mame/drivers/miniforce.cpp +++ b/src/mame/drivers/miniforce.cpp @@ -129,13 +129,16 @@ class miniforce_state : public driver_device { public: -miniforce_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device (mconfig, type, tag) + miniforce_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) { } - virtual void machine_start () override; - virtual void machine_reset () override; + void miniforce(machine_config &config); + +private: + virtual void machine_start() override; + virtual void machine_reset() override; void miniforce_mem(address_map &map); }; diff --git a/src/mame/drivers/miniframe.cpp b/src/mame/drivers/miniframe.cpp index 163179ccf92..ac5ce755dcf 100644 --- a/src/mame/drivers/miniframe.cpp +++ b/src/mame/drivers/miniframe.cpp @@ -35,6 +35,9 @@ public: m_mapram(*this, "mapram") { } + void miniframe(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; required_device m_wd2797; @@ -56,10 +59,9 @@ public: required_shared_ptr m_mapram; - void miniframe(machine_config &config); void miniframe_mem(address_map &map); void ramrombank_map(address_map &map); -private: + uint16_t *m_ramptr; uint32_t m_ramsize; uint16_t m_diskdmasize; diff --git a/src/mame/drivers/minitel_2_rpic.cpp b/src/mame/drivers/minitel_2_rpic.cpp index b6b7f9ef65b..ed33a5faff5 100644 --- a/src/mame/drivers/minitel_2_rpic.cpp +++ b/src/mame/drivers/minitel_2_rpic.cpp @@ -93,6 +93,9 @@ public: { } + void minitel2(machine_config &config); + +private: required_device m_maincpu; required_device m_ts9347; required_device m_palette; @@ -110,10 +113,9 @@ public: DECLARE_READ8_MEMBER ( ts9347_io_r ); DECLARE_WRITE8_MEMBER ( ts9347_io_w ); - void minitel2(machine_config &config); void mem_io(address_map &map); void mem_prg(address_map &map); -protected: + required_ioport_array<16> m_io_kbd; virtual void machine_start() override; diff --git a/src/mame/drivers/minivadr.cpp b/src/mame/drivers/minivadr.cpp index b2124556662..40b9b0c2865 100644 --- a/src/mame/drivers/minivadr.cpp +++ b/src/mame/drivers/minivadr.cpp @@ -47,11 +47,13 @@ public: m_videoram(*this, "videoram"), m_maincpu(*this, "maincpu") { } + void minivadr(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; uint32_t screen_update_minivadr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void minivadr(machine_config &config); void minivadr_map(address_map &map); }; diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp index f447eef62ec..363c5ba2f33 100644 --- a/src/mame/drivers/mirage.cpp +++ b/src/mame/drivers/mirage.cpp @@ -67,7 +67,11 @@ public: m_sprgen(*this, "spritegen") { } + void mirage(machine_config &config); + + void init_mirage(); +private: /* misc */ uint8_t m_mux_data; @@ -87,13 +91,11 @@ public: DECLARE_READ16_MEMBER(mjmux_r); DECLARE_WRITE16_MEMBER(okim1_rombank_w); DECLARE_WRITE16_MEMBER(okim0_rombank_w); - void init_mirage(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(bank_callback); - void mirage(machine_config &config); void mirage_map(address_map &map); }; diff --git a/src/mame/drivers/mirax.cpp b/src/mame/drivers/mirax.cpp index aef0efc6d23..b004861dfa5 100644 --- a/src/mame/drivers/mirax.cpp +++ b/src/mame/drivers/mirax.cpp @@ -125,6 +125,11 @@ public: m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram") { } + void mirax(machine_config &config); + + void init_mirax(); + +private: required_device m_maincpu; required_device m_audiocpu; required_device_array m_ay; @@ -151,7 +156,6 @@ public: DECLARE_WRITE8_MEMBER(ay1_sel); DECLARE_WRITE8_MEMBER(ay2_sel); - void init_mirax(); DECLARE_PALETTE_INIT(mirax); virtual void machine_start() override; @@ -160,7 +164,6 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void mirax(machine_config &config); void mirax_main_map(address_map &map); void mirax_sound_map(address_map &map); }; diff --git a/src/mame/drivers/missb2.cpp b/src/mame/drivers/missb2.cpp index 2e095852a92..029d2ca1be9 100644 --- a/src/mame/drivers/missb2.cpp +++ b/src/mame/drivers/missb2.cpp @@ -36,21 +36,24 @@ public: , m_oki(*this, "oki") { } + void missb2(machine_config &config); + void bublpong(machine_config &config); + + void init_missb2(); + +private: DECLARE_WRITE8_MEMBER(missb2_bg_bank_w); DECLARE_WRITE8_MEMBER(missb2_oki_w); DECLARE_READ8_MEMBER(missb2_oki_r); DECLARE_WRITE_LINE_MEMBER(irqhandler); - void init_missb2(); DECLARE_MACHINE_START(missb2); DECLARE_MACHINE_RESET(missb2); uint32_t screen_update_missb2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void missb2(machine_config &config); - void bublpong(machine_config &config); void maincpu_map(address_map &map); void sound_map(address_map &map); void subcpu_map(address_map &map); -protected: + void configure_banks(); required_shared_ptr m_bgvram; diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp index 6cb41c0386b..0cb8247b342 100644 --- a/src/mame/drivers/missile.cpp +++ b/src/mame/drivers/missile.cpp @@ -380,13 +380,20 @@ public: , m_leds(*this, "led%u", 0U) { } + void missileb(machine_config &config); + void missile(machine_config &config); + void missilea(machine_config &config); + + void init_missilem(); + void init_suprmatk(); + + DECLARE_CUSTOM_INPUT_MEMBER(get_vblank); + +private: DECLARE_WRITE8_MEMBER(missile_w); DECLARE_READ8_MEMBER(missile_r); DECLARE_WRITE8_MEMBER(bootleg_w); DECLARE_READ8_MEMBER(bootleg_r); - DECLARE_CUSTOM_INPUT_MEMBER(get_vblank); - void init_missilem(); - void init_suprmatk(); uint32_t screen_update_missile(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); inline int scanline_to_v(int scanline); @@ -399,13 +406,9 @@ public: TIMER_CALLBACK_MEMBER(clock_irq); TIMER_CALLBACK_MEMBER(adjust_cpu_speed); - void missileb(machine_config &config); - void missile(machine_config &config); - void missilea(machine_config &config); void bootleg_main_map(address_map &map); void main_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/mits680b.cpp b/src/mame/drivers/mits680b.cpp index 4603000bd54..7c5e084ba8d 100644 --- a/src/mame/drivers/mits680b.cpp +++ b/src/mame/drivers/mits680b.cpp @@ -35,11 +35,13 @@ public: , m_maincpu(*this, "maincpu") { } + void mits680b(machine_config &config); + +private: DECLARE_READ8_MEMBER(status_check_r); - void mits680b(machine_config &config); void mem_map(address_map &map); -private: + required_device m_maincpu; }; diff --git a/src/mame/drivers/mjsenpu.cpp b/src/mame/drivers/mjsenpu.cpp index 62ae18bf19c..a3e8dd3a67c 100644 --- a/src/mame/drivers/mjsenpu.cpp +++ b/src/mame/drivers/mjsenpu.cpp @@ -65,6 +65,11 @@ public: { } + void mjsenpu(machine_config &config); + + void init_mjsenpu(); + +private: /* devices */ required_device m_maincpu; required_device m_oki; @@ -94,14 +99,12 @@ public: DECLARE_READ32_MEMBER(vram_r); DECLARE_WRITE32_MEMBER(vram_w); - void init_mjsenpu(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mjsenpu(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_palette; - void mjsenpu(machine_config &config); void mjsenpu_32bit_map(address_map &map); void mjsenpu_io(address_map &map); }; diff --git a/src/mame/drivers/mjsister.cpp b/src/mame/drivers/mjsister.cpp index 4b6880a4cde..95208543ff3 100644 --- a/src/mame/drivers/mjsister.cpp +++ b/src/mame/drivers/mjsister.cpp @@ -25,11 +25,6 @@ class mjsister_state : public driver_device { public: - enum - { - TIMER_DAC - }; - mjsister_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -38,6 +33,14 @@ public: m_dac(*this, "dac"), m_rombank(*this, "bank1") { } + void mjsister(machine_config &config); + +private: + enum + { + TIMER_DAC + }; + /* video-related */ std::unique_ptr m_tmpbitmap0; std::unique_ptr m_tmpbitmap1; @@ -92,10 +95,9 @@ public: void plot0( int offset, uint8_t data ); void plot1( int offset, uint8_t data ); - void mjsister(machine_config &config); void mjsister_io_map(address_map &map); void mjsister_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; emu_timer *m_dac_timer; diff --git a/src/mame/drivers/mk1.cpp b/src/mame/drivers/mk1.cpp index 343717931a9..028f03a0a5b 100644 --- a/src/mame/drivers/mk1.cpp +++ b/src/mame/drivers/mk1.cpp @@ -58,18 +58,18 @@ public: , m_leds(*this, "led%u", 0U) { } + void mk1(machine_config &config); + +private: DECLARE_READ8_MEMBER(mk1_f8_r); DECLARE_WRITE8_MEMBER(mk1_f8_w); TIMER_DEVICE_CALLBACK_MEMBER(mk1_update_leds); F3853_INTERRUPT_REQ_CB(mk1_interrupt); - void mk1(machine_config &config); void mk1_io(address_map &map); void mk1_mem(address_map &map); -protected: virtual void machine_start() override; -private: uint8_t m_f8[2]; uint8_t m_led_data[4]; required_device m_maincpu; diff --git a/src/mame/drivers/mk14.cpp b/src/mame/drivers/mk14.cpp index bfdc58b31e1..0e0fc4f22ba 100644 --- a/src/mame/drivers/mk14.cpp +++ b/src/mame/drivers/mk14.cpp @@ -57,14 +57,16 @@ public: , m_digits(*this, "digit%u", 0U) { } + void mk14(machine_config &config); + +private: DECLARE_READ8_MEMBER(keyboard_r); DECLARE_WRITE8_MEMBER(display_w); DECLARE_WRITE8_MEMBER(port_a_w); DECLARE_WRITE_LINE_MEMBER(cass_w); DECLARE_READ_LINE_MEMBER(cass_r); - void mk14(machine_config &config); void mem_map(address_map &map); -private: + virtual void machine_reset() override; virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/mk2.cpp b/src/mame/drivers/mk2.cpp index c91d1de1ab4..92d9af457d3 100644 --- a/src/mame/drivers/mk2.cpp +++ b/src/mame/drivers/mk2.cpp @@ -72,17 +72,18 @@ public: , m_leds(*this, "led%u", 0U) { } + void mk2(machine_config &config); + +private: DECLARE_READ8_MEMBER(mk2_read_a); DECLARE_WRITE8_MEMBER(mk2_write_a); DECLARE_READ8_MEMBER(mk2_read_b); DECLARE_WRITE8_MEMBER(mk2_write_b); TIMER_DEVICE_CALLBACK_MEMBER(update_leds); - void mk2(machine_config &config); void mk2_mem(address_map &map); -protected: + virtual void machine_start() override; -private: uint8_t m_led_data[5]; required_device m_maincpu; required_device m_speaker; diff --git a/src/mame/drivers/mk85.cpp b/src/mame/drivers/mk85.cpp index 77f93c03e9f..b1161c79b20 100644 --- a/src/mame/drivers/mk85.cpp +++ b/src/mame/drivers/mk85.cpp @@ -34,11 +34,13 @@ public: { } + void mk85(machine_config &config); + +private: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mk85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void mk85(machine_config &config); void mk85_mem(address_map &map); }; diff --git a/src/mame/drivers/mk90.cpp b/src/mame/drivers/mk90.cpp index 939af536e1f..158b23f281e 100644 --- a/src/mame/drivers/mk90.cpp +++ b/src/mame/drivers/mk90.cpp @@ -29,11 +29,13 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") { } + void mk90(machine_config &config); + +private: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mk90(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void mk90(machine_config &config); void mk90_mem(address_map &map); }; diff --git a/src/mame/drivers/mkit09.cpp b/src/mame/drivers/mkit09.cpp index 087ef3f4796..4b119305dc0 100644 --- a/src/mame/drivers/mkit09.cpp +++ b/src/mame/drivers/mkit09.cpp @@ -52,17 +52,20 @@ public: , m_digits(*this, "digit%u", 0U) { } + void mkit09a(machine_config &config); + void mkit09(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); + DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi); + +private: DECLARE_READ8_MEMBER(pa_r); DECLARE_READ8_MEMBER(pb_r); DECLARE_WRITE8_MEMBER(pa_w); DECLARE_WRITE8_MEMBER(pb_w); - DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); - DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi); - void mkit09a(machine_config &config); - void mkit09(machine_config &config); void mkit09_mem(address_map &map); void mkit09a_mem(address_map &map); -private: + uint8_t m_keydata; virtual void machine_reset() override; virtual void machine_start() override { m_digits.resolve(); } diff --git a/src/mame/drivers/mlanding.cpp b/src/mame/drivers/mlanding.cpp index c5394f0d52a..a3a25fd5c4d 100644 --- a/src/mame/drivers/mlanding.cpp +++ b/src/mame/drivers/mlanding.cpp @@ -70,13 +70,6 @@ class mlanding_state : public driver_device { public: - enum - { - TIMER_DMA_COMPLETE - }; - - static const uint32_t c_dma_bank_words = 0x2000; - mlanding_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -98,6 +91,16 @@ public: m_palette(*this, "palette") { } + void mlanding(machine_config &config); + +private: + enum + { + TIMER_DMA_COMPLETE + }; + + static const uint32_t c_dma_bank_words = 0x2000; + required_device m_maincpu; required_device m_subcpu; required_device m_dsp; @@ -165,7 +168,6 @@ public: uint32_t exec_dma(); void msm5205_update(int chip); - void mlanding(machine_config &config); void audio_map_io(address_map &map); void audio_map_prog(address_map &map); void dsp_map_data(address_map &map); @@ -173,7 +175,7 @@ public: void main_map(address_map &map); void mecha_map_prog(address_map &map); void sub_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/drivers/mmagic.cpp b/src/mame/drivers/mmagic.cpp index b5e38567e82..088ae0252c6 100644 --- a/src/mame/drivers/mmagic.cpp +++ b/src/mame/drivers/mmagic.cpp @@ -84,6 +84,9 @@ public: m_audio(0x00) {} + void mmagic(machine_config &config); + +private: DECLARE_READ8_MEMBER(vblank_r); DECLARE_WRITE8_MEMBER(ball_x_w); DECLARE_WRITE8_MEMBER(ball_y_w); @@ -92,13 +95,11 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void mmagic(machine_config &config); void mmagic_io(address_map &map); void mmagic_mem(address_map &map); -protected: + virtual void machine_start() override; -private: required_device m_maincpu; required_device m_screen; required_device m_palette; diff --git a/src/mame/drivers/mmd1.cpp b/src/mame/drivers/mmd1.cpp index 50eb5e3427b..0b019468de9 100644 --- a/src/mame/drivers/mmd1.cpp +++ b/src/mame/drivers/mmd1.cpp @@ -160,6 +160,12 @@ public: , m_digits(*this, "digit%u", 0U) { } + void mmd1(machine_config &config); + void mmd2(machine_config &config); + + void init_mmd2(); + +private: DECLARE_WRITE8_MEMBER(mmd1_port0_w); DECLARE_WRITE8_MEMBER(mmd1_port1_w); DECLARE_WRITE8_MEMBER(mmd1_port2_w); @@ -171,17 +177,13 @@ public: DECLARE_WRITE8_MEMBER(mmd2_digit_w); DECLARE_WRITE8_MEMBER(mmd2_status_callback); DECLARE_WRITE_LINE_MEMBER(mmd2_inte_callback); - void init_mmd2(); DECLARE_MACHINE_RESET(mmd1); DECLARE_MACHINE_RESET(mmd2); - void mmd1(machine_config &config); - void mmd2(machine_config &config); void mmd1_io(address_map &map); void mmd1_mem(address_map &map); void mmd2_io(address_map &map); void mmd2_mem(address_map &map); -private: uint8_t m_return_code; uint8_t m_digit; virtual void machine_start() override { m_digits.resolve(); } diff --git a/src/mame/drivers/mmm.cpp b/src/mame/drivers/mmm.cpp index d25e08d0672..d0b0d394eeb 100644 --- a/src/mame/drivers/mmm.cpp +++ b/src/mame/drivers/mmm.cpp @@ -23,14 +23,16 @@ public: m_inputs(*this, "IN%u", 0) { } + void mmm(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(strobe_w); DECLARE_READ8_MEMBER(inputs_r); DECLARE_WRITE8_MEMBER(ay_porta_w); - void mmm(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; required_device m_ctc; required_ioport_array<8> m_inputs; diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index ecdf3952988..43130af3f34 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -51,12 +51,15 @@ public: : driver_device(mconfig, type, tag) { } - void init_gen32(); void alm32(machine_config &config); void van32(machine_config &config); void van16(machine_config &config); void alm16(machine_config &config); void gen32(machine_config &config); + + void init_gen32(); + +private: void alm16_mem(address_map &map); void alm32_mem(address_map &map); void gen32_mem(address_map &map); @@ -74,11 +77,13 @@ public: , m_keys(*this, "KEY") { } + void berlinp(machine_config &config); + +private: DECLARE_READ8_MEMBER(berlinp_input_r); - void berlinp(machine_config &config); void berlinp_mem(address_map &map); -private: + required_device m_board; required_ioport m_keys; }; diff --git a/src/mame/drivers/mod8.cpp b/src/mame/drivers/mod8.cpp index eca0786b664..c9e5e03dcdf 100644 --- a/src/mame/drivers/mod8.cpp +++ b/src/mame/drivers/mod8.cpp @@ -67,15 +67,17 @@ public: , m_maincpu(*this, "maincpu") { } + void mod8(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(out_w); DECLARE_WRITE8_MEMBER(tty_w); void kbd_put(u8 data); DECLARE_READ8_MEMBER(tty_r); IRQ_CALLBACK_MEMBER(mod8_irq_callback); - void mod8(machine_config &config); void mod8_io(address_map &map); void mod8_mem(address_map &map); -private: + uint16_t m_tty_data; uint8_t m_tty_key_data; int m_tty_cnt; diff --git a/src/mame/drivers/modellot.cpp b/src/mame/drivers/modellot.cpp index ed5039f6b2e..a531ecc61f6 100644 --- a/src/mame/drivers/modellot.cpp +++ b/src/mame/drivers/modellot.cpp @@ -55,15 +55,17 @@ public: , m_p_chargen(*this, "chargen") { } + void modellot(machine_config &config); + +private: DECLARE_READ8_MEMBER(port77_r); DECLARE_READ8_MEMBER(portff_r); void kbd_put(u8 data); uint32_t screen_update_modellot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void modellot(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + uint8_t m_term_data; virtual void machine_reset() override; required_shared_ptr m_p_videoram; diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp index de7dce7d750..2a645e90c24 100644 --- a/src/mame/drivers/mogura.cpp +++ b/src/mame/drivers/mogura.cpp @@ -26,6 +26,9 @@ public: m_gfxdecode(*this, "gfxdecode") { } + void mogura(machine_config &config); + +private: required_device m_maincpu; required_device m_ldac; required_device m_rdac; @@ -42,7 +45,6 @@ public: virtual void video_start() override; DECLARE_PALETTE_INIT(mogura); uint32_t screen_update_mogura(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mogura(machine_config &config); void mogura_io_map(address_map &map); void mogura_map(address_map &map); }; diff --git a/src/mame/drivers/mole.cpp b/src/mame/drivers/mole.cpp index ccd9a90593f..9ef150bbf90 100644 --- a/src/mame/drivers/mole.cpp +++ b/src/mame/drivers/mole.cpp @@ -66,6 +66,9 @@ public: m_gfxdecode(*this, "gfxdecode") { } + void mole(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; @@ -86,7 +89,6 @@ public: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mole(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mole(machine_config &config); void mole_map(address_map &map); }; diff --git a/src/mame/drivers/molecular.cpp b/src/mame/drivers/molecular.cpp index 55240f56097..19ad1eec89f 100644 --- a/src/mame/drivers/molecular.cpp +++ b/src/mame/drivers/molecular.cpp @@ -67,6 +67,9 @@ public: m_filecpu(*this, "filecpu") { } + void molecula(machine_config &config); + +private: // devices required_device m_filecpu; @@ -94,12 +97,11 @@ public: DECLARE_PALETTE_INIT(molecula); - void molecula(machine_config &config); void molecula_app_io(address_map &map); void molecula_app_map(address_map &map); void molecula_file_io(address_map &map); void molecula_file_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/monacogp.cpp b/src/mame/drivers/monacogp.cpp index 55fd7c7e671..2580c0d2e61 100644 --- a/src/mame/drivers/monacogp.cpp +++ b/src/mame/drivers/monacogp.cpp @@ -141,21 +141,18 @@ public: { } + void monacogp(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void monacogp(machine_config &config); -protected: - // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - -private: - }; diff --git a/src/mame/drivers/monty.cpp b/src/mame/drivers/monty.cpp index 352ceb13594..aa9555b0fda 100644 --- a/src/mame/drivers/monty.cpp +++ b/src/mame/drivers/monty.cpp @@ -54,7 +54,7 @@ public: void monty(machine_config &config); void mmonty(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(sound_w); DECLARE_WRITE8_MEMBER(ioDisplayWrite_w); DECLARE_WRITE8_MEMBER(ioCommandWrite0_w); @@ -69,7 +69,6 @@ protected: void monty_io(address_map &map); void monty_mem(address_map &map); -private: required_device m_maincpu; required_device m_speaker; required_device m_sed0; // TODO: This isn't actually a SED1520, it's a SED1503F diff --git a/src/mame/drivers/monzagp.cpp b/src/mame/drivers/monzagp.cpp index 5fbcc2e5d75..14596400c75 100644 --- a/src/mame/drivers/monzagp.cpp +++ b/src/mame/drivers/monzagp.cpp @@ -61,6 +61,9 @@ public: m_digits(*this, "digit%u%u", 0U, 0U) { } + void monzagp(machine_config &config); + +private: DECLARE_READ8_MEMBER(port_r); DECLARE_WRITE8_MEMBER(port_w); DECLARE_WRITE8_MEMBER(port1_w); @@ -85,10 +88,9 @@ public: required_ioport m_dsw; output_finder<4, 7> m_digits; - void monzagp(machine_config &config); void monzagp_io(address_map &map); void monzagp_map(address_map &map); -private: + uint8_t m_p1; uint8_t m_p2; uint8_t m_video_ctrl[2][8]; diff --git a/src/mame/drivers/mps1230.cpp b/src/mame/drivers/mps1230.cpp index 9c981a9ddad..3646d540904 100644 --- a/src/mame/drivers/mps1230.cpp +++ b/src/mame/drivers/mps1230.cpp @@ -92,15 +92,16 @@ public: m_maincpu(*this, CPU_TAG) { } + void mps1000(machine_config &config); + void mps1230(machine_config &config); + +private: required_device m_maincpu; virtual void machine_start() override; virtual void machine_reset() override; - void mps1000(machine_config &config); - void mps1230(machine_config &config); void mps1230_map(address_map &map); -private: }; /*************************************************************************** diff --git a/src/mame/drivers/mpu12wbk.cpp b/src/mame/drivers/mpu12wbk.cpp index 9a629988f04..5ac70ce1038 100644 --- a/src/mame/drivers/mpu12wbk.cpp +++ b/src/mame/drivers/mpu12wbk.cpp @@ -228,19 +228,22 @@ public: m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode") { } + void mpu12wbk(machine_config &config); + + void init_mpu12wbk(); + +private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; tilemap_t *m_bg_tilemap; DECLARE_WRITE8_MEMBER(mpu12wbk_videoram_w); DECLARE_WRITE8_MEMBER(mpu12wbk_colorram_w); - void init_mpu12wbk(); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start() override; DECLARE_PALETTE_INIT(mpu12wbk); uint32_t screen_update_mpu12wbk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; - void mpu12wbk(machine_config &config); void mpu12wbk_map(address_map &map); }; diff --git a/src/mame/drivers/mpu2.cpp b/src/mame/drivers/mpu2.cpp index 129a679880e..566df8efea1 100644 --- a/src/mame/drivers/mpu2.cpp +++ b/src/mame/drivers/mpu2.cpp @@ -51,10 +51,9 @@ public: void mpu2(machine_config &config); -protected: +private: void mpu2_basemap(address_map &map); -private: // devices required_device m_maincpu; }; diff --git a/src/mame/drivers/mpu3.cpp b/src/mame/drivers/mpu3.cpp index b2cc5a862ac..b4d03417238 100644 --- a/src/mame/drivers/mpu3.cpp +++ b/src/mame/drivers/mpu3.cpp @@ -195,10 +195,11 @@ public: , m_ptm2(*this, "ptm_ic2") { } - void init_m3hprvpr(); void mpu3base(machine_config &config); -protected: + void init_m3hprvpr(); + +private: template DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); } DECLARE_WRITE8_MEMBER(characteriser_w); @@ -238,7 +239,6 @@ protected: virtual void machine_reset() override; void mpu3_basemap(address_map &map); -private: int m_triac_ic3; int m_triac_ic4; int m_triac_ic5; diff --git a/src/mame/drivers/mpu4dealem.cpp b/src/mame/drivers/mpu4dealem.cpp index d207e77ec0f..755820cca9a 100644 --- a/src/mame/drivers/mpu4dealem.cpp +++ b/src/mame/drivers/mpu4dealem.cpp @@ -33,13 +33,15 @@ public: { } + void dealem(machine_config &config); + +private: optional_shared_ptr m_dealem_videoram; DECLARE_MACHINE_RESET(dealem_vid); DECLARE_PALETTE_INIT(dealem); uint32_t screen_update_dealem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(dealem_vsync_changed); required_device m_gfxdecode; - void dealem(machine_config &config); void dealem_memmap(address_map &map); }; diff --git a/src/mame/drivers/mpu4plasma.cpp b/src/mame/drivers/mpu4plasma.cpp index 52370a07095..f1f6930af61 100644 --- a/src/mame/drivers/mpu4plasma.cpp +++ b/src/mame/drivers/mpu4plasma.cpp @@ -23,6 +23,9 @@ public: { } + void mpu4plasma(machine_config &config); + +private: required_shared_ptr m_plasmaram; DECLARE_READ16_MEMBER( mpu4plasma_unk_r ) @@ -34,7 +37,6 @@ public: { } uint32_t screen_update_mpu4plasma(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mpu4plasma(machine_config &config); void mpu4plasma_map(address_map &map); }; diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp index b7c29aa974e..a950375488d 100644 --- a/src/mame/drivers/mpu4vid.cpp +++ b/src/mame/drivers/mpu4vid.cpp @@ -233,25 +233,11 @@ public: { } - required_device m_videocpu; - optional_device m_scn2674; - optional_shared_ptr m_vid_vidram; - optional_shared_ptr m_vid_mainram; - required_device m_acia_0; - required_device m_acia_1; - required_device m_ptm; - optional_ioport m_trackx_port; - optional_ioport m_tracky_port; - required_device m_gfxdecode; - - struct bt471_t m_bt471; - - //Video - uint8_t m_m6840_irq_state; - uint8_t m_m6850_irq_state; - int m_gfx_index; - int8_t m_cur[2]; - + void mpu4_vid(machine_config &config); + void bwbvid(machine_config &config); + void crmaze(machine_config &config); + void bwbvid5(machine_config &config); + void mating(machine_config &config); void init_crmazea(); void init_v4barqst2(); @@ -274,6 +260,27 @@ public: void init_skiltrek(); void init_crmaze3(); void init_cybcas(); + +private: + required_device m_videocpu; + optional_device m_scn2674; + optional_shared_ptr m_vid_vidram; + optional_shared_ptr m_vid_mainram; + required_device m_acia_0; + required_device m_acia_1; + required_device m_ptm; + optional_ioport m_trackx_port; + optional_ioport m_tracky_port; + required_device m_gfxdecode; + + struct bt471_t m_bt471; + + //Video + uint8_t m_m6840_irq_state; + uint8_t m_m6850_irq_state; + int m_gfx_index; + int8_t m_cur[2]; + DECLARE_MACHINE_START(mpu4_vid); DECLARE_MACHINE_RESET(mpu4_vid); DECLARE_VIDEO_START(mpu4_vid); @@ -297,11 +304,7 @@ public: DECLARE_WRITE_LINE_MEMBER(mpu_video_reset); DECLARE_WRITE8_MEMBER( vram_w ); DECLARE_READ8_MEMBER( vram_r ); - void mpu4_vid(machine_config &config); - void bwbvid(machine_config &config); - void crmaze(machine_config &config); - void bwbvid5(machine_config &config); - void mating(machine_config &config); + void bwbvid5_68k_map(address_map &map); void bwbvid_68k_map(address_map &map); void mpu4_68k_map(address_map &map); diff --git a/src/mame/drivers/mpu5.cpp b/src/mame/drivers/mpu5.cpp index 1f2a2c72d27..acb8fcc2f6a 100644 --- a/src/mame/drivers/mpu5.cpp +++ b/src/mame/drivers/mpu5.cpp @@ -209,7 +209,7 @@ public: void mpu5(machine_config &config); -protected: +private: DECLARE_READ32_MEMBER(mpu5_mem_r); DECLARE_WRITE32_MEMBER(mpu5_mem_w); @@ -224,7 +224,6 @@ protected: virtual void machine_start() override; void mpu5_map(address_map &map); -private: uint32_t* m_cpuregion; std::unique_ptr m_mainram; SEC sec; diff --git a/src/mame/drivers/mquake.cpp b/src/mame/drivers/mquake.cpp index 9e395980c14..b85f9af2c02 100644 --- a/src/mame/drivers/mquake.cpp +++ b/src/mame/drivers/mquake.cpp @@ -53,19 +53,21 @@ public: m_es5503_rom(*this, "es5503") { } + void mquake(machine_config &config); + void init_mquake(); +private: DECLARE_READ8_MEMBER( es5503_sample_r ); DECLARE_WRITE16_MEMBER( output_w ); DECLARE_READ16_MEMBER( coin_chip_r ); DECLARE_WRITE16_MEMBER( coin_chip_w ); - void mquake(machine_config &config); void a500_mem(address_map &map); void main_map(address_map &map); void mquake_es5503_map(address_map &map); void overlay_512kb_map(address_map &map); -private: + required_device m_es5503; required_region_ptr m_es5503_rom; }; diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp index 65d34e7df84..3c460b5ebd4 100644 --- a/src/mame/drivers/mrgame.cpp +++ b/src/mame/drivers/mrgame.cpp @@ -64,8 +64,12 @@ public: , m_io_x1(*this, "X1") { } - DECLARE_PALETTE_INIT(mrgame); + void mrgame(machine_config &config); + void init_mrgame(); + +private: + DECLARE_PALETTE_INIT(mrgame); DECLARE_WRITE8_MEMBER(ack1_w); DECLARE_WRITE8_MEMBER(ack2_w); DECLARE_WRITE8_MEMBER(portb_w); @@ -86,14 +90,13 @@ public: required_shared_ptr m_p_videoram; required_shared_ptr m_p_objectram; required_device m_gfxdecode; - void mrgame(machine_config &config); void audio1_io(address_map &map); void audio1_map(address_map &map); void audio2_io(address_map &map); void audio2_map(address_map &map); void main_map(address_map &map); void video_map(address_map &map); -private: + bool m_ack1; bool m_ack2; bool m_ackv; diff --git a/src/mame/drivers/ms0515.cpp b/src/mame/drivers/ms0515.cpp index 4f477cf1354..975bddfa8ef 100644 --- a/src/mame/drivers/ms0515.cpp +++ b/src/mame/drivers/ms0515.cpp @@ -78,6 +78,9 @@ public: , m_speaker(*this, "speaker") { } + void ms0515(machine_config &config); + +private: DECLARE_PALETTE_INIT(ms0515); uint32_t screen_update_ms0515(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); @@ -103,9 +106,8 @@ public: DECLARE_WRITE_LINE_MEMBER(irq9_w); DECLARE_WRITE_LINE_MEMBER(irq11_w); - void ms0515(machine_config &config); void ms0515_mem(address_map &map); -protected: + virtual void machine_reset() override; void irq_encoder(int irq, int state); @@ -122,7 +124,6 @@ protected: required_device m_pit8253; required_device m_speaker; -private: uint8_t *m_video_ram; uint8_t m_sysrega, m_sysregc; uint16_t m_bankreg, m_haltreg; diff --git a/src/mame/drivers/ms9540.cpp b/src/mame/drivers/ms9540.cpp index 2ec18fd9987..e59afb62396 100644 --- a/src/mame/drivers/ms9540.cpp +++ b/src/mame/drivers/ms9540.cpp @@ -38,11 +38,11 @@ public: , m_terminal(*this, "terminal") { } - void kbd_put(u8 data); - void ms9540(machine_config &config); - void mem_map(address_map &map); + private: + void kbd_put(u8 data); + void mem_map(address_map &map); uint8_t m_term_data; virtual void machine_reset() override; required_shared_ptr m_p_base; diff --git a/src/mame/drivers/msbc1.cpp b/src/mame/drivers/msbc1.cpp index 7696a5f5480..f11756b0bd9 100644 --- a/src/mame/drivers/msbc1.cpp +++ b/src/mame/drivers/msbc1.cpp @@ -66,8 +66,9 @@ public: { } void msbc1(machine_config &config); - void msbc1_mem(address_map &map); + private: + void msbc1_mem(address_map &map); virtual void machine_reset() override; required_device m_maincpu; }; diff --git a/src/mame/drivers/mstation.cpp b/src/mame/drivers/mstation.cpp index d25da35351b..dc56405abc3 100644 --- a/src/mame/drivers/mstation.cpp +++ b/src/mame/drivers/mstation.cpp @@ -52,6 +52,9 @@ public: { } + void mstation(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; required_device m_bankdev1; @@ -98,7 +101,6 @@ public: DECLARE_PALETTE_INIT(mstation); TIMER_DEVICE_CALLBACK_MEMBER(mstation_1hz_timer); TIMER_DEVICE_CALLBACK_MEMBER(mstation_kb_timer); - void mstation(machine_config &config); void mstation_banked_map(address_map &map); void mstation_io(address_map &map); void mstation_mem(address_map &map); diff --git a/src/mame/drivers/mt735.cpp b/src/mame/drivers/mt735.cpp index 0589f3231ef..a8dad4eaca1 100644 --- a/src/mame/drivers/mt735.cpp +++ b/src/mame/drivers/mt735.cpp @@ -13,6 +13,9 @@ class mt735_state : public driver_device public: mt735_state(const machine_config &mconfig, device_type type, const char *tag); + void mt735(machine_config &config); + +private: required_device m_cpu; DECLARE_READ8_MEMBER(p4_r); @@ -20,7 +23,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; - void mt735(machine_config &config); void mt735_map(address_map &map); }; diff --git a/src/mame/drivers/mtouchxl.cpp b/src/mame/drivers/mtouchxl.cpp index d697cbd796e..a2662532719 100644 --- a/src/mame/drivers/mtouchxl.cpp +++ b/src/mame/drivers/mtouchxl.cpp @@ -62,6 +62,10 @@ public: m_iocard(*this, "dbank"), m_multikey(*this, "multikey") { } + + void at486(machine_config &config); + +private: required_device m_maincpu; #ifndef REAL_PCI_CHIPSET required_device m_mb; @@ -75,7 +79,6 @@ public: DECLARE_READ8_MEMBER(key_r); DECLARE_WRITE8_MEMBER(key_w); DECLARE_READ8_MEMBER(coin_r); - void at486(machine_config &config); static void cdrom(device_t *device); void at32_io(address_map &map); void at32_map(address_map &map); diff --git a/src/mame/drivers/multi16.cpp b/src/mame/drivers/multi16.cpp index 73dbba8e6ac..c066134da29 100644 --- a/src/mame/drivers/multi16.cpp +++ b/src/mame/drivers/multi16.cpp @@ -19,13 +19,16 @@ class multi16_state : public driver_device public: multi16_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pic(*this, "pic8259"), - m_crtc(*this, "crtc"), - m_palette(*this, "palette") - , - m_p_vram(*this, "p_vram"){ } + m_maincpu(*this, "maincpu"), + m_pic(*this, "pic8259"), + m_crtc(*this, "crtc"), + m_palette(*this, "palette"), + m_p_vram(*this, "p_vram") + { } + void multi16(machine_config &config); + +private: required_device m_maincpu; required_device m_pic; required_device m_crtc; @@ -33,12 +36,11 @@ public: DECLARE_WRITE8_MEMBER(multi16_6845_address_w); DECLARE_WRITE8_MEMBER(multi16_6845_data_w); required_shared_ptr m_p_vram; - uint8_t m_crtc_vreg[0x100],m_crtc_index; + uint8_t m_crtc_vreg[0x100], m_crtc_index; virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_multi16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void multi16(machine_config &config); void multi16_io(address_map &map); void multi16_map(address_map &map); }; diff --git a/src/mame/drivers/multi8.cpp b/src/mame/drivers/multi8.cpp index 27d147f9b80..05706b52420 100644 --- a/src/mame/drivers/multi8.cpp +++ b/src/mame/drivers/multi8.cpp @@ -45,6 +45,9 @@ public: , m_aysnd(*this, "aysnd") { } + void multi8(machine_config &config); + +private: DECLARE_READ8_MEMBER(key_input_r); DECLARE_READ8_MEMBER(key_status_r); DECLARE_READ8_MEMBER(vram_r); @@ -62,10 +65,9 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(keyboard_callback); MC6845_UPDATE_ROW(crtc_update_row); - void multi8(machine_config &config); void multi8_io(address_map &map); void multi8_mem(address_map &map); -private: + uint8_t *m_p_vram; uint8_t *m_p_wram; uint8_t *m_p_kanji; diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp index 51833dd2286..cf6dced861b 100644 --- a/src/mame/drivers/multigam.cpp +++ b/src/mame/drivers/multigam.cpp @@ -125,6 +125,18 @@ public: m_p2(*this, "P2"), m_dsw(*this, "DSW") { } + void multigam(machine_config &config); + void supergm3(machine_config &config); + void multigmt(machine_config &config); + void multigm3(machine_config &config); + + void init_multigmt(); + void init_multigam(); + void init_multigm3(); + + DECLARE_CUSTOM_INPUT_MEMBER(multigam_inputs_r); + +private: required_device m_maincpu; required_device m_ppu; required_ioport m_p1; @@ -165,7 +177,6 @@ public: int m_vrom4k; uint8_t m_supergm3_prg_bank; uint8_t m_supergm3_chr_bank; - DECLARE_CUSTOM_INPUT_MEMBER(multigam_inputs_r); DECLARE_WRITE8_MEMBER(multigam_nt_w); DECLARE_READ8_MEMBER(multigam_nt_r); DECLARE_WRITE8_MEMBER(sprite_dma_w); @@ -184,9 +195,6 @@ public: DECLARE_WRITE8_MEMBER(supergm3_prg_bank_w); DECLARE_WRITE8_MEMBER(supergm3_chr_bank_w); void set_mirroring(int mirroring); - void init_multigmt(); - void init_multigam(); - void init_multigm3(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -203,10 +211,6 @@ public: void supergm3_set_bank(); void multigm3_decrypt(uint8_t* mem, int memsize, const uint8_t* decode_nibble); void multigam3_mmc3_scanline_cb(int scanline, int vblank, int blanked); - void multigam(machine_config &config); - void supergm3(machine_config &config); - void multigmt(machine_config &config); - void multigm3(machine_config &config); void multigam_map(address_map &map); void multigm3_map(address_map &map); void multigmt_map(address_map &map); diff --git a/src/mame/drivers/murogem.cpp b/src/mame/drivers/murogem.cpp index 39fa5c66f5f..0091da2953b 100644 --- a/src/mame/drivers/murogem.cpp +++ b/src/mame/drivers/murogem.cpp @@ -127,6 +127,9 @@ public: m_palette(*this, "palette"), m_videoram(*this, "videoram") { } + void murogem(machine_config &config); + +private: required_device m_maincpu; required_device m_dac; required_device m_gfxdecode; @@ -138,7 +141,6 @@ public: DECLARE_PALETTE_INIT(murogem); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void murogem(machine_config &config); void murogem_map(address_map &map); }; diff --git a/src/mame/drivers/murogmbl.cpp b/src/mame/drivers/murogmbl.cpp index 6343a7acdf6..0d977d65bee 100644 --- a/src/mame/drivers/murogmbl.cpp +++ b/src/mame/drivers/murogmbl.cpp @@ -55,6 +55,9 @@ public: m_palette(*this, "palette"), m_video(*this, "video") { } + void murogmbl(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; @@ -65,7 +68,6 @@ public: DECLARE_PALETTE_INIT(murogmbl); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void murogmbl(machine_config &config); void murogmbl_map(address_map &map); }; @@ -79,6 +81,9 @@ public: m_palette(*this, "palette"), m_video(*this, "video") { } + void slotunbl(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; @@ -89,7 +94,6 @@ public: DECLARE_PALETTE_INIT(slotunbl); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void slotunbl(machine_config &config); void slotunbl_map(address_map &map); }; diff --git a/src/mame/drivers/mvme147.cpp b/src/mame/drivers/mvme147.cpp index 97ec968a95b..1f9a088992f 100644 --- a/src/mame/drivers/mvme147.cpp +++ b/src/mame/drivers/mvme147.cpp @@ -197,7 +197,10 @@ mvme147_state(const machine_config &mconfig, device_type type, const char *tag) , m_sccterm2(*this, "scc2") { } + + void mvme147(machine_config &config); +private: DECLARE_READ32_MEMBER (bootvect_r); DECLARE_WRITE32_MEMBER (bootvect_w); /* PCC - Peripheral Channel Controller */ @@ -215,11 +218,8 @@ mvme147_state(const machine_config &mconfig, device_type type, const char *tag) //DECLARE_WRITE16_MEMBER (vme_a16_w); virtual void machine_start () override; virtual void machine_reset () override; - void mvme147(machine_config &config); void mvme147_mem(address_map &map); -protected: -private: required_device m_maincpu; required_device m_sccterm; required_device m_sccterm2; diff --git a/src/mame/drivers/mw18w.cpp b/src/mame/drivers/mw18w.cpp index 34ea290955f..f56106b479e 100644 --- a/src/mame/drivers/mw18w.cpp +++ b/src/mame/drivers/mw18w.cpp @@ -33,16 +33,19 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void mw18w(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(mw18w_sensors_r); + +private: DECLARE_WRITE8_MEMBER(mw18w_sound0_w); DECLARE_WRITE8_MEMBER(mw18w_sound1_w); DECLARE_WRITE8_MEMBER(mw18w_lamps_w); DECLARE_WRITE8_MEMBER(mw18w_led_display_w); DECLARE_WRITE8_MEMBER(mw18w_irq0_clear_w); - DECLARE_CUSTOM_INPUT_MEMBER(mw18w_sensors_r); - void mw18w(machine_config &config); void mw18w_map(address_map &map); void mw18w_portmap(address_map &map); -private: + virtual void machine_start() override { m_digits.resolve(); m_lamps.resolve(); } required_device m_maincpu; output_finder<10> m_digits; diff --git a/src/mame/drivers/mwarr.cpp b/src/mame/drivers/mwarr.cpp index 4587a48a83c..e86f4c97f15 100644 --- a/src/mame/drivers/mwarr.cpp +++ b/src/mame/drivers/mwarr.cpp @@ -72,6 +72,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void mwarr(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_bg_videoram; required_shared_ptr m_mlow_videoram; @@ -115,7 +118,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void mwarr(machine_config &config); void mwarr_map(address_map &map); void oki2_map(address_map &map); }; diff --git a/src/mame/drivers/mwsub.cpp b/src/mame/drivers/mwsub.cpp index 2b7aa64905f..e41b666e84a 100644 --- a/src/mame/drivers/mwsub.cpp +++ b/src/mame/drivers/mwsub.cpp @@ -32,7 +32,7 @@ public: void submar(machine_config &config); -protected: +private: virtual void machine_start() override; DECLARE_READ8_MEMBER(submar_sensor0_r); diff --git a/src/mame/drivers/mx2178.cpp b/src/mame/drivers/mx2178.cpp index 7c469d77e6f..d96d5f8b813 100644 --- a/src/mame/drivers/mx2178.cpp +++ b/src/mame/drivers/mx2178.cpp @@ -44,12 +44,14 @@ public: , m_p_chargen(*this, "chargen") { } + void mx2178(machine_config &config); + +private: MC6845_UPDATE_ROW(crtc_update_row); - void mx2178(machine_config &config); void mx2178_io(address_map &map); void mx2178_mem(address_map &map); -private: + virtual void machine_reset() override; required_device m_palette; required_shared_ptr m_p_videoram; diff --git a/src/mame/drivers/myb3k.cpp b/src/mame/drivers/myb3k.cpp index cd02ffa2586..e04dd150407 100644 --- a/src/mame/drivers/myb3k.cpp +++ b/src/mame/drivers/myb3k.cpp @@ -109,6 +109,14 @@ public: , m_screen(*this, "screen") { } + void stepone(machine_config &config); + void jb3000(machine_config &config); + void myb3k(machine_config &config); + + /* Monitor */ + DECLARE_INPUT_CHANGED_MEMBER(monitor_changed); + +private: /* Interrupt controller */ DECLARE_WRITE_LINE_MEMBER( pic_int_w ); @@ -158,23 +166,15 @@ public: /* Video Controller */ DECLARE_WRITE8_MEMBER(myb3k_video_mode_w); - /* Monitor */ - DECLARE_INPUT_CHANGED_MEMBER(monitor_changed); - /* Status bits */ DECLARE_READ8_MEMBER(myb3k_io_status_r); - void stepone(machine_config &config); - void jb3000(machine_config &config); - void myb3k(machine_config &config); - void myb3k_io(address_map &map); void myb3k_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: /* Interrupt Controller */ void pic_ir5_w(int source, int state); void pic_ir7_w(int source, int state); diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp index b7767ed7d6b..de6b79a11c1 100644 --- a/src/mame/drivers/mycom.cpp +++ b/src/mame/drivers/mycom.cpp @@ -84,6 +84,11 @@ public: , m_p_chargen(*this, "chargen") { } + void mycom(machine_config &config); + + void init_mycom(); + +private: DECLARE_READ8_MEMBER(mycom_upper_r); DECLARE_WRITE8_MEMBER(mycom_upper_w); DECLARE_READ8_MEMBER(vram_data_r); @@ -95,15 +100,13 @@ public: DECLARE_READ8_MEMBER(mycom_05_r); DECLARE_READ8_MEMBER(mycom_06_r); DECLARE_READ8_MEMBER(mycom_08_r); - void init_mycom(); TIMER_DEVICE_CALLBACK_MEMBER(mycom_kbd); DECLARE_WRITE8_MEMBER(mycom_rtc_w); MC6845_UPDATE_ROW(crtc_update_row); - void mycom(machine_config &config); void mycom_io(address_map &map); void mycom_map(address_map &map); -private: + uint8_t m_0a; uint16_t m_i_videoram; uint8_t m_keyb_press; diff --git a/src/mame/drivers/myvision.cpp b/src/mame/drivers/myvision.cpp index 767dd515650..d2fa4634631 100644 --- a/src/mame/drivers/myvision.cpp +++ b/src/mame/drivers/myvision.cpp @@ -49,16 +49,18 @@ public: , m_io_row3(*this, "ROW3") { } + void myvision(machine_config &config); + +private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart ); DECLARE_READ8_MEMBER( ay_port_a_r ); DECLARE_READ8_MEMBER( ay_port_b_r ); DECLARE_WRITE8_MEMBER( ay_port_a_w ); DECLARE_WRITE8_MEMBER( ay_port_b_w ); - void myvision(machine_config &config); void myvision_io(address_map &map); void myvision_mem(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp index 2152d022040..659bddb7558 100644 --- a/src/mame/drivers/mz2000.cpp +++ b/src/mame/drivers/mz2000.cpp @@ -75,6 +75,10 @@ public: m_io_config(*this, "CONFIG"), m_palette(*this, "palette") { } + void mz2000(machine_config &config); + void mz80b(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); required_device m_cass; @@ -129,12 +133,10 @@ public: DECLARE_READ8_MEMBER(mz2000_pio1_portb_r); DECLARE_READ8_MEMBER(mz2000_pio1_porta_r); - void mz2000(machine_config &config); - void mz80b(machine_config &config); void mz2000_io(address_map &map); void mz2000_map(address_map &map); void mz80b_io(address_map &map); -protected: + required_device m_maincpu; required_device m_screen; required_device m_mb8877a; diff --git a/src/mame/drivers/mz3500.cpp b/src/mame/drivers/mz3500.cpp index 3308b0ed4bb..5ec89120701 100644 --- a/src/mame/drivers/mz3500.cpp +++ b/src/mame/drivers/mz3500.cpp @@ -59,6 +59,9 @@ public: m_floppy_connector(*this, "upd765a:%u", 0U) { } + void mz3500(machine_config &config); + +private: // devices required_device m_master; required_device m_slave; @@ -105,14 +108,13 @@ public: UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); - void mz3500(machine_config &config); void mz3500_master_io(address_map &map); void mz3500_master_map(address_map &map); void mz3500_slave_io(address_map &map); void mz3500_slave_map(address_map &map); void upd7220_1_map(address_map &map); void upd7220_2_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/mz6500.cpp b/src/mame/drivers/mz6500.cpp index c0fcec5024d..814a19fcb4a 100644 --- a/src/mame/drivers/mz6500.cpp +++ b/src/mame/drivers/mz6500.cpp @@ -26,6 +26,9 @@ public: m_maincpu(*this, "maincpu"), m_palette(*this, "palette") { } + void mz6500(machine_config &config); + +private: required_device m_hgdc; required_device m_fdc; DECLARE_READ8_MEMBER(mz6500_vram_r); @@ -38,7 +41,6 @@ public: required_device m_maincpu; required_device m_palette; UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); - void mz6500(machine_config &config); void mz6500_io(address_map &map); void mz6500_map(address_map &map); void upd7220_map(address_map &map); diff --git a/src/mame/drivers/mzr8105.cpp b/src/mame/drivers/mzr8105.cpp index a7b4ed074b8..49af5159f11 100644 --- a/src/mame/drivers/mzr8105.cpp +++ b/src/mame/drivers/mzr8105.cpp @@ -179,8 +179,9 @@ mzr8105_state(const machine_config &mconfig, device_type type, const char *tag) } void mzr8105(machine_config &config); - void mzr8105_mem(address_map &map); + private: + void mzr8105_mem(address_map &map); required_device m_maincpu; }; diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h index 1250a655f51..d0c0e167abd 100644 --- a/src/mame/includes/kchamp.h +++ b/src/mame/includes/kchamp.h @@ -32,6 +32,13 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void kchamp(machine_config &config); + void kchampvs(machine_config &config); + + void init_kchampvs(); + void init_kchampvs2(); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -66,8 +73,6 @@ public: DECLARE_WRITE8_MEMBER(kchamp_colorram_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(sound_control_w); - void init_kchampvs(); - void init_kchampvs2(); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_reset() override; virtual void video_start() override; @@ -82,8 +87,6 @@ public: void kchampvs_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void decrypt_code(); DECLARE_WRITE_LINE_MEMBER(msmint); - void kchamp(machine_config &config); - void kchampvs(machine_config &config); void decrypted_opcodes_map(address_map &map); void kchamp_io_map(address_map &map); void kchamp_map(address_map &map); diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h index 9671ae76f62..6e413566027 100644 --- a/src/mame/includes/kickgoal.h +++ b/src/mame/includes/kickgoal.h @@ -27,13 +27,18 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void kickgoal(machine_config &config); + void actionhw(machine_config &config); + + void init_kickgoal(); + +private: DECLARE_READ16_MEMBER(kickgoal_eeprom_r); DECLARE_WRITE16_MEMBER(kickgoal_eeprom_w); DECLARE_WRITE16_MEMBER(kickgoal_fgram_w); DECLARE_WRITE16_MEMBER(kickgoal_bgram_w); DECLARE_WRITE16_MEMBER(kickgoal_bg2ram_w); DECLARE_WRITE16_MEMBER(actionhw_snd_w); - void init_kickgoal(); TILE_GET_INFO_MEMBER(get_kickgoal_fg_tile_info); TILE_GET_INFO_MEMBER(get_kickgoal_bg_tile_info); @@ -49,15 +54,12 @@ public: uint32_t screen_update_kickgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void kickgoal(machine_config &config); - void actionhw(machine_config &config); void kickgoal_program_map(address_map &map); void oki_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: /* video-related */ tilemap_t *m_fgtm; tilemap_t *m_bgtm; diff --git a/src/mame/includes/kim1.h b/src/mame/includes/kim1.h index 0a59e5d776e..157564d91f4 100644 --- a/src/mame/includes/kim1.h +++ b/src/mame/includes/kim1.h @@ -39,7 +39,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi); void kim1(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(kim1_u2_read_a); DECLARE_WRITE8_MEMBER(kim1_u2_write_a); DECLARE_READ8_MEMBER(kim1_u2_read_b); @@ -54,7 +54,6 @@ protected: void kim1_map(address_map &map); -protected: // devices required_device m_maincpu; required_device m_riot2; diff --git a/src/mame/includes/kingobox.h b/src/mame/includes/kingobox.h index 2e25f4f8c31..fbee6a13c70 100644 --- a/src/mame/includes/kingobox.h +++ b/src/mame/includes/kingobox.h @@ -35,6 +35,13 @@ public: m_soundlatch(*this, "soundlatch") { } + void kingofb(machine_config &config); + void ringking(machine_config &config); + + void init_ringkingw(); + void init_ringking3(); + +private: /* memory pointers */ required_shared_ptr m_scroll_y; required_shared_ptr m_videoram; @@ -60,8 +67,6 @@ public: DECLARE_WRITE8_MEMBER(kingofb_videoram2_w); DECLARE_WRITE8_MEMBER(kingofb_colorram2_w); DECLARE_WRITE8_MEMBER(kingofb_f800_w); - void init_ringkingw(); - void init_ringking3(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(ringking_get_bg_tile_info); @@ -85,8 +90,6 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void kingofb(machine_config &config); - void ringking(machine_config &config); void kingobox_map(address_map &map); void kingobox_sound_io_map(address_map &map); void kingobox_sound_map(address_map &map); diff --git a/src/mame/includes/klax.h b/src/mame/includes/klax.h index d17ef34aa69..41406bb9f3d 100644 --- a/src/mame/includes/klax.h +++ b/src/mame/includes/klax.h @@ -26,7 +26,7 @@ public: void klax(machine_config &config); void klax2bl(machine_config &config); -protected: +private: virtual void machine_reset() override; virtual void scanline_update(screen_device &screen, int scanline) override; @@ -43,7 +43,6 @@ protected: void klax2bl_map(address_map &map); void klax_map(address_map &map); -private: required_device m_playfield_tilemap; required_device m_mob; diff --git a/src/mame/includes/kncljoe.h b/src/mame/includes/kncljoe.h index 8da82c1c60f..72846f01f15 100644 --- a/src/mame/includes/kncljoe.h +++ b/src/mame/includes/kncljoe.h @@ -27,6 +27,9 @@ public: m_ay8910(*this, "aysnd"), m_soundlatch(*this, "soundlatch") { } + void kncljoe(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_scrollregs; @@ -69,7 +72,6 @@ public: uint32_t screen_update_kncljoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(sound_nmi); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void kncljoe(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); void sound_portmap(address_map &map); diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index 784a457dd5d..1bc3cceafdc 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -20,6 +20,12 @@ public: , m_lamp(*this, "lamp0") { } + void kopunch(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted); + DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted); + +private: DECLARE_READ8_MEMBER(sensors1_r); DECLARE_READ8_MEMBER(sensors2_r); DECLARE_WRITE8_MEMBER(lamp_w); @@ -30,8 +36,6 @@ public: DECLARE_WRITE8_MEMBER(scroll_y_w); DECLARE_WRITE8_MEMBER(gfxbank_w); - DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted); - DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted); INTERRUPT_GEN_MEMBER(vblank_interrupt); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -39,11 +43,9 @@ public: DECLARE_PALETTE_INIT(kopunch); uint32_t screen_update_kopunch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void kopunch(machine_config &config); void kopunch_io_map(address_map &map); void kopunch_map(address_map &map); -protected: virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/kramermc.h b/src/mame/includes/kramermc.h index 068e6a715f1..d7b0047830c 100644 --- a/src/mame/includes/kramermc.h +++ b/src/mame/includes/kramermc.h @@ -21,8 +21,12 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } - uint8_t m_key_row; + void kramermc(machine_config &config); + void init_kramermc(); + +private: + uint8_t m_key_row; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -32,7 +36,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void kramermc(machine_config &config); void kramermc_io(address_map &map); void kramermc_mem(address_map &map); }; diff --git a/src/mame/includes/ksayakyu.h b/src/mame/includes/ksayakyu.h index a1bbdbd90c5..f0da4d38597 100644 --- a/src/mame/includes/ksayakyu.h +++ b/src/mame/includes/ksayakyu.h @@ -22,6 +22,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void ksayakyu(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -56,7 +59,6 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void ksayakyu(machine_config &config); void maincpu_map(address_map &map); void soundcpu_map(address_map &map); }; diff --git a/src/mame/includes/kyocera.h b/src/mame/includes/kyocera.h index a2536940bac..da023d515d0 100644 --- a/src/mame/includes/kyocera.h +++ b/src/mame/includes/kyocera.h @@ -85,6 +85,21 @@ public: m_battery(*this, "BATTERY") { } + void kc85(machine_config &config); + void kc85_video(machine_config &config); + + DECLARE_WRITE_LINE_MEMBER(kc85_sod_w); + DECLARE_READ_LINE_MEMBER(kc85_sid_r); + + DECLARE_WRITE8_MEMBER( i8155_pa_w ); + DECLARE_WRITE8_MEMBER( i8155_pb_w ); + DECLARE_READ8_MEMBER( i8155_pc_r ); + + DECLARE_WRITE_LINE_MEMBER( i8155_to_w ); + DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); + DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); + +protected: required_device m_maincpu; required_device m_rtc; optional_device m_uart; @@ -120,12 +135,6 @@ public: DECLARE_READ8_MEMBER( keyboard_r ); DECLARE_READ8_MEMBER( lcd_r ); DECLARE_WRITE8_MEMBER( lcd_w ); - DECLARE_WRITE8_MEMBER( i8155_pa_w ); - DECLARE_WRITE8_MEMBER( i8155_pb_w ); - DECLARE_READ8_MEMBER( i8155_pc_r ); - DECLARE_WRITE_LINE_MEMBER( i8155_to_w ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); /* memory state */ uint8_t m_bank; /* memory bank selection */ @@ -141,10 +150,6 @@ public: int m_centronics_select; DECLARE_PALETTE_INIT(kc85); - DECLARE_WRITE_LINE_MEMBER(kc85_sod_w); - DECLARE_READ_LINE_MEMBER(kc85_sid_r); - void kc85(machine_config &config); - void kc85_video(machine_config &config); void kc85_io(address_map &map); void kc85_mem(address_map &map); void trsm100_io(address_map &map); diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index 80b9b2c8b23..208b11db7a8 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -24,6 +24,16 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void kyugo_base(machine_config &config); + void repulse(machine_config &config); + void flashgala(machine_config &config); + void srdmissn(machine_config &config); + void legend(machine_config &config); + void gyrodine(machine_config &config); + + void init_srdmissn(); + +private: DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); DECLARE_WRITE8_MEMBER(coin_counter_w); DECLARE_WRITE8_MEMBER(fgvideoram_w); @@ -35,17 +45,9 @@ public: DECLARE_WRITE8_MEMBER(scroll_y_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - void init_srdmissn(); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_irq); - void kyugo_base(machine_config &config); - void repulse(machine_config &config); - void flashgala(machine_config &config); - void srdmissn(machine_config &config); - void legend(machine_config &config); - void gyrodine(machine_config &config); void flashgala_sub_map(address_map &map); void flashgala_sub_portmap(address_map &map); void gyrodine_main_map(address_map &map); @@ -58,12 +60,11 @@ public: void repulse_sub_portmap(address_map &map); void srdmissn_sub_map(address_map &map); void srdmissn_sub_portmap(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: /* memory pointers */ required_shared_ptr m_fgvideoram; required_shared_ptr m_bgvideoram; diff --git a/src/mame/includes/labyrunr.h b/src/mame/includes/labyrunr.h index 543f45282e6..c3a4e2d8ecb 100644 --- a/src/mame/includes/labyrunr.h +++ b/src/mame/includes/labyrunr.h @@ -26,6 +26,9 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void labyrunr(machine_config &config); + +private: /* devices */ required_device m_k007121; @@ -57,6 +60,5 @@ public: uint32_t screen_update_labyrunr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); INTERRUPT_GEN_MEMBER(labyrunr_timer_interrupt); - void labyrunr(machine_config &config); void labyrunr_map(address_map &map); }; diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h index 6928f1860f5..ed36b92e8c4 100644 --- a/src/mame/includes/ladyfrog.h +++ b/src/mame/includes/ladyfrog.h @@ -24,6 +24,10 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void toucheme(machine_config &config); + void ladyfrog(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; std::unique_ptr m_spriteram; @@ -78,8 +82,6 @@ public: uint32_t screen_update_ladyfrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(nmi_callback); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void toucheme(machine_config &config); - void ladyfrog(machine_config &config); void ladyfrog_map(address_map &map); void ladyfrog_sound_map(address_map &map); }; diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index c5977428562..179dbaf7359 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -31,6 +31,15 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void base(machine_config &config); + void wwjgtin(machine_config &config); + void lasso(machine_config &config); + void chameleo(machine_config &config); + void pinbo(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -65,7 +74,6 @@ public: DECLARE_WRITE8_MEMBER(lasso_video_control_w); DECLARE_WRITE8_MEMBER(wwjgtin_video_control_w); DECLARE_WRITE8_MEMBER(pinbo_video_control_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); TILE_GET_INFO_MEMBER(lasso_get_bg_tile_info); TILE_GET_INFO_MEMBER(wwjgtin_get_track_tile_info); TILE_GET_INFO_MEMBER(pinbo_get_bg_tile_info); @@ -85,11 +93,6 @@ public: void wwjgtin_set_last_four_colors(); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int reverse ); void draw_lasso( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void base(machine_config &config); - void wwjgtin(machine_config &config); - void lasso(machine_config &config); - void chameleo(machine_config &config); - void pinbo(machine_config &config); void chameleo_audio_map(address_map &map); void chameleo_main_map(address_map &map); void lasso_audio_map(address_map &map); diff --git a/src/mame/includes/lastduel.h b/src/mame/includes/lastduel.h index ae248a3092d..a746370cd1e 100644 --- a/src/mame/includes/lastduel.h +++ b/src/mame/includes/lastduel.h @@ -27,6 +27,10 @@ public: m_audiobank(*this, "audiobank") { } + void lastduel(machine_config &config); + void madgear(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_audiocpu; @@ -71,8 +75,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(lastduel_timer_cb); TIMER_DEVICE_CALLBACK_MEMBER(madgear_timer_cb); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); - void lastduel(machine_config &config); - void madgear(machine_config &config); void lastduel_map(address_map &map); void madgear_map(address_map &map); void madgear_sound_map(address_map &map); diff --git a/src/mame/includes/lazercmd.h b/src/mame/includes/lazercmd.h index 996658b214d..44c02722553 100644 --- a/src/mame/includes/lazercmd.h +++ b/src/mame/includes/lazercmd.h @@ -40,6 +40,13 @@ public: m_palette(*this, "palette") { } + void bbonk(machine_config &config); + void medlanes(machine_config &config); + void lazercmd(machine_config &config); + + void init_lazercmd(); + +private: /* device */ required_device m_maincpu; optional_device m_dac0; @@ -69,7 +76,6 @@ public: DECLARE_WRITE8_MEMBER(medlanes_hardware_w); DECLARE_WRITE8_MEMBER(bbonk_hardware_w); DECLARE_READ8_MEMBER(lazercmd_hardware_r); - void init_lazercmd(); virtual void machine_start() override; virtual void machine_reset() override; DECLARE_PALETTE_INIT(lazercmd); @@ -78,9 +84,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(bbonk_timer); int vert_scale(int data); void plot_pattern( bitmap_ind16 &bitmap, int x, int y ); - void bbonk(machine_config &config); - void medlanes(machine_config &config); - void lazercmd(machine_config &config); void bbonk_map(address_map &map); void lazercmd_map(address_map &map); void lazercmd_portmap(address_map &map); diff --git a/src/mame/includes/lc80.h b/src/mame/includes/lc80.h index cab65551cdf..e700f7b7279 100644 --- a/src/mame/includes/lc80.h +++ b/src/mame/includes/lc80.h @@ -35,6 +35,13 @@ public: m_out_led(*this, "led0") { } + void lc80_2(machine_config &config); + void lc80(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); + +private: required_device m_maincpu; required_device m_pio2; required_device m_cassette; @@ -53,16 +60,12 @@ public: DECLARE_READ8_MEMBER( pio1_pb_r ); DECLARE_WRITE8_MEMBER( pio1_pb_w ); DECLARE_READ8_MEMBER( pio2_pb_r ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); void update_display(); // display state uint8_t m_digit; uint8_t m_segment; - void lc80_2(machine_config &config); - void lc80(machine_config &config); void lc80_io(address_map &map); void lc80_mem(address_map &map); void sc80_mem(address_map &map); diff --git a/src/mame/includes/legionna.h b/src/mame/includes/legionna.h index 7e7597a89db..fb3a2f86dca 100644 --- a/src/mame/includes/legionna.h +++ b/src/mame/includes/legionna.h @@ -31,6 +31,22 @@ public: memset(scrollvals, 0, sizeof(uint16_t)*6); } + void cupsocs(machine_config &config); + void heatbrl(machine_config &config); + void cupsoc(machine_config &config); + void grainbow(machine_config &config); + void legionna(machine_config &config); + void godzilla(machine_config &config); + void denjinmk(machine_config &config); + + void init_legiongfx(); + void init_godzilla(); + void init_cupsoc_debug(); + void init_cupsoc(); + void init_cupsocs(); + void init_olysoc92(); + +private: required_shared_ptr m_spriteram; optional_shared_ptr m_swappal; std::unique_ptr m_back_data; @@ -71,12 +87,6 @@ public: DECLARE_WRITE16_MEMBER(grainbow_layer_config_w); DECLARE_WRITE16_MEMBER(palette_swap_w); - void init_legiongfx(); - void init_godzilla(); - void init_cupsoc_debug(); - void init_cupsoc(); - void init_cupsocs(); - void init_olysoc92(); TILE_GET_INFO_MEMBER(get_back_tile_info); TILE_GET_INFO_MEMBER(get_mid_tile_info); TILE_GET_INFO_MEMBER(get_mid_tile_info_denji); @@ -106,13 +116,6 @@ public: required_device m_palette; required_device m_crtc; optional_device m_raiden2cop; - void cupsocs(machine_config &config); - void heatbrl(machine_config &config); - void cupsoc(machine_config &config); - void grainbow(machine_config &config); - void legionna(machine_config &config); - void godzilla(machine_config &config); - void denjinmk(machine_config &config); void cupsoc_map(address_map &map); void cupsocs_map(address_map &map); void denjinmk_map(address_map &map); diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index 17bcf40e56c..3ec1e263010 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -36,52 +36,116 @@ public: , m_master(*this, "master") , m_slave(*this, "slave") , m_mainram(*this, "mainram") - , m_battery_ram(*this, "battery") + , m_master_bankslot(*this, "masterbank_%u", 0U) + , m_master_base(*this, "master") + , m_slave_bankslot(*this, "slavebank") + , m_slave_base(*this, "slave") , m_eeprom(*this, "eeprom") + , m_battery_ram(*this, "battery") + , m_palette(*this, "palette") + , m_screen(*this, "screen") + , m_gfxdecode(*this, "gfxdecode") , m_dac(*this, "dac%u", 0U) , m_ay8910(*this, "ay8910") , m_ay8912(*this, "ay8912") - , m_screen(*this, "screen") - , m_gfxdecode(*this, "gfxdecode") - , m_palette(*this, "palette") - , m_master_base(*this, "master") - , m_slave_base(*this, "slave") , m_bg_gfxrom(*this, "bg_gfx") , m_bg_prom(*this, "bg_prom") - , m_master_bankslot(*this, "masterbank_%u", 0U) - , m_slave_bankslot(*this, "slavebank") { } + void leland(machine_config &config); + void leland_video(machine_config &config); + + void init_dblplay(); + void init_dangerz(); + void init_mayhem(); + void init_alleymas(); + void init_strkzone(); + void init_wseries(); + void init_powrplay(); + void init_basebal2(); + void init_upyoural(); + void init_cerberus(); + + void cerberus_bankswitch(); + void mayhem_bankswitch(); + void dangerz_bankswitch(); + void basebal2_bankswitch(); + void redline_bankswitch(); + + void offroad_bankswitch(); + void viper_bankswitch(); + + DECLARE_READ8_MEMBER(leland_raster_r); + DECLARE_WRITE8_MEMBER(leland_slave_video_addr_w); + DECLARE_WRITE8_MEMBER(leland_slave_large_banksw_w); + DECLARE_WRITE8_MEMBER(leland_master_video_addr_w); + + TIMER_CALLBACK_MEMBER(ataxx_interrupt_callback); + +protected: required_device m_master; required_device m_slave; required_shared_ptr m_mainram; - required_shared_ptr m_battery_ram; + required_memory_bank_array<2> m_master_bankslot; + required_region_ptr m_master_base; + required_memory_bank m_slave_bankslot; + required_region_ptr m_slave_base; required_device m_eeprom; + required_shared_ptr m_battery_ram; + required_device m_palette; + required_device m_screen; + required_device m_gfxdecode; + + emu_timer *m_master_int_timer; + uint8_t m_battery_ram_enable; + + void leland_rotate_memory(const char *cpuname); + + int dial_compute_value(int new_val, int indx); + uint8_t m_dial_last_input[4]; + uint8_t m_dial_last_result[4]; + uint8_t m_analog_result; + + int m_dangerz_x; + int m_dangerz_y; + + void init_master_ports(uint8_t mvram_base, uint8_t io_base); + void (leland_state::*m_update_master_bank)(); + + int leland_vram_port_r(address_space &space, int offset, int num); + void leland_vram_port_w(address_space &space, int offset, int data, int num); + + uint8_t m_wcol_enable; + + DECLARE_READ8_MEMBER(leland_master_analog_key_r); + DECLARE_WRITE8_MEMBER(leland_master_analog_key_w); + DECLARE_READ8_MEMBER(dangerz_input_y_r); + DECLARE_READ8_MEMBER(dangerz_input_x_r); + DECLARE_READ8_MEMBER(dangerz_input_upper_r); + DECLARE_WRITE8_MEMBER(leland_scroll_w); + DECLARE_WRITE8_MEMBER(leland_master_alt_bankswitch_w); + + tilemap_t *m_tilemap; + uint16_t m_xscroll; + uint16_t m_yscroll; + std::unique_ptr m_video_ram; + struct vram_state_data m_vram_state[2]; + + void slave_map_program(address_map &map); + + TIMER_CALLBACK_MEMBER(leland_delayed_mvram_w); + +private: optional_device_array m_dac; optional_device m_ay8910; optional_device m_ay8912; - required_device m_screen; - required_device m_gfxdecode; - required_device m_palette; - required_region_ptr m_master_base; - required_region_ptr m_slave_base; required_region_ptr m_bg_gfxrom; optional_region_ptr m_bg_prom; - required_memory_bank_array<2> m_master_bankslot; - required_memory_bank m_slave_bankslot; - uint8_t m_dac_control; uint8_t *m_alleymas_kludge_mem; uint8_t m_gfx_control; - uint8_t m_wcol_enable; - emu_timer *m_master_int_timer; - int m_dangerz_x; - int m_dangerz_y; - uint8_t m_analog_result; - uint8_t m_dial_last_input[4]; - uint8_t m_dial_last_result[4]; uint8_t m_keycard_shift; uint8_t m_keycard_bit; uint8_t m_keycard_state; @@ -90,12 +154,6 @@ public: uint8_t m_top_board_bank; uint8_t m_sound_port_bank; uint8_t m_alternate_bank; - void (leland_state::*m_update_master_bank)(); - uint8_t m_battery_ram_enable; - std::unique_ptr m_video_ram; - struct vram_state_data m_vram_state[2]; - uint16_t m_xscroll; - uint16_t m_yscroll; uint8_t m_gfxbank; uint16_t m_last_scanline; emu_timer *m_scanline_timer; @@ -103,82 +161,43 @@ public: DECLARE_READ8_MEMBER(cerberus_dial_1_r); DECLARE_READ8_MEMBER(cerberus_dial_2_r); DECLARE_WRITE8_MEMBER(alleymas_joystick_kludge); - DECLARE_READ8_MEMBER(dangerz_input_y_r); - DECLARE_READ8_MEMBER(dangerz_input_x_r); - DECLARE_READ8_MEMBER(dangerz_input_upper_r); - DECLARE_WRITE8_MEMBER(leland_master_alt_bankswitch_w); DECLARE_WRITE8_MEMBER(leland_battery_ram_w); - DECLARE_READ8_MEMBER(leland_master_analog_key_r); - DECLARE_WRITE8_MEMBER(leland_master_analog_key_w); DECLARE_READ8_MEMBER(leland_master_input_r); DECLARE_WRITE8_MEMBER(leland_master_output_w); DECLARE_WRITE8_MEMBER(leland_gated_paletteram_w); DECLARE_READ8_MEMBER(leland_gated_paletteram_r); DECLARE_WRITE8_MEMBER(leland_slave_small_banksw_w); - DECLARE_WRITE8_MEMBER(leland_slave_large_banksw_w); DECLARE_WRITE8_MEMBER(ataxx_slave_banksw_w); - DECLARE_READ8_MEMBER(leland_raster_r); - DECLARE_WRITE8_MEMBER(leland_scroll_w); - DECLARE_WRITE8_MEMBER(leland_master_video_addr_w); DECLARE_WRITE8_MEMBER(leland_mvram_port_w); DECLARE_READ8_MEMBER(leland_mvram_port_r); - DECLARE_WRITE8_MEMBER(leland_slave_video_addr_w); DECLARE_WRITE8_MEMBER(leland_svram_port_w); DECLARE_READ8_MEMBER(leland_svram_port_r); DECLARE_READ8_MEMBER(leland_sound_port_r); DECLARE_WRITE8_MEMBER(leland_sound_port_w); DECLARE_WRITE8_MEMBER(leland_gfx_port_w); - void init_dblplay(); - void init_dangerz(); - void init_mayhem(); - void init_alleymas(); - void init_strkzone(); - void init_wseries(); - void init_powrplay(); - void init_basebal2(); - void init_upyoural(); - void init_cerberus(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - tilemap_t *m_tilemap; - TILEMAP_MAPPER_MEMBER(leland_scan); TILE_GET_INFO_MEMBER(leland_get_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(leland_master_interrupt); TIMER_CALLBACK_MEMBER(leland_interrupt_callback); - TIMER_CALLBACK_MEMBER(ataxx_interrupt_callback); TIMER_CALLBACK_MEMBER(scanline_callback); - TIMER_CALLBACK_MEMBER(leland_delayed_mvram_w); void leland_video_addr_w(address_space &space, int offset, int data, int num); - int leland_vram_port_r(address_space &space, int offset, int num); - void leland_vram_port_w(address_space &space, int offset, int data, int num); - int dial_compute_value(int new_val, int indx); void update_dangerz_xy(); - void cerberus_bankswitch(); - void mayhem_bankswitch(); - void dangerz_bankswitch(); - void basebal2_bankswitch(); - void redline_bankswitch(); - void viper_bankswitch(); - void offroad_bankswitch(); + void leland_init_eeprom(uint8_t default_val, const uint16_t *data, uint8_t serial_offset, uint8_t serial_type); void ataxx_init_eeprom(const uint16_t *data); int keycard_r(); void keycard_w(int data); - void leland_rotate_memory(const char *cpuname); - void init_master_ports(uint8_t mvram_base, uint8_t io_base); - void leland(machine_config &config); - void leland_video(machine_config &config); void master_map_io(address_map &map); void master_map_program(address_map &map); void slave_map_io(address_map &map); - void slave_map_program(address_map &map); void slave_small_map_program(address_map &map); }; @@ -207,7 +226,7 @@ public: void quarterb(machine_config &config); void lelandi(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(redline_pedal_1_r); DECLARE_READ8_MEMBER(redline_pedal_2_r); DECLARE_READ8_MEMBER(redline_wheel_1_r); @@ -220,7 +239,6 @@ protected: void master_redline_map_io(address_map &map); void slave_large_map_program(address_map &map); -private: required_device m_sound; }; @@ -246,7 +264,7 @@ public: void ataxx(machine_config &config); void wsf(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(ataxx_trackball_r); DECLARE_READ8_MEMBER(indyheat_analog_r); DECLARE_WRITE8_MEMBER(indyheat_analog_w); @@ -278,7 +296,6 @@ protected: void master_map_io_2(address_map &map); void slave_map_io_2(address_map &map); -private: required_device m_sound; optional_ioport_array<4> m_track_axes; diff --git a/src/mame/includes/lemmings.h b/src/mame/includes/lemmings.h index 5fda26b45db..ec8c8e18628 100644 --- a/src/mame/includes/lemmings.h +++ b/src/mame/includes/lemmings.h @@ -27,6 +27,9 @@ public: { } + void lemmings(machine_config &config); + +private: /* video-related */ bitmap_ind16 m_bitmap0; tilemap_t *m_vram_tilemap; @@ -64,7 +67,6 @@ public: DECLARE_READ16_MEMBER( lem_protection_region_0_146_r ); DECLARE_WRITE16_MEMBER( lem_protection_region_0_146_w ); - void lemmings(machine_config &config); void lemmings_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index ad2f9902bf9..f72f3d70c15 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -28,6 +28,10 @@ public: m_k054321(*this, "k054321"), m_palette(*this, "palette") { } + void lethalej(machine_config &config); + void lethalen(machine_config &config); + +private: /* video-related */ int m_layer_colorbase[4]; int m_sprite_colorbase; @@ -59,8 +63,6 @@ public: INTERRUPT_GEN_MEMBER(lethalen_interrupt); K05324X_CB_MEMBER(sprite_callback); K056832_CB_MEMBER(tile_callback); - void lethalej(machine_config &config); - void lethalen(machine_config &config); void bank4000_map(address_map &map); void le_main(address_map &map); void le_sound(address_map &map); diff --git a/src/mame/includes/lethalj.h b/src/mame/includes/lethalj.h index 3ca1c5cce35..b6c6d970f4a 100644 --- a/src/mame/includes/lethalj.h +++ b/src/mame/includes/lethalj.h @@ -36,23 +36,27 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void lethalj(machine_config &config); + void gameroom(machine_config &config); + + void init_cfarm(); + void init_ripribit(); + void init_cclownz(); + + DECLARE_CUSTOM_INPUT_MEMBER(cclownz_paddle); + +private: DECLARE_WRITE16_MEMBER(ripribit_control_w); DECLARE_WRITE16_MEMBER(cfarm_control_w); DECLARE_WRITE16_MEMBER(cclownz_control_w); DECLARE_READ16_MEMBER(lethalj_gun_r); DECLARE_WRITE16_MEMBER(lethalj_blitter_w); void do_blit(); - DECLARE_CUSTOM_INPUT_MEMBER(cclownz_paddle); - void init_cfarm(); - void init_ripribit(); - void init_cclownz(); inline void get_crosshair_xy(int player, int *x, int *y); TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update); - void lethalj(machine_config &config); - void gameroom(machine_config &config); void lethalj_map(address_map &map); -protected: + virtual void machine_start() override { m_lamps.resolve(); } virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual void video_start() override; diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index f0e0e7b0840..d8309f75b4c 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -21,6 +21,18 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void liberate_base(machine_config &config); + void liberate(machine_config &config); + void liberatb(machine_config &config); + void boomrang(machine_config &config); + void prosoccr(machine_config &config); + void prosport(machine_config &config); + + void init_yellowcb(); + void init_liberate(); + void init_prosport(); + +private: optional_shared_ptr m_bg_vram; /* prosport */ required_shared_ptr m_colorram; required_shared_ptr m_videoram; @@ -63,9 +75,6 @@ public: DECLARE_WRITE8_MEMBER(liberate_videoram_w); DECLARE_WRITE8_MEMBER(liberate_colorram_w); DECLARE_WRITE8_MEMBER(prosport_bg_vram_w); - void init_yellowcb(); - void init_liberate(); - void init_prosport(); TILEMAP_MAPPER_MEMBER(back_scan); TILEMAP_MAPPER_MEMBER(fix_scan); TILE_GET_INFO_MEMBER(get_back_tile_info); @@ -87,12 +96,6 @@ public: void prosport_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void boomrang_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); void prosoccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void liberate_base(machine_config &config); - void liberate(machine_config &config); - void liberatb(machine_config &config); - void boomrang(machine_config &config); - void prosoccr(machine_config &config); - void prosport(machine_config &config); void deco16_io_map(address_map &map); void decrypted_opcodes_map(address_map &map); void liberatb_map(address_map &map); diff --git a/src/mame/includes/liberatr.h b/src/mame/includes/liberatr.h index f3ff64adbca..1d717f7cbd1 100644 --- a/src/mame/includes/liberatr.h +++ b/src/mame/includes/liberatr.h @@ -38,7 +38,7 @@ public: void liberat2(machine_config &config); void liberatr(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -66,7 +66,6 @@ protected: void liberat2_map(address_map &map); void liberatr_map(address_map &map); -protected: // The following structure describes the (up to 32) line segments // that make up one horizontal line (latitude) for one display frame of the planet. // Note: this and the following structure is only used to collect the diff --git a/src/mame/includes/lisa.h b/src/mame/includes/lisa.h index a4d795577d1..6a0b736e537 100644 --- a/src/mame/includes/lisa.h +++ b/src/mame/includes/lisa.h @@ -130,6 +130,15 @@ public: m_screen(*this, SCREEN_TAG) { } + void lisa(machine_config &config); + void lisa210(machine_config &config); + void macxl(machine_config &config); + + void init_lisa210(); + void init_mac_xl(); + void init_lisa2(); + +private: required_device m_maincpu; required_device m_via0; required_device m_via1; @@ -213,9 +222,6 @@ public: DECLARE_WRITE_LINE_MEMBER(sfmsk_w); DECLARE_WRITE_LINE_MEMBER(hdmsk_w); - void init_lisa210(); - void init_mac_xl(); - void init_lisa2(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -243,9 +249,6 @@ public: void scan_keyboard(); void unplug_keyboard(); void plug_keyboard(); - void lisa(machine_config &config); - void lisa210(machine_config &config); - void macxl(machine_config &config); void lisa210_fdc_map(address_map &map); void lisa_fdc_map(address_map &map); void lisa_map(address_map &map); diff --git a/src/mame/includes/lkage.h b/src/mame/includes/lkage.h index d050c511796..2577ffd0adf 100644 --- a/src/mame/includes/lkage.h +++ b/src/mame/includes/lkage.h @@ -23,6 +23,13 @@ public: m_soundlatch(*this, "soundlatch"), m_soundnmi(*this, "soundnmi") { } + void lkageb(machine_config &config); + void lkage(machine_config &config); + + void init_bygone(); + void init_lkage(); + +private: required_shared_ptr m_vreg; required_shared_ptr m_scroll; required_shared_ptr m_spriteram; @@ -61,8 +68,6 @@ public: DECLARE_READ8_MEMBER(fake_status_r); DECLARE_WRITE8_MEMBER(lkage_videoram_w); - void init_bygone(); - void init_lkage(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); @@ -71,8 +76,6 @@ public: virtual void video_start() override; uint32_t screen_update_lkage(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - void lkageb(machine_config &config); - void lkage(machine_config &config); void lkage_io_map(address_map &map); void lkage_map(address_map &map); void lkage_map_boot(address_map &map); diff --git a/src/mame/includes/llc.h b/src/mame/includes/llc.h index f407e402694..77f922f33be 100644 --- a/src/mame/includes/llc.h +++ b/src/mame/includes/llc.h @@ -33,6 +33,13 @@ public: , m_digits(*this, "digit%u", 0U) { } + void llc1(machine_config &config); + void llc2(machine_config &config); + + void init_llc2(); + void init_llc1(); + +private: DECLARE_WRITE8_MEMBER(llc2_rom_disable_w); DECLARE_WRITE8_MEMBER(llc2_basic_enable_w); void kbd_put(u8 data); @@ -44,21 +51,17 @@ public: DECLARE_READ8_MEMBER(llc2_port1_b_r); DECLARE_READ8_MEMBER(llc2_port2_a_r); DECLARE_WRITE8_MEMBER(llc2_port1_b_w); - void init_llc2(); - void init_llc1(); DECLARE_MACHINE_START(llc1); DECLARE_MACHINE_RESET(llc1); DECLARE_MACHINE_RESET(llc2); uint32_t screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void llc1(machine_config &config); - void llc2(machine_config &config); void llc1_io(address_map &map); void llc1_mem(address_map &map); void llc2_io(address_map &map); void llc2_mem(address_map &map); -private: + bool m_rv; uint8_t m_term_status; uint8_t m_llc1_key; diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index 94b5b931cbf..b11a612f6a9 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -39,6 +39,13 @@ public: m_scroll_x(*this, "scroll_x.%u", 0), m_scroll_y(*this, "scroll_y.%u", 0) { } + void aliencha(machine_config &config); + void lordgun(machine_config &config); + + void init_aliencha(); + void init_lordgun(); + +private: required_device m_maincpu; required_device m_soundcpu; required_device m_oki; @@ -90,9 +97,6 @@ public: DECLARE_WRITE8_MEMBER(aliencha_dip_w); DECLARE_WRITE8_MEMBER(lordgun_okibank_w); - void init_aliencha(); - void init_lordgun(); - TILE_GET_INFO_MEMBER(get_tile_info_0); TILE_GET_INFO_MEMBER(get_tile_info_1); TILE_GET_INFO_MEMBER(get_tile_info_2); @@ -107,8 +111,6 @@ public: void lorddgun_calc_gun_scr(int i); void lordgun_update_gun(int i); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void aliencha(machine_config &config); - void lordgun(machine_config &config); void aliencha_map(address_map &map); void aliencha_soundio_map(address_map &map); void lordgun_map(address_map &map); diff --git a/src/mame/includes/lsasquad.h b/src/mame/includes/lsasquad.h index dbc342eb184..728822366bd 100644 --- a/src/mame/includes/lsasquad.h +++ b/src/mame/includes/lsasquad.h @@ -24,6 +24,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void lsasquad(machine_config &config); + void daikaiju(machine_config &config); + void storming(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_scrollram; @@ -58,9 +63,6 @@ public: int draw_layer_daikaiju( bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int * previd, int type ); void drawbg( bitmap_ind16 &bitmap, const rectangle &cliprect, int type ); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t priority ); - void lsasquad(machine_config &config); - void daikaiju(machine_config &config); - void storming(machine_config &config); void daikaiju_map(address_map &map); void daikaiju_sound_map(address_map &map); void lsasquad_map(address_map &map); diff --git a/src/mame/includes/lucky74.h b/src/mame/includes/lucky74.h index 7c982a2bc63..72326fb54c4 100644 --- a/src/mame/includes/lucky74.h +++ b/src/mame/includes/lucky74.h @@ -19,6 +19,9 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void lucky74(machine_config &config); + +private: DECLARE_READ8_MEMBER(custom_09R81P_port_r); DECLARE_WRITE8_MEMBER(custom_09R81P_port_w); DECLARE_READ8_MEMBER(usart_8251_r); @@ -38,11 +41,9 @@ public: uint32_t screen_update_lucky74(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(nmi_interrupt); DECLARE_WRITE_LINE_MEMBER(lucky74_adpcm_int); - void lucky74(machine_config &config); void lucky74_map(address_map &map); void lucky74_portmap(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/lvcards.h b/src/mame/includes/lvcards.h index c9741f1e01d..e8fc12256e4 100644 --- a/src/mame/includes/lvcards.h +++ b/src/mame/includes/lvcards.h @@ -13,6 +13,11 @@ public: m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode") { } + void lvpoker(machine_config &config); + void lvcards(machine_config &config); + void ponttehk(machine_config &config); + +private: uint8_t m_payout; uint8_t m_pulse; uint8_t m_result; @@ -32,9 +37,6 @@ public: uint32_t screen_update_lvcards(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; - void lvpoker(machine_config &config); - void lvcards(machine_config &config); - void ponttehk(machine_config &config); void lvcards_io_map(address_map &map); void lvcards_map(address_map &map); void lvpoker_map(address_map &map); diff --git a/src/mame/includes/lviv.h b/src/mame/includes/lviv.h index fd484b6fa49..69433b12046 100644 --- a/src/mame/includes/lviv.h +++ b/src/mame/includes/lviv.h @@ -39,7 +39,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(reset_button); -protected: +private: virtual void machine_reset() override; DECLARE_PALETTE_INIT(lviv); diff --git a/src/mame/includes/lwings.h b/src/mame/includes/lwings.h index 7ec5c42f872..aad34ed2d31 100644 --- a/src/mame/includes/lwings.h +++ b/src/mame/includes/lwings.h @@ -22,6 +22,15 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void lwings(machine_config &config); + void trojan(machine_config &config); + void fball(machine_config &config); + void avengers(machine_config &config); + void avengersb(machine_config &config); + + void init_avengersb(); + +private: /* memory pointers */ required_device m_spriteram; required_shared_ptr m_fgvideoram; @@ -70,7 +79,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - void init_avengersb(); DECLARE_VIDEO_START(trojan); DECLARE_VIDEO_START(avengers); DECLARE_VIDEO_START(avengersb); @@ -87,11 +95,6 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void lwings(machine_config &config); - void trojan(machine_config &config); - void fball(machine_config &config); - void avengers(machine_config &config); - void avengersb(machine_config &config); void avengers_adpcm_io_map(address_map &map); void avengers_map(address_map &map); void fball_map(address_map &map); diff --git a/src/mame/includes/lynx.h b/src/mame/includes/lynx.h index 85ffd1bbb8c..cad2ec549c8 100644 --- a/src/mame/includes/lynx.h +++ b/src/mame/includes/lynx.h @@ -26,6 +26,23 @@ class lynx_state : public driver_device { public: + lynx_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_mem_0000(*this, "mem_0000"), + m_mem_fc00(*this, "mem_fc00"), + m_mem_fd00(*this, "mem_fd00"), + m_mem_fe00(*this, "mem_fe00"), + m_mem_fffa(*this, "mem_fffa"), + m_maincpu(*this, "maincpu"), + m_sound(*this, "custom"), + m_cart(*this, "cartslot"), + m_palette(*this, "palette"), + m_screen(*this, "screen") + { } + + void lynx(machine_config &config); + +private: struct BLITTER { // global @@ -109,29 +126,11 @@ public: TIMER_UART }; - lynx_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_mem_0000(*this, "mem_0000"), - m_mem_fc00(*this, "mem_fc00"), - m_mem_fd00(*this, "mem_fd00"), - m_mem_fe00(*this, "mem_fe00"), - m_mem_fffa(*this, "mem_fffa"), - m_maincpu(*this, "maincpu"), - m_sound(*this, "custom"), - m_cart(*this, "cartslot"), - m_palette(*this, "palette"), - m_screen(*this, "screen") - { } - - void lynx(machine_config &config); - -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -private: required_shared_ptr m_mem_0000; required_shared_ptr m_mem_fc00; required_shared_ptr m_mem_fd00; diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index ab6aa480ece..538c2240149 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -36,11 +36,6 @@ class m10_state : public driver_device { public: - enum - { - TIMER_INTERRUPT - }; - m10_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_memory(*this, "memory"), @@ -56,6 +51,22 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void m15(machine_config &config); + void headoni(machine_config &config); + void m10(machine_config &config); + void m11(machine_config &config); + + void init_andromed(); + void init_ipminva1(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: + enum + { + TIMER_INTERRUPT + }; + /* memory pointers */ required_shared_ptr m_memory; required_shared_ptr m_rom; @@ -98,9 +109,6 @@ public: DECLARE_WRITE8_MEMBER(m10_colorram_w); DECLARE_WRITE8_MEMBER(m10_chargen_w); DECLARE_WRITE8_MEMBER(m15_chargen_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - void init_andromed(); - void init_ipminva1(); TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_MACHINE_START(m10); @@ -116,13 +124,9 @@ public: DECLARE_WRITE_LINE_MEMBER(ic8j2_output_changed); inline void plot_pixel_m10( bitmap_ind16 &bm, int x, int y, int col ); - void m15(machine_config &config); - void headoni(machine_config &config); - void m10(machine_config &config); - void m11(machine_config &config); void m10_main(address_map &map); void m11_main(address_map &map); void m15_main(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/m107.h b/src/mame/includes/m107.h index eea6f86bece..c560467df5f 100644 --- a/src/mame/includes/m107.h +++ b/src/mame/includes/m107.h @@ -36,6 +36,16 @@ public: { } + void airass(machine_config &config); + void wpksoc(machine_config &config); + void firebarr(machine_config &config); + void dsoccr94(machine_config &config); + + void init_firebarr(); + void init_dsoccr94(); + void init_wpksoc(); + +private: required_device m_maincpu; required_device m_soundcpu; required_device m_gfxdecode; @@ -69,9 +79,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(scanline_interrupt); - void init_firebarr(); - void init_dsoccr94(); - void init_wpksoc(); virtual void machine_start() override; virtual void video_start() override; @@ -80,10 +87,6 @@ public: void update_scroll_positions(); void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int laynum, int category,int opaque); void screenrefresh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void airass(machine_config &config); - void wpksoc(machine_config &config); - void firebarr(machine_config &config); - void dsoccr94(machine_config &config); void dsoccr94_io_map(address_map &map); void main_map(address_map &map); void main_portmap(address_map &map); diff --git a/src/mame/includes/m5.h b/src/mame/includes/m5.h index a80bdc87ff1..62cb04ce0d0 100644 --- a/src/mame/includes/m5.h +++ b/src/mame/includes/m5.h @@ -51,8 +51,38 @@ public: , m_DIPS(*this, "DIPS") { } + void m5(machine_config &config); + void pal(machine_config &config); + void ntsc(machine_config &config); + + void init_pal(); + void init_ntsc(); + + DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback); + +protected: + required_device m_maincpu; + required_device m_ctc; + //I've changed following devices to optional since we have to remove them in BRNO mod (I don't know better solution) + optional_device m_fd5cpu; + optional_device m_ppi; + optional_device m_fdc; + optional_device m_floppy0; + required_device m_cassette; + optional_device m_cart1; + optional_device m_cart2; + required_device m_centronics; + required_device m_ram; + required_ioport m_reset; + optional_ioport m_DIPS; + m5_cart_slot_device *m_cart_ram, *m_cart; + DECLARE_READ8_MEMBER( sts_r ); DECLARE_WRITE8_MEMBER( com_w ); + + virtual void machine_start() override; + virtual void machine_reset() override; +private: DECLARE_READ8_MEMBER( ppi_pa_r ); DECLARE_WRITE8_MEMBER( ppi_pa_w ); DECLARE_WRITE8_MEMBER( ppi_pb_w ); @@ -70,41 +100,16 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - void init_pal(); - void init_ntsc(); - DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback); - // memory DECLARE_READ8_MEMBER( mem64KBI_r ); DECLARE_WRITE8_MEMBER( mem64KBI_w ); DECLARE_WRITE8_MEMBER( mem64KBF_w ); DECLARE_WRITE8_MEMBER( mem64KRX_w ); - void m5(machine_config &config); - void pal(machine_config &config); - void ntsc(machine_config &config); void fd5_io(address_map &map); void fd5_mem(address_map &map); void m5_io(address_map &map); void m5_mem(address_map &map); -protected: - virtual void machine_start() override; - virtual void machine_reset() override; - - required_device m_maincpu; - required_device m_ctc; - //I've changed following devices to optional since we have to remove them in BRNO mod (I don't know better solution) - optional_device m_fd5cpu; - optional_device m_ppi; - optional_device m_fdc; - optional_device m_floppy0; - required_device m_cassette; - optional_device m_cart1; - optional_device m_cart2; - required_device m_centronics; - required_device m_ram; - required_ioport m_reset; - optional_ioport m_DIPS; // video state // const TMS9928a_interface *m_vdp_intf; @@ -114,7 +119,6 @@ protected: uint8_t m_ram_mode; uint8_t m_ram_type; memory_region *m_cart_rom; - m5_cart_slot_device *m_cart_ram, *m_cart; // floppy state for fd5 uint8_t m_fd5_data; @@ -136,31 +140,34 @@ public: //, m_ramdisk(*this, RAMDISK) { } - DECLARE_READ8_MEMBER( mmu_r ); - DECLARE_WRITE8_MEMBER( mmu_w ); - DECLARE_READ8_MEMBER( ramsel_r ); - DECLARE_WRITE8_MEMBER(ramsel_w ); - DECLARE_READ8_MEMBER( romsel_r ); - DECLARE_WRITE8_MEMBER(romsel_w ); + void brno(machine_config &config); - DECLARE_READ8_MEMBER( fd_r ); - DECLARE_WRITE8_MEMBER( fd_w ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); + void init_brno(); +private: + DECLARE_READ8_MEMBER(mmu_r); + DECLARE_WRITE8_MEMBER(mmu_w); + DECLARE_READ8_MEMBER(ramsel_r); + DECLARE_WRITE8_MEMBER(ramsel_w); + DECLARE_READ8_MEMBER(romsel_r); + DECLARE_WRITE8_MEMBER(romsel_w); -// DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w ); -// DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w ); -// DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback); + DECLARE_READ8_MEMBER(fd_r); + DECLARE_WRITE8_MEMBER(fd_w); + DECLARE_FLOPPY_FORMATS(floppy_formats); - //required_device m_ramdisk; - void init_brno(); - DECLARE_SNAPSHOT_LOAD_MEMBER( brno ); -// DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart); -void brno(machine_config &config); -void brno_io(address_map &map); -void m5_mem_brno(address_map &map); -protected: + // DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w ); + // DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w ); + // DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback); + + //required_device m_ramdisk; + DECLARE_SNAPSHOT_LOAD_MEMBER(brno); + // DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart); + + void brno_io(address_map &map); + void m5_mem_brno(address_map &map); + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/m52.h b/src/mame/includes/m52.h index 06e72b40890..fb899754a37 100644 --- a/src/mame/includes/m52.h +++ b/src/mame/includes/m52.h @@ -17,6 +17,10 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void m52(machine_config &config); + void alpha1v(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -50,8 +54,6 @@ public: required_device m_gfxdecode; required_device m_screen; required_device m_palette; - void m52(machine_config &config); - void alpha1v(machine_config &config); void alpha1v_map(address_map &map); void main_map(address_map &map); void main_portmap(address_map &map); diff --git a/src/mame/includes/m57.h b/src/mame/includes/m57.h index d3b2cbede42..bdb6ae4e60b 100644 --- a/src/mame/includes/m57.h +++ b/src/mame/includes/m57.h @@ -15,6 +15,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void m57(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_scrollram; @@ -34,6 +37,5 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void m57(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h index de4570c96ed..8946bf85491 100644 --- a/src/mame/includes/m58.h +++ b/src/mame/includes/m58.h @@ -26,6 +26,9 @@ public: m_score_panel_disabled(*this, "score_disable") { } + void yard(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; @@ -57,6 +60,5 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); void draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void yard(machine_config &config); void yard_map(address_map &map); }; diff --git a/src/mame/includes/m62.h b/src/mame/includes/m62.h index 17599e8d79c..3039730e3e6 100644 --- a/src/mame/includes/m62.h +++ b/src/mame/includes/m62.h @@ -27,6 +27,28 @@ public: m_audio(*this, "irem_audio") { } + void ldrun2(machine_config &config); + void lotlot(machine_config &config); + void ldrun3(machine_config &config); + void battroad(machine_config &config); + void horizon(machine_config &config); + void ldrun4(machine_config &config); + void spelunk2(machine_config &config); + void youjyudn(machine_config &config); + void kungfum(machine_config &config); + void spelunkr(machine_config &config); + void ldrun(machine_config &config); + void kidniki(machine_config &config); + + void init_youjyudn(); + void init_spelunkr(); + void init_ldrun2(); + void init_ldrun4(); + void init_spelunk2(); + void init_kidniki(); + void init_battroad(); + +private: /* memory pointers */ required_shared_ptr m_spriteram; @@ -76,13 +98,6 @@ public: DECLARE_WRITE8_MEMBER(spelunkr_palbank_w); DECLARE_WRITE8_MEMBER(spelunk2_gfxport_w); DECLARE_WRITE8_MEMBER(horizon_scrollram_w); - void init_youjyudn(); - void init_spelunkr(); - void init_ldrun2(); - void init_ldrun4(); - void init_spelunk2(); - void init_kidniki(); - void init_battroad(); TILE_GET_INFO_MEMBER(get_kungfum_bg_tile_info); TILE_GET_INFO_MEMBER(get_ldrun_bg_tile_info); TILE_GET_INFO_MEMBER(get_ldrun2_bg_tile_info); @@ -143,18 +158,7 @@ public: required_device m_spr_palette; required_device m_chr_palette; required_device m_audio; - void ldrun2(machine_config &config); - void lotlot(machine_config &config); - void ldrun3(machine_config &config); - void battroad(machine_config &config); - void horizon(machine_config &config); - void ldrun4(machine_config &config); - void spelunk2(machine_config &config); - void youjyudn(machine_config &config); - void kungfum(machine_config &config); - void spelunkr(machine_config &config); - void ldrun(machine_config &config); - void kidniki(machine_config &config); + void battroad_io_map(address_map &map); void battroad_map(address_map &map); void horizon_map(address_map &map); diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h index 75033248fe6..5dbc3e2c1a4 100644 --- a/src/mame/includes/m72.h +++ b/src/mame/includes/m72.h @@ -54,6 +54,34 @@ public: m_m82_tmcontrol(0) { } + void m72_base(machine_config &config); + void m72_audio_chips(machine_config &config); + void m72_xmultipl(machine_config &config); + void m72_dbreed(machine_config &config); + void cosmccop(machine_config &config); + void poundfor(machine_config &config); + void m72(machine_config &config); + void m81_hharry(machine_config &config); + void m81_xmultipl(machine_config &config); + void kengo(machine_config &config); + void m81_dbreed(machine_config &config); + void m72_8751(machine_config &config); + void hharryu(machine_config &config); + void rtype2(machine_config &config); + void m82(machine_config &config); + void rtype(machine_config &config); + + void init_dkgenm72(); + void init_bchopper(); + void init_gallop(); + void init_m72_8751(); + void init_dbreedm72(); + void init_airduelm72(); + void init_nspirit(); + void init_loht(); + void init_imgfight(); + +private: required_device m_maincpu; required_device m_soundcpu; optional_device m_mcu; @@ -168,15 +196,6 @@ public: DECLARE_VIDEO_START(poundfor); DECLARE_MACHINE_START(kengo); DECLARE_MACHINE_RESET(kengo); - void init_dkgenm72(); - void init_bchopper(); - void init_gallop(); - void init_m72_8751(); - void init_dbreedm72(); - void init_airduelm72(); - void init_nspirit(); - void init_loht(); - void init_imgfight(); INTERRUPT_GEN_MEMBER(mcu_int); INTERRUPT_GEN_MEMBER(fake_nmi); @@ -197,22 +216,7 @@ public: void majtitle_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void copy_le(uint16_t *dest, const uint8_t *src, uint8_t bytes); void install_protection_handler(const uint8_t *code,const uint8_t *crc); - void m72_base(machine_config &config); - void m72_audio_chips(machine_config &config); - void m72_xmultipl(machine_config &config); - void m72_dbreed(machine_config &config); - void cosmccop(machine_config &config); - void poundfor(machine_config &config); - void m72(machine_config &config); - void m81_hharry(machine_config &config); - void m81_xmultipl(machine_config &config); - void kengo(machine_config &config); - void m81_dbreed(machine_config &config); - void m72_8751(machine_config &config); - void hharryu(machine_config &config); - void rtype2(machine_config &config); - void m82(machine_config &config); - void rtype(machine_config &config); + void dbreed_map(address_map &map); void dbreedm72_map(address_map &map); void hharry_map(address_map &map); diff --git a/src/mame/includes/m79amb.h b/src/mame/includes/m79amb.h index 1c715d37361..fa97f4352f0 100644 --- a/src/mame/includes/m79amb.h +++ b/src/mame/includes/m79amb.h @@ -23,6 +23,7 @@ public: void init_m79amb(); +private: DECLARE_WRITE8_MEMBER(ramtek_videoram_w); DECLARE_READ8_MEMBER(gray5bit_controller0_r); DECLARE_READ8_MEMBER(gray5bit_controller1_r); @@ -32,7 +33,6 @@ public: INTERRUPT_GEN_MEMBER(m79amb_interrupt); -protected: void machine_start() override; uint32_t screen_update_ramtek(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/m90.h b/src/mame/includes/m90.h index 32ef1569cea..f71a5c18c1a 100644 --- a/src/mame/includes/m90.h +++ b/src/mame/includes/m90.h @@ -19,6 +19,21 @@ public: , m_palette(*this, "palette") { } + void m90(machine_config &config); + void bbmanw(machine_config &config); + void hasamu(machine_config &config); + void bombrman(machine_config &config); + void riskchal(machine_config &config); + void bomblord(machine_config &config); + void bbmanwj(machine_config &config); + void dynablsb(machine_config &config); + void matchit2(machine_config &config); + void quizf1(machine_config &config); + + void init_bomblord(); + void init_quizf1(); + +private: required_shared_ptr m_video_control_data; required_shared_ptr m_video_data; optional_shared_ptr m_spriteram; @@ -36,8 +51,6 @@ public: DECLARE_WRITE16_MEMBER(coincounter_w); DECLARE_WRITE16_MEMBER(quizf1_bankswitch_w); DECLARE_WRITE16_MEMBER(m90_video_w); - void init_bomblord(); - void init_quizf1(); DECLARE_WRITE16_MEMBER(bootleg_video_w); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_start() override; @@ -55,16 +68,6 @@ public: void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); void bomblord_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); void dynablsb_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); - void m90(machine_config &config); - void bbmanw(machine_config &config); - void hasamu(machine_config &config); - void bombrman(machine_config &config); - void riskchal(machine_config &config); - void bomblord(machine_config &config); - void bbmanwj(machine_config &config); - void dynablsb(machine_config &config); - void matchit2(machine_config &config); - void quizf1(machine_config &config); void bomblord_main_cpu_map(address_map &map); void dynablsb_main_cpu_io_map(address_map &map); void dynablsb_main_cpu_map(address_map &map); diff --git a/src/mame/includes/m92.h b/src/mame/includes/m92.h index f0c07ca5b7a..4af8cb47be4 100644 --- a/src/mame/includes/m92.h +++ b/src/mame/includes/m92.h @@ -44,6 +44,30 @@ public: m_eeprom(*this, "eeprom", 16), m_mainbank(*this, "mainbank") { } + void m92(machine_config &config); + void m92_banked(machine_config &config); + void inthunt(machine_config &config); + void lethalth(machine_config &config); + void ppan(machine_config &config); + void hook(machine_config &config); + void psoldier(machine_config &config); + void rtypeleo(machine_config &config); + void gunforc2(machine_config &config); + void nbbatman2bl(machine_config &config); + void bmaster(machine_config &config); + void nbbatman(machine_config &config); + void uccops(machine_config &config); + void dsoccr94j(machine_config &config); + void gunforce(machine_config &config); + void majtitl2(machine_config &config); + void majtitl2a(machine_config &config); + void mysticri(machine_config &config); + + void init_bank(); + + DECLARE_CUSTOM_INPUT_MEMBER(m92_sprite_busy_r); + +private: required_device m_spriteram; required_shared_ptr m_vram_data; required_shared_ptr m_spritecontrol; @@ -80,9 +104,7 @@ public: DECLARE_WRITE16_MEMBER(vram_w); template DECLARE_WRITE16_MEMBER(pf_control_w); DECLARE_WRITE16_MEMBER(master_control_w); - DECLARE_CUSTOM_INPUT_MEMBER(m92_sprite_busy_r); DECLARE_WRITE16_MEMBER(oki_bank_w); - void init_bank(); TILE_GET_INFO_MEMBER(get_pf_tile_info); DECLARE_MACHINE_RESET(m92); DECLARE_VIDEO_START(m92); @@ -95,24 +117,6 @@ public: void m92_update_scroll_positions(); void m92_draw_tiles(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); - void m92(machine_config &config); - void m92_banked(machine_config &config); - void inthunt(machine_config &config); - void lethalth(machine_config &config); - void ppan(machine_config &config); - void hook(machine_config &config); - void psoldier(machine_config &config); - void rtypeleo(machine_config &config); - void gunforc2(machine_config &config); - void nbbatman2bl(machine_config &config); - void bmaster(machine_config &config); - void nbbatman(machine_config &config); - void uccops(machine_config &config); - void dsoccr94j(machine_config &config); - void gunforce(machine_config &config); - void majtitl2(machine_config &config); - void majtitl2a(machine_config &config); - void mysticri(machine_config &config); void lethalth_map(address_map &map); void m92_map(address_map &map); void m92_banked_map(address_map &map); @@ -122,6 +126,6 @@ public: void majtitl2_map(address_map &map); void ppan_portmap(address_map &map); void sound_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h index 57524a6ddb2..8b995e0d0eb 100644 --- a/src/mame/includes/mac.h +++ b/src/mame/includes/mac.h @@ -96,44 +96,64 @@ public: { } - required_device m_maincpu; - required_device m_via1; - optional_device m_via2; - optional_device m_asc; - optional_device m_awacs; - optional_device m_egret; - optional_device m_cuda; - required_device m_ram; - optional_device m_539x_1; - optional_device m_539x_2; - optional_device m_ncr5380; - optional_device m_mackbd; - optional_device m_rtc; - - required_ioport m_mouse0, m_mouse1, m_mouse2; - optional_ioport_array<7> m_keys; - optional_ioport m_montype; - - virtual void machine_start() override; - virtual void machine_reset() override; - - /* for Egret and CUDA streaming MCU commands, command types */ - enum mac_streaming_t - { - MCU_STREAMING_NONE = 0, - MCU_STREAMING_PRAMRD, - MCU_STREAMING_PRAMWR, - MCU_STREAMING_WRAMRD, - MCU_STREAMING_WRAMWR - }; + void mac512ke(machine_config &config); + void macplus(machine_config &config); + void maclc(machine_config &config); + void macpb170(machine_config &config); + void macclasc(machine_config &config); + void maciisi(machine_config &config); + void maclc2(machine_config &config); + void macse(machine_config &config); + void maclc3(machine_config &config); + void macpd210(machine_config &config); + void maciici(machine_config &config); + void macprtb(machine_config &config); + void maciix(machine_config &config); + void maclc520(machine_config &config); + void pwrmac(machine_config &config); + void maciivx(machine_config &config); + void maccclas(machine_config &config); + void maciivi(machine_config &config); + void macpb160(machine_config &config); + void maciicx(machine_config &config); + void macqd700(machine_config &config); + void macse30(machine_config &config); + void macpb180(machine_config &config); + void macpb145(machine_config &config); + void macpb180c(machine_config &config); + void maciifx(machine_config &config); + void macpb140(machine_config &config); + void macclas2(machine_config &config); + void macii(machine_config &config); + void maciihmu(machine_config &config); - enum - { - RBV_TYPE_RBV = 0, - RBV_TYPE_V8, - RBV_TYPE_SONORA, - RBV_TYPE_DAFB - }; + void init_maclc2(); + void init_maciifdhd(); + void init_macse30(); + void init_macprtb(); + void init_maciivx(); + void init_macpd210(); + void init_macii(); + void init_macclassic(); + void init_macquadra700(); + void init_macclassic2(); + void init_maciifx(); + void init_maclc(); + void init_macpb160(); + void init_macse(); + void init_macpb140(); + void init_macpm6100(); + void init_maclc520(); + void init_maciici(); + void init_maciix(); + void init_maclrcclassic(); + void init_maciisi(); + void init_maciicx(); + void init_maclc3(); + void init_maclc3plus(); + void init_macpm7100(); + void init_macpm8100(); + void init_macpb100(); /* tells which model is being emulated (set by macxxx_init) */ enum model_t @@ -208,9 +228,50 @@ public: }; model_t m_model; + int m_drive_select; + +private: + required_device m_maincpu; + required_device m_via1; + optional_device m_via2; + optional_device m_asc; + optional_device m_awacs; + optional_device m_egret; + optional_device m_cuda; + required_device m_ram; + optional_device m_539x_1; + optional_device m_539x_2; + optional_device m_ncr5380; + optional_device m_mackbd; + optional_device m_rtc; + + required_ioport m_mouse0, m_mouse1, m_mouse2; + optional_ioport_array<7> m_keys; + optional_ioport m_montype; + + virtual void machine_start() override; + virtual void machine_reset() override; + + /* for Egret and CUDA streaming MCU commands, command types */ + enum mac_streaming_t + { + MCU_STREAMING_NONE = 0, + MCU_STREAMING_PRAMRD, + MCU_STREAMING_PRAMWR, + MCU_STREAMING_WRAMRD, + MCU_STREAMING_WRAMWR + }; + + enum + { + RBV_TYPE_RBV = 0, + RBV_TYPE_V8, + RBV_TYPE_SONORA, + RBV_TYPE_DAFB + }; + uint32_t m_overlay; - int m_drive_select; int m_scsiirq_enable; uint32_t m_via2_vbl; @@ -391,36 +452,7 @@ public: DECLARE_WRITE_LINE_MEMBER(mac_scsi_irq); DECLARE_WRITE_LINE_MEMBER(mac_asc_irq); - void mac512ke(machine_config &config); - void macplus(machine_config &config); - void maclc(machine_config &config); - void macpb170(machine_config &config); - void macclasc(machine_config &config); - void maciisi(machine_config &config); - void maclc2(machine_config &config); - void macse(machine_config &config); - void maclc3(machine_config &config); - void macpd210(machine_config &config); - void maciici(machine_config &config); - void macprtb(machine_config &config); - void maciix(machine_config &config); - void maclc520(machine_config &config); - void pwrmac(machine_config &config); - void maciivx(machine_config &config); - void maccclas(machine_config &config); - void maciivi(machine_config &config); - void macpb160(machine_config &config); - void maciicx(machine_config &config); - void macqd700(machine_config &config); - void macse30(machine_config &config); - void macpb180(machine_config &config); - void macpb145(machine_config &config); - void macpb180c(machine_config &config); - void maciifx(machine_config &config); - void macpb140(machine_config &config); - void macclas2(machine_config &config); - void macii(machine_config &config); - void maciihmu(machine_config &config); + void mac512ke_map(address_map &map); void macii_map(address_map &map); void maciici_map(address_map &map); @@ -437,7 +469,7 @@ public: void macse_map(address_map &map); void pwrmac_map(address_map &map); void quadra700_map(address_map &map); -private: + int has_adb(); void adb_reset(); void adb_vblank(); @@ -474,36 +506,9 @@ private: optional_device m_palette; optional_device m_dac; -public: emu_timer *m_scanline_timer; emu_timer *m_adb_timer; - void init_maclc2(); - void init_maciifdhd(); - void init_macse30(); - void init_macprtb(); - void init_maciivx(); - void init_macpd210(); - void init_macii(); - void init_macclassic(); - void init_macquadra700(); - void init_macclassic2(); - void init_maciifx(); - void init_maclc(); - void init_macpb160(); - void init_macse(); - void init_macpb140(); - void init_macpm6100(); - void init_maclc520(); - void init_maciici(); - void init_maciix(); - void init_maclrcclassic(); - void init_maciisi(); - void init_maciicx(); - void init_maclc3(); - void init_maclc3plus(); - void init_macpm7100(); - void init_macpm8100(); - void init_macpb100(); + DECLARE_VIDEO_START(mac); DECLARE_PALETTE_INIT(mac); DECLARE_VIDEO_START(macprtb); diff --git a/src/mame/includes/macpci.h b/src/mame/includes/macpci.h index ac04cedf994..c213b795f97 100644 --- a/src/mame/includes/macpci.h +++ b/src/mame/includes/macpci.h @@ -41,6 +41,9 @@ public: m_539x_2(*this, MAC_539X_2_TAG) { } + void pippin(machine_config &config); + +private: required_device m_maincpu; required_device m_via1; optional_device m_awacs; @@ -139,16 +142,13 @@ public: DECLARE_READ64_MEMBER ( unk2_r ); void init_pippin(); - void pippin(machine_config &config); void pippin_mem(address_map &map); -private: // wait states for accessing the VIA int m_via_cycles; // hack uint16_t m_unk1_test; -public: emu_timer *m_scanline_timer; uint32_t screen_update_pippin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(mac_6015_tick); diff --git a/src/mame/includes/macrossp.h b/src/mame/includes/macrossp.h index a425784f55f..6b57a7a6703 100644 --- a/src/mame/includes/macrossp.h +++ b/src/mame/includes/macrossp.h @@ -43,6 +43,13 @@ public: { } + void quizmoon(machine_config &config); + void macrossp(machine_config &config); + + void init_quizmoon(); + void init_macrossp(); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_scra_videoram; @@ -88,8 +95,6 @@ public: DECLARE_WRITE32_MEMBER(macrossp_scrb_videoram_w); DECLARE_WRITE32_MEMBER(macrossp_scrc_videoram_w); DECLARE_WRITE32_MEMBER(macrossp_text_videoram_w); - void init_quizmoon(); - void init_macrossp(); TILE_GET_INFO_MEMBER(get_macrossp_scra_tile_info); TILE_GET_INFO_MEMBER(get_macrossp_scrb_tile_info); TILE_GET_INFO_MEMBER(get_macrossp_scrc_tile_info); @@ -102,8 +107,6 @@ public: void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer, int linem, int pri); DECLARE_WRITE_LINE_MEMBER(irqhandler); - void quizmoon(machine_config &config); - void macrossp(machine_config &config); void macrossp_map(address_map &map); void macrossp_sound_map(address_map &map); }; diff --git a/src/mame/includes/madalien.h b/src/mame/includes/madalien.h index 06886fc3ce8..99c9cc5f10d 100644 --- a/src/mame/includes/madalien.h +++ b/src/mame/includes/madalien.h @@ -41,6 +41,12 @@ public: m_soundlatch(*this, "soundlatch"), m_soundlatch2(*this, "soundlatch2") { } + void madalien(machine_config &config); + void madalien_video(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_shared_ptr m_videoram; required_shared_ptr m_charram; required_shared_ptr m_video_control; @@ -61,7 +67,6 @@ public: DECLARE_WRITE8_MEMBER(madalien_output_w); DECLARE_WRITE8_MEMBER(madalien_videoram_w); DECLARE_WRITE8_MEMBER(madalien_charram_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_WRITE8_MEMBER(madalien_portA_w); DECLARE_WRITE8_MEMBER(madalien_portB_w); TILEMAP_MAPPER_MEMBER(scan_mode0); @@ -86,8 +91,6 @@ public: required_device m_palette; required_device m_soundlatch; required_device m_soundlatch2; - void madalien(machine_config &config); - void madalien_video(machine_config &config); void audio_map(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 80ec2fbe175..e8e7b9994e4 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -27,6 +27,10 @@ public: , m_leds(*this, "led%u", 0U) { } + void devstors(machine_config &config); + void mainevt(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(dv_nmienable_w); DECLARE_WRITE8_MEMBER(mainevt_bankswitch_w); DECLARE_WRITE8_MEMBER(mainevt_coin_w); @@ -49,14 +53,11 @@ public: K052109_CB_MEMBER(dv_tile_callback); K051960_CB_MEMBER(mainevt_sprite_callback); K051960_CB_MEMBER(dv_sprite_callback); - void devstors(machine_config &config); - void mainevt(machine_config &config); void devstors_map(address_map &map); void devstors_sound_map(address_map &map); void mainevt_map(address_map &map); void mainevt_sound_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/mainsnk.h b/src/mame/includes/mainsnk.h index da61d515ebf..8f9ca97a1f1 100644 --- a/src/mame/includes/mainsnk.h +++ b/src/mame/includes/mainsnk.h @@ -18,6 +18,9 @@ public: m_spriteram(*this, "spriteram"), m_fgram(*this, "fgram") { } + void mainsnk(machine_config &config); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -47,7 +50,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int scrollx, int scrolly ); - void mainsnk(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); void sound_portmap(address_map &map); diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h index c3dae01d800..5d76d87adcf 100644 --- a/src/mame/includes/mappy.h +++ b/src/mame/includes/mappy.h @@ -30,6 +30,21 @@ public: m_leds(*this, "led%u", 0U) { } + void mappy_common(machine_config &config); + void mappy(machine_config &config); + void phozon(machine_config &config); + void motos(machine_config &config); + void grobda(machine_config &config); + void digdug2(machine_config &config); + void pacnpal(machine_config &config); + void superpac_common(machine_config &config); + void superpac(machine_config &config); + void todruaga(machine_config &config); + + void init_grobda(); + void init_digdug2(); + +private: required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -79,21 +94,9 @@ public: uint32_t screen_update_phozon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_mappy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void init_grobda(); - void init_digdug2(); void mappy_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *spriteram_base); void phozon_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *spriteram_base); - void mappy_common(machine_config &config); - void mappy(machine_config &config); - void phozon(machine_config &config); - void motos(machine_config &config); - void grobda(machine_config &config); - void digdug2(machine_config &config); - void pacnpal(machine_config &config); - void superpac_common(machine_config &config); - void superpac(machine_config &config); - void todruaga(machine_config &config); void mappy_cpu1_map(address_map &map); void mappy_cpu2_map(address_map &map); void phozon_cpu1_map(address_map &map); diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 6d9b37df27a..766be41d8de 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -16,6 +16,15 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void springer(machine_config &config); + void wanted(machine_config &config); + void hopprobo(machine_config &config); + void marineb(machine_config &config); + void bcruzm12(machine_config &config); + void hoccer(machine_config &config); + void changes(machine_config &config); + +private: required_shared_ptr m_videoram; required_shared_ptr m_spriteram; required_shared_ptr m_colorram; @@ -57,13 +66,6 @@ public: DECLARE_WRITE_LINE_MEMBER(marineb_vblank_irq); DECLARE_WRITE_LINE_MEMBER(wanted_vblank_irq); void set_tilemap_scrolly( int cols ); - void springer(machine_config &config); - void wanted(machine_config &config); - void hopprobo(machine_config &config); - void marineb(machine_config &config); - void bcruzm12(machine_config &config); - void hoccer(machine_config &config); - void changes(machine_config &config); void marineb_io_map(address_map &map); void marineb_map(address_map &map); void wanted_io_map(address_map &map); diff --git a/src/mame/includes/mario.h b/src/mame/includes/mario.h index 45a629be9ab..e5839bbc42a 100644 --- a/src/mame/includes/mario.h +++ b/src/mame/includes/mario.h @@ -71,6 +71,13 @@ public: m_videoram(*this, "videoram"), m_monitor(0) { } + void mario_base(machine_config &config); + void masao(machine_config &config); + void masao_audio(machine_config &config); + void mario(machine_config &config); + void mario_audio(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_audiocpu; @@ -140,11 +147,6 @@ public: DECLARE_WRITE8_MEMBER(memory_write_byte); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void set_ea(int ea); - void mario_base(machine_config &config); - void masao(machine_config &config); - void masao_audio(machine_config &config); - void mario(machine_config &config); - void mario_audio(machine_config &config); void mario_io_map(address_map &map); void mario_map(address_map &map); void mario_sound_io_map(address_map &map); diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h index cee02ea05d1..6f64e752156 100644 --- a/src/mame/includes/markham.h +++ b/src/mame/includes/markham.h @@ -48,14 +48,15 @@ public: { } - void init_common(); - void init_banbam(); - void init_pettanp(); - void markham(machine_config &config); void strnskil(machine_config &config); void banbam(machine_config &config); + void init_common(); + void init_banbam(); + void init_pettanp(); + +private: void base_master_map(address_map &map); void markham_master_map(address_map &map); void strnskil_master_map(address_map &map); @@ -63,7 +64,6 @@ public: void markham_slave_map(address_map &map); void strnskil_slave_map(address_map &map); -protected: DECLARE_WRITE8_MEMBER(coin_output_w); template DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(videoram_w); @@ -95,7 +95,6 @@ protected: TIMER_DEVICE_CALLBACK_MEMBER(strnskil_scanline); -private: required_device m_maincpu; required_device m_subcpu; optional_device m_mcu; diff --git a/src/mame/includes/matmania.h b/src/mame/includes/matmania.h index 84dcb143c84..7bf512f9304 100644 --- a/src/mame/includes/matmania.h +++ b/src/mame/includes/matmania.h @@ -31,6 +31,10 @@ public: m_soundlatch(*this, "soundlatch") { } + void matmania(machine_config &config); + void maniach(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_videoram2; @@ -64,8 +68,6 @@ public: DECLARE_PALETTE_INIT(matmania); uint32_t screen_update_matmania(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_maniach(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void matmania(machine_config &config); - void maniach(machine_config &config); void maniach_map(address_map &map); void maniach_sound_map(address_map &map); void matmania_map(address_map &map); diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index 2afaa8adc4f..0704820ec9c 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -55,6 +55,16 @@ public: { } + void maygay_m1_no_oki(machine_config &config); + void maygay_m1(machine_config &config); + void maygay_m1_nec(machine_config &config); + void maygay_m1_empire(machine_config &config); + + void init_m1(); + void init_m1common(); + void init_m1nec(); + +private: required_device m_maincpu; required_device m_mcu; optional_device m_vfd; @@ -133,17 +143,10 @@ public: uint8_t m_main_to_mcu; - void init_m1(); - void init_m1common(); - void init_m1nec(); virtual void machine_start() override; virtual void machine_reset() override; void cpu0_firq(int data); void cpu0_nmi(); - void maygay_m1_no_oki(machine_config &config); - void maygay_m1(machine_config &config); - void maygay_m1_nec(machine_config &config); - void maygay_m1_empire(machine_config &config); void m1_memmap(address_map &map); void m1_nec_memmap(address_map &map); }; diff --git a/src/mame/includes/mbc55x.h b/src/mame/includes/mbc55x.h index ba57d9306a9..578228ed392 100644 --- a/src/mame/includes/mbc55x.h +++ b/src/mame/includes/mbc55x.h @@ -115,6 +115,14 @@ public: { } + void mbc55x(machine_config &config); + + void init_mbc55x(); + + required_device m_maincpu; + uint32_t m_debug_machine; + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); //DECLARE_READ8_MEMBER(pic8259_r); @@ -149,21 +157,15 @@ public: DECLARE_WRITE8_MEMBER(mbc55x_disk_w); DECLARE_READ8_MEMBER(mbc55x_kb_usart_r); DECLARE_WRITE8_MEMBER(mbc55x_kb_usart_w); - void init_mbc55x(); MC6845_UPDATE_ROW(crtc_update_row); DECLARE_PALETTE_INIT(mbc55x); DECLARE_WRITE_LINE_MEMBER(screen_vblank_mbc55x); TIMER_CALLBACK_MEMBER(keyscan_callback); - required_device m_maincpu; - - uint32_t m_debug_machine; - - void mbc55x(machine_config &config); void mbc55x_io(address_map &map); void mbc55x_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -193,7 +195,6 @@ protected: keyboard_t m_keyboard; -private: void debug_command(int ref, const std::vector ¶ms); void video_debug(int ref, const std::vector ¶ms); }; diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h index 1d1a8a51a00..88f2630a4f2 100644 --- a/src/mame/includes/mbee.h +++ b/src/mame/includes/mbee.h @@ -35,11 +35,6 @@ class mbee_state : public driver_device { public: - enum - { - TIMER_MBEE_NEWKB - }; - mbee_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_palette(*this, "palette") @@ -65,6 +60,32 @@ public: , m_screen(*this, "screen") { } + void mbee56(machine_config &config); + void mbeeppc(machine_config &config); + void mbee128(machine_config &config); + void mbee256(machine_config &config); + void mbee(machine_config &config); + void mbeett(machine_config &config); + void mbeeic(machine_config &config); + void mbeepc(machine_config &config); + void mbee128p(machine_config &config); + + void init_mbeepc85(); + void init_mbee256(); + void init_mbee56(); + void init_mbeett(); + void init_mbeeppc(); + void init_mbee(); + void init_mbeepc(); + void init_mbeeic(); + void init_mbee128(); + +private: + enum + { + TIMER_MBEE_NEWKB + }; + DECLARE_WRITE8_MEMBER(port04_w); DECLARE_WRITE8_MEMBER(port06_w); DECLARE_READ8_MEMBER(port07_r); @@ -93,15 +114,6 @@ public: DECLARE_WRITE_LINE_MEMBER(crtc_vs); DECLARE_READ8_MEMBER(fdc_status_r); DECLARE_WRITE8_MEMBER(fdc_motor_w); - void init_mbeepc85(); - void init_mbee256(); - void init_mbee56(); - void init_mbeett(); - void init_mbeeppc(); - void init_mbee(); - void init_mbeepc(); - void init_mbeeic(); - void init_mbee128(); DECLARE_MACHINE_RESET(mbee); DECLARE_VIDEO_START(mono); DECLARE_VIDEO_START(standard); @@ -123,15 +135,6 @@ public: MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr); required_device m_palette; - void mbee56(machine_config &config); - void mbeeppc(machine_config &config); - void mbee128(machine_config &config); - void mbee256(machine_config &config); - void mbee(machine_config &config); - void mbeett(machine_config &config); - void mbeeic(machine_config &config); - void mbeepc(machine_config &config); - void mbee128p(machine_config &config); void mbee128_io(address_map &map); void mbee256_io(address_map &map); void mbee256_mem(address_map &map); @@ -147,7 +150,7 @@ public: void mbeeppc_mem(address_map &map); void mbeett_io(address_map &map); void mbeett_mem(address_map &map); -private: + uint8_t *m_p_videoram; uint8_t *m_p_gfxram; uint8_t *m_p_colorram; diff --git a/src/mame/includes/mc1502.h b/src/mame/includes/mc1502.h index e9c89f66a23..25eda38b881 100644 --- a/src/mame/includes/mc1502.h +++ b/src/mame/includes/mc1502.h @@ -43,6 +43,11 @@ public: , m_kbdio(*this, "Y%u", 1) { } + void mc1502(machine_config &config); + + void init_mc1502(); + +private: required_device m_maincpu; required_device m_upd8251; required_device m_pic8259; @@ -56,7 +61,6 @@ public: required_device m_ram; required_ioport_array<12> m_kbdio; - void init_mc1502(); DECLARE_MACHINE_START(mc1502); DECLARE_MACHINE_RESET(mc1502); @@ -84,10 +88,9 @@ public: DECLARE_WRITE8_MEMBER(mc1502_kppi_portb_w); DECLARE_WRITE8_MEMBER(mc1502_kppi_portc_w); - void mc1502(machine_config &config); void mc1502_io(address_map &map); void mc1502_map(address_map &map); -private: + int m_pit_out2; }; diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h index 3d93ac640cd..8507b4f404f 100644 --- a/src/mame/includes/mcatadv.h +++ b/src/mame/includes/mcatadv.h @@ -22,6 +22,10 @@ public: , m_palette(*this, "palette") { } + void nost(machine_config &config); + void mcatadv(machine_config &config); + +private: /* memory pointers */ required_shared_ptr_array m_vram; required_shared_ptr_array m_scroll; @@ -54,8 +58,6 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank_mcatadv); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); void mcatadv_draw_tilemap_part( screen_device &screen, int layer, int i, bitmap_ind16 &bitmap, const rectangle &cliprect ); - void nost(machine_config &config); - void mcatadv(machine_config &config); void mcatadv_map(address_map &map); void mcatadv_sound_io_map(address_map &map); void mcatadv_sound_map(address_map &map); diff --git a/src/mame/includes/mcr68.h b/src/mame/includes/mcr68.h index 8fa90d260a9..8b2ad1cd1ee 100644 --- a/src/mame/includes/mcr68.h +++ b/src/mame/includes/mcr68.h @@ -31,6 +31,24 @@ public: m_ptm(*this, "ptm") { } + void mcr68(machine_config &config); + void intlaser(machine_config &config); + void xenophob(machine_config &config); + void spyhunt2(machine_config &config); + void trisport(machine_config &config); + void pigskin(machine_config &config); + void archrivl(machine_config &config); + + void init_intlaser(); + void init_pigskin(); + void init_blasted(); + void init_trisport(); + void init_xenophob(); + void init_archrivl(); + void init_spyhunt2(); + void init_archrivlb(); + +private: optional_device m_sounds_good; optional_device m_turbo_cheap_squeak; optional_device m_cvsd_sound; @@ -59,14 +77,7 @@ public: DECLARE_READ16_MEMBER(pigskin_port_2_r); DECLARE_READ16_MEMBER(trisport_port_1_r); DECLARE_WRITE16_MEMBER(mcr68_videoram_w); - void init_intlaser(); - void init_pigskin(); - void init_blasted(); - void init_trisport(); - void init_xenophob(); - void init_archrivl(); - void init_spyhunt2(); - void init_archrivlb(); + DECLARE_READ16_MEMBER(archrivlb_port_1_r); TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_MACHINE_START(mcr68); @@ -84,16 +95,9 @@ public: std::unique_ptr m_srcdata0; std::unique_ptr m_srcdata2; - void mcr68(machine_config &config); - void intlaser(machine_config &config); - void xenophob(machine_config &config); - void spyhunt2(machine_config &config); - void trisport(machine_config &config); - void pigskin(machine_config &config); - void archrivl(machine_config &config); void mcr68_map(address_map &map); void pigskin_map(address_map &map); void trisport_map(address_map &map); -private: + required_device m_ptm; }; diff --git a/src/mame/includes/meadows.h b/src/mame/includes/meadows.h index 91182ca81f9..77d9753888b 100644 --- a/src/mame/includes/meadows.h +++ b/src/mame/includes/meadows.h @@ -28,6 +28,16 @@ public: { } + void bowl3d(machine_config &config); + void meadows(machine_config &config); + void minferno(machine_config &config); + + void init_minferno(); + void init_gypsyjug(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device m_maincpu; optional_device m_audiocpu; optional_device m_dac; @@ -60,9 +70,6 @@ public: DECLARE_READ8_MEMBER(audio_hardware_r); DECLARE_WRITE8_MEMBER(meadows_videoram_w); DECLARE_WRITE8_MEMBER(meadows_spriteram_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - void init_minferno(); - void init_gypsyjug(); TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start() override; uint32_t screen_update_meadows(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -72,9 +79,6 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip); void meadows_sh_update(); SAMPLES_START_CB_MEMBER(meadows_sh_start); - void bowl3d(machine_config &config); - void meadows(machine_config &config); - void minferno(machine_config &config); void audio_map(address_map &map); void bowl3d_main_map(address_map &map); void meadows_main_map(address_map &map); diff --git a/src/mame/includes/megadriv_acbl.h b/src/mame/includes/megadriv_acbl.h index bf9d9fd440e..9fb3f1f55c9 100644 --- a/src/mame/includes/megadriv_acbl.h +++ b/src/mame/includes/megadriv_acbl.h @@ -10,6 +10,13 @@ public: md_boot_state(const machine_config &mconfig, device_type type, const char *tag) : md_base_state(mconfig, type, tag) { m_protcount = 0;} + void megadrvb(machine_config &config); + void megadrvb_6b(machine_config &config); + void md_bootleg(machine_config &config); + void puckpkmn(machine_config &config); + void jzth(machine_config &config); + void puckpkmna(machine_config &config); + void init_aladmdb(); void init_mk3mdb(); void init_ssf2mdb(); @@ -17,6 +24,8 @@ public: void init_topshoot(); void init_puckpkmn(); void init_hshavoc(); + +private: DECLARE_WRITE16_MEMBER(bl_710000_w); DECLARE_READ16_MEMBER(bl_710000_r); DECLARE_WRITE16_MEMBER(aladmdb_w); @@ -30,18 +39,12 @@ public: DECLARE_MACHINE_START(md_bootleg) { MACHINE_START_CALL_MEMBER(megadriv); m_vdp->stop_timers(); } DECLARE_MACHINE_START(md_6button); - void megadrvb(machine_config &config); - void megadrvb_6b(machine_config &config); - void md_bootleg(machine_config &config); - void puckpkmn(machine_config &config); - void jzth(machine_config &config); - void puckpkmna(machine_config &config); void jzth_map(address_map &map); void md_bootleg_map(address_map &map); void puckpkmn_map(address_map &map); void puckpkmna_map(address_map &map); -private: + // bootleg specific int m_aladmdb_mcu_port; diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index 3f6b3878830..1c095124e92 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -43,6 +43,46 @@ public: m_io_dsw2(*this, "DSW2") { } + void system_A_soldam(machine_config &config); + void system_B_monkelf(machine_config &config); + void system_A_iganinju(machine_config &config); + void system_A_hachoo(machine_config &config); + void kickoffb(machine_config &config); + void system_D(machine_config &config); + void system_C(machine_config &config); + void system_Bbl(machine_config &config); + void system_A(machine_config &config); + void system_B(machine_config &config); + void system_B_hayaosi1(machine_config &config); + void system_Z(machine_config &config); + + void init_64street(); + void init_chimerab(); + void init_peekaboo(); + void init_soldam(); + void init_astyanax(); + void init_stdragon(); + void init_hayaosi1(); + void init_soldamj(); + void init_phantasm(); + void init_jitsupro(); + void init_iganinju(); + void init_cybattlr(); + void init_rodlandj(); + void init_rittam(); + void init_rodlandjb(); + void init_avspirit(); + void init_monkelf(); + void init_edf(); + void init_edfp(); + void init_bigstrik(); + void init_rodland(); + void init_edfbl(); + void init_stdragona(); + void init_stdragonb(); + void init_systemz(); + +private: required_shared_ptr m_objectram; optional_device_array m_tmap; required_shared_ptr m_ram; @@ -128,31 +168,7 @@ public: DECLARE_WRITE16_MEMBER(okim6295_both_2_w); DECLARE_WRITE16_MEMBER(ram_w); - void init_64street(); - void init_chimerab(); - void init_peekaboo(); - void init_soldam(); - void init_astyanax(); - void init_stdragon(); - void init_hayaosi1(); - void init_soldamj(); - void init_phantasm(); - void init_jitsupro(); - void init_iganinju(); - void init_cybattlr(); - void init_rodlandj(); - void init_rittam(); - void init_rodlandjb(); - void init_avspirit(); - void init_monkelf(); - void init_edf(); - void init_edfp(); - void init_bigstrik(); - void init_rodland(); - void init_edfbl(); - void init_stdragona(); - void init_stdragonb(); - void init_systemz(); + DECLARE_MACHINE_RESET(megasys1); DECLARE_VIDEO_START(megasys1); DECLARE_PALETTE_INIT(megasys1); @@ -173,18 +189,6 @@ public: void rodland_gfx_unmangle(const char *region); void jitsupro_gfx_unmangle(const char *region); void stdragona_gfx_unmangle(const char *region); - void system_A_soldam(machine_config &config); - void system_B_monkelf(machine_config &config); - void system_A_iganinju(machine_config &config); - void system_A_hachoo(machine_config &config); - void kickoffb(machine_config &config); - void system_D(machine_config &config); - void system_C(machine_config &config); - void system_Bbl(machine_config &config); - void system_A(machine_config &config); - void system_B(machine_config &config); - void system_B_hayaosi1(machine_config &config); - void system_Z(machine_config &config); void kickoffb_sound_map(address_map &map); void megasys1A_map(address_map &map); void megasys1A_sound_map(address_map &map); diff --git a/src/mame/includes/megazone.h b/src/mame/includes/megazone.h index d66032dc471..423ee0cb3cb 100644 --- a/src/mame/includes/megazone.h +++ b/src/mame/includes/megazone.h @@ -26,6 +26,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void megazone(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_scrolly; required_shared_ptr m_scrollx; @@ -64,7 +67,6 @@ public: DECLARE_PALETTE_INIT(megazone); uint32_t screen_update_megazone(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void megazone(machine_config &config); void megazone_i8039_io_map(address_map &map); void megazone_i8039_map(address_map &map); void megazone_map(address_map &map); diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index 2b29e4c0a61..877959e0b00 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -33,6 +33,10 @@ public: { } + void rougien(machine_config &config); + void mermaid(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram2; required_shared_ptr m_videoram; @@ -103,7 +107,5 @@ public: uint8_t collision_check( rectangle& rect ); void collision_update(); DECLARE_WRITE_LINE_MEMBER(rougien_adpcm_int); - void rougien(machine_config &config); - void mermaid(machine_config &config); void mermaid_map(address_map &map); }; diff --git a/src/mame/includes/metalmx.h b/src/mame/includes/metalmx.h index 08fbc8cf4a2..09924d182d9 100644 --- a/src/mame/includes/metalmx.h +++ b/src/mame/includes/metalmx.h @@ -30,7 +30,7 @@ public: void init_metalmx(); void metalmx(machine_config &config); -protected: +private: DECLARE_READ32_MEMBER(unk_r); DECLARE_READ32_MEMBER(watchdog_r); DECLARE_WRITE32_MEMBER(shifter_w); @@ -58,7 +58,6 @@ protected: void gsp_map(address_map &map); void main_map(address_map &map); -private: required_device m_maincpu; required_device m_gsp; required_device m_adsp; diff --git a/src/mame/includes/metlclsh.h b/src/mame/includes/metlclsh.h index ab5c62da53b..7f0e22ef7bc 100644 --- a/src/mame/includes/metlclsh.h +++ b/src/mame/includes/metlclsh.h @@ -22,6 +22,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void metlclsh(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* memory pointers */ required_shared_ptr m_fgram; required_shared_ptr m_spriteram; @@ -51,7 +56,6 @@ public: DECLARE_WRITE8_MEMBER(metlclsh_gfxbank_w); DECLARE_WRITE8_MEMBER(metlclsh_bgram_w); DECLARE_WRITE8_MEMBER(metlclsh_fgram_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); TILEMAP_MAPPER_MEMBER(metlclsh_bgtilemap_scan); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -60,7 +64,6 @@ public: virtual void video_start() override; uint32_t screen_update_metlclsh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void metlclsh(machine_config &config); void metlclsh_master_map(address_map &map); void metlclsh_slave_map(address_map &map); }; diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index ff522ce937c..97ca656f6ef 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -19,12 +19,6 @@ class metro_state : public driver_device { public: - enum - { - TIMER_KARATOUR_IRQ, - TIMER_MOUJA_IRQ - }; - metro_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -49,6 +43,63 @@ public: , m_okibank(*this, "okibank") { } + void i4100_config(machine_config &config); + void i4100_config_360x224(machine_config &config); + void i4220_config(machine_config &config); + void i4220_config_320x240(machine_config &config); + void i4220_config_304x224(machine_config &config); + void i4300_config(machine_config &config); + void i4300_config_384x224(machine_config &config); + void i4300_config_320x240(machine_config &config); + void metro_upd7810_sound(machine_config &config); + void daitorid_upd7810_sound(machine_config &config); + void poitto(machine_config &config); + void blzntrnd(machine_config &config); + void sankokushi(machine_config &config); + void mouja(machine_config &config); + void toride2g(machine_config &config); + void karatour(machine_config &config); + void skyalert(machine_config &config); + void gakusai(machine_config &config); + void batlbubl(machine_config &config); + void pururun(machine_config &config); + void vmetal(machine_config &config); + void daitorid(machine_config &config); + void puzzli(machine_config &config); + void pangpoms(machine_config &config); + void dokyusp(machine_config &config); + void dokyusei(machine_config &config); + void daitoa(machine_config &config); + void lastfort(machine_config &config); + void puzzlet(machine_config &config); + void gakusai2(machine_config &config); + void balcube(machine_config &config); + void msgogo(machine_config &config); + void gstrik2(machine_config &config); + void lastforg(machine_config &config); + void bangball(machine_config &config); + void dharma(machine_config &config); + + void init_karatour(); + void init_blzntrnd(); + void init_vmetal(); + void init_mouja(); + void init_balcube(); + void init_gakusai(); + void init_dharmak(); + void init_puzzlet(); + void init_metro(); + void init_lastfortg(); + + DECLARE_CUSTOM_INPUT_MEMBER(custom_soundstatus_r); + +private: + enum + { + TIMER_KARATOUR_IRQ, + TIMER_MOUJA_IRQ + }; + DECLARE_READ16_MEMBER(metro_irq_cause_r); DECLARE_WRITE16_MEMBER(metro_irq_cause_w); DECLARE_WRITE16_MEMBER(mouja_irq_timer_ctrl_w); @@ -69,7 +120,6 @@ public: DECLARE_WRITE16_MEMBER(puzzlet_irq_enable_w); DECLARE_WRITE16_MEMBER(puzzlet_portb_w); DECLARE_WRITE16_MEMBER(metro_k053936_w); - DECLARE_CUSTOM_INPUT_MEMBER(custom_soundstatus_r); DECLARE_WRITE8_MEMBER(gakusai_oki_bank_hi_w); DECLARE_WRITE8_MEMBER(gakusai_oki_bank_lo_w); DECLARE_READ8_MEMBER(gakusai_eeprom_r); @@ -85,16 +135,6 @@ public: DECLARE_WRITE8_MEMBER(es8712_reset_w); DECLARE_WRITE_LINE_MEMBER(vmetal_es8712_irq); - void init_karatour(); - void init_blzntrnd(); - void init_vmetal(); - void init_mouja(); - void init_balcube(); - void init_gakusai(); - void init_dharmak(); - void init_puzzlet(); - void init_metro(); - void init_lastfortg(); TILE_GET_INFO_MEMBER(metro_k053936_get_tile_info); TILE_GET_INFO_MEMBER(metro_k053936_gstrik2_get_tile_info); TILEMAP_MAPPER_MEMBER(tilemap_scan_gstrik2); @@ -109,42 +149,6 @@ public: IRQ_CALLBACK_MEMBER(metro_irq_callback); DECLARE_READ_LINE_MEMBER(metro_rxd_r); - void i4100_config(machine_config &config); - void i4100_config_360x224(machine_config &config); - void i4220_config(machine_config &config); - void i4220_config_320x240(machine_config &config); - void i4220_config_304x224(machine_config &config); - void i4300_config(machine_config &config); - void i4300_config_384x224(machine_config &config); - void i4300_config_320x240(machine_config &config); - void metro_upd7810_sound(machine_config &config); - void daitorid_upd7810_sound(machine_config &config); - void poitto(machine_config &config); - void blzntrnd(machine_config &config); - void sankokushi(machine_config &config); - void mouja(machine_config &config); - void toride2g(machine_config &config); - void karatour(machine_config &config); - void skyalert(machine_config &config); - void gakusai(machine_config &config); - void batlbubl(machine_config &config); - void pururun(machine_config &config); - void vmetal(machine_config &config); - void daitorid(machine_config &config); - void puzzli(machine_config &config); - void pangpoms(machine_config &config); - void dokyusp(machine_config &config); - void dokyusei(machine_config &config); - void daitoa(machine_config &config); - void lastfort(machine_config &config); - void puzzlet(machine_config &config); - void gakusai2(machine_config &config); - void balcube(machine_config &config); - void msgogo(machine_config &config); - void gstrik2(machine_config &config); - void lastforg(machine_config &config); - void bangball(machine_config &config); - void dharma(machine_config &config); void balcube_map(address_map &map); void bangball_map(address_map &map); void batlbubl_map(address_map &map); @@ -175,11 +179,10 @@ public: void toride2g_map(address_map &map); void vmetal_map(address_map &map); void ymf278_map(address_map &map); -protected: + virtual void machine_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -private: /* devices */ required_device m_maincpu; optional_device m_audiocpu; diff --git a/src/mame/includes/mexico86.h b/src/mame/includes/mexico86.h index 394e3a351c6..94263c7bddb 100644 --- a/src/mame/includes/mexico86.h +++ b/src/mame/includes/mexico86.h @@ -24,6 +24,11 @@ public: { } + void knightb(machine_config &config); + void mexico86(machine_config &config); + void kikikai(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_protection_ram; required_shared_ptr m_mainram; @@ -70,9 +75,6 @@ public: INTERRUPT_GEN_MEMBER(mexico86_m68705_interrupt); void mcu_simulate( ); bool mcu_coin_counter_w(bool condition); - void knightb(machine_config &config); - void mexico86(machine_config &config); - void kikikai(machine_config &config); void mexico86_map(address_map &map); void mexico86_sound_map(address_map &map); void mexico86_sub_cpu_map(address_map &map); diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index db37c3a872b..d2653a0def9 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -35,6 +35,21 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void alphaone(machine_config &config); + void mhavoc(machine_config &config); + void mhavocrv(machine_config &config); + + void init_mhavocrv(); + + DECLARE_CUSTOM_INPUT_MEMBER(tms5220_r); + DECLARE_CUSTOM_INPUT_MEMBER(mhavoc_bit67_r); + DECLARE_CUSTOM_INPUT_MEMBER(gamma_rcvd_r); + DECLARE_CUSTOM_INPUT_MEMBER(gamma_xmtd_r); + DECLARE_CUSTOM_INPUT_MEMBER(alpha_rcvd_r); + DECLARE_CUSTOM_INPUT_MEMBER(alpha_xmtd_r); + DECLARE_CUSTOM_INPUT_MEMBER(clock_r); + +private: DECLARE_READ8_MEMBER(dual_pokey_r); DECLARE_WRITE8_MEMBER(dual_pokey_w); DECLARE_WRITE8_MEMBER(mhavoc_alpha_irq_ack_w); @@ -52,24 +67,13 @@ public: DECLARE_WRITE8_MEMBER(mhavocrv_speech_strobe_w); DECLARE_READ8_MEMBER(quad_pokeyn_r); DECLARE_WRITE8_MEMBER(quad_pokeyn_w); - DECLARE_CUSTOM_INPUT_MEMBER(tms5220_r); - DECLARE_CUSTOM_INPUT_MEMBER(mhavoc_bit67_r); - DECLARE_CUSTOM_INPUT_MEMBER(gamma_rcvd_r); - DECLARE_CUSTOM_INPUT_MEMBER(gamma_xmtd_r); - DECLARE_CUSTOM_INPUT_MEMBER(alpha_rcvd_r); - DECLARE_CUSTOM_INPUT_MEMBER(alpha_xmtd_r); - DECLARE_CUSTOM_INPUT_MEMBER(clock_r); - void init_mhavocrv(); + TIMER_CALLBACK_MEMBER(delayed_gamma_w); TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_cpu_irq_clock); - void alphaone(machine_config &config); - void mhavoc(machine_config &config); - void mhavocrv(machine_config &config); void alpha_map(address_map &map); void alphaone_map(address_map &map); void gamma_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h index 0dc26ee4d23..a91e8b70735 100644 --- a/src/mame/includes/micro3d.h +++ b/src/mame/includes/micro3d.h @@ -43,11 +43,6 @@ class micro3d_sound_device; class micro3d_state : public driver_device { public: - enum - { - TIMER_MAC_DONE - }; - micro3d_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -70,6 +65,20 @@ public: m_vgb_uart(*this, "uart") { } + void micro3d(machine_config &config); + void botss11(machine_config &config); + + void init_micro3d(); + void init_botss(); + + DECLARE_CUSTOM_INPUT_MEMBER(botss_hwchk_r); + +private: + enum + { + TIMER_MAC_DONE + }; + required_device m_maincpu; required_device m_audiocpu; required_device m_upd7759; @@ -152,15 +161,12 @@ public: DECLARE_WRITE32_MEMBER(micro3d_fifo_w); DECLARE_WRITE32_MEMBER(micro3d_alt_fifo_w); DECLARE_READ32_MEMBER(micro3d_pipe_r); - DECLARE_CUSTOM_INPUT_MEMBER(botss_hwchk_r); DECLARE_WRITE8_MEMBER(micro3d_snd_dac_a); DECLARE_WRITE8_MEMBER(micro3d_snd_dac_b); DECLARE_WRITE8_MEMBER(micro3d_sound_p1_w); DECLARE_WRITE8_MEMBER(micro3d_sound_p3_w); DECLARE_READ8_MEMBER(micro3d_sound_p1_r); DECLARE_READ8_MEMBER(micro3d_sound_p3_r); - void init_micro3d(); - void init_botss(); virtual void machine_reset() override; virtual void video_start() override; virtual void video_reset() override; @@ -185,19 +191,15 @@ public: int clip_triangle(micro3d_vtx *v, micro3d_vtx *vout, int num_vertices, enum planes plane); void draw_triangles(uint32_t attr); - - void micro3d(machine_config &config); - void botss11(machine_config &config); void drmath_data(address_map &map); void drmath_prg(address_map &map); void hostmem(address_map &map); void soundmem_io(address_map &map); void soundmem_prg(address_map &map); void vgbmem(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -private: required_device m_vgb_uart; }; diff --git a/src/mame/includes/micronic.h b/src/mame/includes/micronic.h index 8b1152f4c1c..7aa76860d77 100644 --- a/src/mame/includes/micronic.h +++ b/src/mame/includes/micronic.h @@ -49,6 +49,9 @@ public: m_cassette(*this, "cassette") { } + void micronic(machine_config &config); + +private: required_device m_maincpu; required_device m_lcdc; required_device m_beep; @@ -83,10 +86,9 @@ public: uint8_t m_status_flag; DECLARE_PALETTE_INIT(micronic); - void micronic(machine_config &config); void micronic_io(address_map &map); void micronic_mem(address_map &map); -protected: + required_memory_bank m_bank1; required_ioport m_bit0; required_ioport m_bit1; diff --git a/src/mame/includes/microtan.h b/src/mame/includes/microtan.h index 31ede86c416..802b255fb45 100644 --- a/src/mame/includes/microtan.h +++ b/src/mame/includes/microtan.h @@ -41,12 +41,16 @@ public: m_led(*this, "led1") { } + void microtan(machine_config &config); + + void init_microtan(); + +private: DECLARE_READ8_MEMBER(microtan_sound_r); DECLARE_WRITE8_MEMBER(microtan_sound_w); DECLARE_READ8_MEMBER(microtan_bffx_r); DECLARE_WRITE8_MEMBER(microtan_bffx_w); DECLARE_WRITE8_MEMBER(microtan_videoram_w); - void init_microtan(); TILE_GET_INFO_MEMBER(get_bg_tile_info); uint32_t screen_update_microtan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(microtan_interrupt); @@ -74,9 +78,8 @@ public: DECLARE_SNAPSHOT_LOAD_MEMBER( microtan ); DECLARE_QUICKLOAD_LOAD_MEMBER( microtan ); - void microtan(machine_config &config); void microtan_map(address_map &map); -protected: + virtual void machine_start() override { m_led.resolve(); } virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/midtunit.h b/src/mame/includes/midtunit.h index 7f02f21023b..35585213ae5 100644 --- a/src/mame/includes/midtunit.h +++ b/src/mame/includes/midtunit.h @@ -25,16 +25,57 @@ public: midtunit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_palette(*this, "palette"), m_dcs(*this, "dcs"), + m_palette(*this, "palette"), m_cvsd_sound(*this, "cvsd"), m_adpcm_sound(*this, "adpcm"), m_nvram(*this, "nvram"), m_gfxrom(*this, "gfxrom") { } + void tunit_core(machine_config &config); + void tunit_adpcm(machine_config &config); + void tunit_dcs(machine_config &config); + + void init_mktunit(); + void init_mkturbo(); + void init_nbajamte(); + void init_nbajam(); + void init_jdreddp(); + void init_mk2(); + + TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); + TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); + TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update); + +protected: required_device m_maincpu; - required_device m_palette; optional_device m_dcs; + required_device m_palette; + + DECLARE_READ16_MEMBER(midtunit_vram_r); + DECLARE_WRITE16_MEMBER(midtunit_vram_w); + DECLARE_READ16_MEMBER(midtunit_gfxrom_r); + DECLARE_WRITE16_MEMBER(midtunit_vram_data_w); + DECLARE_WRITE16_MEMBER(midtunit_vram_color_w); + DECLARE_READ16_MEMBER(midtunit_vram_data_r); + DECLARE_READ16_MEMBER(midtunit_vram_color_r); + + DECLARE_WRITE16_MEMBER(midxunit_paletteram_w); + DECLARE_READ16_MEMBER(midxunit_paletteram_r); + + DECLARE_READ16_MEMBER(midtunit_dma_r); + DECLARE_WRITE16_MEMBER(midtunit_dma_w); + + DECLARE_READ16_MEMBER(midwunit_gfxrom_r); + + DECLARE_WRITE16_MEMBER(midwunit_control_w); + DECLARE_READ16_MEMBER(midwunit_control_r); + + DECLARE_VIDEO_START(midtunit); + + uint8_t m_gfx_rom_large; + +private: optional_device m_cvsd_sound; optional_device m_adpcm_sound; @@ -59,35 +100,9 @@ public: DECLARE_WRITE16_MEMBER(nbajam_prot_w); DECLARE_WRITE16_MEMBER(jdredd_prot_w); DECLARE_READ16_MEMBER(jdredd_prot_r); - DECLARE_READ16_MEMBER(midtunit_gfxrom_r); - DECLARE_READ16_MEMBER(midwunit_gfxrom_r); - DECLARE_WRITE16_MEMBER(midtunit_vram_w); - DECLARE_WRITE16_MEMBER(midtunit_vram_data_w); - DECLARE_WRITE16_MEMBER(midtunit_vram_color_w); - DECLARE_READ16_MEMBER(midtunit_vram_r); - DECLARE_READ16_MEMBER(midtunit_vram_data_r); - DECLARE_READ16_MEMBER(midtunit_vram_color_r); DECLARE_WRITE16_MEMBER(midtunit_control_w); - DECLARE_WRITE16_MEMBER(midwunit_control_w); - DECLARE_READ16_MEMBER(midwunit_control_r); - DECLARE_WRITE16_MEMBER(midxunit_paletteram_w); - DECLARE_READ16_MEMBER(midxunit_paletteram_r); - DECLARE_READ16_MEMBER(midtunit_dma_r); - DECLARE_WRITE16_MEMBER(midtunit_dma_w); - - TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); - TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); - TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update); - - void init_mktunit(); - void init_mkturbo(); - void init_nbajamte(); - void init_nbajam(); - void init_jdreddp(); - void init_mk2(); DECLARE_MACHINE_RESET(midtunit); - DECLARE_VIDEO_START(midtunit); void register_state_saving(); void init_tunit_generic(int sound); @@ -114,12 +129,6 @@ public: uint8_t m_jdredd_prot_index; uint8_t m_jdredd_prot_max; - uint8_t m_gfx_rom_large; - - void tunit_core(machine_config &config); - void tunit_adpcm(machine_config &config); - void tunit_dcs(machine_config &config); void main_map(address_map &map); -protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index fb37d1de10a..90cfd4b55a4 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -47,23 +47,18 @@ private: class midvunit_state : public driver_device { public: - enum - { - TIMER_SCANLINE - }; - midvunit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_videoram(*this, "videoram", 32), + m_textureram(*this, "textureram"), + m_screen(*this, "screen"), m_nvram(*this, "nvram"), m_ram_base(*this, "ram_base"), m_fastram_base(*this, "fastram_base"), m_tms32031_control(*this, "32031_control"), m_midvplus_misc(*this, "midvplus_misc"), - m_videoram(*this, "videoram", 32), - m_textureram(*this, "textureram") , m_maincpu(*this, "maincpu"), m_watchdog(*this, "watchdog"), - m_screen(*this, "screen"), m_palette(*this, "palette"), m_adc(*this, "adc"), m_midway_serial_pic(*this, "serial_pic"), @@ -76,13 +71,40 @@ public: m_optional_drivers(*this, "lamp%u", 0U), m_motion(*this, "MOTION") { } + void midvcommon(machine_config &config); + void crusnwld(machine_config &config); + void midvplus(machine_config &config); + void offroadc(machine_config &config); + void midvunit(machine_config &config); + + void init_crusnu40(); + void init_crusnu21(); + void init_crusnwld(); + void init_wargods(); + void init_offroadc(); + void init_crusnusa(); + + uint16_t m_page_control; + uint16_t m_dma_data[16]; + uint8_t m_video_changed; + + required_shared_ptr m_videoram; + required_shared_ptr m_textureram; + required_device m_screen; + + DECLARE_CUSTOM_INPUT_MEMBER(motion_r); + +private: + enum + { + TIMER_SCANLINE + }; + optional_shared_ptr m_nvram; required_shared_ptr m_ram_base; optional_shared_ptr m_fastram_base; required_shared_ptr m_tms32031_control; optional_shared_ptr m_midvplus_misc; - required_shared_ptr m_videoram; - required_shared_ptr m_textureram; uint8_t m_cmos_protected; uint16_t m_control_data; @@ -94,10 +116,7 @@ public: int m_lastval; uint32_t *m_generic_speedup; uint16_t m_video_regs[16]; - uint16_t m_dma_data[16]; uint8_t m_dma_data_index; - uint16_t m_page_control; - uint8_t m_video_changed; emu_timer *m_scanline_timer; std::unique_ptr m_poly; uint8_t m_galil_input_index; @@ -145,13 +164,6 @@ public: DECLARE_READ32_MEMBER(generic_speedup_r); DECLARE_READ32_MEMBER(midvunit_wheel_board_r); DECLARE_WRITE32_MEMBER(midvunit_wheel_board_w); - DECLARE_CUSTOM_INPUT_MEMBER(motion_r); - void init_crusnu40(); - void init_crusnu21(); - void init_crusnwld(); - void init_wargods(); - void init_offroadc(); - void init_crusnusa(); void set_input(const char *s); void init_crusnwld_common(offs_t speedup); void init_crusnusa_common(offs_t speedup); @@ -163,7 +175,6 @@ public: TIMER_CALLBACK_MEMBER(scanline_timer_cb); required_device m_maincpu; required_device m_watchdog; - required_device m_screen; required_device m_palette; optional_device m_adc; optional_device m_midway_serial_pic; @@ -177,13 +188,8 @@ public: optional_ioport m_motion; void postload(); - void midvcommon(machine_config &config); - void crusnwld(machine_config &config); - void midvplus(machine_config &config); - void offroadc(machine_config &config); - void midvunit(machine_config &config); void midvplus_map(address_map &map); void midvunit_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; diff --git a/src/mame/includes/midwunit.h b/src/mame/includes/midwunit.h index 34736675581..ba88fd229e1 100644 --- a/src/mame/includes/midwunit.h +++ b/src/mame/includes/midwunit.h @@ -20,6 +20,21 @@ public: m_ports(*this, { { "IN0", "IN1", "DSW", "IN2" } }) { } + void wunit(machine_config &config); + void wunit_picemu(machine_config &config); + void wunit_picsim(machine_config &config); + + void init_mk3r10(); + void init_nbahangt(); + void init_wwfmania(); + void init_umk3(); + void init_mk3(); + void init_openice(); + void init_rmpgwt(); + void init_umk3r11(); + void init_mk3r20(); + +private: optional_device m_midway_serial_pic; optional_device m_midway_serial_pic_emu; required_shared_ptr m_nvram; @@ -46,24 +61,11 @@ public: DECLARE_WRITE16_MEMBER(umk3_palette_hack_w); DECLARE_WRITE16_MEMBER(wwfmania_io_0_w); - void init_mk3r10(); - void init_nbahangt(); - void init_wwfmania(); - void init_umk3(); - void init_mk3(); - void init_openice(); - void init_rmpgwt(); - void init_umk3r11(); - void init_mk3r20(); - DECLARE_MACHINE_RESET(midwunit); DECLARE_VIDEO_START(midwunit); void register_state_saving(); void init_wunit_generic(); void init_mk3_common(); - void wunit(machine_config &config); - void wunit_picemu(machine_config &config); - void wunit_picsim(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/midxunit.h b/src/mame/includes/midxunit.h index b1bafb5c0c3..1389d426bed 100644 --- a/src/mame/includes/midxunit.h +++ b/src/mame/includes/midxunit.h @@ -16,6 +16,11 @@ public: m_nvram(*this, "nvram"), m_midway_serial_pic(*this, "serial_pic") { } + void midxunit(machine_config &config); + + void init_revx(); + +private: DECLARE_READ16_MEMBER(midxunit_cmos_r); DECLARE_WRITE16_MEMBER(midxunit_cmos_w); DECLARE_WRITE16_MEMBER(midxunit_io_w); @@ -31,15 +36,13 @@ public: DECLARE_READ16_MEMBER(midxunit_sound_state_r); DECLARE_WRITE16_MEMBER(midxunit_sound_w); DECLARE_WRITE_LINE_MEMBER(midxunit_dcs_output_full); - void init_revx(); DECLARE_MACHINE_RESET(midxunit); DECLARE_VIDEO_START(midxunit); void register_state_saving(); TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update); - void midxunit(machine_config &config); void main_map(address_map &map); -private: + required_shared_ptr m_nvram; required_device m_midway_serial_pic; uint8_t m_cmos_write_enable; diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h index 4613b28033f..6e96227e580 100644 --- a/src/mame/includes/midyunit.h +++ b/src/mame/includes/midyunit.h @@ -39,12 +39,6 @@ struct dma_state_t class midyunit_state : public driver_device { public: - enum - { - TIMER_DMA, - TIMER_AUTOERASE_LINE - }; - midyunit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -64,6 +58,41 @@ public: { } + void term2(machine_config &config); + void yunit_cvsd_4bit_fast(machine_config &config); + void yunit_adpcm_6bit_fast(machine_config &config); + void yunit_cvsd_6bit_slow(machine_config &config); + void yunit_cvsd_4bit_slow(machine_config &config); + void mkyawdim(machine_config &config); + void yunit_core(machine_config &config); + void zunit(machine_config &config); + void yunit_adpcm_6bit_faster(machine_config &config); + + void init_smashtv(); + void init_strkforc(); + void init_narc(); + void init_term2(); + void init_term2la1(); + void init_term2la3(); + void init_mkyunit(); + void init_trog(); + void init_totcarn(); + void init_mkyawdim(); + void init_shimpact(); + void init_hiimpact(); + void init_mkyturbo(); + void init_term2la2(); + + DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_strobe_r); + DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r); + DECLARE_CUSTOM_INPUT_MEMBER(adpcm_irq_state_r); + +private: + enum + { + TIMER_DMA, + TIMER_AUTOERASE_LINE + }; required_device m_maincpu; optional_device m_audiocpu; @@ -122,27 +151,10 @@ public: DECLARE_WRITE16_MEMBER(midyunit_paletteram_w); DECLARE_READ16_MEMBER(midyunit_dma_r); DECLARE_WRITE16_MEMBER(midyunit_dma_w); - DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_strobe_r); - DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r); - DECLARE_CUSTOM_INPUT_MEMBER(adpcm_irq_state_r); DECLARE_WRITE8_MEMBER(yawdim_oki_bank_w); TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update); - void init_smashtv(); - void init_strkforc(); - void init_narc(); - void init_term2(); - void init_term2la1(); - void init_term2la3(); - void init_mkyunit(); - void init_trog(); - void init_totcarn(); - void init_mkyawdim(); - void init_shimpact(); - void init_hiimpact(); - void init_mkyturbo(); - void init_term2la2(); DECLARE_MACHINE_RESET(midyunit); DECLARE_VIDEO_START(midzunit); DECLARE_VIDEO_START(midyunit_4bit); @@ -152,18 +164,9 @@ public: TIMER_CALLBACK_MEMBER(dma_callback); TIMER_CALLBACK_MEMBER(autoerase_line); - void term2(machine_config &config); - void yunit_cvsd_4bit_fast(machine_config &config); - void yunit_adpcm_6bit_fast(machine_config &config); - void yunit_cvsd_6bit_slow(machine_config &config); - void yunit_cvsd_4bit_slow(machine_config &config); - void mkyawdim(machine_config &config); - void yunit_core(machine_config &config); - void zunit(machine_config &config); - void yunit_adpcm_6bit_faster(machine_config &config); void main_map(address_map &map); void yawdim_sound_map(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void dma_draw(uint16_t command); void init_generic(int bpp, int sound, int prot_start, int prot_end); diff --git a/src/mame/includes/mikie.h b/src/mame/includes/mikie.h index 5e911c30b83..98ab88b3188 100644 --- a/src/mame/includes/mikie.h +++ b/src/mame/includes/mikie.h @@ -21,6 +21,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void mikie(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_colorram; @@ -54,7 +57,6 @@ public: uint32_t screen_update_mikie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void mikie(machine_config &config); void mikie_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/mikro80.h b/src/mame/includes/mikro80.h index 5d066818218..4596c7c67c8 100644 --- a/src/mame/includes/mikro80.h +++ b/src/mame/includes/mikro80.h @@ -42,6 +42,14 @@ public: m_dac(*this, "dac"), m_maincpu(*this, "maincpu") { } + void kristall(machine_config &config); + void radio99(machine_config &config); + void mikro80(machine_config &config); + + void init_radio99(); + void init_mikro80(); + +private: required_shared_ptr m_cursor_ram; required_shared_ptr m_video_ram; int m_keyboard_mask; @@ -55,20 +63,15 @@ public: DECLARE_WRITE8_MEMBER(mikro80_keyboard_w); DECLARE_WRITE8_MEMBER(mikro80_tape_w); DECLARE_READ8_MEMBER(mikro80_tape_r); - void init_radio99(); - void init_mikro80(); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mikro80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void kristall(machine_config &config); - void radio99(machine_config &config); - void mikro80(machine_config &config); void kristall_io(address_map &map); void mikro80_io(address_map &map); void mikro80_mem(address_map &map); void radio99_io(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; required_device m_ppi8255; required_device m_cassette; diff --git a/src/mame/includes/mikromik.h b/src/mame/includes/mikromik.h index fd77d0b0d49..e4750c6071a 100644 --- a/src/mame/includes/mikromik.h +++ b/src/mame/includes/mikromik.h @@ -64,6 +64,12 @@ public: m_fdc_tc(0) { } + void mm1(machine_config &config); + void mm1m6(machine_config &config); + void mm1m6_video(machine_config &config); + void mm1m7(machine_config &config); + +private: required_device m_maincpu; required_device m_iop; required_device m_dmac; @@ -127,10 +133,6 @@ public: I8275_DRAW_CHARACTER_MEMBER( crtc_display_pixels ); UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); DECLARE_PALETTE_INIT( mm1 ); - void mm1(machine_config &config); - void mm1m6(machine_config &config); - void mm1m6_video(machine_config &config); - void mm1m7(machine_config &config); void mm1_map(address_map &map); void mm1_upd7220_map(address_map &map); }; diff --git a/src/mame/includes/mitchell.h b/src/mame/includes/mitchell.h index 629e3cce372..adde1a1fd82 100644 --- a/src/mame/includes/mitchell.h +++ b/src/mame/includes/mitchell.h @@ -37,6 +37,36 @@ public: m_bank1d(*this, "bank1d"), m_soundbank(*this, "soundbank") { } + void pkladiesbl(machine_config &config); + void mstworld(machine_config &config); + void mgakuen(machine_config &config); + void marukin(machine_config &config); + void pang(machine_config &config); + void pangba(machine_config &config); + void pangnv(machine_config &config); + void spangbl(machine_config &config); + + void init_mgakuen2(); + void init_block(); + void init_pangb(); + void init_qtono1(); + void init_mgakuen(); + void init_hatena(); + void init_mstworld(); + void init_spangbl(); + void init_pkladiesbl(); + void init_spang(); + void init_cworld(); + void init_spangj(); + void init_qsangoku(); + void init_marukin(); + void init_pang(); + void init_sbbros(); + void init_pkladies(); + void init_blockbl(); + void init_dokaben(); + +private: /* devices */ required_device m_maincpu; optional_device m_audiocpu; @@ -104,25 +134,7 @@ public: DECLARE_WRITE8_MEMBER(eeprom_clock_w); DECLARE_WRITE8_MEMBER(eeprom_serial_w); DECLARE_WRITE8_MEMBER(oki_banking_w); - void init_mgakuen2(); - void init_block(); - void init_pangb(); - void init_qtono1(); - void init_mgakuen(); - void init_hatena(); - void init_mstworld(); - void init_spangbl(); - void init_pkladiesbl(); - void init_spang(); - void init_cworld(); - void init_spangj(); - void init_qsangoku(); - void init_marukin(); - void init_pang(); - void init_sbbros(); - void init_pkladies(); - void init_blockbl(); - void init_dokaben(); + TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_MACHINE_START(mitchell); DECLARE_MACHINE_RESET(mitchell); @@ -134,14 +146,7 @@ public: void configure_banks(void (*decode)(uint8_t *src, uint8_t *dst, int size)); DECLARE_WRITE8_MEMBER(sound_bankswitch_w); DECLARE_WRITE_LINE_MEMBER(spangbl_adpcm_int); - void pkladiesbl(machine_config &config); - void mstworld(machine_config &config); - void mgakuen(machine_config &config); - void marukin(machine_config &config); - void pang(machine_config &config); - void pangba(machine_config &config); - void pangnv(machine_config &config); - void spangbl(machine_config &config); + void decrypted_opcodes_map(address_map &map); void mgakuen_map(address_map &map); void mitchell_io_map(address_map &map); diff --git a/src/mame/includes/mjkjidai.h b/src/mame/includes/mjkjidai.h index da7763d086b..a4b1ed5be23 100644 --- a/src/mame/includes/mjkjidai.h +++ b/src/mame/includes/mjkjidai.h @@ -18,6 +18,11 @@ public: m_videoram(*this, "videoram"), m_row(*this, "ROW.%u", 0) { } + void mjkjidai(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(keyboard_r); + +private: required_device m_maincpu; required_device m_msm; required_device m_nvram; @@ -36,7 +41,6 @@ public: bool m_display_enable; tilemap_t *m_bg_tilemap; - DECLARE_CUSTOM_INPUT_MEMBER(keyboard_r); DECLARE_WRITE8_MEMBER(keyboard_select_lo_w); DECLARE_WRITE8_MEMBER(keyboard_select_hi_w); DECLARE_WRITE8_MEMBER(mjkjidai_videoram_w); @@ -50,7 +54,6 @@ public: uint32_t screen_update_mjkjidai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - void mjkjidai(machine_config &config); void mjkjidai_io_map(address_map &map); void mjkjidai_map(address_map &map); }; diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h index fe5e2ac9c92..f04d4b2843b 100644 --- a/src/mame/includes/model1.h +++ b/src/mame/includes/model1.h @@ -60,6 +60,48 @@ public: { } + void model1(machine_config &config); + void model1_hle(machine_config &config); + + void vf(machine_config &config); + void vr(machine_config &config); + void vformula(machine_config &config); + void swa(machine_config &config); + void wingwar(machine_config &config); + void wingwar360(machine_config &config); + void netmerc(machine_config &config); + + struct spoint_t + { + int32_t x, y; + }; + + struct point_t + { + float x, y, z; + float xx, yy; + spoint_t s; + }; + + class quad_t + { + public: + quad_t() { } + quad_t(int ccol, float cz, point_t* p0, point_t* p1, point_t* p2, point_t* p3) + : p{ p0, p1, p2, p3 } + , z(cz) + , col(ccol) + { + } + + int compare(const quad_t* other) const; + + point_t *p[4] = { nullptr, nullptr, nullptr, nullptr }; + float z = 0; + int col = 0; + }; + +private: // Machine DECLARE_MACHINE_START(model1); DECLARE_MACHINE_RESET(model1); @@ -130,36 +172,6 @@ public: uint32_t screen_update_model1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_model1); - struct spoint_t - { - int32_t x, y; - }; - - struct point_t - { - float x, y, z; - float xx, yy; - spoint_t s; - }; - - class quad_t - { - public: - quad_t() { } - quad_t(int ccol, float cz, point_t* p0, point_t* p1, point_t* p2, point_t* p3) - : p{ p0, p1, p2, p3 } - , z(cz) - , col(ccol) - { - } - - int compare(const quad_t* other) const; - - point_t *p[4] = { nullptr, nullptr, nullptr, nullptr }; - float z = 0; - int col = 0; - }; - struct lightparam_t { float a = 0; @@ -203,17 +215,6 @@ public: lightparam_t lightparams[32]; }; - void model1(machine_config &config); - void model1_hle(machine_config &config); - - void vf(machine_config &config); - void vr(machine_config &config); - void vformula(machine_config &config); - void swa(machine_config &config); - void wingwar(machine_config &config); - void wingwar360(machine_config &config); - void netmerc(machine_config &config); - void model1_io(address_map &map); void model1_mem(address_map &map); void model1_comm_mem(address_map &map); @@ -226,7 +227,6 @@ public: void polhemus_map(address_map &map); -private: // Machine void irq_raise(int level); void irq_init(); diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index b42be515eac..856d6b0540a 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -80,6 +80,48 @@ public: m_step20_with_old_real3d = false; } + void model3_21_5881(machine_config &config); + void model3_20_5881(machine_config &config); + void model3_15(machine_config &config); + void model3_10(machine_config &config); + void model3_20(machine_config &config); + void model3_21(machine_config &config); + void scud(machine_config &config); + + void init_lemans24(); + void init_vs298(); + void init_vs299(); + void init_swtrilgy(); + void init_scudplus(); + void init_model3_20(); + void init_bass(); + void init_vs2(); + void init_daytona2(); + void init_eca(); + void init_srally2(); + void init_harleya(); + void init_skichamp(); + void init_spikeofe(); + void init_scud(); + void init_harley(); + void init_swtrilga(); + void init_vs29815(); + void init_model3_10(); + void init_vs215(); + void init_getbass(); + void init_scudplusa(); + void init_dirtdvls(); + void init_vf3(); + void init_von2(); + void init_lostwsga(); + void init_oceanhun(); + void init_dayto2pe(); + void init_spikeout(); + void init_magtruck(); + void init_lamachin(); + void init_model3_15(); + +private: required_device m_maincpu; optional_device m_lsi53c810; required_device m_audiocpu; @@ -236,38 +278,7 @@ public: void pci_device_set_reg(uint32_t value); void configure_fast_ram(); void interleave_vroms(); - void init_lemans24(); - void init_vs298(); - void init_vs299(); - void init_swtrilgy(); - void init_scudplus(); - void init_model3_20(); - void init_bass(); - void init_vs2(); - void init_daytona2(); - void init_eca(); - void init_srally2(); - void init_harleya(); - void init_skichamp(); - void init_spikeofe(); - void init_scud(); - void init_harley(); - void init_swtrilga(); - void init_vs29815(); - void init_model3_10(); - void init_vs215(); - void init_getbass(); - void init_scudplusa(); - void init_dirtdvls(); - void init_vf3(); - void init_von2(); - void init_lostwsga(); - void init_oceanhun(); - void init_dayto2pe(); - void init_spikeout(); - void init_magtruck(); - void init_lamachin(); - void init_model3_15(); + DECLARE_MACHINE_START(model3_10); DECLARE_MACHINE_RESET(model3_10); DECLARE_MACHINE_START(model3_15); @@ -337,13 +348,6 @@ public: uint16_t crypt_read_callback(uint32_t addr); - void model3_21_5881(machine_config &config); - void model3_20_5881(machine_config &config); - void model3_15(machine_config &config); - void model3_10(machine_config &config); - void model3_20(machine_config &config); - void model3_21(machine_config &config); - void scud(machine_config &config); void model3_5881_mem(address_map &map); void model3_10_mem(address_map &map); void model3_mem(address_map &map); diff --git a/src/mame/includes/momoko.h b/src/mame/includes/momoko.h index 1a6289be577..c1f5b341ab0 100644 --- a/src/mame/includes/momoko.h +++ b/src/mame/includes/momoko.h @@ -21,6 +21,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void momoko(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_videoram; @@ -56,7 +59,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void momoko(machine_config &config); void momoko_map(address_map &map); void momoko_sound_map(address_map &map); }; diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index 15eee080d01..21034aeca14 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -38,6 +38,11 @@ public: m_screen(*this, "screen"), m_k054321(*this, "k054321") { } + void bucky(machine_config &config); + void moo(machine_config &config); + void moobl(machine_config &config); + +private: /* memory pointers */ optional_shared_ptr m_workram; required_shared_ptr m_spriteram; @@ -85,9 +90,6 @@ public: void moo_objdma(); K056832_CB_MEMBER(tile_callback); K053246_CB_MEMBER(sprite_callback); - void bucky(machine_config &config); - void moo(machine_config &config); - void moobl(machine_config &config); void bucky_map(address_map &map); void moo_map(address_map &map); void moobl_map(address_map &map); diff --git a/src/mame/includes/mosaic.h b/src/mame/includes/mosaic.h index 7649d323508..7fd9ae57d3c 100644 --- a/src/mame/includes/mosaic.h +++ b/src/mame/includes/mosaic.h @@ -16,6 +16,10 @@ public: m_fgvideoram(*this, "fgvideoram"), m_bgvideoram(*this, "bgvideoram") { } + void mosaic(machine_config &config); + void gfire2(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; @@ -46,8 +50,6 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mosaic(machine_config &config); - void gfire2(machine_config &config); void gfire2_io_map(address_map &map); void gfire2_map(address_map &map); void mosaic_io_map(address_map &map); diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index f458226338e..0e5972e2038 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -22,6 +22,11 @@ public: m_palette(*this, "palette"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void mouser(machine_config &config); + + void init_mouser(); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -41,14 +46,12 @@ public: DECLARE_WRITE8_MEMBER(mouser_sound_nmi_clear_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w); - void init_mouser(); 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); INTERRUPT_GEN_MEMBER(mouser_sound_nmi_assert); - void mouser(machine_config &config); void decrypted_opcodes_map(address_map &map); void mouser_map(address_map &map); void mouser_sound_io_map(address_map &map); diff --git a/src/mame/includes/mpf1.h b/src/mame/includes/mpf1.h index 419f43a0bb7..0ff3b9398ea 100644 --- a/src/mame/includes/mpf1.h +++ b/src/mame/includes/mpf1.h @@ -38,6 +38,17 @@ public: m_leds(*this, "led%u", 0U) { } + void mpf1p(machine_config &config); + void mpf1b(machine_config &config); + void mpf1(machine_config &config); + + void init_mpf1(); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_irq ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_res ); + +private: required_device m_maincpu; required_device m_ctc; required_device m_speaker; @@ -54,9 +65,6 @@ public: DECLARE_READ8_MEMBER( ppi_pa_r ); DECLARE_WRITE8_MEMBER( ppi_pb_w ); DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_irq ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_res ); int m_break; int m_m1; @@ -66,12 +74,8 @@ public: emu_timer *m_led_refresh_timer; address_space *m_program; - void init_mpf1(); TIMER_CALLBACK_MEMBER(led_refresh); TIMER_DEVICE_CALLBACK_MEMBER(check_halt_callback); - void mpf1p(machine_config &config); - void mpf1b(machine_config &config); - void mpf1(machine_config &config); void mpf1_io_map(address_map &map); void mpf1_map(address_map &map); void mpf1_step(address_map &map); diff --git a/src/mame/includes/mpz80.h b/src/mame/includes/mpz80.h index ccf949a8a97..065279181b1 100644 --- a/src/mame/includes/mpz80.h +++ b/src/mame/includes/mpz80.h @@ -37,6 +37,9 @@ public: m_trap_aux(1) { } + void mpz80(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; required_device m_s100; @@ -92,7 +95,6 @@ public: int m_trap_stop; int m_trap_aux; void init_mpz80(); - void mpz80(machine_config &config); void mpz80_io(address_map &map); void mpz80_mem(address_map &map); }; diff --git a/src/mame/includes/mrdo.h b/src/mame/includes/mrdo.h index 56cfa2f399b..a14c9db7961 100644 --- a/src/mame/includes/mrdo.h +++ b/src/mame/includes/mrdo.h @@ -20,6 +20,10 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void mrlo(machine_config &config); + void mrdo(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_bgvideoram; required_shared_ptr m_fgvideoram; @@ -44,7 +48,5 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void mrlo(machine_config &config); - void mrdo(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index a819dd114db..734277c29b4 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -25,6 +25,9 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void mrflea(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -50,7 +53,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(mrflea_slave_interrupt); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void mrflea(machine_config &config); void mrflea_master_io_map(address_map &map); void mrflea_master_map(address_map &map); void mrflea_slave_io_map(address_map &map); diff --git a/src/mame/includes/mrjong.h b/src/mame/includes/mrjong.h index a8865a0e822..c3b51c38c12 100644 --- a/src/mame/includes/mrjong.h +++ b/src/mame/includes/mrjong.h @@ -19,6 +19,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void mrjong(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -37,7 +40,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void mrjong(machine_config &config); void mrjong_io_map(address_map &map); void mrjong_map(address_map &map); }; diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index 7ef76464179..e24ef8db46a 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -28,6 +28,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void msisaac(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_videoram; @@ -95,7 +98,6 @@ public: uint32_t screen_update_msisaac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(nmi_callback); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void msisaac(machine_config &config); void msisaac_map(address_map &map); void msisaac_sound_map(address_map &map); }; diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h index 11d3e254f00..45fd314c5ab 100644 --- a/src/mame/includes/msx.h +++ b/src/mame/includes/msx.h @@ -159,51 +159,6 @@ public: } } - // static configuration helpers - static void install_slot_pages(device_t &owner, uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, device_t *device); - - virtual void driver_start() override; - virtual void machine_start() override; - virtual void machine_reset() override; - - DECLARE_WRITE8_MEMBER(msx_sec_slot_w); - DECLARE_READ8_MEMBER(msx_sec_slot_r); - DECLARE_READ8_MEMBER(msx_kanji_r); - DECLARE_WRITE8_MEMBER(msx_kanji_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_a_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_c_w); - DECLARE_READ8_MEMBER(msx_ppi_port_b_r); - DECLARE_READ8_MEMBER(msx_rtc_reg_r); - DECLARE_WRITE8_MEMBER(msx_rtc_reg_w); - DECLARE_WRITE8_MEMBER(msx_rtc_latch_w); - DECLARE_READ8_MEMBER(msx_mem_read); - DECLARE_WRITE8_MEMBER(msx_mem_write); - DECLARE_READ8_MEMBER(msx_switched_r); - DECLARE_WRITE8_MEMBER(msx_switched_w); - DECLARE_WRITE_LINE_MEMBER(turbo_w); - - void msx_memory_map_all(); - void msx_memory_map_page(uint8_t page); - void msx_memory_reset(); - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - DECLARE_READ8_MEMBER(msx_psg_port_a_r); - DECLARE_READ8_MEMBER(msx_psg_port_b_r); - DECLARE_WRITE8_MEMBER(msx_psg_port_a_w); - DECLARE_WRITE8_MEMBER(msx_psg_port_b_w); - INTERRUPT_GEN_MEMBER(msx_interrupt); - DECLARE_WRITE8_MEMBER(msx_ay8910_w); - void msx_memory_init(); - void post_load(); - - DECLARE_WRITE_LINE_MEMBER(msx_irq_source0) { msx_irq_source(0, state); } // usually tms9918/v9938/v9958 - DECLARE_WRITE_LINE_MEMBER(msx_irq_source1) { msx_irq_source(1, state); } // usually first cartridge slot - DECLARE_WRITE_LINE_MEMBER(msx_irq_source2) { msx_irq_source(2, state); } // usually second cartridge slot - DECLARE_WRITE_LINE_MEMBER(msx_irq_source3) { msx_irq_source(3, state); } // sometimes expansion slot - - std::vector m_switched; - void mpc25fd(machine_config &config); void hc6(machine_config &config); void nms8220(machine_config &config); @@ -479,11 +434,58 @@ public: void msx_2_35_dd_drive(machine_config &config); void msx_ym2413(machine_config &config); void msx2_64kb_vram(machine_config &config); + +private: + // static configuration helpers + static void install_slot_pages(device_t &owner, uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, device_t *device); + + virtual void driver_start() override; + virtual void machine_start() override; + virtual void machine_reset() override; + + DECLARE_WRITE8_MEMBER(msx_sec_slot_w); + DECLARE_READ8_MEMBER(msx_sec_slot_r); + DECLARE_READ8_MEMBER(msx_kanji_r); + DECLARE_WRITE8_MEMBER(msx_kanji_w); + DECLARE_WRITE8_MEMBER(msx_ppi_port_a_w); + DECLARE_WRITE8_MEMBER(msx_ppi_port_c_w); + DECLARE_READ8_MEMBER(msx_ppi_port_b_r); + DECLARE_READ8_MEMBER(msx_rtc_reg_r); + DECLARE_WRITE8_MEMBER(msx_rtc_reg_w); + DECLARE_WRITE8_MEMBER(msx_rtc_latch_w); + DECLARE_READ8_MEMBER(msx_mem_read); + DECLARE_WRITE8_MEMBER(msx_mem_write); + DECLARE_READ8_MEMBER(msx_switched_r); + DECLARE_WRITE8_MEMBER(msx_switched_w); + DECLARE_WRITE_LINE_MEMBER(turbo_w); + + void msx_memory_map_all(); + void msx_memory_map_page(uint8_t page); + void msx_memory_reset(); + + DECLARE_FLOPPY_FORMATS(floppy_formats); + + DECLARE_READ8_MEMBER(msx_psg_port_a_r); + DECLARE_READ8_MEMBER(msx_psg_port_b_r); + DECLARE_WRITE8_MEMBER(msx_psg_port_a_w); + DECLARE_WRITE8_MEMBER(msx_psg_port_b_w); + INTERRUPT_GEN_MEMBER(msx_interrupt); + DECLARE_WRITE8_MEMBER(msx_ay8910_w); + void msx_memory_init(); + void post_load(); + + DECLARE_WRITE_LINE_MEMBER(msx_irq_source0) { msx_irq_source(0, state); } // usually tms9918/v9938/v9958 + DECLARE_WRITE_LINE_MEMBER(msx_irq_source1) { msx_irq_source(1, state); } // usually first cartridge slot + DECLARE_WRITE_LINE_MEMBER(msx_irq_source2) { msx_irq_source(2, state); } // usually second cartridge slot + DECLARE_WRITE_LINE_MEMBER(msx_irq_source3) { msx_irq_source(3, state); } // sometimes expansion slot + + std::vector m_switched; + void msx2_io_map(address_map &map); void msx2p_io_map(address_map &map); void msx_io_map(address_map &map); void msx_memory_map(address_map &map); -private: + required_device m_maincpu; optional_device m_v9938; optional_device m_v9958; diff --git a/src/mame/includes/mtx.h b/src/mame/includes/mtx.h index 46538172426..012be8da430 100644 --- a/src/mame/includes/mtx.h +++ b/src/mame/includes/mtx.h @@ -46,6 +46,11 @@ public: , m_rompak(*this, "rompak") { } + void rs128(machine_config &config); + void mtx500(machine_config &config); + void mtx512(machine_config &config); + +private: required_device m_maincpu; required_device m_sn; required_device m_z80ctc; @@ -105,9 +110,6 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(extrom_load); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rompak_load); DECLARE_SNAPSHOT_LOAD_MEMBER(mtx); - void rs128(machine_config &config); - void mtx500(machine_config &config); - void mtx512(machine_config &config); void mtx_io(address_map &map); void mtx_mem(address_map &map); void rs128_io(address_map &map); diff --git a/src/mame/includes/mugsmash.h b/src/mame/includes/mugsmash.h index 4ae2ce7ff99..a0f7a40631c 100644 --- a/src/mame/includes/mugsmash.h +++ b/src/mame/includes/mugsmash.h @@ -20,6 +20,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void mugsmash(machine_config &config); + +private: required_shared_ptr m_videoram1; required_shared_ptr m_videoram2; required_shared_ptr m_regs1; @@ -45,7 +48,6 @@ public: virtual void video_start() override; uint32_t screen_update_mugsmash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void mugsmash(machine_config &config); void mugsmash_map(address_map &map); void mugsmash_sound_map(address_map &map); }; diff --git a/src/mame/includes/multfish.h b/src/mame/includes/multfish.h index af7120bb965..72059e43003 100644 --- a/src/mame/includes/multfish.h +++ b/src/mame/includes/multfish.h @@ -28,22 +28,9 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_bank_w); - DECLARE_READ8_MEMBER(bankedram_r); - DECLARE_WRITE8_MEMBER(bankedram_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_rambank_w); - DECLARE_READ8_MEMBER(ray_r); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_hopper_w); - DECLARE_WRITE8_MEMBER(rollfr_hopper_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps1_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps2_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps3_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_counters_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_f3_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_dispenable_w); - DECLARE_READ8_MEMBER(igrosoft_gamble_timekeeper_r); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_timekeeper_w); + void rollfr(machine_config &config); + void igrosoft_gamble(machine_config &config); + void init_customl(); void init_island2l(); void init_keksl(); @@ -66,16 +53,31 @@ public: void init_crzmon2(); void init_crzmon2lot(); void init_crzmon2ent(); + +private: + DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_bank_w); + DECLARE_READ8_MEMBER(bankedram_r); + DECLARE_WRITE8_MEMBER(bankedram_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_rambank_w); + DECLARE_READ8_MEMBER(ray_r); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_hopper_w); + DECLARE_WRITE8_MEMBER(rollfr_hopper_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps1_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps2_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps3_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_counters_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_f3_w); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_dispenable_w); + DECLARE_READ8_MEMBER(igrosoft_gamble_timekeeper_r); + DECLARE_WRITE8_MEMBER(igrosoft_gamble_timekeeper_w); TILE_GET_INFO_MEMBER(get_igrosoft_gamble_tile_info); TILE_GET_INFO_MEMBER(get_igrosoft_gamble_reel_tile_info); uint32_t screen_update_igrosoft_gamble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void rollfr(machine_config &config); - void igrosoft_gamble(machine_config &config); void igrosoft_gamble_map(address_map &map); void igrosoft_gamble_portmap(address_map &map); void rollfr_portmap(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index df602e8d5e1..8be1cd9e236 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -34,7 +34,7 @@ public: void mnchmobl(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/mustache.h b/src/mame/includes/mustache.h index d568e0c69f0..4395cd37722 100644 --- a/src/mame/includes/mustache.h +++ b/src/mame/includes/mustache.h @@ -19,6 +19,11 @@ public: m_spriteram(*this, "spriteram"), m_dswb(*this, "DSWB") { } + void mustache(machine_config &config); + + void init_mustache(); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_screen; @@ -38,14 +43,12 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); - void init_mustache(); 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 ); TIMER_DEVICE_CALLBACK_MEMBER(scanline); - void mustache(machine_config &config); void decrypted_opcodes_map(address_map &map); void memmap(address_map &map); }; diff --git a/src/mame/includes/mw8080bw.h b/src/mame/includes/mw8080bw.h index 75026d596c5..8b0e1c37750 100644 --- a/src/mame/includes/mw8080bw.h +++ b/src/mame/includes/mw8080bw.h @@ -59,6 +59,76 @@ public: m_screen(*this, "screen") { } + void blueshrk(machine_config &config); + void blueshrk_audio(machine_config &config); + void boothill(machine_config &config); + void boothill_audio(machine_config &config); + void bowler(machine_config &config); + void bowler_audio(machine_config &config); + void checkmat(machine_config &config); + void checkmat_audio(machine_config &config); + void clowns(machine_config &config); + void clowns_audio(machine_config &config); + void desertgu(machine_config &config); + void desertgu_audio(machine_config &config); + void dogpatch(machine_config &config); + void dogpatch_audio(machine_config &config); + void dplay(machine_config &config); + void dplay_audio(machine_config &config); + void gmissile(machine_config &config); + void gmissile_audio(machine_config &config); + void gunfight(machine_config &config); + void gunfight_audio(machine_config &config); + void invad2ct(machine_config &config); + void invad2ct_audio(machine_config &config); + void invaders(machine_config &config); + void invaders_audio(machine_config &config); + void invaders_samples_audio(machine_config &config); + void m4(machine_config &config); + void m4_audio(machine_config &config); + void maze(machine_config &config); + void maze_audio(machine_config &config); + void mw8080bw_root(machine_config &config); + void phantom2(machine_config &config); + void phantom2_audio(machine_config &config); + void seawolf(machine_config &config); + void seawolf_audio(machine_config &config); + void shuffle(machine_config &config); + void shuffle_audio(machine_config &config); + void spacwalk(machine_config &config); + void spacwalk_audio(machine_config &config); + void spcenctr(machine_config &config); + void spcenctr_audio(machine_config &config); + void tornbase(machine_config &config); + void tornbase_audio(machine_config &config); + void zzzap(machine_config &config); + void zzzap_audio(machine_config &config); + + + DECLARE_CUSTOM_INPUT_MEMBER(seawolf_erase_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_left_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_right_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_left_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_right_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(tornbase_score_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(desertgu_gun_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(desertgu_dip_sw_0_1_r); + DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_left_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_right_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(clowns_controller_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_coin_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw6_sw7_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw5_r); + DECLARE_CUSTOM_INPUT_MEMBER(blueshrk_coin_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_in0_control_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_in1_control_r); + DECLARE_CUSTOM_INPUT_MEMBER(invaders_in2_control_r); + + DECLARE_MACHINE_START(mw8080bw); + DECLARE_MACHINE_RESET(mw8080bw); + +protected: + /* device/memory pointers */ required_device m_maincpu; optional_device m_mb14241; @@ -68,6 +138,15 @@ public: optional_shared_ptr m_colorram2; optional_device m_discrete; + /* other devices */ + optional_device m_samples; + optional_device m_samples1; + optional_device m_samples2; + optional_device m_sn1; + optional_device m_sn2; + optional_device m_sn; + required_device m_screen; + /* sound-related */ uint8_t m_port_1_last; uint8_t m_port_2_last; @@ -76,8 +155,20 @@ public: uint8_t m_port_3_last_extra; /* misc game specific */ - uint16_t m_phantom2_cloud_counter; uint8_t m_flip_screen; + + DECLARE_WRITE8_MEMBER(invaders_audio_1_w); + DECLARE_WRITE8_MEMBER(invaders_audio_2_w); + + std::unique_ptr m_scattered_colorram; + std::unique_ptr m_scattered_colorram2; + + uint32_t screen_update_invaders(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + uint32_t screen_update_mw8080bw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +private: + /* misc game specific */ + uint16_t m_phantom2_cloud_counter; uint8_t m_rev_shift_res; uint8_t m_maze_tone_timing_state; /* output of IC C1, pin 5 */ uint8_t m_desertgun_controller_select; @@ -90,22 +181,10 @@ public: uint8_t m_spcenctr_bright_control; uint8_t m_spcenctr_brightness; - std::unique_ptr m_scattered_colorram; - std::unique_ptr m_scattered_colorram2; - /* timers */ emu_timer *m_interrupt_timer; emu_timer *m_maze_tone_timer; - /* other devices */ - optional_device m_samples; - optional_device m_samples1; - optional_device m_samples2; - optional_device m_sn1; - optional_device m_sn2; - optional_device m_sn; - required_device m_screen; - DECLARE_READ8_MEMBER(mw8080bw_shift_result_rev_r); DECLARE_READ8_MEMBER(mw8080bw_reversable_shift_result_r); DECLARE_WRITE8_MEMBER(mw8080bw_reversable_shift_count_w); @@ -120,24 +199,6 @@ public: DECLARE_READ8_MEMBER(bowler_shift_result_r); DECLARE_WRITE8_MEMBER(bowler_lights_1_w); DECLARE_WRITE8_MEMBER(bowler_lights_2_w); - DECLARE_CUSTOM_INPUT_MEMBER(seawolf_erase_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_right_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_right_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_score_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(desertgu_gun_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(desertgu_dip_sw_0_1_r); - DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_right_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(clowns_controller_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_coin_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw6_sw7_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw5_r); - DECLARE_CUSTOM_INPUT_MEMBER(blueshrk_coin_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in0_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in1_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in2_control_r); DECLARE_WRITE8_MEMBER(seawolf_audio_w); DECLARE_WRITE8_MEMBER(gunfight_audio_w); DECLARE_WRITE8_MEMBER(zzzap_audio_1_w); @@ -155,8 +216,6 @@ public: DECLARE_WRITE8_MEMBER(bowler_audio_4_w); DECLARE_WRITE8_MEMBER(bowler_audio_5_w); DECLARE_WRITE8_MEMBER(bowler_audio_6_w); - DECLARE_MACHINE_START(mw8080bw); - DECLARE_MACHINE_RESET(mw8080bw); DECLARE_MACHINE_START(maze); DECLARE_MACHINE_START(boothill); DECLARE_MACHINE_START(desertgu); @@ -167,10 +226,8 @@ public: DECLARE_MACHINE_START(phantom2); DECLARE_MACHINE_START(invaders); DECLARE_SOUND_START(samples); - uint32_t screen_update_mw8080bw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_spcenctr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_phantom2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - uint32_t screen_update_invaders(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_phantom2); TIMER_CALLBACK_MEMBER(maze_tone_timing_timer_callback); TIMER_CALLBACK_MEMBER(mw8080bw_interrupt_callback); @@ -193,8 +250,6 @@ public: DECLARE_WRITE8_MEMBER(spcenctr_audio_2_w); DECLARE_WRITE8_MEMBER(spcenctr_audio_3_w); DECLARE_WRITE8_MEMBER(bowler_audio_1_w); - DECLARE_WRITE8_MEMBER(invaders_audio_1_w); - DECLARE_WRITE8_MEMBER(invaders_audio_2_w); DECLARE_WRITE8_MEMBER(blueshrk_audio_w); DECLARE_WRITE8_MEMBER(invad2ct_audio_1_w); DECLARE_WRITE8_MEMBER(invad2ct_audio_2_w); @@ -208,50 +263,6 @@ public: void mw8080bw_start_interrupt_timer( ); uint8_t tornbase_get_cabinet_type(); int invaders_is_cabinet_cocktail(); - void blueshrk(machine_config &config); - void blueshrk_audio(machine_config &config); - void boothill(machine_config &config); - void boothill_audio(machine_config &config); - void bowler(machine_config &config); - void bowler_audio(machine_config &config); - void checkmat(machine_config &config); - void checkmat_audio(machine_config &config); - void clowns(machine_config &config); - void clowns_audio(machine_config &config); - void desertgu(machine_config &config); - void desertgu_audio(machine_config &config); - void dogpatch(machine_config &config); - void dogpatch_audio(machine_config &config); - void dplay(machine_config &config); - void dplay_audio(machine_config &config); - void gmissile(machine_config &config); - void gmissile_audio(machine_config &config); - void gunfight(machine_config &config); - void gunfight_audio(machine_config &config); - void invad2ct(machine_config &config); - void invad2ct_audio(machine_config &config); - void invaders(machine_config &config); - void invaders_audio(machine_config &config); - void invaders_samples_audio(machine_config &config); - void m4(machine_config &config); - void m4_audio(machine_config &config); - void maze(machine_config &config); - void maze_audio(machine_config &config); - void mw8080bw_root(machine_config &config); - void phantom2(machine_config &config); - void phantom2_audio(machine_config &config); - void seawolf(machine_config &config); - void seawolf_audio(machine_config &config); - void shuffle(machine_config &config); - void shuffle_audio(machine_config &config); - void spacwalk(machine_config &config); - void spacwalk_audio(machine_config &config); - void spcenctr(machine_config &config); - void spcenctr_audio(machine_config &config); - void tornbase(machine_config &config); - void tornbase_audio(machine_config &config); - void zzzap(machine_config &config); - void zzzap_audio(machine_config &config); void blueshrk_io_map(address_map &map); void boothill_io_map(address_map &map); void bowler_io_map(address_map &map); diff --git a/src/mame/includes/mystston.h b/src/mame/includes/mystston.h index 3b250f43981..512dd04a9ac 100644 --- a/src/mame/includes/mystston.h +++ b/src/mame/includes/mystston.h @@ -35,6 +35,12 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void mystston(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: + /* machine state */ required_device_array m_ay8910; required_shared_ptr m_ay8910_data; @@ -53,7 +59,6 @@ public: DECLARE_WRITE8_MEMBER(irq_clear_w); DECLARE_WRITE8_MEMBER(mystston_ay8910_select_w); DECLARE_WRITE8_MEMBER(mystston_video_control_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_VIDEO_START(mystston); @@ -67,7 +72,6 @@ public: required_device m_gfxdecode; required_device m_screen; required_device m_palette; - void mystston(machine_config &config); void mystston_video(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index 279f6e3b74b..ebbdc16a5a9 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -21,6 +21,14 @@ public: m_spriteram(*this,"spriteram") { } + void martchmp(machine_config &config); + void mystwarr(machine_config &config); + void dadandrn(machine_config &config); + void viostorm(machine_config &config); + void gaiapols(machine_config &config); + void metamrph(machine_config &config); + +private: required_device m_k054321; required_shared_ptr m_gx_workram; optional_shared_ptr m_spriteram; @@ -97,12 +105,6 @@ public: K055673_CB_MEMBER(gaiapols_sprite_callback); K055673_CB_MEMBER(martchmp_sprite_callback); void decode_tiles(); - void martchmp(machine_config &config); - void mystwarr(machine_config &config); - void dadandrn(machine_config &config); - void viostorm(machine_config &config); - void gaiapols(machine_config &config); - void metamrph(machine_config &config); void dadandrn_map(address_map &map); void gaiapols_map(address_map &map); void martchmp_map(address_map &map); diff --git a/src/mame/includes/mz2500.h b/src/mame/includes/mz2500.h index 72d2adfe2e8..743214dbc9c 100644 --- a/src/mame/includes/mz2500.h +++ b/src/mame/includes/mz2500.h @@ -55,6 +55,9 @@ public: m_wram(*this, "wram") { } + void mz2500(machine_config &config); + +private: required_device m_maincpu; required_device m_screen; required_device m_rtc; @@ -203,7 +206,6 @@ public: uint8_t pal_256_param(int index, int param); void reset_banks(uint8_t type); - void mz2500(machine_config &config); void mz2500_io(address_map &map); void mz2500_map(address_map &map); void mz2500_bank_window_map(address_map &map); diff --git a/src/mame/includes/mz700.h b/src/mame/includes/mz700.h index 17b29b4802d..5cc2b6cb1ce 100644 --- a/src/mame/includes/mz700.h +++ b/src/mame/includes/mz700.h @@ -43,6 +43,13 @@ public: , m_cursor_timer(*this, "cursor") { } + void mz800(machine_config &config); + void mz700(machine_config &config); + + void init_mz800(); + void init_mz700(); + +private: DECLARE_READ8_MEMBER(mz700_e008_r); DECLARE_WRITE8_MEMBER(mz700_e008_w); DECLARE_READ8_MEMBER(mz800_bank_0_r); @@ -65,8 +72,6 @@ public: DECLARE_WRITE8_MEMBER(mz800_ramaddr_w); DECLARE_WRITE8_MEMBER(mz800_palette_w); DECLARE_WRITE8_MEMBER(mz800_cgram_w); - void init_mz800(); - void init_mz700(); DECLARE_MACHINE_RESET(mz700); DECLARE_MACHINE_RESET(mz800); virtual void machine_start() override; @@ -86,8 +91,6 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - void mz800(machine_config &config); - void mz700(machine_config &config); void mz700_banke(address_map &map); void mz700_io(address_map &map); void mz700_mem(address_map &map); @@ -95,7 +98,6 @@ public: void mz800_io(address_map &map); void mz800_mem(address_map &map); -private: int m_mz700; /* 1 if running on an mz700 */ int m_cursor_bit; diff --git a/src/mame/includes/mz80.h b/src/mame/includes/mz80.h index a0fecfad310..93436c93434 100644 --- a/src/mame/includes/mz80.h +++ b/src/mame/includes/mz80.h @@ -32,6 +32,13 @@ public: , m_p_chargen(*this, "chargen") { } + void mz80kj(machine_config &config); + void mz80k(machine_config &config); + void mz80a(machine_config &config); + + void init_mz80k(); + +private: DECLARE_READ8_MEMBER(mz80k_strobe_r); DECLARE_WRITE8_MEMBER(mz80k_strobe_w); DECLARE_READ8_MEMBER(mz80k_8255_portb_r); @@ -40,18 +47,13 @@ public: DECLARE_WRITE8_MEMBER(mz80k_8255_portc_w); DECLARE_WRITE_LINE_MEMBER(pit_out0_changed); DECLARE_WRITE_LINE_MEMBER(pit_out2_changed); - void init_mz80k(); uint32_t screen_update_mz80k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_mz80kj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_mz80a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(ne555_tempo_callback); - void mz80kj(machine_config &config); - void mz80k(machine_config &config); - void mz80a(machine_config &config); void mz80k_io(address_map &map); void mz80k_mem(address_map &map); -private: bool m_mz80k_vertical; bool m_mz80k_tempo_strobe; uint8_t m_speaker_level; -- cgit v1.2.3