From 6d6b562ffd0168791e9d8d363a07063e7090c0c6 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Wed, 27 Jun 2018 14:32:24 +0100 Subject: more private member use in 'D, E, F, G' drivers (nw) (#3704) * more private member use in 'D' drivers (nw) * same for 'E' drivers (nw) * and 'F' (nw) * 'G' (nw) (left galaxian/galaxold alone because I know somebody is looking at them) --- src/mame/drivers/d6800.cpp | 7 +- src/mame/drivers/d6809.cpp | 6 +- src/mame/drivers/d9final.cpp | 4 +- src/mame/drivers/dacholer.cpp | 11 ++-- src/mame/drivers/dai3wksi.cpp | 4 +- src/mame/drivers/dambustr.cpp | 7 +- src/mame/drivers/daruma.cpp | 4 +- src/mame/drivers/datum.cpp | 9 +-- src/mame/drivers/dblcrown.cpp | 3 +- src/mame/drivers/dblewing.cpp | 8 ++- src/mame/drivers/dbox.cpp | 30 +++++---- src/mame/drivers/dct11em.cpp | 5 +- src/mame/drivers/ddayjlc.cpp | 12 ++-- src/mame/drivers/ddealer.cpp | 9 +-- src/mame/drivers/ddenlovr.cpp | 87 +++++++++++++------------ src/mame/drivers/de_2.cpp | 3 +- src/mame/drivers/de_3.cpp | 3 +- src/mame/drivers/de_3b.cpp | 12 ++-- src/mame/drivers/deco156.cpp | 3 +- src/mame/drivers/deco_ld.cpp | 11 ++-- src/mame/drivers/dectalk.cpp | 16 +++-- src/mame/drivers/deshoros.cpp | 8 ++- src/mame/drivers/destroyr.cpp | 16 ++--- src/mame/drivers/dfruit.cpp | 4 +- src/mame/drivers/dgpix.cpp | 18 ++--- src/mame/drivers/diablo1300.cpp | 5 +- src/mame/drivers/digijet.cpp | 4 +- src/mame/drivers/dim68k.cpp | 6 +- src/mame/drivers/discoboy.cpp | 7 +- src/mame/drivers/diverboy.cpp | 4 +- src/mame/drivers/dlair.cpp | 3 +- src/mame/drivers/dlair2.cpp | 6 +- src/mame/drivers/dmax8000.cpp | 7 +- src/mame/drivers/dmndrby.cpp | 4 +- src/mame/drivers/dms86.cpp | 7 +- src/mame/drivers/dmv.cpp | 6 +- src/mame/drivers/dolphunk.cpp | 6 +- src/mame/drivers/dominob.cpp | 4 +- src/mame/drivers/dorachan.cpp | 5 +- src/mame/drivers/dotrikun.cpp | 5 +- src/mame/drivers/dps1.cpp | 8 ++- src/mame/drivers/dreambal.cpp | 7 +- src/mame/drivers/dreamwld.cpp | 6 +- src/mame/drivers/drtomy.cpp | 4 +- src/mame/drivers/dsb46.cpp | 9 +-- src/mame/drivers/dual68.cpp | 5 +- src/mame/drivers/dunhuang.cpp | 8 +-- src/mame/drivers/dvk_kcgd.cpp | 7 +- src/mame/drivers/dvk_ksm.cpp | 6 +- src/mame/drivers/dwarfd.cpp | 13 ++-- src/mame/drivers/dynadice.cpp | 4 +- src/mame/drivers/e100.cpp | 7 +- src/mame/drivers/eacc.cpp | 5 +- src/mame/drivers/ec184x.cpp | 2 +- src/mame/drivers/ecoinf1.cpp | 3 +- src/mame/drivers/ecoinf2.cpp | 3 +- src/mame/drivers/ecoinf3.cpp | 3 +- src/mame/drivers/ecoinfr.cpp | 18 +++-- src/mame/drivers/egghunt.cpp | 4 +- src/mame/drivers/einstein.cpp | 8 ++- src/mame/drivers/electra.cpp | 9 +-- src/mame/drivers/elekscmp.cpp | 3 +- src/mame/drivers/elektronmono.cpp | 3 +- src/mame/drivers/elwro800.cpp | 6 +- src/mame/drivers/embargo.cpp | 4 +- src/mame/drivers/enigma2.cpp | 14 ++-- src/mame/drivers/enmirage.cpp | 9 ++- src/mame/drivers/ep64.cpp | 6 +- src/mame/drivers/ertictac.cpp | 7 +- src/mame/drivers/esh.cpp | 8 ++- src/mame/drivers/esprit.cpp | 11 ++-- src/mame/drivers/esq1.cpp | 10 ++- src/mame/drivers/esq5505.cpp | 31 ++++----- src/mame/drivers/esqasr.cpp | 9 ++- src/mame/drivers/esqkt.cpp | 8 ++- src/mame/drivers/esqmr.cpp | 8 ++- src/mame/drivers/et3400.cpp | 7 +- src/mame/drivers/ettrivia.cpp | 4 +- src/mame/drivers/europc.cpp | 12 ++-- src/mame/drivers/eva.cpp | 10 +-- src/mame/drivers/evmbug.cpp | 6 +- src/mame/drivers/excali64.cpp | 6 +- src/mame/drivers/exelv.cpp | 6 +- src/mame/drivers/exidyttl.cpp | 10 ++- src/mame/drivers/expro02.cpp | 23 ++++--- src/mame/drivers/extrema.cpp | 4 +- src/mame/drivers/ez2d.cpp | 4 +- src/mame/drivers/f-32.cpp | 6 +- src/mame/drivers/famibox.cpp | 10 +-- src/mame/drivers/fanucs15.cpp | 6 +- src/mame/drivers/fanucspmg.cpp | 12 ++-- src/mame/drivers/fastinvaders.cpp | 4 +- src/mame/drivers/fb01.cpp | 6 +- src/mame/drivers/fc100.cpp | 9 ++- src/mame/drivers/fccpu30.cpp | 44 +++++++------ src/mame/drivers/fidel6502.cpp | 80 +++++++++++++---------- src/mame/drivers/fidel68k.cpp | 28 ++++---- src/mame/drivers/fidelmcs48.cpp | 4 +- src/mame/drivers/fidelz80.cpp | 25 ++++--- src/mame/drivers/fireball.cpp | 5 +- src/mame/drivers/firebeat.cpp | 15 +++-- src/mame/drivers/firefox.cpp | 3 +- src/mame/drivers/fk1.cpp | 4 +- src/mame/drivers/flicker.cpp | 3 +- src/mame/drivers/flipjack.cpp | 7 +- src/mame/drivers/flower.cpp | 10 +-- src/mame/drivers/flyball.cpp | 17 +++-- src/mame/drivers/fontwriter.cpp | 5 +- src/mame/drivers/force68k.cpp | 8 ++- src/mame/drivers/forte2.cpp | 3 +- src/mame/drivers/fp1100.cpp | 9 ++- src/mame/drivers/fp200.cpp | 9 ++- src/mame/drivers/fp6000.cpp | 4 +- src/mame/drivers/fresh.cpp | 6 +- src/mame/drivers/fruitpc.cpp | 4 +- src/mame/drivers/ft68m.cpp | 6 +- src/mame/drivers/fungames.cpp | 9 +-- src/mame/drivers/funkball.cpp | 4 +- src/mame/drivers/g627.cpp | 6 +- src/mame/drivers/gaelcopc.cpp | 5 +- src/mame/drivers/gal3.cpp | 4 +- src/mame/drivers/galgame.cpp | 7 +- src/mame/drivers/galpani3.cpp | 6 +- src/mame/drivers/gamate.cpp | 10 +-- src/mame/drivers/gambl186.cpp | 4 +- src/mame/drivers/gamecstl.cpp | 7 +- src/mame/drivers/gameking.cpp | 11 ++-- src/mame/drivers/gammagic.cpp | 4 +- src/mame/drivers/gamtor.cpp | 3 +- src/mame/drivers/gei.cpp | 35 +++++----- src/mame/drivers/geneve.cpp | 11 ++-- src/mame/drivers/geniusiq.cpp | 29 +++++---- src/mame/drivers/genpc.cpp | 4 +- src/mame/drivers/ggconnie.cpp | 6 +- src/mame/drivers/ghosteo.cpp | 13 ++-- src/mame/drivers/giclassic.cpp | 6 +- src/mame/drivers/gimix.cpp | 9 ++- src/mame/drivers/gizmondo.cpp | 10 ++- src/mame/drivers/gkigt.cpp | 7 +- src/mame/drivers/globalfr.cpp | 4 +- src/mame/drivers/globalvr.cpp | 2 +- src/mame/drivers/gluck2.cpp | 4 +- src/mame/drivers/gmaster.cpp | 8 ++- src/mame/drivers/go2000.cpp | 4 +- src/mame/drivers/gokidetor.cpp | 7 +- src/mame/drivers/goldngam.cpp | 6 +- src/mame/drivers/goldnpkr.cpp | 82 +++++++++++++---------- src/mame/drivers/good.cpp | 4 +- src/mame/drivers/goodejan.cpp | 6 +- src/mame/drivers/gp2x.cpp | 4 +- src/mame/drivers/gp_1.cpp | 9 ++- src/mame/drivers/gp_2.cpp | 7 +- src/mame/drivers/gpworld.cpp | 9 ++- src/mame/drivers/grfd2301.cpp | 6 +- src/mame/drivers/gridcomp.cpp | 19 +++--- src/mame/drivers/gstream.cpp | 18 +++-- src/mame/drivers/gticlub.cpp | 20 +++--- src/mame/drivers/gts1.cpp | 3 +- src/mame/drivers/gts3.cpp | 10 ++- src/mame/drivers/gts3a.cpp | 10 ++- src/mame/drivers/gts80.cpp | 13 ++-- src/mame/drivers/gts80a.cpp | 11 ++-- src/mame/drivers/gts80b.cpp | 17 +++-- src/mame/drivers/guab.cpp | 11 ++-- src/mame/includes/dai.h | 16 +++-- src/mame/includes/darius.h | 5 +- src/mame/includes/darkmist.h | 7 +- src/mame/includes/darkseal.h | 7 +- src/mame/includes/dassault.h | 7 +- src/mame/includes/dbz.h | 11 ++-- src/mame/includes/dcheese.h | 23 ++++--- src/mame/includes/dcon.h | 6 +- src/mame/includes/dday.h | 4 +- src/mame/includes/ddragon.h | 109 ++++++++++++++++++------------- src/mame/includes/ddragon3.h | 82 +++++++++++++---------- src/mame/includes/ddribble.h | 4 +- src/mame/includes/deadang.h | 90 ++++++++++++++----------- src/mame/includes/dec0.h | 106 ++++++++++++++++-------------- src/mame/includes/dec8.h | 28 ++++---- src/mame/includes/deco32.h | 133 ++++++++++++++++++++----------------- src/mame/includes/decocass.h | 130 ++++++++++++++++++------------------ src/mame/includes/deniam.h | 11 ++-- src/mame/includes/dgn_beta.h | 42 ++++++------ src/mame/includes/dgnalpha.h | 6 +- src/mame/includes/dietgo.h | 7 +- src/mame/includes/digdug.h | 9 ++- src/mame/includes/divebomb.h | 4 +- src/mame/includes/djboy.h | 9 ++- src/mame/includes/djmain.h | 35 +++++----- src/mame/includes/dkong.h | 66 ++++++++++--------- src/mame/includes/dm7000.h | 4 +- src/mame/includes/docastle.h | 8 ++- src/mame/includes/dragrace.h | 3 +- src/mame/includes/drgnmst.h | 7 +- src/mame/includes/dribling.h | 4 +- src/mame/includes/drmicro.h | 4 +- src/mame/includes/dynax.h | 134 ++++++++++++++++++++------------------ src/mame/includes/dynduke.h | 6 +- src/mame/includes/efdt.h | 4 +- src/mame/includes/electron.h | 28 ++++---- src/mame/includes/elf.h | 8 ++- src/mame/includes/eolith.h | 40 +++++++----- src/mame/includes/epos.h | 10 +-- src/mame/includes/esd16.h | 14 ++-- src/mame/includes/espial.h | 6 +- src/mame/includes/esripsys.h | 12 ++-- src/mame/includes/eti660.h | 6 +- src/mame/includes/exedexes.h | 4 +- src/mame/includes/exerion.h | 18 +++-- src/mame/includes/exidy.h | 51 ++++++++------- src/mame/includes/exp85.h | 9 ++- src/mame/includes/exprraid.h | 20 +++--- src/mame/includes/exzisus.h | 4 +- src/mame/includes/f1gp.h | 8 ++- src/mame/includes/fantland.h | 13 ++-- src/mame/includes/fastfred.h | 24 +++---- src/mame/includes/fastlane.h | 4 +- src/mame/includes/fcombat.h | 10 ++- src/mame/includes/fgoal.h | 20 +++--- src/mame/includes/finalizr.h | 4 +- src/mame/includes/firetrap.h | 9 ++- src/mame/includes/firetrk.h | 26 ++++---- src/mame/includes/fitfight.h | 15 +++-- src/mame/includes/flkatck.h | 4 +- src/mame/includes/flstory.h | 15 +++-- src/mame/includes/fm7.h | 37 ++++++----- src/mame/includes/fmtowns.h | 38 ++++++----- src/mame/includes/foodf.h | 3 +- src/mame/includes/freekick.h | 25 +++---- src/mame/includes/fromanc2.h | 21 +++--- src/mame/includes/fromance.h | 71 +++++++++++--------- src/mame/includes/funkybee.h | 4 +- src/mame/includes/funkyjet.h | 7 +- src/mame/includes/funworld.h | 64 +++++++++--------- src/mame/includes/funybubl.h | 4 +- src/mame/includes/fuukifg2.h | 20 +++--- src/mame/includes/fuukifg3.h | 20 +++--- src/mame/includes/gaelco.h | 11 ++-- src/mame/includes/gaelco2.h | 80 ++++++++++++++--------- src/mame/includes/gaelco3d.h | 3 +- src/mame/includes/gaiden.h | 26 ++++---- src/mame/includes/galaxia.h | 8 ++- src/mame/includes/galaxy.h | 12 ++-- src/mame/includes/galeb.h | 7 +- src/mame/includes/galivan.h | 16 +++-- src/mame/includes/galpani2.h | 4 +- src/mame/includes/galpanic.h | 7 +- src/mame/includes/galspnbl.h | 4 +- src/mame/includes/gamecom.h | 10 ++- src/mame/includes/gameplan.h | 16 +++-- src/mame/includes/gamepock.h | 4 +- src/mame/includes/gauntlet.h | 3 +- src/mame/includes/gba.h | 9 ++- src/mame/includes/gberet.h | 11 ++-- src/mame/includes/gcpinbal.h | 16 +++-- src/mame/includes/gijoe.h | 4 +- src/mame/includes/ginganin.h | 7 +- src/mame/includes/glass.h | 8 ++- src/mame/includes/gng.h | 3 +- src/mame/includes/goal92.h | 4 +- src/mame/includes/goindol.h | 6 +- src/mame/includes/gomoku.h | 4 +- src/mame/includes/gottlieb.h | 62 +++++++++--------- src/mame/includes/gotya.h | 4 +- src/mame/includes/gp32.h | 6 +- src/mame/includes/gradius3.h | 4 +- src/mame/includes/grchamp.h | 5 +- src/mame/includes/gridlee.h | 3 +- src/mame/includes/gstriker.h | 17 +++-- src/mame/includes/gumbo.h | 8 ++- src/mame/includes/gunbustr.h | 21 +++--- src/mame/includes/gundealr.h | 8 ++- src/mame/includes/gunsmoke.h | 4 +- src/mame/includes/gyruss.h | 7 +- 274 files changed, 2251 insertions(+), 1611 deletions(-) diff --git a/src/mame/drivers/d6800.cpp b/src/mame/drivers/d6800.cpp index 2f2d9d15e03..31a79b35608 100644 --- a/src/mame/drivers/d6800.cpp +++ b/src/mame/drivers/d6800.cpp @@ -72,6 +72,10 @@ public: , m_io_shift(*this, "SHIFT") { } + + void d6800(machine_config &config); + +private: DECLARE_READ8_MEMBER( d6800_cassette_r ); DECLARE_WRITE8_MEMBER( d6800_cassette_w ); DECLARE_READ8_MEMBER( d6800_keyboard_r ); @@ -82,9 +86,8 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(d6800_p); DECLARE_QUICKLOAD_LOAD_MEMBER( d6800 ); - void d6800(machine_config &config); void d6800_map(address_map &map); -private: + uint8_t m_rtc; bool m_cb2; bool m_cassold; diff --git a/src/mame/drivers/d6809.cpp b/src/mame/drivers/d6809.cpp index fa7a84d6019..c0b839ab88b 100644 --- a/src/mame/drivers/d6809.cpp +++ b/src/mame/drivers/d6809.cpp @@ -97,13 +97,15 @@ public: , m_terminal(*this, "terminal") { } + void d6809(machine_config &config); + +private: DECLARE_READ8_MEMBER( term_r ); DECLARE_WRITE8_MEMBER( term_w ); void kbd_put(u8 data); - void d6809(machine_config &config); void mem_map(address_map &map); -private: + uint8_t m_term_data; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/d9final.cpp b/src/mame/drivers/d9final.cpp index 9a777f0f016..e0d063fb1e7 100644 --- a/src/mame/drivers/d9final.cpp +++ b/src/mame/drivers/d9final.cpp @@ -45,6 +45,9 @@ public: m_hi_vram(*this, "hi_vram"), m_cram(*this, "cram") { } + void d9final(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; @@ -66,7 +69,6 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void d9final(machine_config &config); void d9final_io(address_map &map); void d9final_map(address_map &map); }; diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp index e1cb3ba5039..05644afb300 100644 --- a/src/mame/drivers/dacholer.cpp +++ b/src/mame/drivers/dacholer.cpp @@ -59,6 +59,12 @@ public: , m_leds(*this, "led%u", 0U) { } + void itaten(machine_config &config); + void dacholer(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r); + +private: DECLARE_WRITE8_MEMBER(bg_scroll_x_w); DECLARE_WRITE8_MEMBER(bg_scroll_y_w); DECLARE_WRITE8_MEMBER(background_w); @@ -70,7 +76,6 @@ public: DECLARE_WRITE8_MEMBER(snd_ack_w); DECLARE_WRITE8_MEMBER(snd_irq_w); DECLARE_WRITE8_MEMBER(music_irq_w); - DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_PALETTE_INIT(dacholer); @@ -78,8 +83,6 @@ public: INTERRUPT_GEN_MEMBER(sound_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - void itaten(machine_config &config); - void dacholer(machine_config &config); void itaten_main_map(address_map &map); void itaten_snd_io_map(address_map &map); void itaten_snd_map(address_map &map); @@ -88,12 +91,10 @@ public: void snd_io_map(address_map &map); void snd_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: /* devices */ required_device m_maincpu; required_device m_audiocpu; diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp index d828af52548..a8dde4929d1 100644 --- a/src/mame/drivers/dai3wksi.cpp +++ b/src/mame/drivers/dai3wksi.cpp @@ -67,6 +67,9 @@ public: m_dai3wksi_videoram(*this, "videoram"), m_in2(*this, "IN2") { } + void dai3wksi(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_samples; @@ -98,7 +101,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; - void dai3wksi(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/drivers/dambustr.cpp b/src/mame/drivers/dambustr.cpp index 2b370a7abe9..47950c45c5d 100644 --- a/src/mame/drivers/dambustr.cpp +++ b/src/mame/drivers/dambustr.cpp @@ -66,12 +66,15 @@ public: : galaxold_state(mconfig, type, tag), m_custom(*this, "cust") { } + void dambustr(machine_config &config); + + void init_dambustr(); + +private: required_device m_custom; int m_noise_data; DECLARE_WRITE8_MEMBER(dambustr_noise_enable_w); - void init_dambustr(); - void dambustr(machine_config &config); void dambustr_map(address_map &map); }; diff --git a/src/mame/drivers/daruma.cpp b/src/mame/drivers/daruma.cpp index 68a7798770b..de4087a8c62 100644 --- a/src/mame/drivers/daruma.cpp +++ b/src/mame/drivers/daruma.cpp @@ -29,13 +29,15 @@ public: m_maincpu(*this, "maincpu"), m_speaker(*this, "speaker") { } + void daruma(machine_config &config); + +private: DECLARE_READ8_MEMBER(dev0_r); DECLARE_WRITE8_MEMBER(dev1_w); DECLARE_WRITE8_MEMBER(dev2_w); DECLARE_READ8_MEMBER(dev4_r); required_device m_maincpu; required_device m_speaker; - void daruma(machine_config &config); void mem_io(address_map &map); void mem_prg(address_map &map); }; diff --git a/src/mame/drivers/datum.cpp b/src/mame/drivers/datum.cpp index a3de0df354f..fecf35f477d 100644 --- a/src/mame/drivers/datum.cpp +++ b/src/mame/drivers/datum.cpp @@ -66,14 +66,15 @@ public: , m_digits(*this, "digit%u", 0U) { } + void datum(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); + DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi); + +private: DECLARE_READ8_MEMBER(pa_r); DECLARE_WRITE8_MEMBER(pa_w); DECLARE_WRITE8_MEMBER(pb_w); - DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); - DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi); - void datum(machine_config &config); void datum_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/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp index 4c1f547f54f..35396d74199 100644 --- a/src/mame/drivers/dblcrown.cpp +++ b/src/mame/drivers/dblcrown.cpp @@ -73,14 +73,13 @@ public: void dblcrown(machine_config &config); -protected: +private: // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: // screen updates uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp index e07d0b9303a..f1503af323c 100644 --- a/src/mame/drivers/dblewing.cpp +++ b/src/mame/drivers/dblewing.cpp @@ -100,6 +100,11 @@ public: m_soundlatch_pending(false) { } + void dblewing(machine_config &config); + + void init_dblewing(); + +private: /* memory pointers */ required_shared_ptr m_pf1_rowscroll; required_shared_ptr m_pf2_rowscroll; @@ -115,7 +120,6 @@ public: DECLARE_READ8_MEMBER(irq_latch_r); DECLARE_WRITE_LINE_MEMBER(soundlatch_irq_w); - void init_dblewing(); uint32_t screen_update_dblewing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(bank_callback); @@ -124,12 +128,10 @@ public: READ16_MEMBER( wf_protection_region_0_104_r ); WRITE16_MEMBER( wf_protection_region_0_104_w ); - void dblewing(machine_config &config); void dblewing_map(address_map &map); void decrypted_opcodes_map(address_map &map); void sound_io(address_map &map); void sound_map(address_map &map); -private: bool m_soundlatch_pending; }; diff --git a/src/mame/drivers/dbox.cpp b/src/mame/drivers/dbox.cpp index 07255123c96..71dc04335d6 100644 --- a/src/mame/drivers/dbox.cpp +++ b/src/mame/drivers/dbox.cpp @@ -435,32 +435,36 @@ class dbox_state : public driver_device { - public: - dbox_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_display(*this, "display") - , m_ip16_74259(*this, "hct259.ip16") - { } +public: + dbox_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_display(*this, "display") + , m_ip16_74259(*this, "hct259.ip16") + { } + + void dbox(machine_config &config); + + void init_dbox(); + +private: required_device m_maincpu; required_device m_display; required_device m_ip16_74259; virtual void machine_reset() override; - virtual void machine_start () override; - void init_dbox(); + virtual void machine_start() override; DECLARE_WRITE8_MEMBER(sda5708_reset); DECLARE_WRITE8_MEMBER(sda5708_clk); DECLARE_WRITE8_MEMBER(write_pa); - void dbox(machine_config &config); void dbox_map(address_map &map); #if LOCALFLASH - DECLARE_READ16_MEMBER (sysflash_r); - DECLARE_WRITE16_MEMBER (sysflash_w); + DECLARE_READ16_MEMBER(sysflash_r); + DECLARE_WRITE16_MEMBER(sysflash_w); private: - uint16_t *m_sysflash; + uint16_t * m_sysflash; uint32_t m_sf_mode; uint32_t m_sf_state; #endif diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 529ed9c8c96..42ca84a4083 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -20,11 +20,14 @@ public: dct11em_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") { } + + void dct11em(machine_config &config); + +private: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void dct11em(machine_config &config); void dct11em_mem(address_map &map); }; diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp index 57888258262..21966bd0be7 100644 --- a/src/mame/drivers/ddayjlc.cpp +++ b/src/mame/drivers/ddayjlc.cpp @@ -84,6 +84,13 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void ddayjlc(machine_config &config); + + void init_ddayjlc(); + DECLARE_CUSTOM_INPUT_MEMBER(prot_r); + +private: + DECLARE_WRITE8_MEMBER(prot_w); DECLARE_WRITE8_MEMBER(char_bank_w); DECLARE_WRITE8_MEMBER(bgvram_w); @@ -97,23 +104,18 @@ public: DECLARE_WRITE8_MEMBER(flip_screen_w); DECLARE_WRITE8_MEMBER(i8257_CH0_w); DECLARE_WRITE8_MEMBER(i8257_LMSR_w); - DECLARE_CUSTOM_INPUT_MEMBER(prot_r); - void init_ddayjlc(); TILE_GET_INFO_MEMBER(get_tile_info_bg); TILE_GET_INFO_MEMBER(get_tile_info_fg); DECLARE_PALETTE_INIT(ddayjlc); uint32_t screen_update_ddayjlc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void ddayjlc(machine_config &config); void main_map(address_map &map); void sound_map(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_mainram; required_shared_ptr m_spriteram; diff --git a/src/mame/drivers/ddealer.cpp b/src/mame/drivers/ddealer.cpp index 1f13e420831..8e2d8b5df65 100644 --- a/src/mame/drivers/ddealer.cpp +++ b/src/mame/drivers/ddealer.cpp @@ -138,6 +138,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void ddealer(machine_config &config); + + void init_ddealer(); + +private: DECLARE_WRITE16_MEMBER(flipscreen_w); DECLARE_WRITE16_MEMBER(back_vram_w); DECLARE_WRITE16_MEMBER(mcu_shared_w); @@ -149,16 +154,12 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(mcu_sim); - void ddealer(machine_config &config); void ddealer_map(address_map &map); - void init_ddealer(); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: // memory pointers required_shared_ptr m_vregs; required_shared_ptr m_left_fg_vram_top; diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp index 3667bc3c2ac..04187ea3bd7 100644 --- a/src/mame/drivers/ddenlovr.cpp +++ b/src/mame/drivers/ddenlovr.cpp @@ -175,6 +175,51 @@ public: , m_leds(*this, "led%u", 0U) { } + void mjmywrld(machine_config &config); + void mjmyster(machine_config &config); + void mmpanic(machine_config &config); + void nettoqc(machine_config &config); + void mjmyornt(machine_config &config); + void kotbinsp(machine_config &config); + void mjgnight(machine_config &config); + void ddenlovrk(machine_config &config); + void quizchq(machine_config &config); + void mjmyuniv(machine_config &config); + void dtoyoken(machine_config &config); + void hgokou(machine_config &config); + void seljan2(machine_config &config); + void janshinp(machine_config &config); + void hkagerou(machine_config &config); + void ultrchmp(machine_config &config); + void rongrong(machine_config &config); + void mjflove(machine_config &config); + void hanakanz(machine_config &config); + void jongtei(machine_config &config); + void akamaru(machine_config &config); + void mjchuuka(machine_config &config); + void hparadis(machine_config &config); + void mjreach1(machine_config &config); + void ddenlovr(machine_config &config); + void funkyfig(machine_config &config); + void hginga(machine_config &config); + void daimyojn(machine_config &config); + void htengoku(machine_config &config); + void sryudens(machine_config &config); + void hgokbang(machine_config &config); + void quiz365(machine_config &config); + void kotbinyo(machine_config &config); + void mjschuka(machine_config &config); + void ddenlovj(machine_config &config); + + void init_rongrong(); + void init_momotaro(); + + DECLARE_CUSTOM_INPUT_MEMBER(ddenlovr_blitter_irq_r); + DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r); + DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r); + DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r); + +private: void set_blitter_irq(write_line_delegate &&handler) { m_blitter_irq_handler = std::move(handler); } DECLARE_MACHINE_START(ddenlovr); @@ -204,10 +249,6 @@ public: DECLARE_WRITE_LINE_MEMBER(hanakanz_rtc_irq); DECLARE_WRITE_LINE_MEMBER(mjflove_rtc_irq); - DECLARE_CUSTOM_INPUT_MEMBER(ddenlovr_blitter_irq_r); - DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r); - DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r); - DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r); DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor_w); DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor2_w); DECLARE_WRITE8_MEMBER(ddenlovr_priority_w); @@ -348,8 +389,6 @@ public: DECLARE_WRITE8_MEMBER(seljan2_rombank_w); DECLARE_WRITE8_MEMBER(seljan2_palette_enab_w); DECLARE_WRITE8_MEMBER(seljan2_palette_w); - void init_rongrong(); - void init_momotaro(); DECLARE_WRITE8_MEMBER(htengoku_select_w); DECLARE_WRITE8_MEMBER(htengoku_coin_w); DECLARE_READ8_MEMBER(htengoku_input_r); @@ -391,41 +430,6 @@ public: void mmpanic_update_leds(); void mjchuuka_get_romdata(); uint8_t hgokou_player_r( int player ); - void mjmywrld(machine_config &config); - void mjmyster(machine_config &config); - void mmpanic(machine_config &config); - void nettoqc(machine_config &config); - void mjmyornt(machine_config &config); - void kotbinsp(machine_config &config); - void mjgnight(machine_config &config); - void ddenlovrk(machine_config &config); - void quizchq(machine_config &config); - void mjmyuniv(machine_config &config); - void dtoyoken(machine_config &config); - void hgokou(machine_config &config); - void seljan2(machine_config &config); - void janshinp(machine_config &config); - void hkagerou(machine_config &config); - void ultrchmp(machine_config &config); - void rongrong(machine_config &config); - void mjflove(machine_config &config); - void hanakanz(machine_config &config); - void jongtei(machine_config &config); - void akamaru(machine_config &config); - void mjchuuka(machine_config &config); - void hparadis(machine_config &config); - void mjreach1(machine_config &config); - void ddenlovr(machine_config &config); - void funkyfig(machine_config &config); - void hginga(machine_config &config); - void daimyojn(machine_config &config); - void htengoku(machine_config &config); - void sryudens(machine_config &config); - void hgokbang(machine_config &config); - void quiz365(machine_config &config); - void kotbinyo(machine_config &config); - void mjschuka(machine_config &config); - void ddenlovj(machine_config &config); void akamaru_map(address_map &map); void daimyojn_portmap(address_map &map); void ddenlovj_map(address_map &map); @@ -475,7 +479,6 @@ public: void sryudens_portmap(address_map &map); void ultrchmp_map(address_map &map); -protected: write_line_delegate m_blitter_irq_handler; optional_shared_ptr m_protection1; diff --git a/src/mame/drivers/de_2.cpp b/src/mame/drivers/de_2.cpp index 1c845825bbb..6a1d34a2027 100644 --- a/src/mame/drivers/de_2.cpp +++ b/src/mame/drivers/de_2.cpp @@ -50,7 +50,7 @@ public: void de_type2_alpha3(machine_config &config); void de_type3(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -104,7 +104,6 @@ protected: bool m_more_data; bool m_nmi_enable; -private: uint32_t m_segment1; uint32_t m_segment2; uint8_t m_strobe; diff --git a/src/mame/drivers/de_3.cpp b/src/mame/drivers/de_3.cpp index 17dcc5b6d5c..447fcd17517 100644 --- a/src/mame/drivers/de_3.cpp +++ b/src/mame/drivers/de_3.cpp @@ -37,7 +37,7 @@ public: void de_3_dmd1(machine_config &config); void de_3_dmd2(machine_config &config); -protected: +private: // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; @@ -84,7 +84,6 @@ protected: bool m_nmi_enable; -private: // uint32_t m_segment1; // uint32_t m_segment2; uint8_t m_strobe; diff --git a/src/mame/drivers/de_3b.cpp b/src/mame/drivers/de_3b.cpp index b707b032cf6..65acd0dd0e3 100644 --- a/src/mame/drivers/de_3b.cpp +++ b/src/mame/drivers/de_3b.cpp @@ -22,6 +22,12 @@ public: m_dmdtype3(*this, "decodmd") { } + void detest(machine_config &config); + void de_3b(machine_config &config); + + void init_de_3b(); + +private: // devices optional_device m_decobsmt; optional_device m_dmdtype3; @@ -41,14 +47,8 @@ public: DECLARE_WRITE8_MEMBER(display_w); DECLARE_WRITE8_MEMBER(lamps_w); - void detest(machine_config &config); - void de_3b(machine_config &config); -protected: - // driver_device overrides virtual void machine_reset() override; -public: - void init_de_3b(); uint8_t m_strobe; uint8_t m_kbdrow; diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp index 878c21d1285..1d0b3aa47f2 100644 --- a/src/mame/drivers/deco156.cpp +++ b/src/mame/drivers/deco156.cpp @@ -45,7 +45,7 @@ public: void hvysmsh(machine_config &config); void wcvol95(machine_config &config); -protected: +private: DECLARE_WRITE32_MEMBER(hvysmsh_eeprom_w); DECLARE_READ32_MEMBER(pf1_rowscroll_r); DECLARE_READ32_MEMBER(pf2_rowscroll_r); @@ -64,7 +64,6 @@ protected: void hvysmsh_map(address_map &map); void wcvol95_map(address_map &map); -private: /* devices */ required_device m_maincpu; required_device m_deco_tilegen1; diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp index 57887adcbba..f3bf870141f 100644 --- a/src/mame/drivers/deco_ld.cpp +++ b/src/mame/drivers/deco_ld.cpp @@ -136,9 +136,15 @@ public: m_attr0(*this, "attr0"), m_vram1(*this, "vram1"), m_attr1(*this, "attr1") - { } + void rblaster(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(begas_vblank_r); + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: + required_device m_maincpu; optional_device m_audiocpu; required_device m_laserdisc; @@ -158,13 +164,10 @@ public: DECLARE_READ8_MEMBER(acia_status_hack_r); DECLARE_READ8_MEMBER(sound_status_r); DECLARE_WRITE8_MEMBER(decold_sound_cmd_w); - DECLARE_CUSTOM_INPUT_MEMBER(begas_vblank_r); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); virtual void machine_start() override; uint32_t screen_update_rblaster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(sound_interrupt); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *spriteram, uint16_t tile_bank ); - void rblaster(machine_config &config); void rblaster_map(address_map &map); void rblaster_sound_map(address_map &map); }; diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp index 22e02895ec9..9995ff8ac25 100644 --- a/src/mame/drivers/dectalk.cpp +++ b/src/mame/drivers/dectalk.cpp @@ -252,11 +252,6 @@ dgc (dg(no!spam)cx@mac.com) class dectalk_state : public driver_device { public: - enum - { - TIMER_OUTFIFO_READ - }; - dectalk_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -267,6 +262,14 @@ public: { } + void dectalk(machine_config &config); + +private: + enum + { + TIMER_OUTFIFO_READ + }; + // input fifo, between m68k and tms32010 uint16_t m_infifo[32]; // technically eight 74LS224 4bit*16stage FIFO chips, arranged as a 32 stage, 16-bit wide fifo uint8_t m_infifo_count; @@ -321,11 +324,10 @@ public: uint16_t dsp_outfifo_r(); DECLARE_WRITE_LINE_MEMBER(dectalk_reset); - void dectalk(machine_config &config); void m68k_mem(address_map &map); void tms32010_io(address_map &map); void tms32010_mem(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/deshoros.cpp b/src/mame/drivers/deshoros.cpp index f38997aa7cf..0948abf8f49 100644 --- a/src/mame/drivers/deshoros.cpp +++ b/src/mame/drivers/deshoros.cpp @@ -46,6 +46,11 @@ public: m_beeper(*this, "beeper") { } + void destiny(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: required_device m_maincpu; required_device m_beeper; @@ -60,9 +65,6 @@ public: DECLARE_WRITE8_MEMBER(bank_select_w); DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - - void destiny(machine_config &config); void main_map(address_map &map); protected: // driver_device overrides diff --git a/src/mame/drivers/destroyr.cpp b/src/mame/drivers/destroyr.cpp index a31396c288a..07fdbad8d54 100644 --- a/src/mame/drivers/destroyr.cpp +++ b/src/mame/drivers/destroyr.cpp @@ -25,12 +25,6 @@ TODO: class destroyr_state : public driver_device { public: - enum - { - TIMER_DESTROYR_DIAL, - TIMER_DESTROYR_FRAME - }; - destroyr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -45,7 +39,14 @@ public: void destroyr(machine_config &config); -protected: +private: + + enum + { + TIMER_DESTROYR_DIAL, + TIMER_DESTROYR_FRAME + }; + DECLARE_WRITE8_MEMBER(misc_w); DECLARE_WRITE8_MEMBER(cursor_load_w); DECLARE_WRITE8_MEMBER(interrupt_ack_w); @@ -64,7 +65,6 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void destroyr_map(address_map &map); -private: /* devices */ required_device m_maincpu; required_device m_watchdog; diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp index 348abafbfc0..1608a03b732 100644 --- a/src/mame/drivers/dfruit.cpp +++ b/src/mame/drivers/dfruit.cpp @@ -36,6 +36,9 @@ public: m_vdp(*this, "tc0091lvc") { } + void dfruit(machine_config &config); + +private: required_device m_maincpu; required_device m_vdp; @@ -71,7 +74,6 @@ public: uint8_t ram_bank_r(uint16_t offset, uint8_t bank_num); void ram_bank_w(uint16_t offset, uint8_t data, uint8_t bank_num); TIMER_DEVICE_CALLBACK_MEMBER(dfruit_irq_scanline); - void dfruit(machine_config &config); void dfruit_map(address_map &map); void tc0091lvc_map(address_map &map); }; diff --git a/src/mame/drivers/dgpix.cpp b/src/mame/drivers/dgpix.cpp index dbd18df8213..3ccaf4bdc0c 100644 --- a/src/mame/drivers/dgpix.cpp +++ b/src/mame/drivers/dgpix.cpp @@ -166,6 +166,16 @@ public: m_maincpu(*this, "maincpu"), m_vblank(*this, "VBLANK") { } + void dgpix(machine_config &config); + + void init_elfin(); + void init_jumpjump(); + void init_xfiles(); + void init_xfilesk(); + void init_kdynastg(); + void init_fmaniac3(); + +private: required_device m_maincpu; required_ioport m_vblank; @@ -184,19 +194,11 @@ public: DECLARE_WRITE32_MEMBER(coin_w); DECLARE_READ32_MEMBER(vblank_r); - void init_elfin(); - void init_jumpjump(); - void init_xfiles(); - void init_xfilesk(); - void init_kdynastg(); - void init_fmaniac3(); - virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_dgpix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void dgpix(machine_config &config); void cpu_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/drivers/diablo1300.cpp b/src/mame/drivers/diablo1300.cpp index 72c8b812258..de029270cd4 100644 --- a/src/mame/drivers/diablo1300.cpp +++ b/src/mame/drivers/diablo1300.cpp @@ -144,12 +144,13 @@ public: , m_maincpu(*this, "maincpu") { } + void diablo1300(machine_config &config); + private: virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; -public: - void diablo1300(machine_config &config); + void diablo1300_map(address_map &map); void diablo1300_data_map(address_map &map); }; diff --git a/src/mame/drivers/digijet.cpp b/src/mame/drivers/digijet.cpp index bf74473feea..21da2bc0113 100644 --- a/src/mame/drivers/digijet.cpp +++ b/src/mame/drivers/digijet.cpp @@ -33,11 +33,13 @@ public: { } + void digijet(machine_config &config); + +private: required_device m_maincpu; virtual void machine_start() override { } virtual void machine_reset() override { } - void digijet(machine_config &config); void io_map(address_map &map); }; diff --git a/src/mame/drivers/dim68k.cpp b/src/mame/drivers/dim68k.cpp index da718ee0677..77e7952dac6 100644 --- a/src/mame/drivers/dim68k.cpp +++ b/src/mame/drivers/dim68k.cpp @@ -57,6 +57,9 @@ public: , m_p_chargen(*this, "chargen") { } + void dim68k(machine_config &config); + +private: DECLARE_READ16_MEMBER( dim68k_duart_r ); DECLARE_READ16_MEMBER( dim68k_fdc_r ); DECLARE_READ16_MEMBER( dim68k_game_switches_r ); @@ -73,9 +76,8 @@ public: void kbd_put(u8 data); MC6845_UPDATE_ROW(crtc_update_row); - void dim68k(machine_config &config); void dim68k_mem(address_map &map); -private: + bool m_speaker_bit; u8 m_video_control; u8 m_term_data; diff --git a/src/mame/drivers/discoboy.cpp b/src/mame/drivers/discoboy.cpp index 3319eaef11a..7a1d5db0bf0 100644 --- a/src/mame/drivers/discoboy.cpp +++ b/src/mame/drivers/discoboy.cpp @@ -70,6 +70,11 @@ public: m_ram_1(*this, "ram_1"), m_ram_2(*this, "ram_2") { } + void discoboy(machine_config &config); + + void init_discoboy(); + +private: /* video-related */ uint8_t m_gfxbank; uint8_t m_port_00; @@ -102,13 +107,11 @@ public: DECLARE_WRITE8_MEMBER(rambank2_w); DECLARE_READ8_MEMBER(port_06_r); DECLARE_WRITE8_MEMBER(yunsung8_sound_bankswitch_w); - void init_discoboy(); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); DECLARE_WRITE_LINE_MEMBER(yunsung8_adpcm_int); - void discoboy(machine_config &config); void discoboy_map(address_map &map); void io_map(address_map &map); void rambank1_map(address_map &map); diff --git a/src/mame/drivers/diverboy.cpp b/src/mame/drivers/diverboy.cpp index 504a75d817c..90bd9101888 100644 --- a/src/mame/drivers/diverboy.cpp +++ b/src/mame/drivers/diverboy.cpp @@ -73,6 +73,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void diverboy(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; @@ -91,7 +94,6 @@ public: virtual void video_start() override; uint32_t screen_update_diverboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void diverboy(machine_config &config); void diverboy_map(address_map &map); void snd_map(address_map &map); }; diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp index b08e306c05d..9a93bc9c2c7 100644 --- a/src/mame/drivers/dlair.cpp +++ b/src/mame/drivers/dlair.cpp @@ -79,7 +79,7 @@ public: void dleuro(machine_config &config); void dlair_ldv1000(machine_config &config); -protected: +private: void laserdisc_data_w(uint8_t data) { if (m_ldv1000 != nullptr) m_ldv1000->data_w(data); @@ -135,7 +135,6 @@ protected: void dleuro_map(address_map &map); void dlus_map(address_map &map); -private: required_device m_maincpu; optional_device m_speaker; optional_device m_gfxdecode; diff --git a/src/mame/drivers/dlair2.cpp b/src/mame/drivers/dlair2.cpp index 13fb70751a6..f04abf592b5 100644 --- a/src/mame/drivers/dlair2.cpp +++ b/src/mame/drivers/dlair2.cpp @@ -47,6 +47,9 @@ public: { } + void dlair2(machine_config &config); + +private: // devices required_device m_maincpu; @@ -56,10 +59,9 @@ public: INTERRUPT_GEN_MEMBER(dlair2_timer_irq); DECLARE_PALETTE_INIT(dlair2); - void dlair2(machine_config &config); void dlair2_io(address_map &map); void dlair2_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/dmax8000.cpp b/src/mame/drivers/dmax8000.cpp index 52deda2488a..ae667a9ae28 100644 --- a/src/mame/drivers/dmax8000.cpp +++ b/src/mame/drivers/dmax8000.cpp @@ -46,7 +46,11 @@ public: , m_floppy0(*this, "fdc:0") { } + void dmax8000(machine_config &config); + void init_dmax8000(); + +private: DECLARE_MACHINE_RESET(dmax8000); DECLARE_WRITE8_MEMBER(port0c_w); DECLARE_WRITE8_MEMBER(port0d_w); @@ -54,10 +58,9 @@ public: DECLARE_WRITE8_MEMBER(port40_w); DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - void dmax8000(machine_config &config); void dmax8000_io(address_map &map); void dmax8000_mem(address_map &map); -private: + required_device m_maincpu; required_device m_fdc; required_device m_floppy0; diff --git a/src/mame/drivers/dmndrby.cpp b/src/mame/drivers/dmndrby.cpp index eaa9bc71ca8..eaae8fae413 100644 --- a/src/mame/drivers/dmndrby.cpp +++ b/src/mame/drivers/dmndrby.cpp @@ -77,6 +77,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void dderby(machine_config &config); + +private: required_shared_ptr m_scroll_ram; required_shared_ptr m_sprite_ram; required_shared_ptr m_dderby_vidchars; @@ -99,7 +102,6 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void dderby(machine_config &config); void dderby_sound_map(address_map &map); void memmap(address_map &map); }; diff --git a/src/mame/drivers/dms86.cpp b/src/mame/drivers/dms86.cpp index d119417148d..40cff98c1d7 100644 --- a/src/mame/drivers/dms86.cpp +++ b/src/mame/drivers/dms86.cpp @@ -48,17 +48,20 @@ public: , m_ctc(*this, "ctc") { } + void dms86(machine_config &config); + DECLARE_WRITE_LINE_MEMBER(nmi_w); + +private: DECLARE_WRITE8_MEMBER(m1_ack_w); DECLARE_READ16_MEMBER(port9a_r); DECLARE_READ16_MEMBER(port9c_r); void kbd_put(u8 data); - void dms86(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + u8 m_term_data; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp index 4291ea8d735..01466c1edf4 100644 --- a/src/mame/drivers/dmv.cpp +++ b/src/mame/drivers/dmv.cpp @@ -73,6 +73,9 @@ public: , m_leds(*this, "led%u", 1U) { } + void dmv(machine_config &config); + +private: void update_halt_line(); DECLARE_WRITE8_MEMBER(leds_w); @@ -142,16 +145,13 @@ public: UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); - void dmv(machine_config &config); void dmv_io(address_map &map); void dmv_mem(address_map &map); void upd7220_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; -private: required_device m_maincpu; required_device m_screen; required_device m_hgdc; diff --git a/src/mame/drivers/dolphunk.cpp b/src/mame/drivers/dolphunk.cpp index a123f8510e2..3a2a950c8b2 100644 --- a/src/mame/drivers/dolphunk.cpp +++ b/src/mame/drivers/dolphunk.cpp @@ -102,16 +102,18 @@ public: , m_digits(*this, "digit%u", 0U) { } + void dauphin(machine_config &config); + +private: DECLARE_READ_LINE_MEMBER(cass_r); DECLARE_WRITE_LINE_MEMBER(cass_w); DECLARE_READ8_MEMBER(port07_r); DECLARE_WRITE8_MEMBER(port00_w); DECLARE_WRITE8_MEMBER(port06_w); TIMER_DEVICE_CALLBACK_MEMBER(dauphin_c); - void dauphin(machine_config &config); void dauphin_io(address_map &map); void dauphin_mem(address_map &map); -private: + uint8_t m_cass_data; uint8_t m_last_key; bool m_cass_state; diff --git a/src/mame/drivers/dominob.cpp b/src/mame/drivers/dominob.cpp index b21062d5740..67e9431691f 100644 --- a/src/mame/drivers/dominob.cpp +++ b/src/mame/drivers/dominob.cpp @@ -81,6 +81,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void dominob(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -97,7 +100,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void dominob(machine_config &config); void memmap(address_map &map); void portmap(address_map &map); }; diff --git a/src/mame/drivers/dorachan.cpp b/src/mame/drivers/dorachan.cpp index 50f02c42234..71856caf1f3 100644 --- a/src/mame/drivers/dorachan.cpp +++ b/src/mame/drivers/dorachan.cpp @@ -35,16 +35,17 @@ public: , m_colors(*this, "colors") { } + void dorachan(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(protection_w); DECLARE_READ8_MEMBER(protection_r); DECLARE_READ8_MEMBER(v128_r); uint32_t screen_update_dorachan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void dorachan(machine_config &config); void dorachan_io_map(address_map &map); void dorachan_map(address_map &map); -private: // internal state uint8_t m_flip_screen; uint16_t m_prot_value; diff --git a/src/mame/drivers/dotrikun.cpp b/src/mame/drivers/dotrikun.cpp index 29c20e9f3ee..ba8cf50e81a 100644 --- a/src/mame/drivers/dotrikun.cpp +++ b/src/mame/drivers/dotrikun.cpp @@ -49,6 +49,10 @@ public: m_scanline_off_timer(*this, "scanline_off") { } + void dotrikun(machine_config &config); + +private: + required_device m_maincpu; required_device m_screen; required_shared_ptr m_vram; @@ -67,7 +71,6 @@ public: virtual void machine_start() override; virtual void machine_reset() override; - void dotrikun(machine_config &config); void dotrikun_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/drivers/dps1.cpp b/src/mame/drivers/dps1.cpp index a68c7338d6b..271d72014c9 100644 --- a/src/mame/drivers/dps1.cpp +++ b/src/mame/drivers/dps1.cpp @@ -33,6 +33,11 @@ public: //, m_floppy1(*this, "fdc:1") { } + void dps1(machine_config &config); + + void init_dps1(); + +private: DECLARE_WRITE8_MEMBER(portb2_w); DECLARE_WRITE8_MEMBER(portb4_w); DECLARE_WRITE8_MEMBER(portb6_w); @@ -43,13 +48,10 @@ public: DECLARE_READ8_MEMBER(portff_r); DECLARE_WRITE8_MEMBER(portff_w); DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - void init_dps1(); DECLARE_MACHINE_RESET(dps1); - void dps1(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: bool m_dma_dir; uint16_t m_dma_adr; required_device m_maincpu; diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp index b6b57462c19..1d5898dd323 100644 --- a/src/mame/drivers/dreambal.cpp +++ b/src/mame/drivers/dreambal.cpp @@ -43,13 +43,17 @@ public: m_eeprom(*this, "eeprom") { } + void dreambal(machine_config &config); + + void init_dreambal(); + +private: /* devices */ required_device m_maincpu; optional_device m_deco104; required_device m_deco_tilegen1; required_device m_eeprom; - void init_dreambal(); virtual void machine_start() override; virtual void machine_reset() override; @@ -73,7 +77,6 @@ public: m_eeprom->cs_write(data&0x4 ? ASSERT_LINE : CLEAR_LINE); } } - void dreambal(machine_config &config); void dreambal_map(address_map &map); }; diff --git a/src/mame/drivers/dreamwld.cpp b/src/mame/drivers/dreamwld.cpp index c9d1689802f..da1deb99172 100644 --- a/src/mame/drivers/dreamwld.cpp +++ b/src/mame/drivers/dreamwld.cpp @@ -125,6 +125,10 @@ public: std::fill(std::begin(m_old_linescroll), std::end(m_old_linescroll), 0); } + void baryon(machine_config &config); + void dreamwld(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr_array m_vram; @@ -163,8 +167,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void baryon(machine_config &config); - void dreamwld(machine_config &config); void baryon_map(address_map &map); void dreamwld_map(address_map &map); void oki1_map(address_map &map); diff --git a/src/mame/drivers/drtomy.cpp b/src/mame/drivers/drtomy.cpp index 43513230752..7af1b14ef50 100644 --- a/src/mame/drivers/drtomy.cpp +++ b/src/mame/drivers/drtomy.cpp @@ -29,6 +29,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void drtomy(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram_fg; required_shared_ptr m_videoram_bg; @@ -54,7 +57,6 @@ public: required_device m_oki; required_device m_gfxdecode; required_device m_palette; - void drtomy(machine_config &config); void drtomy_map(address_map &map); }; diff --git a/src/mame/drivers/dsb46.cpp b/src/mame/drivers/dsb46.cpp index 656e87272a4..9c1bdfb8b05 100644 --- a/src/mame/drivers/dsb46.cpp +++ b/src/mame/drivers/dsb46.cpp @@ -45,14 +45,15 @@ public: , m_maincpu(*this, "maincpu") { } - DECLARE_WRITE8_MEMBER(port1a_w); + void dsb46(machine_config &config); + void init_dsb46(); - DECLARE_MACHINE_RESET(dsb46); - void dsb46(machine_config &config); +private: + DECLARE_WRITE8_MEMBER(port1a_w); + DECLARE_MACHINE_RESET(dsb46); void dsb46_io(address_map &map); void dsb46_mem(address_map &map); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/dual68.cpp b/src/mame/drivers/dual68.cpp index bce136276e5..6c26462299e 100644 --- a/src/mame/drivers/dual68.cpp +++ b/src/mame/drivers/dual68.cpp @@ -26,14 +26,15 @@ public: , m_p_ram(*this, "ram") { } + void dual68(machine_config &config); + +private: void kbd_put(u8 data); DECLARE_WRITE16_MEMBER(terminal_w); - void dual68(machine_config &config); void dual68_mem(address_map &map); void sio4_io(address_map &map); void sio4_mem(address_map &map); -private: virtual void machine_reset() override; required_device m_maincpu; required_device m_terminal; diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp index 9cdb7753ec1..d576dfe2f78 100644 --- a/src/mame/drivers/dunhuang.cpp +++ b/src/mame/drivers/dunhuang.cpp @@ -80,6 +80,9 @@ public: m_dsw(*this, {"DSW1", "DSW2", "DSW3", "DSW4", "DSW5"}), m_service(*this, "SERVICE") { } + void dunhuang(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(pos_x_w); DECLARE_WRITE8_MEMBER(pos_y_w); DECLARE_WRITE8_MEMBER(tile_w); @@ -103,17 +106,14 @@ public: DECLARE_READ8_MEMBER(dsw_r); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void dunhuang(machine_config &config); void dunhuang_io_map(address_map &map); void dunhuang_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 */ tilemap_t *m_tmap; tilemap_t *m_tmap2; diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp index 0d372fc877a..b146bede198 100644 --- a/src/mame/drivers/dvk_kcgd.cpp +++ b/src/mame/drivers/dvk_kcgd.cpp @@ -68,6 +68,9 @@ public: m_screen(*this, "screen") { } + void kcgd(machine_config &config); + +private: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -99,9 +102,8 @@ public: emu_timer *m_vsync_off_timer; emu_timer *m_500hz_timer; - void kcgd(machine_config &config); void kcgd_mem(address_map &map); -private: + void draw_scanline(uint16_t *p, uint16_t offset); rectangle m_tmpclip; bitmap_ind16 m_tmpbmp; @@ -114,7 +116,6 @@ private: } m_video; std::unique_ptr m_videoram; -protected: required_device m_maincpu; // required_device m_ms7004; required_device m_palette; diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index 614eed6a312..9d0d30c5f88 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -107,6 +107,9 @@ public: , m_p_chargen(*this, "chargen") { } + void ksm(machine_config &config); + +private: TIMER_DEVICE_CALLBACK_MEMBER( scanline_callback ); virtual void machine_reset() override; @@ -124,10 +127,9 @@ public: DECLARE_WRITE8_MEMBER(ksm_ppi_porta_w); DECLARE_WRITE8_MEMBER(ksm_ppi_portc_w); - void ksm(machine_config &config); void ksm_io(address_map &map); void ksm_mem(address_map &map); -private: + uint32_t draw_scanline(uint16_t *p, uint16_t offset, uint8_t scanline); rectangle m_tmpclip; bitmap_ind16 m_tmpbmp; diff --git a/src/mame/drivers/dwarfd.cpp b/src/mame/drivers/dwarfd.cpp index 896183d4491..c8abf018049 100644 --- a/src/mame/drivers/dwarfd.cpp +++ b/src/mame/drivers/dwarfd.cpp @@ -317,6 +317,14 @@ public: m_dsw2(*this, "DSW2") { } + void dwarfd(machine_config &config); + void pokeresp(machine_config &config); + void qc(machine_config &config); + + void init_qc(); + void init_dwarfd(); + +private: /* video-related */ int m_crt_access; bool m_back_color; @@ -337,17 +345,12 @@ public: DECLARE_READ8_MEMBER(qc_b8_r); DECLARE_WRITE_LINE_MEMBER(dwarfd_sod_callback); DECLARE_WRITE_LINE_MEMBER(drq_w); - void init_qc(); - void init_dwarfd(); virtual void machine_start() override; virtual void machine_reset() override; DECLARE_PALETTE_INIT(dwarfd); I8275_DRAW_CHARACTER_MEMBER(display_pixels); I8275_DRAW_CHARACTER_MEMBER(pesp_display_pixels); I8275_DRAW_CHARACTER_MEMBER(qc_display_pixels); - void dwarfd(machine_config &config); - void pokeresp(machine_config &config); - void qc(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); void pokeresp_map(address_map &map); diff --git a/src/mame/drivers/dynadice.cpp b/src/mame/drivers/dynadice.cpp index 1f333e45a09..b63d9d9102e 100644 --- a/src/mame/drivers/dynadice.cpp +++ b/src/mame/drivers/dynadice.cpp @@ -54,9 +54,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_ay8910(*this, "ay8910") { } -void init_dynadice(); + void dynadice(machine_config &config); -void dynadice(machine_config &config); + void init_dynadice(); protected: virtual void machine_start() override; diff --git a/src/mame/drivers/e100.cpp b/src/mame/drivers/e100.cpp index 7b6229de096..b8c98e8083e 100644 --- a/src/mame/drivers/e100.cpp +++ b/src/mame/drivers/e100.cpp @@ -158,6 +158,10 @@ public: ,m_pia1_B(0) ,m_50hz(0) { } + + void e100(machine_config &config); + +private: required_device m_maincpu; required_device m_kbd_74145; required_shared_ptr m_videoram; @@ -179,9 +183,8 @@ public: DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w); DECLARE_WRITE_LINE_MEMBER( pia1_cb2_w); TIMER_DEVICE_CALLBACK_MEMBER(rtc_w); - void e100(machine_config &config); void e100_map(address_map &map); -protected: + required_ioport m_io_line0; required_ioport m_io_line1; required_ioport m_io_line2; diff --git a/src/mame/drivers/eacc.cpp b/src/mame/drivers/eacc.cpp index 1fe4b602144..898f51e2c4b 100644 --- a/src/mame/drivers/eacc.cpp +++ b/src/mame/drivers/eacc.cpp @@ -66,6 +66,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void eacc(machine_config &config); + +private: DECLARE_READ_LINE_MEMBER( eacc_cb1_r ); DECLARE_READ_LINE_MEMBER( eacc_distance_r ); DECLARE_READ_LINE_MEMBER( eacc_fuel_sensor_r ); @@ -75,9 +78,7 @@ public: DECLARE_WRITE8_MEMBER( eacc_segment_w ); TIMER_DEVICE_CALLBACK_MEMBER(eacc_cb1); TIMER_DEVICE_CALLBACK_MEMBER(eacc_nmi); - void eacc(machine_config &config); void eacc_mem(address_map &map); -private: uint8_t m_digit; bool m_cb1; bool m_cb2; diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp index 59eb98941ac..c279d9f4670 100644 --- a/src/mame/drivers/ec184x.cpp +++ b/src/mame/drivers/ec184x.cpp @@ -48,7 +48,7 @@ public: void init_ec1841(); -protected: +private: DECLARE_MACHINE_RESET(ec1841); DECLARE_READ8_MEMBER(memboard_r); DECLARE_WRITE8_MEMBER(memboard_w); diff --git a/src/mame/drivers/ecoinf1.cpp b/src/mame/drivers/ecoinf1.cpp index 2177021e6b1..39df2f05dab 100644 --- a/src/mame/drivers/ecoinf1.cpp +++ b/src/mame/drivers/ecoinf1.cpp @@ -21,11 +21,10 @@ public: void ecoinf1_older(machine_config &config); -protected: +private: void older_memmap(address_map &map); void older_portmap(address_map &map); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/ecoinf2.cpp b/src/mame/drivers/ecoinf2.cpp index 468db89c37c..c5061925d5e 100644 --- a/src/mame/drivers/ecoinf2.cpp +++ b/src/mame/drivers/ecoinf2.cpp @@ -37,7 +37,7 @@ public: void ecoinf2_oxo(machine_config &config); -protected: +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(ox_port5c_out_w); @@ -204,7 +204,6 @@ protected: void oxo_memmap(address_map &map); void oxo_portmap(address_map &map); -private: required_device m_maincpu; required_device_array m_reels; required_device m_meters; diff --git a/src/mame/drivers/ecoinf3.cpp b/src/mame/drivers/ecoinf3.cpp index 6b12003086d..090230279a4 100644 --- a/src/mame/drivers/ecoinf3.cpp +++ b/src/mame/drivers/ecoinf3.cpp @@ -42,7 +42,7 @@ public: void init_ecoinf3_swap(); void ecoinf3_pyramid(machine_config &config); -protected: +private: virtual void machine_start() override { m_lamp_outputs.resolve(); @@ -268,7 +268,6 @@ protected: void pyramid_memmap(address_map &map); void pyramid_portmap(address_map &map); -private: required_device m_maincpu; required_device_array m_reels; output_finder<16 * 16> m_lamp_outputs; diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp index 62423b80aa0..c96675a1740 100644 --- a/src/mame/drivers/ecoinfr.cpp +++ b/src/mame/drivers/ecoinfr.cpp @@ -64,6 +64,17 @@ public: m_digits(*this, "digit%u", 0U) { } + void ecoinfr(machine_config &config); + + void init_ecoinfrbr(); + void init_ecoinfr(); + void init_ecoinfrmab(); + + DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel1_opto_r); + DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel2_opto_r); + DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel3_opto_r); + +private: int irq_toggle; int m_optic_pattern; DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; } @@ -106,13 +117,7 @@ public: DECLARE_WRITE8_MEMBER(ec_port16_out_w); DECLARE_WRITE8_MEMBER(ec_port17_out_w); DECLARE_WRITE8_MEMBER(ec_port18_out_w); - DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel1_opto_r); - DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel2_opto_r); - DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel3_opto_r); - void init_ecoinfrbr(); - void init_ecoinfr(); - void init_ecoinfrmab(); virtual void machine_reset() override; virtual void machine_start() override { m_digits.resolve(); } TIMER_DEVICE_CALLBACK_MEMBER(ecoinfr_irq_timer); @@ -126,7 +131,6 @@ public: required_device m_reel2; required_device m_reel3; output_finder<16> m_digits; - void ecoinfr(machine_config &config); void memmap(address_map &map); void portmap(address_map &map); }; diff --git a/src/mame/drivers/egghunt.cpp b/src/mame/drivers/egghunt.cpp index 512e94d87c3..6b23e6b51de 100644 --- a/src/mame/drivers/egghunt.cpp +++ b/src/mame/drivers/egghunt.cpp @@ -64,6 +64,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void egghunt(machine_config &config); + +private: /* video-related */ tilemap_t *m_bg_tilemap; uint8_t m_vidram_bank; @@ -98,7 +101,6 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void egghunt(machine_config &config); void egghunt_map(address_map &map); void io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp index 683dba89b66..8c002b3b8d9 100644 --- a/src/mame/drivers/einstein.cpp +++ b/src/mame/drivers/einstein.cpp @@ -87,7 +87,11 @@ public: m_int(0) {} + void einstein(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(joystick_button); + +private: TIMER_DEVICE_CALLBACK_MEMBER(keyboard_timer_callback); DECLARE_WRITE8_MEMBER(keyboard_line_write); DECLARE_READ8_MEMBER(keyboard_data_read); @@ -107,14 +111,12 @@ public: DECLARE_WRITE_LINE_MEMBER(ardy_w); TIMER_DEVICE_CALLBACK_MEMBER(strobe_callback); - void einstein(machine_config &config); void einstein_io(address_map &map); void einstein_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; -private: void einstein_scan_keyboard(); required_device m_maincpu; diff --git a/src/mame/drivers/electra.cpp b/src/mame/drivers/electra.cpp index de5452e030d..59dca302ffa 100644 --- a/src/mame/drivers/electra.cpp +++ b/src/mame/drivers/electra.cpp @@ -50,21 +50,18 @@ public: { } + void electra(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void electra(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/elekscmp.cpp b/src/mame/drivers/elekscmp.cpp index dc31e2fe446..fb18bd2aeaa 100644 --- a/src/mame/drivers/elekscmp.cpp +++ b/src/mame/drivers/elekscmp.cpp @@ -40,7 +40,7 @@ public: void elekscmp(machine_config &config); -protected: +private: virtual void machine_start() override; DECLARE_READ8_MEMBER(keyboard_r); @@ -49,7 +49,6 @@ protected: void mem_map(address_map &map); -private: required_device m_maincpu; required_ioport_array<4> m_x; output_finder<8> m_digit; diff --git a/src/mame/drivers/elektronmono.cpp b/src/mame/drivers/elektronmono.cpp index 3e53bbdc7e2..92fbd07775d 100644 --- a/src/mame/drivers/elektronmono.cpp +++ b/src/mame/drivers/elektronmono.cpp @@ -125,13 +125,12 @@ public: void elektron(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; void elektron_map(address_map &map); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp index 46046860ea4..5fea91d80ba 100644 --- a/src/mame/drivers/elwro800.cpp +++ b/src/mame/drivers/elwro800.cpp @@ -50,6 +50,9 @@ public: { } + void elwro800(machine_config &config); + +private: /* for elwro800 */ /* RAM mapped at 0 */ uint8_t m_ram_at_0000; @@ -67,13 +70,12 @@ public: DECLARE_WRITE8_MEMBER(i8255_port_c_w); DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - void elwro800(machine_config &config); void elwro800_bank1(address_map &map); void elwro800_bank2(address_map &map); void elwro800_io(address_map &map); void elwro800_m1(address_map &map); void elwro800_mem(address_map &map); -protected: + required_device m_i8251; required_device m_i8255; required_device m_centronics; diff --git a/src/mame/drivers/embargo.cpp b/src/mame/drivers/embargo.cpp index 8bea4cc0d81..2468e88e6b5 100644 --- a/src/mame/drivers/embargo.cpp +++ b/src/mame/drivers/embargo.cpp @@ -19,6 +19,9 @@ public: m_videoram(*this, "videoram"), m_maincpu(*this, "maincpu") { } + void embargo(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; @@ -35,7 +38,6 @@ public: virtual void machine_reset() override; uint32_t screen_update_embargo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void embargo(machine_config &config); void main_data_map(address_map &map); void main_io_map(address_map &map); void main_map(address_map &map); diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp index 2469476458b..083abf1c038 100644 --- a/src/mame/drivers/enigma2.cpp +++ b/src/mame/drivers/enigma2.cpp @@ -71,6 +71,15 @@ public: m_colors(*this, "colors"), m_stars(*this, "stars"){ } + void enigma2(machine_config &config); + void enigma2a(machine_config &config); + + void init_enigma2(); + + DECLARE_CUSTOM_INPUT_MEMBER(p1_controls_r); + DECLARE_CUSTOM_INPUT_MEMBER(p2_controls_r); + +private: /* memory pointers */ required_shared_ptr m_videoram; @@ -95,11 +104,8 @@ public: DECLARE_READ8_MEMBER(dip_switch_r); DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w); - DECLARE_CUSTOM_INPUT_MEMBER(p1_controls_r); - DECLARE_CUSTOM_INPUT_MEMBER(p2_controls_r); DECLARE_READ8_MEMBER(sound_latch_r); DECLARE_WRITE8_MEMBER(protection_data_w); - void init_enigma2(); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_enigma2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -110,8 +116,6 @@ public: inline int vysnc_chain_counter_to_vpos( uint16_t counter ); void create_interrupt_timers( ); void start_interrupt_timers( ); - void enigma2(machine_config &config); - void enigma2a(machine_config &config); void enigma2_audio_cpu_map(address_map &map); void enigma2_main_cpu_map(address_map &map); void enigma2a_main_cpu_io_map(address_map &map); diff --git a/src/mame/drivers/enmirage.cpp b/src/mame/drivers/enmirage.cpp index ba646de66b0..4c1bd9d4873 100644 --- a/src/mame/drivers/enmirage.cpp +++ b/src/mame/drivers/enmirage.cpp @@ -67,19 +67,22 @@ public: { } - DECLARE_FLOPPY_FORMATS( floppy_formats ); + void mirage(machine_config &config); void init_mirage(); + +private: + + DECLARE_FLOPPY_FORMATS( floppy_formats ); + uint32_t screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(mirage_via_write_porta); DECLARE_WRITE8_MEMBER(mirage_via_write_portb); DECLARE_WRITE_LINE_MEMBER(mirage_doc_irq); DECLARE_READ8_MEMBER(mirage_adc_read); - void mirage(machine_config &config); void mirage_map(address_map &map); -protected: virtual void machine_reset() override; virtual void machine_start() override { m_digits.resolve(); } virtual void video_start() override; diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp index e0af1e6c5f3..e4d5ecb0ff0 100644 --- a/src/mame/drivers/ep64.cpp +++ b/src/mame/drivers/ep64.cpp @@ -193,6 +193,10 @@ public: m_y(*this, "Y%u", 0) { } + void ep128(machine_config &config); + void ep64(machine_config &config); + +private: required_device m_maincpu; required_device m_dave; required_device m_nick; @@ -217,8 +221,6 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); int m_centronics_busy; - void ep128(machine_config &config); - void ep64(machine_config &config); void dave_128k_mem(address_map &map); void dave_64k_mem(address_map &map); void dave_io(address_map &map); diff --git a/src/mame/drivers/ertictac.cpp b/src/mame/drivers/ertictac.cpp index 5d7532698ca..428d7c8d16b 100644 --- a/src/mame/drivers/ertictac.cpp +++ b/src/mame/drivers/ertictac.cpp @@ -36,12 +36,15 @@ public: ertictac_state(const machine_config &mconfig, device_type type, const char *tag) : archimedes_state(mconfig, type, tag) { } - DECLARE_READ32_MEMBER(ertictac_podule_r); + void ertictac(machine_config &config); + void init_ertictac(); + +private: + DECLARE_READ32_MEMBER(ertictac_podule_r); virtual void machine_start() override; virtual void machine_reset() override; INTERRUPT_GEN_MEMBER(ertictac_podule_irq); - void ertictac(machine_config &config); void ertictac_map(address_map &map); }; diff --git a/src/mame/drivers/esh.cpp b/src/mame/drivers/esh.cpp index 648bd14178c..a56b7911209 100644 --- a/src/mame/drivers/esh.cpp +++ b/src/mame/drivers/esh.cpp @@ -48,6 +48,12 @@ public: m_beep(*this, "beeper"), m_palette(*this, "palette") { } + + void esh(machine_config &config); + + void init_esh(); + +private: required_device m_laserdisc; required_device m_screen; required_shared_ptr m_tile_ram; @@ -58,7 +64,6 @@ public: DECLARE_WRITE8_MEMBER(misc_write); DECLARE_WRITE8_MEMBER(led_writes); DECLARE_WRITE8_MEMBER(nmi_line_w); - void init_esh(); bool m_nmi_enable; virtual void machine_start() override; DECLARE_PALETTE_INIT(esh); @@ -70,7 +75,6 @@ public: required_device m_beep; required_device m_palette; - void esh(machine_config &config); void z80_0_io(address_map &map); void z80_0_mem(address_map &map); protected: diff --git a/src/mame/drivers/esprit.cpp b/src/mame/drivers/esprit.cpp index 3255255302b..723ba2c5795 100644 --- a/src/mame/drivers/esprit.cpp +++ b/src/mame/drivers/esprit.cpp @@ -30,14 +30,17 @@ public: , m_palette(*this, "palette") { } - MC6845_UPDATE_ROW(crtc_update_row); - void init_init(); - void esprit(machine_config &config); void esprit3(machine_config &config); + + void init_init(); + +private: + MC6845_UPDATE_ROW(crtc_update_row); + void mem3_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; required_region_ptr m_p_chargen; required_shared_ptr m_p_videoram; diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp index 1f748a7989f..eeef45211c2 100644 --- a/src/mame/drivers/esq1.cpp +++ b/src/mame/drivers/esq1.cpp @@ -396,6 +396,13 @@ public: m_mdout(*this, "mdout") { } + void sq80(machine_config &config); + + void esq1(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(key_stroke); + +private: required_device m_maincpu; required_device m_duart; required_device m_filters; @@ -422,11 +429,8 @@ public: uint8_t m_seqram[0x10000]; uint8_t m_dosram[0x2000]; virtual void machine_reset() override; - DECLARE_INPUT_CHANGED_MEMBER(key_stroke); void send_through_panel(uint8_t data); - void esq1(machine_config &config); - void sq80(machine_config &config); void esq1_map(address_map &map); void sq80_map(address_map &map); }; diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp index b4740d4abc6..a78a52eecb2 100644 --- a/src/mame/drivers/esq5505.cpp +++ b/src/mame/drivers/esq5505.cpp @@ -182,6 +182,21 @@ public: , m_mdout(*this, "mdout") { } + void sq1(machine_config &config); + void vfx(machine_config &config); + void vfxsd(machine_config &config); + void eps(machine_config &config); + void vfx32(machine_config &config); + + void init_eps(); + void init_common(); + void init_sq1(); + void init_denib(); + DECLARE_INPUT_CHANGED_MEMBER(key_stroke); + IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback); + DECLARE_WRITE_LINE_MEMBER(esq5505_otis_irq); + +private: required_device m_maincpu; required_device m_duart; required_device m_esp; @@ -218,28 +233,14 @@ public: DECLARE_FLOPPY_FORMATS( floppy_formats ); - void sq1(machine_config &config); - void vfx(machine_config &config); - void vfxsd(machine_config &config); - void eps(machine_config &config); - void vfx32(machine_config &config); void eps_map(address_map &map); void sq1_map(address_map &map); void vfx_map(address_map &map); void vfxsd_map(address_map &map); -private: + uint16_t *m_rom, *m_ram; uint16_t m_analog_values[8]; -public: - void init_eps(); - void init_common(); - void init_sq1(); - void init_denib(); - DECLARE_INPUT_CHANGED_MEMBER(key_stroke); - IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback); - DECLARE_WRITE_LINE_MEMBER(esq5505_otis_irq); - //dmac DECLARE_WRITE8_MEMBER(dma_end); DECLARE_WRITE8_MEMBER(dma_error); diff --git a/src/mame/drivers/esqasr.cpp b/src/mame/drivers/esqasr.cpp index 8887d703443..787fec516a3 100644 --- a/src/mame/drivers/esqasr.cpp +++ b/src/mame/drivers/esqasr.cpp @@ -60,6 +60,12 @@ public: , m_sq1vfd(*this, "sq1vfd") { } + void asrx(machine_config &config); + void asr(machine_config &config); + + void init_asr(); + +private: required_device m_maincpu; optional_device m_esp; optional_device m_pump; @@ -68,11 +74,8 @@ public: virtual void machine_start() override; virtual void machine_reset() override; - void init_asr(); DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); DECLARE_READ16_MEMBER(esq5506_read_adc); - void asrx(machine_config &config); - void asr(machine_config &config); void asr_map(address_map &map); void asrx_map(address_map &map); }; diff --git a/src/mame/drivers/esqkt.cpp b/src/mame/drivers/esqkt.cpp index ddce73c5c93..89ee7e4d7af 100644 --- a/src/mame/drivers/esqkt.cpp +++ b/src/mame/drivers/esqkt.cpp @@ -114,6 +114,11 @@ public: , m_mdout(*this, "mdout") { } + void kt(machine_config &config); + + void init_kt(); + +private: required_device m_maincpu; required_device m_esp; required_device m_pump; @@ -132,11 +137,8 @@ public: uint8_t m_duart_io; bool m_bCalibSecondByte; -public: - void init_kt(); DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); DECLARE_READ16_MEMBER(esq5506_read_adc); - void kt(machine_config &config); void kt_map(address_map &map); }; diff --git a/src/mame/drivers/esqmr.cpp b/src/mame/drivers/esqmr.cpp index 800c8cf4947..5f1f387b7d8 100644 --- a/src/mame/drivers/esqmr.cpp +++ b/src/mame/drivers/esqmr.cpp @@ -217,16 +217,18 @@ public: , m_sq1vfd(*this, "sq1vfd") { } + void mr(machine_config &config); + + void init_mr(); + +private: required_device m_maincpu; required_device m_sq1vfd; virtual void machine_reset() override; -public: - void init_mr(); DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq); DECLARE_READ16_MEMBER(esq5506_read_adc); - void mr(machine_config &config); void mr_map(address_map &map); }; diff --git a/src/mame/drivers/et3400.cpp b/src/mame/drivers/et3400.cpp index 537cabe4378..e408b0a0d99 100644 --- a/src/mame/drivers/et3400.cpp +++ b/src/mame/drivers/et3400.cpp @@ -49,11 +49,13 @@ public: , m_digit(*this, "digit%u", 1U) { } + void et3400(machine_config &config); + DECLARE_WRITE_LINE_MEMBER(reset_key_w); DECLARE_WRITE_LINE_MEMBER(segment_test_w); - void et3400(machine_config &config); -protected: +private: + virtual void machine_start() override; DECLARE_READ8_MEMBER(keypad_r); @@ -66,7 +68,6 @@ protected: void mem_map(address_map &map); -private: required_device m_maincpu; required_device m_pia; required_device_array m_displatch; diff --git a/src/mame/drivers/ettrivia.cpp b/src/mame/drivers/ettrivia.cpp index bfc700855b1..38a778da095 100644 --- a/src/mame/drivers/ettrivia.cpp +++ b/src/mame/drivers/ettrivia.cpp @@ -49,6 +49,9 @@ public: { } + void ettrivia(machine_config &config); + +private: int m_palreg; int m_gfx_bank; int m_question_bank; @@ -76,7 +79,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device_array m_ay; - void ettrivia(machine_config &config); void cpu_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index 24591707333..e4e5fa9a0ac 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -50,6 +50,13 @@ public: m_port61(0) { } + void europc(machine_config &config); + void europc2(machine_config &config); + void euroxt(machine_config &config); + + void init_europc(); + +private: required_device m_maincpu; required_device m_mb; required_device m_keyboard; @@ -64,8 +71,6 @@ public: DECLARE_READ8_MEMBER( europc_rtc_r ); DECLARE_WRITE8_MEMBER( europc_rtc_w ); - void init_europc(); - void europc_rtc_set_time(); uint8_t m_jim_data[16]; @@ -84,9 +89,6 @@ public: TIMER_RTC }; static void cfg_builtin_720K(device_t *device); - void europc(machine_config &config); - void europc2(machine_config &config); - void euroxt(machine_config &config); void europc_io(address_map &map); void europc_map(address_map &map); }; diff --git a/src/mame/drivers/eva.cpp b/src/mame/drivers/eva.cpp index 9d8b35ca746..f60feaba058 100644 --- a/src/mame/drivers/eva.cpp +++ b/src/mame/drivers/eva.cpp @@ -39,6 +39,11 @@ public: m_tms6100(*this, "tms6100") { } + void tms5110_route(machine_config &config); + void eva11(machine_config &config); + void eva24(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_tms5100; @@ -56,11 +61,6 @@ public: DECLARE_WRITE16_MEMBER(eva11_write_o); DECLARE_WRITE16_MEMBER(eva11_write_r); - void tms5110_route(machine_config &config); - void eva11(machine_config &config); - void eva24(machine_config &config); - -protected: virtual void machine_start() override; virtual void machine_reset() override; }; diff --git a/src/mame/drivers/evmbug.cpp b/src/mame/drivers/evmbug.cpp index 497b3a105bb..d2f91e1c182 100644 --- a/src/mame/drivers/evmbug.cpp +++ b/src/mame/drivers/evmbug.cpp @@ -31,14 +31,16 @@ public: , m_terminal(*this, "terminal") { } + void evmbug(machine_config &config); + +private: DECLARE_READ8_MEMBER(rs232_r); DECLARE_WRITE8_MEMBER(rs232_w); void kbd_put(u8 data); - void evmbug(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + virtual void machine_reset() override; uint8_t m_term_data; uint8_t m_term_out; diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp index ce5f1a7acd0..dd0cca56e8a 100644 --- a/src/mame/drivers/excali64.cpp +++ b/src/mame/drivers/excali64.cpp @@ -72,6 +72,9 @@ public: , m_floppy1(*this, "fdc:1") { } + void excali64(machine_config &config); + +private: DECLARE_PALETTE_INIT(excali64); DECLARE_WRITE8_MEMBER(ppib_w); DECLARE_READ8_MEMBER(ppic_r); @@ -96,10 +99,9 @@ public: DECLARE_MACHINE_RESET(excali64); required_device m_palette; - void excali64(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + uint8_t *m_p_videoram; uint8_t *m_p_hiresram; uint8_t m_sys_status; diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp index 51fb2d18819..a8a4ebc061c 100644 --- a/src/mame/drivers/exelv.cpp +++ b/src/mame/drivers/exelv.cpp @@ -81,6 +81,10 @@ public: m_cart(*this, "cartslot") { } + void exeltel(machine_config &config); + void exl100(machine_config &config); + +private: required_device m_maincpu; required_device m_tms3556; required_device m_tms5220c; @@ -116,8 +120,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(exelv_hblank_interrupt); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( exelvision_cartridge ); - void exeltel(machine_config &config); - void exl100(machine_config &config); void tms7020_mem(address_map &map); void tms7040_mem(address_map &map); }; diff --git a/src/mame/drivers/exidyttl.cpp b/src/mame/drivers/exidyttl.cpp index 39dd60d4dab..55e9650b4a1 100644 --- a/src/mame/drivers/exidyttl.cpp +++ b/src/mame/drivers/exidyttl.cpp @@ -51,22 +51,20 @@ public: { } + void attack(machine_config &config); + void deathrac(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void attack(machine_config &config); - void deathrac(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/expro02.cpp b/src/mame/drivers/expro02.cpp index 25fed233d8a..8248bba7e71 100644 --- a/src/mame/drivers/expro02.cpp +++ b/src/mame/drivers/expro02.cpp @@ -235,6 +235,19 @@ public: m_spriteram(*this, "spriteram") { } + void supmodel(machine_config &config); + void zipzap(machine_config &config); + void fantasia(machine_config &config); + void fantsia2(machine_config &config); + void comad(machine_config &config); + void comad_noview2(machine_config &config); + void smissw(machine_config &config); + void galhustl(machine_config &config); + void expro02(machine_config &config); + + void init_expro02(); + +private: required_device m_maincpu; required_device m_palette; required_device m_screen; @@ -248,7 +261,6 @@ public: DECLARE_WRITE8_MEMBER(expro02_6295_bankswitch_w); - void init_expro02(); virtual void machine_start() override; DECLARE_PALETTE_INIT(expro02); @@ -260,15 +272,6 @@ public: // comad READ16_MEMBER(comad_timer_r); READ8_MEMBER(comad_okim6295_r); - void supmodel(machine_config &config); - void zipzap(machine_config &config); - void fantasia(machine_config &config); - void fantsia2(machine_config &config); - void comad(machine_config &config); - void comad_noview2(machine_config &config); - void smissw(machine_config &config); - void galhustl(machine_config &config); - void expro02(machine_config &config); void comad_map(address_map &map); void expro02_map(address_map &map); void expro02_video_base_map(address_map &map); diff --git a/src/mame/drivers/extrema.cpp b/src/mame/drivers/extrema.cpp index e60b9751585..b1cd04802f9 100644 --- a/src/mame/drivers/extrema.cpp +++ b/src/mame/drivers/extrema.cpp @@ -23,8 +23,10 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu") { } - required_device m_maincpu; void extrema(machine_config &config); + +private: + required_device m_maincpu; void extrema_map(address_map &map); void extrema_portmap(address_map &map); }; diff --git a/src/mame/drivers/ez2d.cpp b/src/mame/drivers/ez2d.cpp index 3cfefe829f2..23a73cf93ab 100644 --- a/src/mame/drivers/ez2d.cpp +++ b/src/mame/drivers/ez2d.cpp @@ -50,13 +50,15 @@ public: m_maincpu(*this, "maincpu") { } + void ez2d(machine_config &config); + +private: required_device m_maincpu; virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void ez2d(machine_config &config); void ez2d_map(address_map &map); }; diff --git a/src/mame/drivers/f-32.cpp b/src/mame/drivers/f-32.cpp index 1b13cafb36d..d8d328b591e 100644 --- a/src/mame/drivers/f-32.cpp +++ b/src/mame/drivers/f-32.cpp @@ -45,6 +45,10 @@ public: m_maincpu(*this, "maincpu") , m_videoram(*this, "videoram"){ } + void mosaicf2(machine_config &config); + void royalpk2(machine_config &config); + +private: /* devices */ required_device m_maincpu; @@ -53,8 +57,6 @@ public: DECLARE_READ32_MEMBER(f32_input_port_1_r); uint32_t screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mosaicf2(machine_config &config); - void royalpk2(machine_config &config); void common_map(address_map &map); void mosaicf2_io(address_map &map); void royalpk2_io(address_map &map); diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp index 8e4e2cafb67..21eab88fc63 100644 --- a/src/mame/drivers/famibox.cpp +++ b/src/mame/drivers/famibox.cpp @@ -75,7 +75,13 @@ public: m_maincpu(*this, "maincpu"), m_ppu(*this, "ppu") { } + void famibox(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r); + DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed); + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); +private: required_device m_maincpu; required_device m_ppu; @@ -106,9 +112,6 @@ public: DECLARE_READ8_MEMBER(famibox_IN1_r); DECLARE_READ8_MEMBER(famibox_system_r); DECLARE_WRITE8_MEMBER(famibox_system_w); - DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r); - DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -116,7 +119,6 @@ public: TIMER_CALLBACK_MEMBER(famicombox_gameplay_timer_callback); void famicombox_bankswitch(uint8_t bank); void famicombox_reset(); - void famibox(machine_config &config); void famibox_map(address_map &map); }; diff --git a/src/mame/drivers/fanucs15.cpp b/src/mame/drivers/fanucs15.cpp index 2d782a1c978..211abbef1a6 100644 --- a/src/mame/drivers/fanucs15.cpp +++ b/src/mame/drivers/fanucs15.cpp @@ -319,17 +319,19 @@ public: , m_convcpu(*this, "convcpu") // conversational 80286-8 { } + void fanucs15(machine_config &config); + +private: required_device m_maincpu; required_device m_pmccpu; required_device m_gfxcpu; required_device m_convcpu; - void fanucs15(machine_config &config); void convcpu_mem(address_map &map); void gfxcpu_mem(address_map &map); void maincpu_mem(address_map &map); void pmccpu_mem(address_map &map); -private: + virtual void machine_reset() override; }; diff --git a/src/mame/drivers/fanucspmg.cpp b/src/mame/drivers/fanucspmg.cpp index a245cf167c8..2d8e59ba8d7 100644 --- a/src/mame/drivers/fanucspmg.cpp +++ b/src/mame/drivers/fanucspmg.cpp @@ -585,6 +585,12 @@ public: , m_chargen(*this, CHARGEN_TAG) { } + void fanucspmgm(machine_config &config); + void fanucspmg(machine_config &config); + + void init_fanucspmg(); + +private: required_device m_maincpu; required_device m_subcpu; required_device m_usart0; @@ -631,17 +637,13 @@ public: MC6845_UPDATE_ROW(crtc_update_row); MC6845_UPDATE_ROW(crtc_update_row_mono); - void init_fanucspmg(); - uint8_t m_vram[24576]; uint8_t m_video_ctrl; - void fanucspmgm(machine_config &config); - void fanucspmg(machine_config &config); void maincpu_io(address_map &map); void maincpu_mem(address_map &map); void subcpu_mem(address_map &map); -private: + virtual void machine_reset() override; int32_t m_vram_bank; uint8_t m_vbl_ctrl; diff --git a/src/mame/drivers/fastinvaders.cpp b/src/mame/drivers/fastinvaders.cpp index ed1db1c39a7..f5694ef95aa 100644 --- a/src/mame/drivers/fastinvaders.cpp +++ b/src/mame/drivers/fastinvaders.cpp @@ -54,7 +54,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(in5); DECLARE_INPUT_CHANGED_MEMBER(in6); -protected: +private: DECLARE_WRITE8_MEMBER(io_40_w); DECLARE_READ8_MEMBER(io_60_r); @@ -67,7 +67,6 @@ protected: DECLARE_WRITE8_MEMBER(io_e0_w); DECLARE_WRITE8_MEMBER(io_f0_w); - DECLARE_READ_LINE_MEMBER(sid_read); virtual void video_start() override; @@ -87,7 +86,6 @@ protected: void fastinvaders_6845_io(address_map &map); void fastinvaders_8275_io(address_map &map); -private: required_device m_maincpu; required_device m_gfxdecode; required_shared_ptr m_videoram; diff --git a/src/mame/drivers/fb01.cpp b/src/mame/drivers/fb01.cpp index a4b9cdbda68..8926ec0f7c2 100644 --- a/src/mame/drivers/fb01.cpp +++ b/src/mame/drivers/fb01.cpp @@ -38,6 +38,9 @@ public: { } + void fb01(machine_config &config); + +private: DECLARE_WRITE_LINE_MEMBER(write_usart_clock); DECLARE_WRITE_LINE_MEMBER(midi_in); DECLARE_WRITE_LINE_MEMBER(ym2164_irq_w); @@ -50,10 +53,9 @@ public: DECLARE_PALETTE_INIT(fb01); HD44780_PIXEL_UPDATE(fb01_pixel_update); - void fb01(machine_config &config); void fb01_io(address_map &map); void fb01_mem(address_map &map); -private: + required_device m_maincpu; required_device m_upd71051; required_device m_midi_thru; diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp index ef225404654..9fe28d2645d 100644 --- a/src/mame/drivers/fc100.cpp +++ b/src/mame/drivers/fc100.cpp @@ -68,6 +68,11 @@ public: , m_keyboard(*this, "KEY.%u", 0) { } + void fc100(machine_config &config); + + void init_fc100(); + +private: DECLARE_READ8_MEMBER(mc6847_videoram_r); DECLARE_READ8_MEMBER(port00_r); DECLARE_WRITE8_MEMBER(port31_w); @@ -76,7 +81,6 @@ public: DECLARE_WRITE8_MEMBER(port60_w); DECLARE_WRITE8_MEMBER(port70_w); DECLARE_WRITE_LINE_MEMBER(txdata_callback); - void init_fc100(); TIMER_DEVICE_CALLBACK_MEMBER(timer_c); TIMER_DEVICE_CALLBACK_MEMBER(timer_p); TIMER_DEVICE_CALLBACK_MEMBER(timer_k); @@ -85,10 +89,9 @@ public: { return m_p_chargen[(ch * 16 + line) & 0xfff]; } - void fc100(machine_config &config); void fc100_io(address_map &map); void fc100_mem(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp index e0dcb408d73..848b0ed0de5 100644 --- a/src/mame/drivers/fccpu30.cpp +++ b/src/mame/drivers/fccpu30.cpp @@ -249,6 +249,28 @@ cpu30_state(const machine_config &mconfig, device_type type, const char *tag) { } + void cpu30(machine_config &config); + void cpu30x(machine_config &config); + void cpu30zbe(machine_config &config); + void cpu30be8(machine_config &config); + void cpu30za(machine_config &config); + void cpu30lite4(machine_config &config); + void cpu30xa(machine_config &config); + void cpu33(machine_config &config); + void cpu30lite8(machine_config &config); + void cpu30be16(machine_config &config); + + void init_cpu30x(); + void init_cpu30xa(); + void init_cpu30za(); + void init_cpu30zbe(); + void init_cpu30be8(); + void init_cpu30be16(); + void init_cpu30lite4(); + void init_cpu30lite8(); + void init_cpu33(); + +private: DECLARE_WRITE8_MEMBER (fdc_w); DECLARE_READ8_MEMBER (fdc_r); DECLARE_WRITE8_MEMBER (scsi_w); @@ -283,29 +305,9 @@ cpu30_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 init_cpu30x(); - void init_cpu30xa(); - void init_cpu30za(); - void init_cpu30zbe(); - void init_cpu30be8(); - void init_cpu30be16(); - void init_cpu30lite4(); - void init_cpu30lite8(); - void init_cpu33(); - void cpu30(machine_config &config); - void cpu30x(machine_config &config); - void cpu30zbe(machine_config &config); - void cpu30be8(machine_config &config); - void cpu30za(machine_config &config); - void cpu30lite4(machine_config &config); - void cpu30xa(machine_config &config); - void cpu33(machine_config &config); - void cpu30lite8(machine_config &config); - void cpu30be16(machine_config &config); + void cpu30_mem(address_map &map); -protected: -private: required_device m_maincpu; required_device m_ram; diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index fae3c8dfc9e..661eecca85e 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -477,6 +477,51 @@ public: m_div_config(*this, "div_config") { } + void csc(machine_config &config); + void su9(machine_config &config); + void rsc(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(su9_cpu_freq); + + void eas(machine_config &config); + void eag(machine_config &config); + void pc(machine_config &config); + void init_eag(); + + void sc9b(machine_config &config); + void sc9c(machine_config &config); + void sc9d(machine_config &config); + void playmatic(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(sc9c_cpu_freq); + + void sc12_map(address_map &map); + void sc12(machine_config &config); + void sc12b(machine_config &config); + + void as12(machine_config &config); + + void fexcel(machine_config &config); + void fexcelb(machine_config &config); + void fexcel4(machine_config &config); + void fexceld(machine_config &config); + void fexcelv(machine_config &config); + void fexcelp(machine_config &config); + void granits(machine_config &config); + void fdes2100(machine_config &config); + void fdes2000(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch); + + void fdes2000d(machine_config &config); + void fdes2100d(machine_config &config); + void init_fdesdis(); + + void fphantom(machine_config &config); + void init_fphantom(); + + void chesster(machine_config &config); + void kishon(machine_config &config); + void init_chesster(); + +private: // devices/pointers optional_device m_ppi8255; optional_memory_bank m_rombank; @@ -508,14 +553,10 @@ public: DECLARE_READ_LINE_MEMBER(csc_pia1_ca1_r); DECLARE_READ_LINE_MEMBER(csc_pia1_cb1_r); DECLARE_MACHINE_RESET(su9); - DECLARE_INPUT_CHANGED_MEMBER(su9_cpu_freq); void su9_set_cpu_freq(); void csc_map(address_map &map); void su9_map(address_map &map); void rsc_map(address_map &map); - void csc(machine_config &config); - void su9(machine_config &config); - void rsc(machine_config &config); // EAS, EAG, PC void eas_prepare_display(); @@ -525,13 +566,9 @@ public: DECLARE_WRITE8_MEMBER(eas_ppi_porta_w); DECLARE_READ8_MEMBER(eas_ppi_portb_r); DECLARE_WRITE8_MEMBER(eas_ppi_portc_w); - void init_eag(); void eas_map(address_map &map); void eag_map(address_map &map); void pc_map(address_map &map); - void eas(machine_config &config); - void eag(machine_config &config); - void pc(machine_config &config); // SC9 void sc9_prepare_display(); @@ -540,21 +577,13 @@ public: DECLARE_READ8_MEMBER(sc9_input_r); DECLARE_READ8_MEMBER(sc9d_input_r); DECLARE_MACHINE_RESET(sc9c); - DECLARE_INPUT_CHANGED_MEMBER(sc9c_cpu_freq); void sc9c_set_cpu_freq(); void sc9_map(address_map &map); void sc9d_map(address_map &map); - void sc9b(machine_config &config); - void sc9c(machine_config &config); - void sc9d(machine_config &config); - void playmatic(machine_config &config); // SC12 DECLARE_WRITE8_MEMBER(sc12_control_w); DECLARE_READ8_MEMBER(sc12_input_r); - void sc12_map(address_map &map); - void sc12(machine_config &config); - void sc12b(machine_config &config); // AS12 void as12_prepare_display(); @@ -562,10 +591,8 @@ public: DECLARE_WRITE8_MEMBER(as12_led_w); DECLARE_READ8_MEMBER(as12_input_r); void as12_map(address_map &map); - void as12(machine_config &config); // Excellence - DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch); DECLARE_READ8_MEMBER(fexcelv_speech_r); DECLARE_WRITE8_MEMBER(fexcel_ttl_w); DECLARE_READ8_MEMBER(fexcelb_ttl_r); @@ -573,39 +600,22 @@ public: void fexcel_map(address_map &map); void fexcelb_map(address_map &map); void fexcelp_map(address_map &map); - void fexcel(machine_config &config); - void fexcelb(machine_config &config); - void fexcel4(machine_config &config); - void fexceld(machine_config &config); - void fexcelv(machine_config &config); - void fexcelp(machine_config &config); - void granits(machine_config &config); - void fdes2100(machine_config &config); - void fdes2000(machine_config &config); // Designer Display DECLARE_WRITE8_MEMBER(fdesdis_control_w); DECLARE_WRITE8_MEMBER(fdesdis_lcd_w); DECLARE_READ8_MEMBER(fdesdis_input_r); - void init_fdesdis(); void fdesdis_map(address_map &map); - void fdes2000d(machine_config &config); - void fdes2100d(machine_config &config); // Phantom DECLARE_MACHINE_RESET(fphantom); - void init_fphantom(); void fphantom_map(address_map &map); - void fphantom(machine_config &config); // Chesster DECLARE_WRITE8_MEMBER(chesster_control_w); DECLARE_WRITE8_MEMBER(kishon_control_w); - void init_chesster(); void chesster_map(address_map &map); void kishon_map(address_map &map); - void chesster(machine_config &config); - void kishon(machine_config &config); }; diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp index 86cbd6a1429..5e9f18893ac 100644 --- a/src/mame/drivers/fidel68k.cpp +++ b/src/mame/drivers/fidel68k.cpp @@ -202,6 +202,22 @@ public: m_ram(*this, "ram") { } + void fex68k(machine_config &config); + void fex68km2(machine_config &config); + void fex68km3(machine_config &config); + + void fdes2265(machine_config &config); + void fdes2325(machine_config &config); + void init_fdes2265(); + + void eag(machine_config &config); + void eagv7(machine_config &config); + void eagv9(machine_config &config); + void eagv10(machine_config &config); + void eagv11(machine_config &config); + void init_eag(); + +private: optional_device m_ram; TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE); } @@ -212,22 +228,15 @@ public: void fex68k_map(address_map &map); void fex68km2_map(address_map &map); void fex68km3_map(address_map &map); - void fex68k(machine_config &config); - void fex68km2(machine_config &config); - void fex68km3(machine_config &config); // Designer Master DECLARE_WRITE8_MEMBER(fdes68k_control_w); DECLARE_READ8_MEMBER(fdes68k_input_r); DECLARE_WRITE8_MEMBER(fdes68k_lcd_w); - void init_fdes2265(); void fdes2265_map(address_map &map); void fdes2325_map(address_map &map); - void fdes2265(machine_config &config); - void fdes2325(machine_config &config); // EAG(6114/6117) - void init_eag(); void eag_prepare_display(); DECLARE_READ8_MEMBER(eag_input1_r); DECLARE_WRITE8_MEMBER(eag_leds_w); @@ -237,11 +246,6 @@ public: void eag_map(address_map &map); void eagv7_map(address_map &map); void eagv11_map(address_map &map); - void eag(machine_config &config); - void eagv7(machine_config &config); - void eagv9(machine_config &config); - void eagv10(machine_config &config); - void eagv11(machine_config &config); }; diff --git a/src/mame/drivers/fidelmcs48.cpp b/src/mame/drivers/fidelmcs48.cpp index 4b141e00c7f..78cdeb4b104 100644 --- a/src/mame/drivers/fidelmcs48.cpp +++ b/src/mame/drivers/fidelmcs48.cpp @@ -41,6 +41,9 @@ public: : fidelbase_state(mconfig, type, tag) { } + void sc6(machine_config &config); + +private: // SC6 void sc6_prepare_display(); DECLARE_WRITE8_MEMBER(sc6_mux_w); @@ -49,7 +52,6 @@ public: DECLARE_READ_LINE_MEMBER(sc6_input6_r); DECLARE_READ_LINE_MEMBER(sc6_input7_r); void sc6_map(address_map &map); - void sc6(machine_config &config); }; diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp index f031de3f5fb..08d930583ae 100644 --- a/src/mame/drivers/fidelz80.cpp +++ b/src/mame/drivers/fidelz80.cpp @@ -523,6 +523,22 @@ public: m_beeper(*this, "beeper") { } + void cc10(machine_config &config); + void vcc(machine_config &config); + + void bcc(machine_config &config); + + void scc(machine_config &config); + + void vsc(machine_config &config); + + void vbrc(machine_config &config); + + void dsc(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(reset_button); + +private: // devices/pointers optional_device m_mcu; optional_device m_z80pio; @@ -534,8 +550,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); } TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } - DECLARE_INPUT_CHANGED_MEMBER(reset_button); - // CC10 and VCC/UVC void vcc_prepare_display(); DECLARE_READ8_MEMBER(vcc_speech_r); @@ -550,22 +564,18 @@ public: void cc10_map(address_map &map); void vcc_io(address_map &map); void vcc_map(address_map &map); - void cc10(machine_config &config); - void vcc(machine_config &config); // BCC DECLARE_READ8_MEMBER(bcc_input_r); DECLARE_WRITE8_MEMBER(bcc_control_w); void bcc_io(address_map &map); void bcc_map(address_map &map); - void bcc(machine_config &config); // SCC DECLARE_READ8_MEMBER(scc_input_r); DECLARE_WRITE8_MEMBER(scc_control_w); void scc_io(address_map &map); void scc_map(address_map &map); - void scc(machine_config &config); // VSC void vsc_prepare_display(); @@ -579,7 +589,6 @@ public: DECLARE_WRITE8_MEMBER(vsc_pio_portb_w); void vsc_io(address_map &map); void vsc_map(address_map &map); - void vsc(machine_config &config); // VBRC void vbrc_prepare_display(); @@ -591,14 +600,12 @@ public: DECLARE_WRITE8_MEMBER(vbrc_ioexp_port_w); void vbrc_main_io(address_map &map); void vbrc_main_map(address_map &map); - void vbrc(machine_config &config); // DSC void dsc_prepare_display(); DECLARE_WRITE8_MEMBER(dsc_control_w); DECLARE_WRITE8_MEMBER(dsc_select_w); DECLARE_READ8_MEMBER(dsc_input_r); - void dsc(machine_config &config); void dsc_map(address_map &map); }; diff --git a/src/mame/drivers/fireball.cpp b/src/mame/drivers/fireball.cpp index 3358d417568..9e238bac175 100644 --- a/src/mame/drivers/fireball.cpp +++ b/src/mame/drivers/fireball.cpp @@ -55,6 +55,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void fireball(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(io_00_w); DECLARE_READ8_MEMBER(io_00_r); DECLARE_WRITE8_MEMBER(io_02_w); @@ -69,11 +72,9 @@ public: DECLARE_WRITE8_MEMBER(p3_w); TIMER_DEVICE_CALLBACK_MEMBER(int_0); - void fireball(machine_config &config); void fireball_io_map(address_map &map); void fireball_map(address_map &map); -private: uint8_t m_p1_data; uint8_t m_p3_data; uint8_t int_timing; diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp index 96985da6e33..bca86c59078 100644 --- a/src/mame/drivers/firebeat.cpp +++ b/src/mame/drivers/firebeat.cpp @@ -190,6 +190,15 @@ public: m_spuata(*this, "spu_ata") { } + void firebeat2(machine_config &config); + void firebeat(machine_config &config); + void firebeat_spu(machine_config &config); + + void init_ppd(); + void init_kbm(); + void init_ppp(); + +private: required_device m_maincpu; optional_device m_audiocpu; required_shared_ptr m_work_ram; @@ -214,9 +223,6 @@ public: int m_ibutton_read_subkey_ptr; uint8_t m_ibutton_subkey_data[0x40]; - void init_ppd(); - void init_kbm(); - void init_ppp(); DECLARE_MACHINE_START(firebeat); DECLARE_MACHINE_RESET(firebeat); DECLARE_VIDEO_START(firebeat); @@ -268,9 +274,6 @@ public: DECLARE_WRITE_LINE_MEMBER(gcu0_interrupt); DECLARE_WRITE_LINE_MEMBER(gcu1_interrupt); static void cdrom_config(device_t *device); - void firebeat2(machine_config &config); - void firebeat(machine_config &config); - void firebeat_spu(machine_config &config); void firebeat_map(address_map &map); void firebeat2_map(address_map &map); void spu_map(address_map &map); diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index 48f9133c52d..ed6e52dedcd 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -72,7 +72,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r); void firefox(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(firefox_disc_status_r); DECLARE_READ8_MEMBER(firefox_disc_data_r); DECLARE_WRITE8_MEMBER(firefox_disc_read_w); @@ -110,7 +110,6 @@ protected: void audio_map(address_map &map); void main_map(address_map &map); -private: required_device m_laserdisc; required_shared_ptr m_tileram; required_shared_ptr m_spriteram; diff --git a/src/mame/drivers/fk1.cpp b/src/mame/drivers/fk1.cpp index 4c18a77768a..c164f149125 100644 --- a/src/mame/drivers/fk1.cpp +++ b/src/mame/drivers/fk1.cpp @@ -28,6 +28,9 @@ public: m_ram(*this, RAM_TAG) { } + void fk1(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; @@ -63,7 +66,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(keyboard_callback); TIMER_DEVICE_CALLBACK_MEMBER(vsync_callback); IRQ_CALLBACK_MEMBER(fk1_irq_callback); - void fk1(machine_config &config); void fk1_io(address_map &map); void fk1_mem(address_map &map); }; diff --git a/src/mame/drivers/flicker.cpp b/src/mame/drivers/flicker.cpp index 9b25f7e335c..d7fb27cbe58 100644 --- a/src/mame/drivers/flicker.cpp +++ b/src/mame/drivers/flicker.cpp @@ -64,7 +64,7 @@ public: void flicker(machine_config &config); -protected: +private: virtual void driver_start() override; DECLARE_WRITE8_MEMBER(ram0_out) { m_ram0_output = data; } @@ -81,7 +81,6 @@ protected: void flicker_rom_ports(address_map &map); void flicker_status(address_map &map); -private: required_device m_maincpu; required_ioport m_testport; required_ioport m_coinport; diff --git a/src/mame/drivers/flipjack.cpp b/src/mame/drivers/flipjack.cpp index be6f8f72cc2..0e492642d8e 100644 --- a/src/mame/drivers/flipjack.cpp +++ b/src/mame/drivers/flipjack.cpp @@ -109,6 +109,11 @@ public: m_layer = 0; } + void flipjack(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(flipjack_coin); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_crtc; @@ -128,13 +133,11 @@ public: DECLARE_WRITE8_MEMBER(flipjack_soundlatch_w); DECLARE_WRITE8_MEMBER(flipjack_bank_w); DECLARE_WRITE8_MEMBER(flipjack_layer_w); - DECLARE_INPUT_CHANGED_MEMBER(flipjack_coin); DECLARE_READ8_MEMBER(flipjack_soundlatch_r); DECLARE_WRITE8_MEMBER(flipjack_portc_w); virtual void machine_start() override; DECLARE_PALETTE_INIT(flipjack); uint32_t screen_update_flipjack(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void flipjack(machine_config &config); void flipjack_main_io_map(address_map &map); void flipjack_main_map(address_map &map); void flipjack_sound_io_map(address_map &map); diff --git a/src/mame/drivers/flower.cpp b/src/mame/drivers/flower.cpp index 28883514234..31e1e357cb1 100644 --- a/src/mame/drivers/flower.cpp +++ b/src/mame/drivers/flower.cpp @@ -108,30 +108,32 @@ public: m_soundlatch(*this, "soundlatch") { } + void flower(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(coin_counter_w); DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(audio_nmi_mask_w); DECLARE_WRITE8_MEMBER(bgvram_w); DECLARE_WRITE8_MEMBER(fgvram_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); INTERRUPT_GEN_MEMBER(master_vblank_irq); INTERRUPT_GEN_MEMBER(slave_vblank_irq); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void flower(machine_config &config); void audio_map(address_map &map); void shared_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: required_device m_mastercpu; required_device m_slavecpu; required_device m_audiocpu; diff --git a/src/mame/drivers/flyball.cpp b/src/mame/drivers/flyball.cpp index 93b3a1dbf92..326d78a6b50 100644 --- a/src/mame/drivers/flyball.cpp +++ b/src/mame/drivers/flyball.cpp @@ -31,13 +31,6 @@ static constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK / 2; class flyball_state : public driver_device { public: - enum - { - TIMER_POT_ASSERT, - TIMER_POT_CLEAR, - TIMER_QUARTER - }; - flyball_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -51,7 +44,14 @@ public: void flyball(machine_config &config); -protected: +private: + enum + { + TIMER_POT_ASSERT, + TIMER_POT_CLEAR, + TIMER_QUARTER + }; + DECLARE_READ8_MEMBER(input_r); DECLARE_READ8_MEMBER(scanline_r); DECLARE_READ8_MEMBER(potsense_r); @@ -80,7 +80,6 @@ protected: void flyball_map(address_map &map); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; diff --git a/src/mame/drivers/fontwriter.cpp b/src/mame/drivers/fontwriter.cpp index 25de2f3b850..ff07676d05a 100644 --- a/src/mame/drivers/fontwriter.cpp +++ b/src/mame/drivers/fontwriter.cpp @@ -33,6 +33,9 @@ public: m_maincpu(*this, "maincpu") { } + void fontwriter(machine_config &config); + +private: virtual void machine_reset() override; virtual void machine_start() override; @@ -43,10 +46,8 @@ public: m_vbl ^= 0xff; return m_vbl; } - void fontwriter(machine_config &config); void io_map(address_map &map); void main_map(address_map &map); -protected: // devices required_device m_maincpu; diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp index d1708dbe89c..7975d77d33f 100644 --- a/src/mame/drivers/force68k.cpp +++ b/src/mame/drivers/force68k.cpp @@ -171,6 +171,10 @@ public: { } + void fccpu1_eprom_sockets(machine_config &config); + void fccpu1(machine_config &config); + +private: DECLARE_READ16_MEMBER (bootvect_r); DECLARE_READ16_MEMBER (vme_a24_r); DECLARE_WRITE16_MEMBER (vme_a24_w); @@ -202,10 +206,8 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER (exp1_load) { return force68k_load_cart(image, m_cart); } DECLARE_READ16_MEMBER (read16_rom); - void fccpu1_eprom_sockets(machine_config &config); - void fccpu1(machine_config &config); void force68k_mem(address_map &map); -private: + required_device m_maincpu; required_device m_rtc; required_device m_pit; diff --git a/src/mame/drivers/forte2.cpp b/src/mame/drivers/forte2.cpp index d279a2b1626..fc2db887852 100644 --- a/src/mame/drivers/forte2.cpp +++ b/src/mame/drivers/forte2.cpp @@ -55,7 +55,7 @@ public: void init_pesadelo(); void pesadelo(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; void io_mem(address_map &map); @@ -64,7 +64,6 @@ protected: DECLARE_READ8_MEMBER(forte2_ay8910_read_input); DECLARE_WRITE8_MEMBER(forte2_ay8910_set_input_mask); -private: required_device m_maincpu; uint8_t m_input_mask; diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp index 99f71e6294e..ddd5c879292 100644 --- a/src/mame/drivers/fp1100.cpp +++ b/src/mame/drivers/fp1100.cpp @@ -70,6 +70,11 @@ public: , m_cass(*this, "cassette") { } + void fp1100(machine_config &config); + + void init_fp1100(); + +private: DECLARE_WRITE8_MEMBER(main_bank_w); DECLARE_WRITE8_MEMBER(irq_mask_w); DECLARE_WRITE8_MEMBER(main_to_sub_w); @@ -87,16 +92,14 @@ public: DECLARE_WRITE_LINE_MEMBER(centronics_busy_w); DECLARE_WRITE_LINE_MEMBER(cass_w); INTERRUPT_GEN_MEMBER(vblank_irq); - void init_fp1100(); DECLARE_MACHINE_RESET(fp1100); MC6845_UPDATE_ROW(crtc_update_row); TIMER_DEVICE_CALLBACK_MEMBER(timer_c); required_device m_palette; - void fp1100(machine_config &config); void io_map(address_map &map); void main_map(address_map &map); void sub_map(address_map &map); -private: + uint8_t m_irq_mask; uint8_t m_main_latch; uint8_t m_sub_latch; diff --git a/src/mame/drivers/fp200.cpp b/src/mame/drivers/fp200.cpp index 261279d98d0..478ac7c536a 100644 --- a/src/mame/drivers/fp200.cpp +++ b/src/mame/drivers/fp200.cpp @@ -36,6 +36,11 @@ public: m_maincpu(*this, "maincpu") { } + void fp200(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(keyb_irq); + +private: // devices required_device m_maincpu; uint8_t m_io_type; @@ -63,16 +68,14 @@ public: DECLARE_WRITE8_MEMBER(fp200_lcd_w); DECLARE_READ8_MEMBER(fp200_keyb_r); DECLARE_WRITE8_MEMBER(fp200_keyb_w); - DECLARE_INPUT_CHANGED_MEMBER(keyb_irq); DECLARE_WRITE_LINE_MEMBER(sod_w); DECLARE_READ_LINE_MEMBER(sid_r); DECLARE_PALETTE_INIT(fp200); - void fp200(machine_config &config); void fp200_io(address_map &map); void fp200_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/fp6000.cpp b/src/mame/drivers/fp6000.cpp index 322385eb671..d5a9af2d406 100644 --- a/src/mame/drivers/fp6000.cpp +++ b/src/mame/drivers/fp6000.cpp @@ -38,6 +38,9 @@ public: m_palette(*this, "palette") { } + void fp6000(machine_config &config); + +private: uint8_t *m_char_rom; required_shared_ptr m_gvram; required_shared_ptr m_vram; @@ -63,7 +66,6 @@ public: required_devicem_crtc; required_device m_gfxdecode; required_device m_palette; - void fp6000(machine_config &config); void fp6000_io(address_map &map); void fp6000_map(address_map &map); }; diff --git a/src/mame/drivers/fresh.cpp b/src/mame/drivers/fresh.cpp index 71e19bf5fe6..469fad4bcc1 100644 --- a/src/mame/drivers/fresh.cpp +++ b/src/mame/drivers/fresh.cpp @@ -44,6 +44,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void fresh(machine_config &config); + +private: tilemap_t *m_bg_tilemap; tilemap_t *m_bg_2_tilemap; @@ -52,7 +55,6 @@ public: required_shared_ptr m_attr_videoram; required_shared_ptr m_attr_2_videoram; - DECLARE_WRITE16_MEMBER(fresh_bg_videoram_w); DECLARE_WRITE16_MEMBER(fresh_attr_videoram_w); TILE_GET_INFO_MEMBER(get_fresh_bg_tile_info); @@ -60,7 +62,6 @@ public: DECLARE_WRITE16_MEMBER(fresh_attr_2_videoram_w); TILE_GET_INFO_MEMBER(get_fresh_bg_2_tile_info); - uint16_t m_d30000_value; DECLARE_WRITE16_MEMBER( d30000_write ) @@ -102,7 +103,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void fresh(machine_config &config); void fresh_map(address_map &map); }; diff --git a/src/mame/drivers/fruitpc.cpp b/src/mame/drivers/fruitpc.cpp index a1dfa49a7a3..db9b0ab1be7 100644 --- a/src/mame/drivers/fruitpc.cpp +++ b/src/mame/drivers/fruitpc.cpp @@ -35,6 +35,9 @@ public: , m_inp4(*this, "INP4") { } + void fruitpc(machine_config &config); + +private: required_device m_isabus; required_ioport m_inp1; required_ioport m_inp2; @@ -44,7 +47,6 @@ public: DECLARE_READ8_MEMBER(fruit_inp_r); DECLARE_WRITE8_MEMBER(dma8237_1_dack_w); static void fruitpc_sb_conf(device_t *device); - void fruitpc(machine_config &config); void fruitpc_io(address_map &map); void fruitpc_map(address_map &map); }; diff --git a/src/mame/drivers/ft68m.cpp b/src/mame/drivers/ft68m.cpp index d645004ec7d..69517a972a8 100644 --- a/src/mame/drivers/ft68m.cpp +++ b/src/mame/drivers/ft68m.cpp @@ -29,11 +29,13 @@ public: { } + void ft68m(machine_config &config); + +private: DECLARE_READ16_MEMBER(switches_r); - void ft68m(machine_config &config); void mem_map(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/fungames.cpp b/src/mame/drivers/fungames.cpp index 3a18f4153d0..481c3ba604d 100644 --- a/src/mame/drivers/fungames.cpp +++ b/src/mame/drivers/fungames.cpp @@ -46,21 +46,18 @@ public: { } + void fungames(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void fungames(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/funkball.cpp b/src/mame/drivers/funkball.cpp index a53711f3416..69f8d5ccc11 100644 --- a/src/mame/drivers/funkball.cpp +++ b/src/mame/drivers/funkball.cpp @@ -94,6 +94,9 @@ public: , m_inputs(*this, "IN.%u", 0) { } + void funkball(machine_config &config); + +private: uint8_t m_funkball_config_reg_sel; uint8_t m_funkball_config_regs[256]; uint32_t m_cx5510_regs[256/4]; @@ -138,7 +141,6 @@ public: DECLARE_WRITE8_MEMBER(io20_w); virtual void machine_start() override; virtual void machine_reset() override; - void funkball(machine_config &config); void flashbank_map(address_map &map); void funkball_io(address_map &map); void funkball_map(address_map &map); diff --git a/src/mame/drivers/g627.cpp b/src/mame/drivers/g627.cpp index 582d6c0e10e..1f6f40b23c8 100644 --- a/src/mame/drivers/g627.cpp +++ b/src/mame/drivers/g627.cpp @@ -61,17 +61,19 @@ public: , m_digits(*this, "digit%u", 0U) { } + void g627(machine_config &config); + void init_v115(); void init_v117(); + +private: DECLARE_READ8_MEMBER(porta_r); DECLARE_READ8_MEMBER(portb_r); DECLARE_WRITE8_MEMBER(portc_w); DECLARE_WRITE8_MEMBER(disp_w); DECLARE_WRITE8_MEMBER(lamp_w); - void g627(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: uint8_t m_seg[6]; uint8_t m_portc; uint8_t m_motor; diff --git a/src/mame/drivers/gaelcopc.cpp b/src/mame/drivers/gaelcopc.cpp index ee16b48b4c0..600feb982a9 100644 --- a/src/mame/drivers/gaelcopc.cpp +++ b/src/mame/drivers/gaelcopc.cpp @@ -38,11 +38,12 @@ public: m_maincpu(*this, "maincpu") { } + void gaelcopc(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void gaelcopc(machine_config &config); void gaelcopc_map(address_map &map); -protected: // devices required_device m_maincpu; diff --git a/src/mame/drivers/gal3.cpp b/src/mame/drivers/gal3.cpp index 59ee0526f1c..96c2805c8ab 100644 --- a/src/mame/drivers/gal3.cpp +++ b/src/mame/drivers/gal3.cpp @@ -146,6 +146,9 @@ public: m_rso_shared_ram(*this, "rso_shared_ram"), m_generic_paletteram_16(*this, "paletteram") { } + void gal3(machine_config &config); + +private: uint32_t *m_mpSharedRAM0; //uint32_t *m_mpSharedRAM1; uint16_t m_namcos21_video_enable; @@ -166,7 +169,6 @@ public: DECLARE_VIDEO_START(gal3); uint32_t screen_update_gal3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void update_palette( ); - void gal3(machine_config &config); void cpu_mst_map(address_map &map); void cpu_slv_map(address_map &map); void psn_b1_cpu_map(address_map &map); diff --git a/src/mame/drivers/galgame.cpp b/src/mame/drivers/galgame.cpp index 82510c51f62..4d590ee07fe 100644 --- a/src/mame/drivers/galgame.cpp +++ b/src/mame/drivers/galgame.cpp @@ -26,6 +26,11 @@ public: m_maincpu(*this, "maincpu"), m_palette(*this, "palette") { } + void galaxygame(machine_config &config); + + void init_galaxygame(); + +private: uint16_t m_clk; uint16_t m_x; @@ -50,14 +55,12 @@ public: DECLARE_READ16_MEMBER(y_r); DECLARE_WRITE16_MEMBER(y_w); DECLARE_WRITE16_MEMBER(clk_w); - void init_galaxygame(); virtual void machine_reset() override; uint32_t screen_update_galaxygame(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(galaxygame_irq); IRQ_CALLBACK_MEMBER(galaxygame_irq_callback); required_device m_maincpu; required_device m_palette; - void galaxygame(machine_config &config); void galaxygame_map(address_map &map); }; diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp index eb7057827fb..7c12d616c14 100644 --- a/src/mame/drivers/galpani3.cpp +++ b/src/mame/drivers/galpani3.cpp @@ -90,9 +90,11 @@ public: m_priority_buffer(*this, "priority_buffer"), m_sprregs(*this, "sprregs"), m_sprite_bitmap(1024, 1024) - { } + void galpani3(machine_config &config); + +private: required_device m_maincpu; required_device_array m_grap2; required_device m_palette; @@ -114,12 +116,10 @@ public: DECLARE_WRITE16_MEMBER(galpani3_priority_buffer_scrollx_w); DECLARE_WRITE16_MEMBER(galpani3_priority_buffer_scrolly_w); - virtual void video_start() override; uint32_t screen_update_galpani3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(galpani3_vblank); - void galpani3(machine_config &config); void galpani3_map(address_map &map); }; diff --git a/src/mame/drivers/gamate.cpp b/src/mame/drivers/gamate.cpp index 17b89218194..0cf3423272d 100644 --- a/src/mame/drivers/gamate.cpp +++ b/src/mame/drivers/gamate.cpp @@ -32,6 +32,11 @@ public: , m_bios(*this, "bios") { } + void gamate(machine_config &config); + + void init_gamate(); + +private: DECLARE_READ8_MEMBER(card_available_check); DECLARE_READ8_MEMBER(card_available_set); DECLARE_WRITE8_MEMBER(card_reset); @@ -42,14 +47,11 @@ public: DECLARE_WRITE8_MEMBER(write_cart); DECLARE_READ8_MEMBER(read_cart); - void init_gamate(); - TIMER_CALLBACK_MEMBER(gamate_timer); TIMER_CALLBACK_MEMBER(gamate_timer2); - void gamate(machine_config &config); void gamate_mem(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/gambl186.cpp b/src/mame/drivers/gambl186.cpp index 9b950063e6c..9be11b6f8e0 100644 --- a/src/mame/drivers/gambl186.cpp +++ b/src/mame/drivers/gambl186.cpp @@ -64,6 +64,9 @@ public: m_maincpu(*this, "maincpu"), m_upd7759(*this, "7759") { } + void gambl186(machine_config &config); + +private: required_device m_maincpu; optional_device m_upd7759; int m_comms_state; @@ -79,7 +82,6 @@ public: DECLARE_WRITE16_MEMBER(comms_w); DECLARE_WRITE16_MEMBER(data_bank_w); DECLARE_WRITE16_MEMBER(upd_w); - void gambl186(machine_config &config); void gambl186_io(address_map &map); void gambl186_map(address_map &map); }; diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp index bd94a27b4b5..3f4b5d0473a 100644 --- a/src/mame/drivers/gamecstl.cpp +++ b/src/mame/drivers/gamecstl.cpp @@ -83,6 +83,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void gamecstl(machine_config &config); + + void init_gamecstl(); + +private: required_shared_ptr m_cga_ram; required_device m_gfxdecode; required_device m_palette; @@ -93,14 +98,12 @@ public: DECLARE_WRITE32_MEMBER(pnp_config_w); DECLARE_WRITE32_MEMBER(pnp_data_w); DECLARE_WRITE32_MEMBER(bios_ram_w); - void init_gamecstl(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_gamecstl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_char(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, int ch, int att, int x, int y); void intel82439tx_init(); - void gamecstl(machine_config &config); void gamecstl_io(address_map &map); void gamecstl_map(address_map &map); diff --git a/src/mame/drivers/gameking.cpp b/src/mame/drivers/gameking.cpp index c595ac31357..3d171a834e9 100644 --- a/src/mame/drivers/gameking.cpp +++ b/src/mame/drivers/gameking.cpp @@ -46,7 +46,13 @@ public: m_palette(*this, "palette") { } + void gameking(machine_config &config); + void gameking3(machine_config &config); + void gameking1(machine_config &config); + void init_gameking(); + +private: virtual void machine_start() override; virtual void machine_reset() override; DECLARE_PALETTE_INIT(gameking); @@ -70,11 +76,8 @@ public: uint8_t bank8000_cart; //34 bit 7; bits 0,1,.. a15,a16,.. uint8_t res2[0x4c]; }; - void gameking(machine_config &config); - void gameking3(machine_config &config); - void gameking1(machine_config &config); void gameking_mem(address_map &map); -protected: + required_device m_maincpu; required_device m_cart; required_ioport m_io_joy; diff --git a/src/mame/drivers/gammagic.cpp b/src/mame/drivers/gammagic.cpp index 99e9a2b4aa8..251e97e26e1 100644 --- a/src/mame/drivers/gammagic.cpp +++ b/src/mame/drivers/gammagic.cpp @@ -44,8 +44,10 @@ public: gammagic_state(const machine_config &mconfig, device_type type, const char *tag) : pcat_base_state(mconfig, type, tag) { } - virtual void machine_start() override; void gammagic(machine_config &config); + +private: + virtual void machine_start() override; void gammagic_io(address_map &map); void gammagic_map(address_map &map); }; diff --git a/src/mame/drivers/gamtor.cpp b/src/mame/drivers/gamtor.cpp index 7e00c6939b6..0e756f2d3f3 100644 --- a/src/mame/drivers/gamtor.cpp +++ b/src/mame/drivers/gamtor.cpp @@ -44,12 +44,11 @@ public: void init_gaminator(); void gaminator(machine_config &config); -protected: +private: void gaminator_map(address_map &map); DECLARE_WRITE32_MEMBER(gamtor_unk_w); -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp index 7e117d14259..d5ff6768dce 100644 --- a/src/mame/drivers/gei.cpp +++ b/src/mame/drivers/gei.cpp @@ -97,6 +97,23 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void findout(machine_config &config); + void suprpokr(machine_config &config); + void gselect(machine_config &config); + void amuse1(machine_config &config); + void gepoker(machine_config &config); + void jokpokera(machine_config &config); + void quizvid(machine_config &config); + void getrivia(machine_config &config); + void amuse(machine_config &config); + void sprtauth(machine_config &config); + + void init_setbank(); + void init_bank2k(); + void init_bank8k(); + void init_geimulti(); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(gei_drawctrl_w); @@ -114,23 +131,8 @@ public: DECLARE_WRITE8_MEMBER(nmi_w); DECLARE_READ8_MEMBER(portC_r); - void init_setbank(); - void init_bank2k(); - void init_bank8k(); - void init_geimulti(); - INTERRUPT_GEN_MEMBER(vblank_irq); - void findout(machine_config &config); - void suprpokr(machine_config &config); - void gselect(machine_config &config); - void amuse1(machine_config &config); - void gepoker(machine_config &config); - void jokpokera(machine_config &config); - void quizvid(machine_config &config); - void getrivia(machine_config &config); - void amuse(machine_config &config); - void sprtauth(machine_config &config); void amuse1_map(address_map &map); void amuse_map(address_map &map); void findout_map(address_map &map); @@ -140,11 +142,10 @@ public: void quizvid_map(address_map &map); void sprtauth_map(address_map &map); void suprpokr_map(address_map &map); -protected: + virtual void machine_start() override { m_lamps.resolve(); } virtual void video_start() override; -private: bitmap_ind16 m_bitmap; uint8_t m_drawctrl[3]; diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp index ce0285bdd7c..0913d3a5477 100644 --- a/src/mame/drivers/geneve.cpp +++ b/src/mame/drivers/geneve.cpp @@ -222,6 +222,13 @@ public: { } + void geneve_common(machine_config &config); + void geneve(machine_config &config); + void genmod(machine_config &config); + + void init_geneve(); + +private: // CRU (Communication Register Unit) handling DECLARE_READ8_MEMBER(cruread); DECLARE_WRITE8_MEMBER(cruwrite); @@ -256,7 +263,6 @@ public: DECLARE_WRITE_LINE_MEMBER( ext_ready ); DECLARE_WRITE_LINE_MEMBER( mapper_ready ); - void init_geneve(); virtual void machine_start() override; virtual void machine_reset() override; @@ -270,9 +276,6 @@ public: int m_ready_line; int m_ready_line1; - void geneve_common(machine_config &config); - void geneve(machine_config &config); - void genmod(machine_config &config); void crumap(address_map &map); void memmap(address_map &map); diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp index c02baeb4ecc..972567befd0 100644 --- a/src/mame/drivers/geniusiq.cpp +++ b/src/mame/drivers/geniusiq.cpp @@ -167,14 +167,6 @@ PCB - German Version: class geniusiq_state : public driver_device { public: - enum - { - IQ128_ROM_CART = 0x00, - IQ128_ROMLESS1_CART = 0x01, - IQ128_ROMLESS2_CART = 0x02, - IQ128_NO_CART = 0x03 - }; - geniusiq_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -185,6 +177,21 @@ public: m_cart_state(IQ128_NO_CART) { } + void iqtv512(machine_config &config); + void iq128(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(send_input); + DECLARE_INPUT_CHANGED_MEMBER(send_mouse_input); + +private: + enum + { + IQ128_ROM_CART = 0x00, + IQ128_ROMLESS1_CART = 0x01, + IQ128_ROMLESS2_CART = 0x02, + IQ128_NO_CART = 0x03 + }; + required_device m_maincpu; required_device m_cart; required_region_ptr m_rom; @@ -198,8 +205,6 @@ public: DECLARE_READ16_MEMBER(input_r); DECLARE_WRITE16_MEMBER(mouse_pos_w); - DECLARE_INPUT_CHANGED_MEMBER(send_input); - DECLARE_INPUT_CHANGED_MEMBER(send_mouse_input); DECLARE_WRITE16_MEMBER(gfx_base_w); DECLARE_WRITE16_MEMBER(gfx_dest_w); DECLARE_WRITE16_MEMBER(gfx_color_w); @@ -212,10 +217,8 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER( iq128_cart ); DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( iq128_cart ); - void iqtv512(machine_config &config); - void iq128(machine_config &config); void geniusiq_mem(address_map &map); -private: + uint16_t m_gfx_y; uint16_t m_gfx_x; uint32_t m_gfx_base; diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp index 326d8060398..ba0e77c2f39 100644 --- a/src/mame/drivers/genpc.cpp +++ b/src/mame/drivers/genpc.cpp @@ -22,7 +22,6 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") { } - required_device m_maincpu; void pcega(machine_config &config); void pcvga(machine_config &config); void pccga(machine_config &config); @@ -30,6 +29,9 @@ public: void pcmda(machine_config &config); void pc8_io(address_map &map); void pc8_map(address_map &map); + +private: + required_device m_maincpu; }; void genpc_state::pc8_map(address_map &map) diff --git a/src/mame/drivers/ggconnie.cpp b/src/mame/drivers/ggconnie.cpp index 95bed40b3b4..94ddd0f3338 100644 --- a/src/mame/drivers/ggconnie.cpp +++ b/src/mame/drivers/ggconnie.cpp @@ -40,14 +40,14 @@ public: , m_oki(*this, "oki") { } + void ggconnie(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(lamp_w); DECLARE_WRITE8_MEMBER(output_w); DECLARE_WRITE8_MEMBER(oki_bank_w); - void ggconnie(machine_config &config); - void sgx_io(address_map &map); void sgx_mem(address_map &map); -private: required_device m_rtc; required_device m_oki; }; diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp index e7707d5e60e..f63b608a318 100644 --- a/src/mame/drivers/ghosteo.cpp +++ b/src/mame/drivers/ghosteo.cpp @@ -99,6 +99,14 @@ public: { } + void ghosteo(machine_config &config); + void touryuu(machine_config &config); + void bballoon(machine_config &config); + + void init_touryuu(); + void init_bballoon(); + +private: required_device m_maincpu; required_device m_i2cmem; required_device m_s3c2410; @@ -117,8 +125,6 @@ public: DECLARE_WRITE8_MEMBER(qs1000_p3_w); int m_rom_pagesize; - void init_touryuu(); - void init_bballoon(); virtual void machine_start() override; virtual void machine_reset() override; DECLARE_READ32_MEMBER(s3c2410_gpio_port_r); @@ -131,9 +137,6 @@ public: DECLARE_WRITE_LINE_MEMBER(s3c2410_i2c_scl_w ); DECLARE_READ_LINE_MEMBER(s3c2410_i2c_sda_r ); DECLARE_WRITE_LINE_MEMBER(s3c2410_i2c_sda_w ); - void ghosteo(machine_config &config); - void touryuu(machine_config &config); - void bballoon(machine_config &config); void bballoon_map(address_map &map); void touryuu_map(address_map &map); }; diff --git a/src/mame/drivers/giclassic.cpp b/src/mame/drivers/giclassic.cpp index 1fc38437f3f..1391bbd5c24 100644 --- a/src/mame/drivers/giclassic.cpp +++ b/src/mame/drivers/giclassic.cpp @@ -64,6 +64,9 @@ public: m_palette(*this, "palette") { } + void giclassic(machine_config &config); + +private: required_device m_maincpu; required_device m_k056832; required_device m_palette; @@ -81,9 +84,8 @@ public: DECLARE_WRITE16_MEMBER(control_w); DECLARE_READ16_MEMBER(vrom_r); - void giclassic(machine_config &config); void satellite_main(address_map &map); -private: + uint8_t m_control; }; diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp index d876b075d15..9cb7cf0f043 100644 --- a/src/mame/drivers/gimix.cpp +++ b/src/mame/drivers/gimix.cpp @@ -98,6 +98,11 @@ public: , m_dma_dip(*this, "dma_s2") {} + void gimix(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(drive_size_cb); + +private: DECLARE_WRITE8_MEMBER(system_w); DECLARE_WRITE_LINE_MEMBER(irq_w); DECLARE_WRITE_LINE_MEMBER(fdc_irq_w); @@ -111,14 +116,12 @@ public: DECLARE_READ8_MEMBER(pia_pb_r); DECLARE_WRITE8_MEMBER(pia_pb_w); TIMER_DEVICE_CALLBACK_MEMBER(test_timer_w); - DECLARE_INPUT_CHANGED_MEMBER(drive_size_cb); DECLARE_FLOPPY_FORMATS(floppy_formats); - void gimix(machine_config &config); void gimix_banked_mem(address_map &map); void gimix_mem(address_map &map); -private: + uint8_t m_term_data; uint8_t m_dma_status; uint8_t m_dma_ctrl; diff --git a/src/mame/drivers/gizmondo.cpp b/src/mame/drivers/gizmondo.cpp index d357d8102be..f80098736aa 100644 --- a/src/mame/drivers/gizmondo.cpp +++ b/src/mame/drivers/gizmondo.cpp @@ -53,12 +53,17 @@ public: m_gf4500(*this, "gf4500") { } + void gizmondo(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(port_changed); + + void init_gizmondo(); + +private: uint32_t m_port[9]; required_device m_s3c2440; - void init_gizmondo(); virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_INPUT_CHANGED_MEMBER(port_changed); inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4); required_device m_maincpu; required_device m_gf4500; @@ -66,7 +71,6 @@ public: DECLARE_WRITE32_MEMBER(s3c2440_gpio_port_w); bitmap_rgb32 m_bitmap; - void gizmondo(machine_config &config); void gizmondo_map(address_map &map); }; diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp index d47c9322205..052c6e23d89 100644 --- a/src/mame/drivers/gkigt.cpp +++ b/src/mame/drivers/gkigt.cpp @@ -114,7 +114,10 @@ public: m_quart1(*this, "quart1") { } + void igt_gameking(machine_config &config); + void igt_ms72c(machine_config &config); +private: virtual void video_start() override; uint32_t screen_update_igt_gameking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -138,12 +141,10 @@ public: DECLARE_READ8_MEMBER(timer_r); DECLARE_READ16_MEMBER(version_r); - void igt_gameking(machine_config &config); - void igt_ms72c(machine_config &config); void igt_gameking_map(address_map &map); void igt_ms72c_map(address_map &map); void ramdac_map(address_map &map); -private: + required_device m_maincpu; required_device m_palette; required_device m_screen; diff --git a/src/mame/drivers/globalfr.cpp b/src/mame/drivers/globalfr.cpp index 82b8feb017e..efe6a2fe754 100644 --- a/src/mame/drivers/globalfr.cpp +++ b/src/mame/drivers/globalfr.cpp @@ -30,6 +30,9 @@ public: m_vfd(*this, "vfd") { } + void globalfr(machine_config &config); + +private: required_device m_maincpu; optional_device m_vfd; @@ -37,7 +40,6 @@ public: DECLARE_WRITE16_MEMBER(vfd_w); - void globalfr(machine_config &config); void globalfr_map(address_map &map); }; diff --git a/src/mame/drivers/globalvr.cpp b/src/mame/drivers/globalvr.cpp index 69d785f7267..a85b4201d3f 100644 --- a/src/mame/drivers/globalvr.cpp +++ b/src/mame/drivers/globalvr.cpp @@ -69,7 +69,7 @@ public: void globalvr(machine_config &config); void globalvr_map(address_map &map); -protected: +private: // devices required_device m_maincpu; diff --git a/src/mame/drivers/gluck2.cpp b/src/mame/drivers/gluck2.cpp index 30b96bdf874..aa6f886776e 100644 --- a/src/mame/drivers/gluck2.cpp +++ b/src/mame/drivers/gluck2.cpp @@ -214,6 +214,9 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram") { } + void gluck2(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; @@ -230,7 +233,6 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void gluck2(machine_config &config); void gluck2_map(address_map &map); }; diff --git a/src/mame/drivers/gmaster.cpp b/src/mame/drivers/gmaster.cpp index e5bdc0d7875..b99ac40a926 100644 --- a/src/mame/drivers/gmaster.cpp +++ b/src/mame/drivers/gmaster.cpp @@ -29,6 +29,11 @@ public: , m_cart(*this, "cartslot") { } + void gmaster(machine_config &config); + + void init_gmaster() { memset(&m_video, 0, sizeof(m_video)); memset(m_ram, 0, sizeof(m_ram)); } + +private: DECLARE_PALETTE_INIT(gmaster); DECLARE_READ8_MEMBER(gmaster_io_r); DECLARE_WRITE8_MEMBER(gmaster_io_w); @@ -41,12 +46,9 @@ public: DECLARE_WRITE8_MEMBER(gmaster_portc_w); DECLARE_WRITE8_MEMBER(gmaster_portd_w); DECLARE_WRITE8_MEMBER(gmaster_portf_w); - void init_gmaster() { memset(&m_video, 0, sizeof(m_video)); memset(m_ram, 0, sizeof(m_ram)); } uint32_t screen_update_gmaster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void gmaster(machine_config &config); void gmaster_mem(address_map &map); -private: virtual void machine_start() override; struct diff --git a/src/mame/drivers/go2000.cpp b/src/mame/drivers/go2000.cpp index e3f90597151..881280d7a13 100644 --- a/src/mame/drivers/go2000.cpp +++ b/src/mame/drivers/go2000.cpp @@ -56,6 +56,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void go2000(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_videoram2; @@ -73,7 +76,6 @@ public: virtual void machine_start() override; virtual void video_start() override; uint32_t screen_update_go2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void go2000(machine_config &config); void go2000_map(address_map &map); void go2000_sound_io(address_map &map); void go2000_sound_map(address_map &map); diff --git a/src/mame/drivers/gokidetor.cpp b/src/mame/drivers/gokidetor.cpp index b82ee741131..0c7d663bbf0 100644 --- a/src/mame/drivers/gokidetor.cpp +++ b/src/mame/drivers/gokidetor.cpp @@ -25,6 +25,9 @@ public: , m_maincpu(*this, "maincpu") { } + void gokidetor(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(out4_w); DECLARE_WRITE8_MEMBER(out5_w); DECLARE_WRITE8_MEMBER(out6_w); @@ -33,13 +36,11 @@ public: DECLARE_WRITE8_MEMBER(out9_w); DECLARE_WRITE8_MEMBER(ym_porta_w); - void gokidetor(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); -protected: + virtual void machine_start() override; -private: required_device m_maincpu; }; diff --git a/src/mame/drivers/goldngam.cpp b/src/mame/drivers/goldngam.cpp index 9bec3298129..05e13267b3d 100644 --- a/src/mame/drivers/goldngam.cpp +++ b/src/mame/drivers/goldngam.cpp @@ -247,9 +247,6 @@ class goldngam_state : public driver_device { - static constexpr int MOVIECRD_DUART1_IRQ = M68K_IRQ_2; - static constexpr int MOVIECRD_DUART2_IRQ = M68K_IRQ_4; - public: goldngam_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), @@ -260,6 +257,9 @@ public: void swisspkr(machine_config &config); void moviecrd(machine_config &config); private: + static constexpr int MOVIECRD_DUART1_IRQ = M68K_IRQ_2; + static constexpr int MOVIECRD_DUART2_IRQ = M68K_IRQ_4; + DECLARE_READ8_MEMBER(unk_r); virtual void video_start() override; DECLARE_PALETTE_INIT(goldngam); diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp index 8e3210db770..60e4be4ae95 100644 --- a/src/mame/drivers/goldnpkr.cpp +++ b/src/mame/drivers/goldnpkr.cpp @@ -1299,9 +1299,9 @@ class goldnpkr_state : public driver_device public: goldnpkr_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_colorram(*this, "colorram"), - m_maincpu(*this, "maincpu"), m_discrete(*this, "discrete"), m_ay8910(*this, "ay8910"), m_gfxdecode(*this, "gfxdecode"), @@ -1309,23 +1309,19 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_WRITE8_MEMBER(goldnpkr_videoram_w); - DECLARE_WRITE8_MEMBER(goldnpkr_colorram_w); - DECLARE_READ8_MEMBER(goldnpkr_mux_port_r); - DECLARE_READ8_MEMBER(pottnpkr_mux_port_r); - DECLARE_WRITE8_MEMBER(mux_w); - DECLARE_WRITE8_MEMBER(mux_port_w); - DECLARE_WRITE8_MEMBER(wcfalcon_snd_w); - DECLARE_WRITE8_MEMBER(lamps_a_w); - DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_WRITE8_MEMBER(pia0_a_w); - DECLARE_WRITE8_MEMBER(pia0_b_w); - DECLARE_WRITE8_MEMBER(pia1_a_w); - DECLARE_WRITE8_MEMBER(pia1_b_w); - DECLARE_READ8_MEMBER(pia0_a_r); - DECLARE_READ8_MEMBER(pia0_b_r); - DECLARE_READ8_MEMBER(pia1_a_r); - DECLARE_READ8_MEMBER(pia1_b_r); + void goldnpkr_base(machine_config &config); + void wildcard(machine_config &config); + void wildcrdb(machine_config &config); + void witchcrd(machine_config &config); + void mondial(machine_config &config); + void bchancep(machine_config &config); + void wcfalcon(machine_config &config); + void geniea(machine_config &config); + void genie(machine_config &config); + void pottnpkr(machine_config &config); + void goldnpkr(machine_config &config); + void wcrdxtnd(machine_config &config); + void init_vkdlswwh(); void init_icp1db(); void init_flcnw(); @@ -1346,29 +1342,44 @@ public: void init_vkdlswwr(); void init_vkdlswwv(); void init_bchancep(); + + DECLARE_READ8_MEMBER(pottnpkr_mux_port_r); + DECLARE_WRITE8_MEMBER(lamps_a_w); + DECLARE_WRITE8_MEMBER(sound_w); + DECLARE_WRITE8_MEMBER(mux_w); + + DECLARE_PALETTE_INIT(witchcrd); + + uint32_t screen_update_goldnpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + required_device m_maincpu; + + DECLARE_WRITE8_MEMBER(goldnpkr_videoram_w); + DECLARE_WRITE8_MEMBER(goldnpkr_colorram_w); + +private: + DECLARE_READ8_MEMBER(goldnpkr_mux_port_r); + DECLARE_WRITE8_MEMBER(mux_port_w); + DECLARE_WRITE8_MEMBER(wcfalcon_snd_w); + DECLARE_WRITE8_MEMBER(pia0_a_w); + DECLARE_WRITE8_MEMBER(pia0_b_w); + DECLARE_WRITE8_MEMBER(pia1_a_w); + DECLARE_WRITE8_MEMBER(pia1_b_w); + DECLARE_READ8_MEMBER(pia0_a_r); + DECLARE_READ8_MEMBER(pia0_b_r); + DECLARE_READ8_MEMBER(pia1_a_r); + DECLARE_READ8_MEMBER(pia1_b_r); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(wcrdxtnd_get_bg_tile_info); virtual void video_start() override; DECLARE_PALETTE_INIT(goldnpkr); - DECLARE_PALETTE_INIT(witchcrd); DECLARE_VIDEO_START(wcrdxtnd); DECLARE_PALETTE_INIT(wcrdxtnd); DECLARE_MACHINE_START(mondial); DECLARE_MACHINE_RESET(mondial); - uint32_t screen_update_goldnpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void goldnpkr_base(machine_config &config); - void wildcard(machine_config &config); - void wildcrdb(machine_config &config); - void witchcrd(machine_config &config); - void mondial(machine_config &config); - void bchancep(machine_config &config); - void wcfalcon(machine_config &config); - void geniea(machine_config &config); - void genie(machine_config &config); - void pottnpkr(machine_config &config); - void goldnpkr(machine_config &config); - void wcrdxtnd(machine_config &config); void bchancep_map(address_map &map); void genie_map(address_map &map); void goldnpkr_map(address_map &map); @@ -1382,13 +1393,11 @@ public: void witchcrd_falcon_map(address_map &map); void witchcrd_map(address_map &map); -protected: virtual void machine_start() override { m_lamps.resolve(); } required_shared_ptr m_videoram; required_shared_ptr m_colorram; - required_device m_maincpu; optional_device m_discrete; optional_device m_ay8910; required_device m_gfxdecode; @@ -1412,15 +1421,16 @@ public: m_portc_data(0x0f) { } + void megadpkr(machine_config &config); + +private: DECLARE_READ8_MEMBER(cpubank_decrypt_r); DECLARE_WRITE8_MEMBER(mcu_command_w); DECLARE_WRITE8_MEMBER(mcu_portb_w); DECLARE_WRITE8_MEMBER(mcu_portc_w); - void megadpkr(machine_config &config); void megadpkr_banked_map(address_map &map); void megadpkr_map(address_map &map); -private: required_region_ptr m_cpubank; required_device m_mcu; diff --git a/src/mame/drivers/good.cpp b/src/mame/drivers/good.cpp index c95d7ba0c0d..15516836133 100644 --- a/src/mame/drivers/good.cpp +++ b/src/mame/drivers/good.cpp @@ -52,6 +52,9 @@ public: { } + void good(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_fg_tilemapram; required_shared_ptr m_bg_tilemapram; @@ -68,7 +71,6 @@ public: uint32_t screen_update_good(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; - void good(machine_config &config); void good_map(address_map &map); }; diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp index f91567554bb..b582ddbe1a6 100644 --- a/src/mame/drivers/goodejan.cpp +++ b/src/mame/drivers/goodejan.cpp @@ -97,6 +97,10 @@ public: m_sc3_vram(*this, "sc3_vram"), m_spriteram16(*this, "sprite_ram") { } + void totmejan(machine_config &config); + void goodejan(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; @@ -139,8 +143,6 @@ public: void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri); virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void totmejan(machine_config &config); - void goodejan(machine_config &config); void common_io_map(address_map &map); void goodejan_io_map(address_map &map); void goodejan_map(address_map &map); diff --git a/src/mame/drivers/gp2x.cpp b/src/mame/drivers/gp2x.cpp index 20fc43bf507..d92c64215f7 100644 --- a/src/mame/drivers/gp2x.cpp +++ b/src/mame/drivers/gp2x.cpp @@ -35,6 +35,9 @@ public: m_maincpu_region(*this, "maincpu"), m_ram(*this, "ram"){ } + void gp2x(machine_config &config); + +private: required_device m_maincpu; required_region_ptr m_maincpu_region; DECLARE_READ32_MEMBER(gp2x_lcdc_r); @@ -56,7 +59,6 @@ public: uint32_t m_nand_ptr_temp; uint32_t m_timer; uint32_t screen_update_gp2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void gp2x(machine_config &config); void gp2x_map(address_map &map); }; diff --git a/src/mame/drivers/gp_1.cpp b/src/mame/drivers/gp_1.cpp index 7b9c91b54ba..4c97a07e8e4 100644 --- a/src/mame/drivers/gp_1.cpp +++ b/src/mame/drivers/gp_1.cpp @@ -52,17 +52,20 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gp_1(machine_config &config); + void gp_1s(machine_config &config); + void init_gp_1(); + +private: DECLARE_WRITE8_MEMBER(porta_w); DECLARE_WRITE8_MEMBER(portas_w); DECLARE_WRITE8_MEMBER(portc_w); DECLARE_READ8_MEMBER(portb_r); TIMER_DEVICE_CALLBACK_MEMBER(zero_timer); - void gp_1(machine_config &config); - void gp_1s(machine_config &config); void gp_1_io(address_map &map); void gp_1_map(address_map &map); -private: + uint8_t m_u14; uint8_t m_digit; uint8_t m_segment[16]; diff --git a/src/mame/drivers/gp_2.cpp b/src/mame/drivers/gp_2.cpp index d3ba29e39b8..2460596b0a5 100644 --- a/src/mame/drivers/gp_2.cpp +++ b/src/mame/drivers/gp_2.cpp @@ -61,15 +61,18 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gp_2(machine_config &config); + void init_gp_2(); + +private: DECLARE_WRITE8_MEMBER(porta_w); DECLARE_WRITE8_MEMBER(portc_w); DECLARE_READ8_MEMBER(portb_r); TIMER_DEVICE_CALLBACK_MEMBER(zero_timer); - void gp_2(machine_config &config); void gp_2_io(address_map &map); void gp_2_map(address_map &map); -private: + uint8_t m_u14; uint8_t m_digit; uint8_t m_segment[16]; diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp index a5943b97727..f3d7b1a5ab7 100644 --- a/src/mame/drivers/gpworld.cpp +++ b/src/mame/drivers/gpworld.cpp @@ -66,6 +66,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void gpworld(machine_config &config); + + void init_gpworld(); + +private: uint8_t m_nmi_enable; uint8_t m_start_lamp; uint8_t m_ldp_read_latch; @@ -82,7 +87,6 @@ public: DECLARE_WRITE8_MEMBER(misc_io_write); DECLARE_WRITE8_MEMBER(brake_gas_write); DECLARE_WRITE8_MEMBER(palette_write); - void init_gpworld(); virtual void machine_start() override; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_callback); @@ -93,10 +97,9 @@ public: required_device m_gfxdecode; required_device m_palette; - void gpworld(machine_config &config); void mainmem(address_map &map); void mainport(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/grfd2301.cpp b/src/mame/drivers/grfd2301.cpp index 81b1c036428..967a1a1161a 100644 --- a/src/mame/drivers/grfd2301.cpp +++ b/src/mame/drivers/grfd2301.cpp @@ -46,12 +46,14 @@ public: , m_p_chargen(*this, "chargen") { } + void grfd2301(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void grfd2301(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_device m_maincpu; diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp index 5314bd2a4a2..f784ba8f1ea 100644 --- a/src/mame/drivers/gridcomp.cpp +++ b/src/mame/drivers/gridcomp.cpp @@ -111,6 +111,16 @@ public: , m_ram(*this, RAM_TAG) { } + void grid1129(machine_config &config); + void grid1131(machine_config &config); + void grid1121(machine_config &config); + void grid1139(machine_config &config); + void grid1109(machine_config &config); + void grid1101(machine_config &config); + + void init_gridcomp(); + +private: required_device m_maincpu; required_device m_osp; required_device m_modem; @@ -118,7 +128,6 @@ public: required_device m_speaker; required_device m_ram; - void init_gridcomp(); DECLARE_MACHINE_START(gridcomp); DECLARE_MACHINE_RESET(gridcomp); @@ -136,16 +145,10 @@ public: void kbd_put(u16 data); - void grid1129(machine_config &config); - void grid1131(machine_config &config); - void grid1121(machine_config &config); - void grid1139(machine_config &config); - void grid1109(machine_config &config); - void grid1101(machine_config &config); void grid1101_io(address_map &map); void grid1101_map(address_map &map); void grid1121_map(address_map &map); -private: + bool m_kbd_ready; uint16_t m_kbd_data; diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp index 10fe8c0aab2..de502ce603b 100644 --- a/src/mame/drivers/gstream.cpp +++ b/src/mame/drivers/gstream.cpp @@ -155,6 +155,17 @@ public: m_toggle = 0; } + void x2222(machine_config &config); + void gstream(machine_config &config); + + void init_gstream(); + void init_x2222(); + + DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_service_r); + DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r); + DECLARE_CUSTOM_INPUT_MEMBER(x2222_toggle_r); + +private: /* devices */ required_device m_maincpu; optional_device_array m_oki; @@ -182,11 +193,6 @@ public: DECLARE_READ32_MEMBER(gstream_speedup_r); DECLARE_READ32_MEMBER(x2222_speedup_r); DECLARE_READ32_MEMBER(x2222_speedup2_r); - DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_service_r); - DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r); - DECLARE_CUSTOM_INPUT_MEMBER(x2222_toggle_r); - void init_gstream(); - void init_x2222(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -200,8 +206,6 @@ public: required_device m_gfxdecode; required_device m_palette; - void x2222(machine_config &config); - void gstream(machine_config &config); void gstream_32bit_map(address_map &map); void gstream_io(address_map &map); void x2222_32bit_map(address_map &map); diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp index 0e1f43c9a44..f7fab557739 100644 --- a/src/mame/drivers/gticlub.cpp +++ b/src/mame/drivers/gticlub.cpp @@ -273,7 +273,17 @@ public: { } + void thunderh(machine_config &config); + void hangplt(machine_config &config); + void slrasslt(machine_config &config); + void gticlub(machine_config &config); + + void init_hangplt_common(); + void init_hangplt(); + void init_hangpltu(); + void init_gticlub(); +private: // TODO: Needs verification on real hardware static const int m_sound_timer_usec = 2400; @@ -320,10 +330,6 @@ public: DECLARE_WRITE16_MEMBER(soundtimer_en_w); DECLARE_WRITE16_MEMBER(soundtimer_count_w); - void init_hangplt_common(); - void init_hangplt(); - void init_hangpltu(); - void init_gticlub(); DECLARE_MACHINE_START(gticlub); DECLARE_MACHINE_RESET(gticlub); DECLARE_MACHINE_RESET(hangplt); @@ -337,17 +343,13 @@ public: uint32_t screen_update_lscreen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t screen_update_rscreen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void thunderh(machine_config &config); - void hangplt(machine_config &config); - void slrasslt(machine_config &config); - void gticlub(machine_config &config); void gticlub_map(address_map &map); void hangplt_map(address_map &map); void hangplt_sharc0_map(address_map &map); void hangplt_sharc1_map(address_map &map); void sharc_map(address_map &map); void sound_memmap(address_map &map); -private: + void gticlub_led_setreg(int offset, uint8_t data); uint8_t m_gticlub_led_reg[2]; diff --git a/src/mame/drivers/gts1.cpp b/src/mame/drivers/gts1.cpp index c29117b2465..1d83ccd32ce 100644 --- a/src/mame/drivers/gts1.cpp +++ b/src/mame/drivers/gts1.cpp @@ -92,7 +92,7 @@ public: void gts1(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER (gts1_solenoid_r); DECLARE_WRITE8_MEMBER(gts1_solenoid_w); DECLARE_READ8_MEMBER (gts1_switches_r); @@ -114,7 +114,6 @@ protected: void gts1_data(address_map &map); void gts1_io(address_map &map); -private: required_device m_maincpu; required_ioport_array<3> m_dips; required_ioport_array<5> m_switches; diff --git a/src/mame/drivers/gts3.cpp b/src/mame/drivers/gts3.cpp index 28e5ae51691..118e847eb47 100644 --- a/src/mame/drivers/gts3.cpp +++ b/src/mame/drivers/gts3.cpp @@ -48,16 +48,20 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gts3(machine_config &config); + void init_gts3(); + + DECLARE_INPUT_CHANGED_MEMBER(test_inp); + +private: DECLARE_WRITE8_MEMBER(segbank_w); DECLARE_READ8_MEMBER(u4a_r); DECLARE_READ8_MEMBER(u4b_r); DECLARE_WRITE8_MEMBER(u4b_w); DECLARE_WRITE_LINE_MEMBER(nmi_w); - DECLARE_INPUT_CHANGED_MEMBER(test_inp); - void gts3(machine_config &config); void gts3_map(address_map &map); -private: + bool m_dispclk; bool m_lampclk; uint8_t m_digit; diff --git a/src/mame/drivers/gts3a.cpp b/src/mame/drivers/gts3a.cpp index 14e2b649a63..7381d4c723f 100644 --- a/src/mame/drivers/gts3a.cpp +++ b/src/mame/drivers/gts3a.cpp @@ -42,7 +42,13 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gts3a(machine_config &config); + void init_gts3a(); + + DECLARE_INPUT_CHANGED_MEMBER(test_inp); + +private: DECLARE_WRITE8_MEMBER(segbank_w); DECLARE_READ8_MEMBER(u4a_r); DECLARE_READ8_MEMBER(u4b_r); @@ -50,14 +56,12 @@ public: DECLARE_READ8_MEMBER(dmd_r); DECLARE_WRITE8_MEMBER(dmd_w); DECLARE_WRITE_LINE_MEMBER(nmi_w); - DECLARE_INPUT_CHANGED_MEMBER(test_inp); MC6845_UPDATE_ROW(crtc_update_row); DECLARE_PALETTE_INIT(gts3a); required_device m_palette; - void gts3a(machine_config &config); void gts3a_dmd_map(address_map &map); void gts3a_map(address_map &map); -private: + bool m_dispclk; bool m_lampclk; uint8_t m_digit; diff --git a/src/mame/drivers/gts80.cpp b/src/mame/drivers/gts80.cpp index 97f3dde44fc..49a32b8a495 100644 --- a/src/mame/drivers/gts80.cpp +++ b/src/mame/drivers/gts80.cpp @@ -41,7 +41,14 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gts80(machine_config &config); + void gts80_ss(machine_config &config); + void gts80_s(machine_config &config); + void gts80_hh(machine_config &config); + void init_gts80(); + +private: DECLARE_READ8_MEMBER(port1a_r); DECLARE_READ8_MEMBER(port2a_r); DECLARE_WRITE8_MEMBER(port1b_w); @@ -49,12 +56,8 @@ public: DECLARE_WRITE8_MEMBER(port2b_w); DECLARE_WRITE8_MEMBER(port3a_w); DECLARE_WRITE8_MEMBER(port3b_w); - void gts80(machine_config &config); - void gts80_ss(machine_config &config); - void gts80_s(machine_config &config); - void gts80_hh(machine_config &config); void gts80_map(address_map &map); -private: + uint8_t m_port2; uint8_t m_segment; uint8_t m_lamprow; diff --git a/src/mame/drivers/gts80a.cpp b/src/mame/drivers/gts80a.cpp index 44c1001934e..02b028950e7 100644 --- a/src/mame/drivers/gts80a.cpp +++ b/src/mame/drivers/gts80a.cpp @@ -33,7 +33,13 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gts80a(machine_config &config); + void gts80a_s(machine_config &config); + void gts80a_ss(machine_config &config); + void init_gts80a(); + +private: DECLARE_READ8_MEMBER(port1a_r); DECLARE_READ8_MEMBER(port2a_r); DECLARE_WRITE8_MEMBER(port1b_w); @@ -41,11 +47,8 @@ public: DECLARE_WRITE8_MEMBER(port2b_w); DECLARE_WRITE8_MEMBER(port3a_w); DECLARE_WRITE8_MEMBER(port3b_w); - void gts80a(machine_config &config); - void gts80a_s(machine_config &config); - void gts80a_ss(machine_config &config); void gts80a_map(address_map &map); -private: + uint8_t m_port2; uint8_t m_segment; uint8_t m_lamprow; diff --git a/src/mame/drivers/gts80b.cpp b/src/mame/drivers/gts80b.cpp index 5c052239ba6..e8cc0c3bddf 100644 --- a/src/mame/drivers/gts80b.cpp +++ b/src/mame/drivers/gts80b.cpp @@ -34,7 +34,16 @@ public: , m_digits(*this, "digit%u", 0U) { } + void gts80b_s2(machine_config &config); + void gts80b_s3(machine_config &config); + void bonebstr(machine_config &config); + void gts80b_s1(machine_config &config); + void gts80b_s(machine_config &config); + void gts80b(machine_config &config); + void init_gts80b(); + +private: DECLARE_READ8_MEMBER(port1a_r); DECLARE_READ8_MEMBER(port2a_r); DECLARE_WRITE8_MEMBER(port1b_w); @@ -42,14 +51,8 @@ public: DECLARE_WRITE8_MEMBER(port2b_w); DECLARE_WRITE8_MEMBER(port3a_w); DECLARE_WRITE8_MEMBER(port3b_w); - void gts80b_s2(machine_config &config); - void gts80b_s3(machine_config &config); - void bonebstr(machine_config &config); - void gts80b_s1(machine_config &config); - void gts80b_s(machine_config &config); - void gts80b(machine_config &config); void gts80b_map(address_map &map); -private: + uint8_t m_dispcmd; uint8_t m_port2a; uint8_t m_port2b; diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp index 8104de2f956..eb057f4fdc9 100644 --- a/src/mame/drivers/guab.cpp +++ b/src/mame/drivers/guab.cpp @@ -82,6 +82,11 @@ public: m_sound_buffer(0), m_sound_latch(false) { } + void guab(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: EF9369_COLOR_UPDATE(ef9369_color_update); DECLARE_WRITE16_MEMBER(tms34061_w); DECLARE_READ16_MEMBER(tms34061_r); @@ -99,16 +104,14 @@ public: DECLARE_READ8_MEMBER(watchdog_r); DECLARE_WRITE8_MEMBER(watchdog_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_FLOPPY_FORMATS(floppy_formats); - void guab(machine_config &config); void guab_map(address_map &map); -protected: + virtual void machine_start() override; -private: + required_device m_maincpu; required_device m_tms34061; required_device m_sn; diff --git a/src/mame/includes/dai.h b/src/mame/includes/dai.h index 04f5dbb40a1..85462bdb2f3 100644 --- a/src/mame/includes/dai.h +++ b/src/mame/includes/dai.h @@ -23,12 +23,6 @@ class dai_state : public driver_device { public: - enum - { - TIMER_BOOTSTRAP, - TIMER_TMS5501 - }; - dai_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -39,6 +33,15 @@ public: m_ram(*this, RAM_TAG), m_palette(*this, "palette") { } + void dai(machine_config &config); + +private: + enum + { + TIMER_BOOTSTRAP, + TIMER_TMS5501 + }; + required_device m_maincpu; required_device m_pit; required_device m_tms5501; @@ -69,7 +72,6 @@ public: void dai_update_memory(int dai_rom_bank); IRQ_CALLBACK_MEMBER(int_ack); - void dai(machine_config &config); void dai_io(address_map &map); void dai_mem(address_map &map); protected: diff --git a/src/mame/includes/darius.h b/src/mame/includes/darius.h index 81fbdacdc60..93195471858 100644 --- a/src/mame/includes/darius.h +++ b/src/mame/includes/darius.h @@ -48,6 +48,10 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void darius(machine_config &config); + +private: + /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_fg_ram; @@ -131,7 +135,6 @@ public: void update_psg1( int port ); void update_da( ); DECLARE_WRITE_LINE_MEMBER(darius_adpcm_int); - void darius(machine_config &config); void darius_cpub_map(address_map &map); void darius_map(address_map &map); void darius_sound2_io_map(address_map &map); diff --git a/src/mame/includes/darkmist.h b/src/mame/includes/darkmist.h index 18c28144cbe..6435a6a1d16 100644 --- a/src/mame/includes/darkmist.h +++ b/src/mame/includes/darkmist.h @@ -27,6 +27,11 @@ public: m_tx_clut(*this, "tx_clut"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void darkmist(machine_config &config); + + void init_darkmist(); + +private: required_device m_maincpu; required_device m_t5182; required_device m_screen; @@ -57,7 +62,6 @@ public: TILE_GET_INFO_MEMBER(get_txttile_info); virtual void machine_start() override; - void init_darkmist(); virtual void video_start() override; DECLARE_PALETTE_INIT(darkmist); @@ -70,7 +74,6 @@ public: void decrypt_snd(); TIMER_DEVICE_CALLBACK_MEMBER(scanline); - void darkmist(machine_config &config); void decrypted_opcodes_map(address_map &map); void memmap(address_map &map); }; diff --git a/src/mame/includes/darkseal.h b/src/mame/includes/darkseal.h index 6e742542281..068f494de04 100644 --- a/src/mame/includes/darkseal.h +++ b/src/mame/includes/darkseal.h @@ -30,11 +30,11 @@ public: , m_paletteram_ext(*this, "palette_ext") { } - void init_darkseal(); - void darkseal(machine_config &config); -protected: + void init_darkseal(); + +private: DECLARE_WRITE16_MEMBER(irq_ack_w); DECLARE_WRITE16_MEMBER(palette_w); DECLARE_WRITE16_MEMBER(palette_ext_w); @@ -44,7 +44,6 @@ protected: void darkseal_map(address_map &map); void sound_map(address_map &map); -private: required_device m_maincpu; required_device m_audiocpu; required_device m_palette; diff --git a/src/mame/includes/dassault.h b/src/mame/includes/dassault.h index 9acc0436c9b..5bcad8a2c8f 100644 --- a/src/mame/includes/dassault.h +++ b/src/mame/includes/dassault.h @@ -33,6 +33,11 @@ public: , m_pf4_rowscroll(*this, "pf4_rowscroll") { } + void dassault(machine_config &config); + + void init_dassault(); + +private: /* devices */ required_device m_maincpu; required_device m_audiocpu; @@ -57,13 +62,11 @@ public: DECLARE_WRITE16_MEMBER(dassault_control_w); DECLARE_READ16_MEMBER(dassault_sub_control_r); DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - void init_dassault(); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_dassault(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void mixdassaultlayer(bitmap_rgb32 &bitmap, bitmap_ind16* sprite_bitmap, const rectangle &cliprect, uint16_t pri, uint16_t primask, uint16_t penbase, uint8_t alpha); DECO16IC_BANK_CB_MEMBER(bank_callback); - void dassault(machine_config &config); void dassault_map(address_map &map); void dassault_sub_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/dbz.h b/src/mame/includes/dbz.h index 63d5d73e58a..a709297de97 100644 --- a/src/mame/includes/dbz.h +++ b/src/mame/includes/dbz.h @@ -33,6 +33,13 @@ public: m_gfxdecode(*this, "gfxdecode"), m_soundlatch(*this, "soundlatch") { } + void dbz(machine_config &config); + + void init_dbza(); + void init_dbz(); + void init_dbz2(); + +private: /* memory pointers */ required_shared_ptr m_bg1_videoram; required_shared_ptr m_bg2_videoram; @@ -65,9 +72,6 @@ public: DECLARE_WRITE16_MEMBER(dbz_bg2_videoram_w); DECLARE_WRITE16_MEMBER(dbz_bg1_videoram_w); DECLARE_WRITE_LINE_MEMBER(dbz_irq2_ack_w); - void init_dbza(); - void init_dbz(); - void init_dbz2(); TILE_GET_INFO_MEMBER(get_dbz_bg2_tile_info); TILE_GET_INFO_MEMBER(get_dbz_bg1_tile_info); virtual void machine_start() override; @@ -77,7 +81,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(dbz_scanline); K056832_CB_MEMBER(tile_callback); K053246_CB_MEMBER(sprite_callback); - void dbz(machine_config &config); void dbz_map(address_map &map); void dbz_sound_io_map(address_map &map); void dbz_sound_map(address_map &map); diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h index 8321de5bb28..2961646c9d4 100644 --- a/src/mame/includes/dcheese.h +++ b/src/mame/includes/dcheese.h @@ -15,12 +15,6 @@ class dcheese_state : public driver_device { public: - enum - { - TIMER_BLITTER_SCANLINE, - TIMER_SIGNAL_IRQ - }; - dcheese_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -29,6 +23,18 @@ public: m_bsmt(*this, "bsmt"), m_soundlatch(*this, "soundlatch") { } + void fredmem(machine_config &config); + void dcheese(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(sound_latch_state_r); + +private: + enum + { + TIMER_BLITTER_SCANLINE, + TIMER_SIGNAL_IRQ + }; + /* video-related */ uint16_t m_blitter_color[2]; uint16_t m_blitter_xparam[16]; @@ -61,7 +67,6 @@ public: DECLARE_WRITE16_MEMBER(madmax_blitter_vidparam_w); DECLARE_WRITE16_MEMBER(madmax_blitter_unknown_w); DECLARE_READ16_MEMBER(madmax_blitter_vidparam_r); - DECLARE_CUSTOM_INPUT_MEMBER(sound_latch_state_r); virtual void machine_start() override; virtual void video_start() override; DECLARE_PALETTE_INIT(dcheese); @@ -74,11 +79,9 @@ public: void do_clear( ); void do_blit( ); - void fredmem(machine_config &config); - void dcheese(machine_config &config); void main_cpu_map(address_map &map); void sound_cpu_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/dcon.h b/src/mame/includes/dcon.h index 7103f81adc7..af6bcd1457b 100644 --- a/src/mame/includes/dcon.h +++ b/src/mame/includes/dcon.h @@ -19,6 +19,10 @@ public: m_textram(*this, "textram"), m_spriteram(*this, "spriteram") { } + void dcon(machine_config &config); + void sdgndmps(machine_config &config); + +private: required_device m_maincpu; required_device m_seibu_sound; required_device m_gfxdecode; @@ -60,8 +64,6 @@ public: uint32_t screen_update_dcon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_sdgndmps(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); - void dcon(machine_config &config); - void sdgndmps(machine_config &config); void dcon_map(address_map &map); void sdgndmps_map(address_map &map); }; diff --git a/src/mame/includes/dday.h b/src/mame/includes/dday.h index 51db310c424..d0c7bf08372 100644 --- a/src/mame/includes/dday.h +++ b/src/mame/includes/dday.h @@ -26,6 +26,9 @@ public: m_palette(*this, "palette"), m_ay1(*this, "ay1") { } + void dday(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_textvideoram; required_shared_ptr m_fgvideoram; @@ -69,6 +72,5 @@ public: required_device m_screen; required_device m_palette; required_device m_ay1; - void dday(machine_config &config); void dday_map(address_map &map); }; diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 974fedefe15..edd90fa3493 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -20,6 +20,14 @@ class ddragon_state : public driver_device public: ddragon_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_soundcpu(*this, "soundcpu") + , m_subcpu(*this, "sub") + , m_screen(*this, "screen") + , m_palette(*this, "palette") + , m_gfxdecode(*this, "gfxdecode") + , m_soundlatch(*this, "soundlatch") + , m_mainbank(*this, "mainbank") , m_rambase(*this, "rambase") , m_bgvideoram(*this, "bgvideoram") , m_fgvideoram(*this, "fgvideoram") @@ -27,27 +35,34 @@ public: , m_spriteram(*this, "spriteram") , m_scrollx_lo(*this, "scrollx_lo") , m_scrolly_lo(*this, "scrolly_lo") - , m_maincpu(*this, "maincpu") - , m_soundcpu(*this, "soundcpu") - , m_subcpu(*this, "sub") , m_adpcm(*this, "adpcm%u", 1U) - , m_gfxdecode(*this, "gfxdecode") - , m_screen(*this, "screen") - , m_palette(*this, "palette") - , m_soundlatch(*this, "soundlatch") - , m_mainbank(*this, "mainbank") , m_adpcm_rom(*this, "adpcm%u", 1U) { } - /* memory pointers */ + void ddragon(machine_config &config); + void ddragon6809(machine_config &config); + void ddragonb(machine_config &config); + void ddragonba(machine_config &config); + void ddragon2(machine_config &config); + + void init_ddragon2(); + void init_ddragon(); + void init_ddragon6809(); + + DECLARE_CUSTOM_INPUT_MEMBER(subcpu_bus_free); + +protected: + required_device m_maincpu; + required_device m_soundcpu; + optional_device m_subcpu; + required_device m_screen; + required_device m_palette; + required_device m_gfxdecode; + required_device m_soundlatch; + + optional_memory_bank m_mainbank; optional_shared_ptr m_rambase; - required_shared_ptr m_bgvideoram; - required_shared_ptr m_fgvideoram; - optional_shared_ptr m_comram; - required_shared_ptr m_spriteram; - required_shared_ptr m_scrollx_lo; - required_shared_ptr m_scrolly_lo; /* video-related */ tilemap_t *m_fg_tilemap; @@ -76,30 +91,40 @@ public: int m_m5205_clk; #endif + DECLARE_WRITE8_MEMBER(ddragon_bgvideoram_w); + DECLARE_WRITE8_MEMBER(ddragon_fgvideoram_w); + + TILEMAP_MAPPER_MEMBER(background_scan); + + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_16color_tile_info); + + int scanline_to_vcount(int scanline); + + uint32_t screen_update_ddragon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void ddragon_base_map(address_map &map); + +private: + /* memory pointers */ + required_shared_ptr m_bgvideoram; + required_shared_ptr m_fgvideoram; + optional_shared_ptr m_comram; + required_shared_ptr m_spriteram; + required_shared_ptr m_scrollx_lo; + required_shared_ptr m_scrolly_lo; + /* devices */ - required_device m_maincpu; - required_device m_soundcpu; - optional_device m_subcpu; optional_device_array m_adpcm; - required_device m_gfxdecode; - required_device m_screen; - required_device m_palette; - required_device m_soundlatch; - optional_memory_bank m_mainbank; optional_region_ptr_array m_adpcm_rom; - int scanline_to_vcount(int scanline); void ddragon_interrupt_ack(address_space &space, offs_t offset, uint8_t data); void dd_adpcm_int(int chip); /* video/ddragon.c */ - TILEMAP_MAPPER_MEMBER(background_scan); - TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - TILE_GET_INFO_MEMBER(get_fg_16color_tile_info); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - uint32_t screen_update_ddragon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_MACHINE_START(ddragon); DECLARE_MACHINE_RESET(ddragon); @@ -107,9 +132,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(ddragon_scanline); - DECLARE_WRITE8_MEMBER(ddragon_bgvideoram_w); - DECLARE_WRITE8_MEMBER(ddragon_fgvideoram_w); - DECLARE_CUSTOM_INPUT_MEMBER(subcpu_bus_free); DECLARE_WRITE8_MEMBER(ddragon_bankswitch_w); DECLARE_READ8_MEMBER(ddragon_interrupt_r); DECLARE_WRITE8_MEMBER(ddragon_interrupt_w); @@ -125,19 +147,10 @@ public: DECLARE_WRITE_LINE_MEMBER(dd_adpcm_int_1); DECLARE_WRITE_LINE_MEMBER(dd_adpcm_int_2); - void init_ddragon2(); - void init_ddragon(); - void init_ddragon6809(); - void ddragon(machine_config &config); - void ddragon6809(machine_config &config); - void ddragonb(machine_config &config); - void ddragonba(machine_config &config); - void ddragon2(machine_config &config); void dd2_map(address_map &map); void dd2_sound_map(address_map &map); void dd2_sub_map(address_map &map); void ddragon_map(address_map &map); - void ddragon_base_map(address_map &map); void ddragonba_sub_map(address_map &map); void ddragonba_sub_portmap(address_map &map); void sound_map(address_map &map); @@ -156,17 +169,20 @@ public: { } + void darktowr(machine_config &config); + + void init_darktowr(); + +private: DECLARE_READ8_MEMBER(darktowr_mcu_bank_r); DECLARE_WRITE8_MEMBER(darktowr_mcu_bank_w); DECLARE_WRITE8_MEMBER(darktowr_bankswitch_w); DECLARE_WRITE8_MEMBER(mcu_port_a_w); - void init_darktowr(); - void darktowr(machine_config &config); void darktowr_map(address_map &map); void darktowr_banked_map(address_map &map); -protected: + required_device m_mcu; optional_device m_darktowr_bank; @@ -182,9 +198,12 @@ public: { } - DECLARE_WRITE8_MEMBER(toffy_bankswitch_w); + void toffy(machine_config &config); void init_toffy(); - void toffy(machine_config &config); + +private: + DECLARE_WRITE8_MEMBER(toffy_bankswitch_w); + void toffy_map(address_map &map); }; diff --git a/src/mame/includes/ddragon3.h b/src/mame/includes/ddragon3.h index 2d1242d04b4..9a1deaf771e 100644 --- a/src/mame/includes/ddragon3.h +++ b/src/mame/includes/ddragon3.h @@ -20,26 +20,37 @@ class ddragon3_state : public driver_device public: ddragon3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_soundlatch(*this, "soundlatch"), m_bg_videoram(*this, "bg_videoram"), m_fg_videoram(*this, "fg_videoram"), m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_oki(*this, "oki"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch") + m_screen(*this, "screen") { vblank_level = 6; raster_level = 5; } - /* memory pointers */ - required_shared_ptr m_bg_videoram; - required_shared_ptr m_fg_videoram; -// required_shared_ptr m_spriteram; - required_device m_spriteram; + void ctribe(machine_config &config); + void ddragon3b(machine_config &config); + void ddragon3(machine_config &config); + + TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_scanline); + +protected: + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; + required_device m_soundlatch; + + /* misc */ + uint8_t m_pri; + int vblank_level; + int raster_level; /* video-related */ tilemap_t *m_fg_tilemap; @@ -50,51 +61,49 @@ public: uint16_t m_fg_scrollx; uint16_t m_fg_scrolly; uint16_t m_bg_tilebase; - - uint16_t m_sprite_xoff; + uint16_t m_bg0_dx; uint16_t m_bg1_dx[2]; + uint16_t m_sprite_xoff; - /* misc */ - uint8_t m_pri; + DECLARE_WRITE16_MEMBER(ddragon3_scroll_w); + DECLARE_READ16_MEMBER(ddragon3_scroll_r); + DECLARE_WRITE16_MEMBER(ddragon3_bg_videoram_w); + DECLARE_WRITE16_MEMBER(ddragon3_fg_videoram_w); + + void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); + void sound_map(address_map &map); + + virtual void video_start() override; + +private: + /* memory pointers */ + required_shared_ptr m_bg_videoram; + required_shared_ptr m_fg_videoram; +// required_shared_ptr m_spriteram; + required_device m_spriteram; + /* devices */ - required_device m_maincpu; required_device m_audiocpu; required_device m_oki; - required_device m_gfxdecode; required_device m_screen; - required_device m_palette; - required_device m_soundlatch; DECLARE_WRITE16_MEMBER(ddragon3_vreg_w); DECLARE_WRITE16_MEMBER(irq6_ack_w); DECLARE_WRITE16_MEMBER(irq5_ack_w); - DECLARE_WRITE16_MEMBER(ddragon3_scroll_w); - DECLARE_READ16_MEMBER(ddragon3_scroll_r); - DECLARE_WRITE16_MEMBER(ddragon3_bg_videoram_w); - DECLARE_WRITE16_MEMBER(ddragon3_fg_videoram_w); DECLARE_WRITE8_MEMBER(oki_bankswitch_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void machine_start() override; virtual void machine_reset() override; - virtual void video_start() override; uint32_t screen_update_ddragon3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_ctribe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_scanline); - void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - int vblank_level; - int raster_level; - void ctribe(machine_config &config); - void ddragon3b(machine_config &config); - void ddragon3(machine_config &config); void ctribe_map(address_map &map); void ctribe_sound_map(address_map &map); void dd3b_map(address_map &map); void ddragon3_map(address_map &map); - void sound_map(address_map &map); }; @@ -110,6 +119,13 @@ public: raster_level = 2; } + void wwfwfest(machine_config &config); + void wwfwfstb(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r); + DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r); + +private: /* wwfwfest has an extra layer */ required_shared_ptr m_fg0_videoram; required_shared_ptr m_paletteram; @@ -125,15 +141,11 @@ public: DECLARE_WRITE16_MEMBER(wwfwfest_paletteram_w); DECLARE_WRITE16_MEMBER(wwfwfest_soundwrite); - DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r); - DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r); TILE_GET_INFO_MEMBER(get_fg0_tile_info); virtual void video_start() override; DECLARE_VIDEO_START(wwfwfstb); uint32_t screen_update_wwfwfest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void wwfwfest(machine_config &config); - void wwfwfstb(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/includes/ddribble.h b/src/mame/includes/ddribble.h index 1294a05d19b..50ac799c460 100644 --- a/src/mame/includes/ddribble.h +++ b/src/mame/includes/ddribble.h @@ -29,6 +29,9 @@ public: m_filter3(*this, "filter3"), m_gfxdecode(*this, "gfxdecode") { } + void ddribble(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_fg_videoram; required_shared_ptr m_spriteram_1; @@ -78,7 +81,6 @@ public: uint32_t screen_update_ddribble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* source, int lenght, int gfxset, int flipscreen ); - void ddribble(machine_config &config); void cpu0_map(address_map &map); void cpu1_map(address_map &map); void cpu2_map(address_map &map); diff --git a/src/mame/includes/deadang.h b/src/mame/includes/deadang.h index 32dbce1a8be..d48166d1b89 100644 --- a/src/mame/includes/deadang.h +++ b/src/mame/includes/deadang.h @@ -11,65 +11,75 @@ class deadang_state : public driver_device public: deadang_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_scroll_ram(*this, "scroll_ram"), + m_videoram(*this, "videoram"), + m_video_data(*this, "video_data"), + m_spriteram(*this, "spriteram"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_seibu_sound(*this, "seibu_sound"), m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub"), - m_seibu_sound(*this, "seibu_sound"), m_adpcm1(*this, "adpcm1"), - m_adpcm2(*this, "adpcm2"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_spriteram(*this, "spriteram"), - m_videoram(*this, "videoram"), - m_scroll_ram(*this, "scroll_ram"), - m_video_data(*this, "video_data") { } + m_adpcm2(*this, "adpcm2") + { } - required_device m_maincpu; - required_device m_subcpu; - required_device m_seibu_sound; - optional_device m_adpcm1; - optional_device m_adpcm2; - required_device m_gfxdecode; - required_device m_palette; + void deadang(machine_config &config); + + void init_deadang(); + void init_ghunter(); + + DECLARE_WRITE16_MEMBER(foreground_w); + + TILEMAP_MAPPER_MEMBER(bg_scan); + TILE_GET_INFO_MEMBER(get_pf1_tile_info); + TILE_GET_INFO_MEMBER(get_pf3_tile_info); + TILE_GET_INFO_MEMBER(get_pf2_tile_info); + TILE_GET_INFO_MEMBER(get_text_tile_info); + +protected: + virtual void video_start() override; + + void main_map(address_map &map); - required_shared_ptr m_spriteram; - required_shared_ptr m_videoram; required_shared_ptr m_scroll_ram; + required_shared_ptr m_videoram; required_shared_ptr m_video_data; + required_shared_ptr m_spriteram; + required_device m_gfxdecode; + required_device m_palette; + required_device m_seibu_sound; + + int m_tilebank; + int m_oldtilebank; tilemap_t *m_pf3_layer; tilemap_t *m_pf2_layer; tilemap_t *m_pf1_layer; tilemap_t *m_text_layer; - int m_tilebank; - int m_oldtilebank; - - DECLARE_WRITE16_MEMBER(foreground_w); + DECLARE_WRITE16_MEMBER(text_w); DECLARE_WRITE16_MEMBER(bank_w); + + void sound_decrypted_opcodes_map(address_map &map); + void sound_map(address_map &map); + +private: + required_device m_maincpu; + required_device m_subcpu; + optional_device m_adpcm1; + optional_device m_adpcm2; + DECLARE_READ16_MEMBER(ghunter_trackball_low_r); DECLARE_READ16_MEMBER(ghunter_trackball_high_r); - void init_deadang(); - void init_ghunter(); - - TILEMAP_MAPPER_MEMBER(bg_scan); - TILE_GET_INFO_MEMBER(get_pf3_tile_info); - TILE_GET_INFO_MEMBER(get_pf2_tile_info); - TILE_GET_INFO_MEMBER(get_pf1_tile_info); - TILE_GET_INFO_MEMBER(get_text_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(main_scanline); TIMER_DEVICE_CALLBACK_MEMBER(sub_scanline); - void deadang(machine_config &config); - void main_map(address_map &map); - void sound_decrypted_opcodes_map(address_map &map); - void sound_map(address_map &map); void sub_map(address_map &map); -protected: - virtual void video_start() override; }; class popnrun_state : public deadang_state @@ -79,18 +89,20 @@ public: : deadang_state(mconfig, type, tag) {} + void popnrun(machine_config &config); + void init_popnrun(); +protected: + virtual void video_start() override; + +private: TILE_GET_INFO_MEMBER(get_popnrun_text_tile_info); DECLARE_WRITE16_MEMBER(popnrun_text_w); void popnrun_main_map(address_map &map); void popnrun_sub_map(address_map &map); void popnrun_sound_map(address_map &map); - void popnrun(machine_config &config); uint32_t popnrun_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void popnrun_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - -protected: - virtual void video_start() override; }; diff --git a/src/mame/includes/dec0.h b/src/mame/includes/dec0.h index fad6a1254cb..35fd39abe44 100644 --- a/src/mame/includes/dec0.h +++ b/src/mame/includes/dec0.h @@ -12,48 +12,84 @@ class dec0_state : public driver_device { public: - enum class mcu_type { - EMULATED, - BADDUDES_SIM, - BIRDTRY_SIM - }; - dec0_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), - m_subcpu(*this, "sub"), - m_mcu(*this, "mcu"), - m_palette(*this, "palette"), + m_soundlatch(*this, "soundlatch"), m_tilegen1(*this, "tilegen1"), m_tilegen2(*this, "tilegen2"), m_tilegen3(*this, "tilegen3"), m_spritegen(*this, "spritegen"), + m_palette(*this, "palette"), + m_paletteram(*this, "palette"), + m_subcpu(*this, "sub"), + m_mcu(*this, "mcu"), m_pfprotect(*this, "pfprotect"), m_sndprotect(*this, "sndprotect"), - m_soundlatch(*this, "soundlatch"), m_ram(*this, "ram"), m_spriteram(*this, "spriteram"), - m_paletteram(*this, "palette"), m_robocop_shared_ram(*this, "robocop_shared"), m_hippodrm_shared_ram(*this, "hippodrm_shared") { } + void dec0_base(machine_config &config); + void dec0(machine_config &config); + void dec1(machine_config &config); + void midres(machine_config &config); + void birdtry(machine_config &config); + void baddudes(machine_config &config); + void midresbj(machine_config &config); + void slyspy(machine_config &config); + void hbarrel(machine_config &config); + void midresb(machine_config &config); + void ffantasybl(machine_config &config); + void drgninjab(machine_config &config); + void robocop(machine_config &config); + void robocopb(machine_config &config); + void hippodrm(machine_config &config); + + void init_robocop(); + void init_hippodrm(); + void init_hbarrel(); + void init_slyspy(); + void init_birdtry(); + void init_drgninja(); + void init_midresb(); + void init_ffantasybl(); + + DECLARE_VIDEO_START(dec0_nodma); + +protected: required_device m_maincpu; required_device m_audiocpu; - optional_device m_subcpu; - optional_device m_mcu; - required_device m_palette; + required_device m_soundlatch; optional_device m_tilegen1; optional_device m_tilegen2; optional_device m_tilegen3; optional_device m_spritegen; + required_device m_palette; + required_shared_ptr m_paletteram; + + uint16_t *m_buffered_spriteram; + uint16_t m_pri; + + DECLARE_READ16_MEMBER(dec0_controls_r); + DECLARE_READ16_MEMBER(slyspy_controls_r); + DECLARE_WRITE16_MEMBER(dec0_priority_w); + +private: + enum class mcu_type { + EMULATED, + BADDUDES_SIM, + BIRDTRY_SIM + }; + + optional_device m_subcpu; + optional_device m_mcu; optional_device m_pfprotect; optional_device m_sndprotect; - required_device m_soundlatch; - required_shared_ptr m_ram; required_shared_ptr m_spriteram; - required_shared_ptr m_paletteram; optional_shared_ptr m_robocop_shared_ram; optional_shared_ptr m_hippodrm_shared_ram; @@ -65,16 +101,12 @@ public: int m_hippodrm_msb; int m_hippodrm_lsb; uint8_t m_i8751_ports[4]; - uint16_t *m_buffered_spriteram; - uint16_t m_pri; DECLARE_WRITE16_MEMBER(dec0_control_w); DECLARE_WRITE16_MEMBER(midres_sound_w); - DECLARE_READ16_MEMBER(slyspy_controls_r); DECLARE_READ16_MEMBER(slyspy_protection_r); DECLARE_WRITE16_MEMBER(slyspy_state_w); DECLARE_READ16_MEMBER(slyspy_state_r); - DECLARE_READ16_MEMBER(dec0_controls_r); DECLARE_READ16_MEMBER(midres_controls_r); DECLARE_READ8_MEMBER(hippodrm_prot_r); DECLARE_WRITE8_MEMBER(hippodrm_prot_w); @@ -89,25 +121,14 @@ public: DECLARE_READ16_MEMBER(robocop_68000_share_r); DECLARE_WRITE16_MEMBER(robocop_68000_share_w); DECLARE_WRITE16_MEMBER(dec0_update_sprites_w); - DECLARE_WRITE16_MEMBER(dec0_priority_w); DECLARE_READ16_MEMBER(ffantasybl_242024_r); DECLARE_READ8_MEMBER(slyspy_sound_state_r); DECLARE_READ8_MEMBER(slyspy_sound_state_reset_r); - void init_robocop(); - void init_hippodrm(); - void init_hbarrel(); - void init_slyspy(); - void init_birdtry(); - void init_drgninja(); - void init_midresb(); - void init_ffantasybl(); - virtual void machine_start() override; DECLARE_MACHINE_RESET(slyspy); DECLARE_VIDEO_START(dec0); - DECLARE_VIDEO_START(dec0_nodma); uint32_t screen_update_hbarrel(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_baddudes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -122,21 +143,6 @@ public: void dec0_i8751_write(int data); void dec0_i8751_reset(); void h6280_decrypt(const char *cputag); - void dec0_base(machine_config &config); - void dec0(machine_config &config); - void dec1(machine_config &config); - void midres(machine_config &config); - void birdtry(machine_config &config); - void baddudes(machine_config &config); - void midresbj(machine_config &config); - void slyspy(machine_config &config); - void hbarrel(machine_config &config); - void midresb(machine_config &config); - void ffantasybl(machine_config &config); - void drgninjab(machine_config &config); - void robocop(machine_config &config); - void robocopb(machine_config &config); - void hippodrm(machine_config &config); void dec0_map(address_map &map); void dec0_s_map(address_map &map); void hippodrm_sub_map(address_map &map); @@ -164,6 +170,10 @@ public: { } + void secretab(machine_config &config); + void automat(machine_config &config); + +private: required_device m_msm1; required_device m_msm2; required_device m_adpcm_select1; @@ -189,8 +199,6 @@ public: uint32_t screen_update_automat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_secretab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void secretab(machine_config &config); - void automat(machine_config &config); void automat_map(address_map &map); void automat_s_map(address_map &map); void secretab_map(address_map &map); diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index da7d5d0f8b4..46bfea1cd24 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -45,6 +45,21 @@ public: m_coin_port(*this, "I8751") { } + void shackled(machine_config &config); + void meikyuh(machine_config &config); + void lastmisn(machine_config &config); + void csilver(machine_config &config); + void cobracom(machine_config &config); + void garyoret(machine_config &config); + void srdarwin(machine_config &config); + void ghostb(machine_config &config); + void oscar(machine_config &config); + void gondo(machine_config &config); + + void init_dec8(); + void init_csilver(); + +private: /* devices */ required_device m_maincpu; optional_device m_subcpu; @@ -149,8 +164,6 @@ public: DECLARE_WRITE8_MEMBER(lastmisn_scrolly_w); DECLARE_WRITE8_MEMBER(gondo_scroll_w); DECLARE_READ8_MEMBER(csilver_adpcm_reset_r); - void init_dec8(); - void init_csilver(); TILE_GET_INFO_MEMBER(get_cobracom_fix_tile_info); TILE_GET_INFO_MEMBER(get_ghostb_fix_tile_info); TILE_GET_INFO_MEMBER(get_oscar_fix_tile_info); @@ -187,16 +200,7 @@ public: void srdarwin_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); DECLARE_WRITE_LINE_MEMBER(csilver_adpcm_int); - void shackled(machine_config &config); - void meikyuh(machine_config &config); - void lastmisn(machine_config &config); - void csilver(machine_config &config); - void cobracom(machine_config &config); - void garyoret(machine_config &config); - void srdarwin(machine_config &config); - void ghostb(machine_config &config); - void oscar(machine_config &config); - void gondo(machine_config &config); + void cobra_map(address_map &map); void csilver_map(address_map &map); void csilver_s_map(address_map &map); diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index 1c9d6358855..1e6ecd925cd 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -23,48 +23,31 @@ class deco32_state : public driver_device public: deco32_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_audiocpu(*this, "audiocpu") - , m_ioprot(*this, "ioprot") - , m_deco_irq(*this, "irq") - , m_decobsmt(*this, "decobsmt") , m_sprgen(*this, "spritegen%u", 1) - , m_eeprom(*this, "eeprom") - , m_ym2151(*this, "ymsnd") - , m_oki(*this, "oki%u", 1) , m_deco_tilegen(*this, "tilegen%u", 1) , m_gfxdecode(*this, "gfxdecode") , m_screen(*this, "screen") , m_palette(*this, "palette") + , m_deco_irq(*this, "irq") + , m_decobsmt(*this, "decobsmt") + , m_eeprom(*this, "eeprom") + , m_ioprot(*this, "ioprot") + , m_ym2151(*this, "ymsnd") + , m_oki(*this, "oki%u", 1) , m_soundlatch(*this, "soundlatch") + , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") , m_pf_rowscroll32(*this, "pf%u_rowscroll32", 1) , m_generic_paletteram_32(*this, "paletteram") { } - required_device m_maincpu; - optional_device m_audiocpu; - required_device m_ioprot; - optional_device m_deco_irq; - optional_device m_decobsmt; - optional_device_array m_sprgen; - optional_device m_eeprom; - optional_device m_ym2151; - optional_device_array m_oki; - required_device_array m_deco_tilegen; - required_device m_gfxdecode; - required_device m_screen; - optional_device m_palette; - optional_device m_soundlatch; - - // we use the pointers below to store a 32-bit copy.. - required_shared_ptr_array m_pf_rowscroll32; - optional_shared_ptr m_generic_paletteram_32; + DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - std::unique_ptr m_dirty_palette; // all but captaven - int m_pri; // all but dragngun - std::unique_ptr m_spriteram16[2]; // all but dragngun - std::unique_ptr m_spriteram16_buffered[2]; // all but dragngun - std::unique_ptr m_pf_rowscroll[4]; // common +protected: + void h6280_sound_custom_latch_map(address_map &map); + void h6280_sound_map(address_map &map); + void z80_sound_io(address_map &map); + void z80_sound_map(address_map &map); // common DECLARE_READ16_MEMBER(ioprot_r); @@ -75,7 +58,6 @@ public: DECLARE_WRITE32_MEMBER(vblank_ack_w); template DECLARE_WRITE32_MEMBER(pf_rowscroll_w); - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); // captaven, fghthist, nslasher and tattass template DECLARE_READ32_MEMBER(spriteram_r); @@ -87,17 +69,38 @@ public: DECLARE_WRITE32_MEMBER(buffered_palette_w); DECLARE_WRITE32_MEMBER(palette_dma_w); - void h6280_sound_custom_latch_map(address_map &map); - void h6280_sound_map(address_map &map); - void z80_sound_io(address_map &map); - void z80_sound_map(address_map &map); -protected: - virtual void video_start() override; + optional_device_array m_sprgen; + required_device_array m_deco_tilegen; + required_device m_gfxdecode; + required_device m_screen; + optional_device m_palette; + optional_device m_deco_irq; + optional_device m_decobsmt; + optional_device m_eeprom; + required_device m_ioprot; + optional_device m_ym2151; + optional_device_array m_oki; + optional_device m_soundlatch; void allocate_spriteram(int chip); void allocate_buffered_palette(); void allocate_rowscroll(int size1, int size2, int size3, int size4); + virtual void video_start() override; + + std::unique_ptr m_dirty_palette; // all but captaven + int m_pri; // all but dragngun + std::unique_ptr m_spriteram16[2]; // all but dragngun + std::unique_ptr m_spriteram16_buffered[2]; // all but dragngun + std::unique_ptr m_pf_rowscroll[4]; // common + +private: + required_device m_maincpu; + optional_device m_audiocpu; + + // we use the pointers below to store a 32-bit copy.. + required_shared_ptr_array m_pf_rowscroll32; + optional_shared_ptr m_generic_paletteram_32; }; class captaven_state : public deco32_state @@ -107,6 +110,11 @@ public: : deco32_state(mconfig, type, tag) { } + void captaven(machine_config &config); + + void init_captaven(); + +private: DECLARE_READ32_MEMBER(_71_r); DECLARE_READ8_MEMBER(captaven_dsw1_r); DECLARE_READ8_MEMBER(captaven_dsw2_r); @@ -114,16 +122,13 @@ public: DECLARE_READ8_MEMBER(captaven_soundcpu_status_r); DECLARE_VIDEO_START(captaven); - void init_captaven(); uint32_t screen_update_captaven(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(captaven_bank_callback); DECOSPR_PRIORITY_CB_MEMBER(captaven_pri_callback); - void captaven(machine_config &config); void captaven_map(address_map &map); -private: }; class fghthist_state : public deco32_state @@ -133,21 +138,24 @@ public: : deco32_state(mconfig, type, tag) { } + void fghthist(machine_config &config); + void fghthistu(machine_config &config); + void fghthsta(machine_config &config); + + void init_fghthist(); + +private: DECLARE_WRITE32_MEMBER(sound_w); DECLARE_READ16_MEMBER(fghthist_in0_r); DECLARE_READ16_MEMBER(fghthist_in1_r); DECLARE_READ32_MEMBER(unk_status_r); - void init_fghthist(); DECLARE_VIDEO_START(fghthist); uint32_t screen_update_fghthist(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(fghthist_bank_callback); - void fghthist(machine_config &config); - void fghthistu(machine_config &config); - void fghthsta(machine_config &config); void fghthist_map(address_map &map); void fghthsta_memmap(address_map &map); private: @@ -161,14 +169,21 @@ public: : deco32_state(mconfig, type, tag) , m_deco_ace(*this, "deco_ace") { } + + void nslasheru(machine_config &config); + void tattass(machine_config &config); + void nslasher(machine_config &config); + + void init_tattass(); + void init_nslasher(); + +private: required_device m_deco_ace; DECLARE_WRITE32_MEMBER(tattass_control_w); DECLARE_WRITE_LINE_MEMBER(tattass_sound_irq_w); DECLARE_READ16_MEMBER(nslasher_debug_r); - void init_tattass(); - void init_nslasher(); DECLARE_VIDEO_START(nslasher); uint32_t screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -176,12 +191,9 @@ public: DECLARE_READ16_MEMBER(port_b_tattass); DECO16IC_BANK_CB_MEMBER(tattass_bank_callback); - void nslasheru(machine_config &config); - void tattass(machine_config &config); - void nslasher(machine_config &config); void nslasher_map(address_map &map); void tattass_map(address_map &map); -private: + void mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, gfx_element *gfx0, gfx_element *gfx1, int mixAlphaTilemap); std::unique_ptr m_tilemap_alpha_bitmap; @@ -209,6 +221,17 @@ public: , m_gun_speaker_disabled(true) { } + void dragngun(machine_config &config); + void lockload(machine_config &config); + void lockloadu(machine_config &config); + + void init_dragngun(); + void init_dragngunj(); + void init_lockload(); + + DECLARE_INPUT_CHANGED_MEMBER(lockload_gun_trigger); + +private: required_device m_sprgenzoom; required_device m_spriteram; @@ -239,26 +262,18 @@ public: DECLARE_WRITE8_MEMBER(lockload_okibank_lo_w); DECLARE_WRITE8_MEMBER(lockload_okibank_hi_w); // lockload - void init_dragngun(); - void init_dragngunj(); - void init_lockload(); DECLARE_VIDEO_START(dragngun); void dragngun_init_common(); - DECLARE_INPUT_CHANGED_MEMBER(lockload_gun_trigger); uint32_t screen_update_dragngun(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(bank_1_callback); DECO16IC_BANK_CB_MEMBER(bank_2_callback); - void dragngun(machine_config &config); - void lockload(machine_config &config); - void lockloadu(machine_config &config); void dragngun_map(address_map &map); void lockload_map(address_map &map); void lockloadu_map(address_map &map); void lockload_sound_map(address_map &map); void lockloadu_sound_map(address_map &map); -private: bool m_gun_speaker_disabled; }; diff --git a/src/mame/includes/decocass.h b/src/mame/includes/decocass.h index f4448bd1410..ea19a7153e1 100644 --- a/src/mame/includes/decocass.h +++ b/src/mame/includes/decocass.h @@ -26,8 +26,8 @@ public: decocass_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), m_mcu(*this, "mcu"), + m_audiocpu(*this, "audiocpu"), m_watchdog(*this, "watchdog"), m_cassette(*this, "cassette"), m_gfxdecode(*this, "gfxdecode"), @@ -45,10 +45,30 @@ public: { } + void decocass(machine_config &config); + + void init_decocass(); + void init_decocrom(); + void init_cdsteljn(); + +protected: /* devices */ required_device m_maincpu; - required_device m_audiocpu; required_device m_mcu; + + /* dongles-related */ + read8_delegate m_dongle_r; + write8_delegate m_dongle_w; + + virtual void machine_start() override; + virtual void machine_reset() override; + + int32_t m_firsttime; + uint8_t m_latch1; + +private: + /* devices */ + required_device m_audiocpu; required_device m_watchdog; required_device m_cassette; required_device m_gfxdecode; @@ -95,8 +115,6 @@ public: uint8_t m_audio_nmi_state; /* misc */ - int32_t m_firsttime; - uint8_t m_latch1; uint8_t m_decocass_reset; int32_t m_de0091_enable; /* DE-0091xx daughter board enable */ uint8_t m_quadrature_decoder[4]; /* four inputs from the quadrature decoder (H1, V1, H2, V2) */ @@ -110,23 +128,14 @@ public: int m_i8041_p2_write_latch; int m_i8041_p2_read_latch; - /* dongles-related */ - read8_delegate m_dongle_r; - write8_delegate m_dongle_w; - /* DS Telejan */ uint8_t m_mux_data; - void init_decocass(); - void init_decocrom(); - void init_cdsteljn(); TILEMAP_MAPPER_MEMBER(fgvideoram_scan_cols); TILEMAP_MAPPER_MEMBER(bgvideoram_scan_cols); TILE_GET_INFO_MEMBER(get_bg_l_tile_info); TILE_GET_INFO_MEMBER(get_bg_r_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - virtual void machine_start() override; - virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(decocass); @@ -192,10 +201,9 @@ public: DECLARE_READ8_MEMBER(cdsteljn_input_r); DECLARE_WRITE8_MEMBER(cdsteljn_mux_w); TIMER_DEVICE_CALLBACK_MEMBER(decocass_audio_nmi_gen); - void decocass(machine_config &config); void decocass_map(address_map &map); void decocass_sound_map(address_map &map); -private: + void draw_edge(bitmap_ind16 &bitmap, const rectangle &cliprect, int which, bool opaque); void draw_special_priority(bitmap_ind16 &bitmap, bitmap_ind8 &priority, const rectangle &cliprect); void draw_center(bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -220,24 +228,6 @@ public: m_type1_map = nullptr; } - DECLARE_MACHINE_RESET(ctsttape); - DECLARE_MACHINE_RESET(chwy); - DECLARE_MACHINE_RESET(cdsteljn); - DECLARE_MACHINE_RESET(cterrani); - DECLARE_MACHINE_RESET(castfant); - DECLARE_MACHINE_RESET(csuperas); - DECLARE_MACHINE_RESET(cmanhat); - DECLARE_MACHINE_RESET(clocknch); - DECLARE_MACHINE_RESET(cprogolf); - DECLARE_MACHINE_RESET(cprogolfj); - DECLARE_MACHINE_RESET(cluckypo); - DECLARE_MACHINE_RESET(ctisland); - DECLARE_MACHINE_RESET(ctisland3); - DECLARE_MACHINE_RESET(cexplore); - DECLARE_MACHINE_RESET(cocean1a); /* 10 */ - DECLARE_MACHINE_RESET(cfboy0a1); /* 12 */ - DECLARE_MACHINE_RESET(clocknchj); /* 11 */ - void cprogolfj(machine_config &config); void cfboy0a1(machine_config &config); void cdsteljn(machine_config &config); @@ -255,13 +245,29 @@ public: void ctsttape(machine_config &config); void castfant(machine_config &config); void ctisland(machine_config &config); -protected: + +private: + DECLARE_MACHINE_RESET(ctsttape); + DECLARE_MACHINE_RESET(chwy); + DECLARE_MACHINE_RESET(cdsteljn); + DECLARE_MACHINE_RESET(cterrani); + DECLARE_MACHINE_RESET(castfant); + DECLARE_MACHINE_RESET(csuperas); + DECLARE_MACHINE_RESET(cmanhat); + DECLARE_MACHINE_RESET(clocknch); + DECLARE_MACHINE_RESET(cprogolf); + DECLARE_MACHINE_RESET(cprogolfj); + DECLARE_MACHINE_RESET(cluckypo); + DECLARE_MACHINE_RESET(ctisland); + DECLARE_MACHINE_RESET(ctisland3); + DECLARE_MACHINE_RESET(cexplore); + DECLARE_MACHINE_RESET(cocean1a); /* 10 */ + DECLARE_MACHINE_RESET(cfboy0a1); /* 12 */ + DECLARE_MACHINE_RESET(clocknchj); /* 11 */ virtual void machine_start() override; virtual void machine_reset() override; -private: - DECLARE_READ8_MEMBER(decocass_type1_r); /* dongle type #1 */ @@ -279,13 +285,10 @@ public: { } -protected: - +private: virtual void machine_start() override; virtual void machine_reset() override; -private: - DECLARE_READ8_MEMBER(decocass_type2_r); DECLARE_WRITE8_MEMBER(decocass_type2_w); @@ -304,20 +307,6 @@ public: { } - DECLARE_MACHINE_RESET(cfishing); - DECLARE_MACHINE_RESET(cbtime); - DECLARE_MACHINE_RESET(cburnrub); - DECLARE_MACHINE_RESET(cgraplop); - DECLARE_MACHINE_RESET(cgraplop2); - DECLARE_MACHINE_RESET(clapapa); - DECLARE_MACHINE_RESET(cskater); - DECLARE_MACHINE_RESET(cprobowl); - DECLARE_MACHINE_RESET(cnightst); - DECLARE_MACHINE_RESET(cpsoccer); - DECLARE_MACHINE_RESET(csdtenis); - DECLARE_MACHINE_RESET(czeroize); - DECLARE_MACHINE_RESET(cppicf); - DECLARE_MACHINE_RESET(cfghtice); void csdtenis(machine_config &config); void cburnrub(machine_config &config); @@ -333,13 +322,26 @@ public: void clapapa(machine_config &config); void cfishing(machine_config &config); void czeroize(machine_config &config); -protected: + +private: + DECLARE_MACHINE_RESET(cfishing); + DECLARE_MACHINE_RESET(cbtime); + DECLARE_MACHINE_RESET(cburnrub); + DECLARE_MACHINE_RESET(cgraplop); + DECLARE_MACHINE_RESET(cgraplop2); + DECLARE_MACHINE_RESET(clapapa); + DECLARE_MACHINE_RESET(cskater); + DECLARE_MACHINE_RESET(cprobowl); + DECLARE_MACHINE_RESET(cnightst); + DECLARE_MACHINE_RESET(cpsoccer); + DECLARE_MACHINE_RESET(csdtenis); + DECLARE_MACHINE_RESET(czeroize); + DECLARE_MACHINE_RESET(cppicf); + DECLARE_MACHINE_RESET(cfghtice); virtual void machine_start() override; virtual void machine_reset() override; -private: - DECLARE_READ8_MEMBER(decocass_type3_r); DECLARE_WRITE8_MEMBER(decocass_type3_w); @@ -360,13 +362,11 @@ public: { } -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; -private: - DECLARE_READ8_MEMBER(decocass_type4_r); DECLARE_WRITE8_MEMBER(decocass_type4_w); @@ -384,13 +384,11 @@ public: { } -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; -private: - DECLARE_READ8_MEMBER(decocass_type5_r); DECLARE_WRITE8_MEMBER(decocass_type5_w); @@ -407,12 +405,11 @@ public: { } -protected: +private: //virtual void machine_start() override; virtual void machine_reset() override; -private: DECLARE_READ8_MEMBER(decocass_nodong_r); }; @@ -425,12 +422,11 @@ public: { } -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; -private: DECLARE_READ8_MEMBER(decocass_widel_r); DECLARE_WRITE8_MEMBER(decocass_widel_w); diff --git a/src/mame/includes/deniam.h b/src/mame/includes/deniam.h index e4006b105a8..a6af580f140 100644 --- a/src/mame/includes/deniam.h +++ b/src/mame/includes/deniam.h @@ -27,6 +27,13 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void deniam16c(machine_config &config); + void deniam16b(machine_config &config); + + void init_karianx(); + void init_logicpro(); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_textram; @@ -61,8 +68,6 @@ public: DECLARE_WRITE16_MEMBER(deniam_coinctrl_w); DECLARE_WRITE8_MEMBER(deniam16b_oki_rom_bank_w); DECLARE_WRITE16_MEMBER(deniam16c_oki_rom_bank_w); - void init_karianx(); - void init_logicpro(); TILEMAP_MAPPER_MEMBER(scan_pages); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -81,8 +86,6 @@ public: required_device m_gfxdecode; required_device m_palette; optional_device m_soundlatch; - void deniam16c(machine_config &config); - void deniam16b(machine_config &config); void deniam16b_map(address_map &map); void deniam16c_map(address_map &map); void sound_io_map(address_map &map); diff --git a/src/mame/includes/dgn_beta.h b/src/mame/includes/dgn_beta.h index 9dbd3373e5d..6deda4202a5 100644 --- a/src/mame/includes/dgn_beta.h +++ b/src/mame/includes/dgn_beta.h @@ -99,6 +99,27 @@ public: m_floppy3(*this, FDC_TAG ":3"), m_palette(*this, "palette") { } + void dgnbeta(machine_config &config); + + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b0_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b1_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b2_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b3_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b4_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b5_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b6_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b7_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b8_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_b9_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bA_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bB_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bC_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bD_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bE_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bF_w); + DECLARE_WRITE8_MEMBER(dgnbeta_ram_bG_w); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); required_device m_mc6845; @@ -169,23 +190,7 @@ public: virtual void machine_start() override; virtual void machine_reset() override; DECLARE_PALETTE_INIT(dgn); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b0_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b1_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b2_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b3_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b4_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b5_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b6_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b7_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b8_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b9_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bA_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bB_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bC_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bD_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bE_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bF_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bG_w); + DECLARE_READ8_MEMBER(d_pia0_pa_r); DECLARE_WRITE8_MEMBER(d_pia0_pa_w); DECLARE_READ8_MEMBER(d_pia0_pb_r); @@ -233,9 +238,8 @@ public: offs_t dgnbeta_dasm_override(std::ostream &stream, offs_t pc, const util::disasm_interface::data_buffer &opcodes, const util::disasm_interface::data_buffer ¶ms); - void dgnbeta(machine_config &config); void dgnbeta_map(address_map &map); -private: + void execute_beta_key_dump(int ref, const std::vector ¶ms); void execute_beta_dat_log(int ref, const std::vector ¶ms); }; diff --git a/src/mame/includes/dgnalpha.h b/src/mame/includes/dgnalpha.h index ea6defa2088..f5d6c7922ca 100644 --- a/src/mame/includes/dgnalpha.h +++ b/src/mame/includes/dgnalpha.h @@ -50,6 +50,9 @@ public: { } + void dgnalpha(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(dragon_formats); @@ -66,8 +69,6 @@ public: DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - void dgnalpha(machine_config &config); -protected: /* driver overrides */ virtual void device_start(void) override; virtual void device_reset(void) override; @@ -87,7 +88,6 @@ protected: required_device m_floppy2; required_device m_floppy3; -private: uint8_t m_just_reset; /* modem */ diff --git a/src/mame/includes/dietgo.h b/src/mame/includes/dietgo.h index 0bbf4796eb2..0d504ec9eed 100644 --- a/src/mame/includes/dietgo.h +++ b/src/mame/includes/dietgo.h @@ -26,6 +26,11 @@ public: , m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void dietgo(machine_config &config); + + void init_dietgo(); + +private: optional_device m_deco104; /* memory pointers */ required_shared_ptr_array m_pf_rowscroll; @@ -37,13 +42,11 @@ public: required_device m_audiocpu; required_device m_deco_tilegen; required_shared_ptr m_decrypted_opcodes; - void init_dietgo(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECO16IC_BANK_CB_MEMBER(bank_callback); DECLARE_READ16_MEMBER( dietgo_protection_region_0_104_r ); DECLARE_WRITE16_MEMBER( dietgo_protection_region_0_104_w ); - void dietgo(machine_config &config); void decrypted_opcodes_map(address_map &map); void dietgo_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/digdug.h b/src/mame/includes/digdug.h index 32856d5c12a..4f023bc6963 100644 --- a/src/mame/includes/digdug.h +++ b/src/mame/includes/digdug.h @@ -10,6 +10,12 @@ public: m_digdug_posram(*this, "digdug_posram"), m_digdug_flpram(*this, "digdug_flpram") { } + void dzigzag(machine_config &config); + void digdug(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(shifted_port_r); + +private: required_shared_ptr m_digdug_objram; required_shared_ptr m_digdug_posram; required_shared_ptr m_digdug_flpram; @@ -18,7 +24,6 @@ public: uint8_t m_tx_color_mode; uint8_t m_bg_disable; uint8_t m_bg_color_bank; - DECLARE_CUSTOM_INPUT_MEMBER(shifted_port_r); TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(bg_get_tile_info); TILE_GET_INFO_MEMBER(tx_get_tile_info); @@ -30,7 +35,5 @@ public: DECLARE_WRITE8_MEMBER(bg_select_w); DECLARE_WRITE_LINE_MEMBER(tx_color_mode_w); DECLARE_WRITE_LINE_MEMBER(bg_disable_w); - void dzigzag(machine_config &config); - void digdug(machine_config &config); void digdug_map(address_map &map); }; diff --git a/src/mame/includes/divebomb.h b/src/mame/includes/divebomb.h index cc68e228cb9..3fb38b4b3d9 100644 --- a/src/mame/includes/divebomb.h +++ b/src/mame/includes/divebomb.h @@ -35,6 +35,9 @@ public: { } + void divebomb(machine_config &config); + +private: required_device m_spritecpu; required_device m_fgcpu; required_device m_rozcpucpu; @@ -76,7 +79,6 @@ public: template DECLARE_WRITE8_MEMBER(rozcpu_wrap_enable_w); template DECLARE_WRITE8_MEMBER(rozcpu_enable_w); DECLARE_WRITE8_MEMBER(rozcpu_pal_w); - void divebomb(machine_config &config); void divebomb_fgcpu_iomap(address_map &map); void divebomb_fgcpu_map(address_map &map); void divebomb_rozcpu_iomap(address_map &map); diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 543dbc942a6..29f42aac49b 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -39,6 +39,12 @@ public: { } + void djboy(machine_config &config); + + void init_djboy(); + void init_djboyj(); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_paletteram; @@ -96,8 +102,6 @@ public: DECLARE_WRITE8_MEMBER(djboy_scrolly_w); DECLARE_WRITE8_MEMBER(djboy_videoram_w); DECLARE_WRITE8_MEMBER(djboy_paletteram_w); - void init_djboy(); - void init_djboyj(); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_start() override; virtual void machine_reset() override; @@ -105,7 +109,6 @@ public: uint32_t screen_update_djboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank_djboy); TIMER_DEVICE_CALLBACK_MEMBER(djboy_scanline); - void djboy(machine_config &config); void mastercpu_am(address_map &map); void mastercpu_port_am(address_map &map); void slavecpu_am(address_map &map); diff --git a/src/mame/includes/djmain.h b/src/mame/includes/djmain.h index bcbaf1394b7..4693d770840 100644 --- a/src/mame/includes/djmain.h +++ b/src/mame/includes/djmain.h @@ -24,6 +24,24 @@ public: { } + void djmainj(machine_config &config); + void djmainu(machine_config &config); + void djmaina(machine_config &config); + + void init_bm7thmix(); + void init_bm6thmix(); + void init_hmcompmx(); + void init_bmfinal(); + void init_hmcompm2(); + void init_bm5thmix(); + void init_bm4thmix(); + void init_beatmania(); + void init_bmdct(); + void init_bmcompm2(); + void init_bmcorerm(); + void init_bmclubmx(); + +private: DECLARE_WRITE32_MEMBER(sndram_bank_w); DECLARE_READ32_MEMBER(sndram_r); DECLARE_WRITE32_MEMBER(sndram_w); @@ -41,33 +59,18 @@ public: DECLARE_WRITE32_MEMBER(unknown590000_w); DECLARE_WRITE32_MEMBER(unknown802000_w); DECLARE_WRITE32_MEMBER(unknownc02000_w); - void init_bm7thmix(); - void init_bm6thmix(); - void init_hmcompmx(); - void init_bmfinal(); - void init_hmcompm2(); - void init_bm5thmix(); - void init_bm4thmix(); - void init_beatmania(); - void init_bmdct(); - void init_bmcompm2(); - void init_bmcorerm(); - void init_bmclubmx(); + uint32_t screen_update_djmain(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vb_interrupt); DECLARE_WRITE_LINE_MEMBER(ide_interrupt); void draw_sprites( bitmap_rgb32 &bitmap, const rectangle &cliprect); K056832_CB_MEMBER(tile_callback); - void djmainj(machine_config &config); - void djmainu(machine_config &config); - void djmaina(machine_config &config); void k054539_map(address_map &map); void maincpu_djmain(address_map &map); void maincpu_djmaina(address_map &map); void maincpu_djmainj(address_map &map); void maincpu_djmainu(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/dkong.h b/src/mame/includes/dkong.h index cc7a2098def..8c6a272b2dd 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -131,6 +131,41 @@ public: { } + void dkong_base(machine_config &config); + void dk_braze(machine_config &config); + void dkj_braze(machine_config &config); + void ddk_braze(machine_config &config); + void dk3_braze(machine_config &config); + void strtheat(machine_config &config); + void spclforc(machine_config &config); + void s2650(machine_config &config); + void dkongjr(machine_config &config); + void radarscp1(machine_config &config); + void drktnjr(machine_config &config); + void dkong2b(machine_config &config); + void drakton(machine_config &config); + void radarscp(machine_config &config); + void pestplce(machine_config &config); + void herbiedk(machine_config &config); + void dkong3(machine_config &config); + void dkong3b(machine_config &config); + void radarscp_audio(machine_config &config); + void dkong2b_audio(machine_config &config); + void dkongjr_audio(machine_config &config); + void dkong3_audio(machine_config &config); + void radarscp1_audio(machine_config &config); + + void init_strtheat(); + void init_herodk(); + void init_dkingjr(); + void init_drakton(); + void init_dkonghs(); + void init_dkongx(); + void init_dkong3hs(); + + DECLARE_WRITE_LINE_MEMBER(dk_braze_a15); + +private: /* devices */ required_device m_maincpu; optional_device m_soundcpu; @@ -252,14 +287,6 @@ public: DECLARE_WRITE8_MEMBER(dkong_z80dma_rdy_w); DECLARE_READ8_MEMBER(braze_eeprom_r); DECLARE_WRITE8_MEMBER(braze_eeprom_w); - DECLARE_WRITE_LINE_MEMBER(dk_braze_a15); - void init_strtheat(); - void init_herodk(); - void init_dkingjr(); - void init_drakton(); - void init_dkonghs(); - void init_dkongx(); - void init_dkong3hs(); TILE_GET_INFO_MEMBER(dkong_bg_tile_info); TILE_GET_INFO_MEMBER(radarscp1_bg_tile_info); DECLARE_MACHINE_START(dkong2b); @@ -298,29 +325,6 @@ public: DECLARE_WRITE8_MEMBER(memory_write_byte); double CD4049(double x); - void dkong_base(machine_config &config); - void dk_braze(machine_config &config); - void dkj_braze(machine_config &config); - void ddk_braze(machine_config &config); - void dk3_braze(machine_config &config); - void strtheat(machine_config &config); - void spclforc(machine_config &config); - void s2650(machine_config &config); - void dkongjr(machine_config &config); - void radarscp1(machine_config &config); - void drktnjr(machine_config &config); - void dkong2b(machine_config &config); - void drakton(machine_config &config); - void radarscp(machine_config &config); - void pestplce(machine_config &config); - void herbiedk(machine_config &config); - void dkong3(machine_config &config); - void dkong3b(machine_config &config); - void radarscp_audio(machine_config &config); - void dkong2b_audio(machine_config &config); - void dkongjr_audio(machine_config &config); - void dkong3_audio(machine_config &config); - void radarscp1_audio(machine_config &config); void dkong3_io_map(address_map &map); void dkong3_map(address_map &map); void dkong3_sound1_map(address_map &map); diff --git a/src/mame/includes/dm7000.h b/src/mame/includes/dm7000.h index a6f0ae82559..05918895d8e 100644 --- a/src/mame/includes/dm7000.h +++ b/src/mame/includes/dm7000.h @@ -20,6 +20,9 @@ public: { } + void dm7000(machine_config &config); + +private: required_device m_maincpu; required_device m_terminal; @@ -55,7 +58,6 @@ public: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_dm7000(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void dm7000(machine_config &config); void dm7000_mem(address_map &map); }; diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h index c32f92ac861..9c5c194d1a2 100644 --- a/src/mame/includes/docastle.h +++ b/src/mame/includes/docastle.h @@ -29,6 +29,11 @@ public: m_palette(*this, "palette") { } + void dorunrun(machine_config &config); + void idsoccer(machine_config &config); + void docastle(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_slave; @@ -81,9 +86,6 @@ public: DECLARE_WRITE_LINE_MEMBER(stx_on_w); DECLARE_WRITE_LINE_MEMBER(stx_off_w); DECLARE_WRITE_LINE_MEMBER(idsoccer_adpcm_int); - void dorunrun(machine_config &config); - void idsoccer(machine_config &config); - void docastle(machine_config &config); void docastle_io_map(address_map &map); void docastle_map(address_map &map); void docastle_map2(address_map &map); diff --git a/src/mame/includes/dragrace.h b/src/mame/includes/dragrace.h index 3132d420f0d..b5e33504f26 100644 --- a/src/mame/includes/dragrace.h +++ b/src/mame/includes/dragrace.h @@ -49,7 +49,7 @@ public: void dragrace(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(speed1_w); DECLARE_WRITE8_MEMBER(speed2_w); DECLARE_READ8_MEMBER(dragrace_input_r); @@ -66,7 +66,6 @@ protected: virtual void video_start() override; void dragrace_map(address_map &map); -private: /* memory pointers */ required_shared_ptr m_playfield_ram; required_shared_ptr m_position_ram; diff --git a/src/mame/includes/drgnmst.h b/src/mame/includes/drgnmst.h index f722643ad13..640454eedc6 100644 --- a/src/mame/includes/drgnmst.h +++ b/src/mame/includes/drgnmst.h @@ -25,6 +25,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void drgnmst(machine_config &config); + + void init_drgnmst(); + +private: /* memory pointers */ required_shared_ptr m_vidregs; required_shared_ptr m_fg_videoram; @@ -65,7 +70,6 @@ public: DECLARE_WRITE16_MEMBER(drgnmst_fg_videoram_w); DECLARE_WRITE16_MEMBER(drgnmst_bg_videoram_w); DECLARE_WRITE16_MEMBER(drgnmst_md_videoram_w); - void init_drgnmst(); TILE_GET_INFO_MEMBER(get_drgnmst_fg_tile_info); TILE_GET_INFO_MEMBER(get_drgnmst_bg_tile_info); TILE_GET_INFO_MEMBER(get_drgnmst_md_tile_info); @@ -82,6 +86,5 @@ public: required_device m_audiocpu; required_device m_gfxdecode; required_device m_palette; - void drgnmst(machine_config &config); void drgnmst_main_map(address_map &map); }; diff --git a/src/mame/includes/dribling.h b/src/mame/includes/dribling.h index 484d57dc071..7995122248e 100644 --- a/src/mame/includes/dribling.h +++ b/src/mame/includes/dribling.h @@ -22,6 +22,9 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram"){ } + void dribling(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_watchdog; @@ -53,7 +56,6 @@ public: DECLARE_PALETTE_INIT(dribling); uint32_t screen_update_dribling(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(dribling_irq_gen); - void dribling(machine_config &config); void dribling_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/includes/drmicro.h b/src/mame/includes/drmicro.h index b0c1b01769b..fbc9e0a3abf 100644 --- a/src/mame/includes/drmicro.h +++ b/src/mame/includes/drmicro.h @@ -18,6 +18,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void drmicro(machine_config &config); + +private: /* memory pointers */ std::unique_ptr m_videoram; @@ -47,7 +50,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void drmicro(machine_config &config); void drmicro_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index 0771f08ce92..e7e0ce6259c 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -24,11 +24,11 @@ public: , m_maincpu(*this, "maincpu") , m_soundcpu(*this, "soundcpu") , m_oki(*this, "oki") - , m_msm(*this, "msm") , m_screen(*this, "screen") , m_palette(*this, "palette") - , m_bankdev(*this, "bankdev") , m_mainlatch(*this, "mainlatch") + , m_bankdev(*this, "bankdev") + , m_msm(*this, "msm") , m_mainirq(*this, "mainirq") , m_soundirq(*this, "soundirq") , m_soundlatch(*this, "soundlatch") @@ -39,9 +39,78 @@ public: { } - DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w); + void mjfriday(machine_config &config); + void yarunara(machine_config &config); + void janyuki(machine_config &config); + void hnoridur(machine_config &config); + void gekisha(machine_config &config); + void majrjhdx(machine_config &config); + void mcnpshnt(machine_config &config); + void nanajign(machine_config &config); + void cdracula(machine_config &config); + void tenkai(machine_config &config); + void hjingi(machine_config &config); + void mjreach(machine_config &config); + void neruton(machine_config &config); + void mjdialq2(machine_config &config); + void jantouki(machine_config &config); + void quiztvqq(machine_config &config); + void mjelctrn(machine_config &config); + void mjembase(machine_config &config); + void mjangels(machine_config &config); + void hanamai(machine_config &config); + void sprtmtch(machine_config &config); + + void init_mjelct3(); + void init_blktouch(); + void init_mjelct3a(); + void init_maya_common(); + void init_mayac(); + void init_maya(); + DECLARE_WRITE_LINE_MEMBER(blitter_ack_w); DECLARE_WRITE_LINE_MEMBER(sprtmtch_blitter_irq_w); + DECLARE_WRITE_LINE_MEMBER(sprtmtch_vblank_w); + DECLARE_WRITE_LINE_MEMBER(layer_half_w); + DECLARE_WRITE_LINE_MEMBER(layer_half2_w); + DECLARE_WRITE_LINE_MEMBER(flipscreen_w); + + DECLARE_WRITE8_MEMBER(hnoridur_blit_pixel_w); + DECLARE_WRITE8_MEMBER(dynax_blit_scrollx_w); + DECLARE_WRITE8_MEMBER(dynax_blit_scrolly_w); + +protected: + required_device m_maincpu; + optional_device m_soundcpu; + optional_device m_oki; + optional_device m_screen; + required_device m_palette; + optional_device m_mainlatch; + optional_device m_bankdev; + + /* input / output */ + uint8_t m_input_sel; + uint8_t m_dsw_sel; + uint8_t m_keyb; + uint8_t m_coins; + uint8_t m_hopper; + + DECLARE_VIDEO_START(hnoridur); + + DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w); + DECLARE_WRITE8_MEMBER(dynax_blit_dest_w); + DECLARE_WRITE8_MEMBER(dynax_blit_romregion_w); + DECLARE_WRITE8_MEMBER(dynax_extra_scrollx_w); + DECLARE_WRITE8_MEMBER(dynax_extra_scrolly_w); + + void hanamai_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i ); + + DECLARE_MACHINE_START(dynax); + DECLARE_MACHINE_RESET(dynax); + + void htengoku_banked_map(address_map &map); + +private: DECLARE_WRITE8_MEMBER(jantouki_vblank_ack_w); DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_ack_w); DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_irq_w); @@ -102,10 +171,7 @@ public: DECLARE_READ8_MEMBER(gekisha_keyboard_1_r); DECLARE_WRITE8_MEMBER(gekisha_hopper_w); DECLARE_WRITE8_MEMBER(gekisha_p4_w); - DECLARE_WRITE8_MEMBER(dynax_extra_scrollx_w); - DECLARE_WRITE8_MEMBER(dynax_extra_scrolly_w); //DECLARE_WRITE8_MEMBER(dynax_blit_pen_w); - DECLARE_WRITE8_MEMBER(dynax_blit_dest_w); DECLARE_WRITE8_MEMBER(dynax_blit2_dest_w); DECLARE_WRITE8_MEMBER(tenkai_blit_dest_w); DECLARE_WRITE8_MEMBER(mjembase_blit_dest_w); @@ -119,26 +185,19 @@ public: DECLARE_WRITE8_MEMBER(dynax_blit_palette67_w); DECLARE_WRITE_LINE_MEMBER(blit_palbank_w); DECLARE_WRITE_LINE_MEMBER(blit2_palbank_w); - DECLARE_WRITE_LINE_MEMBER(layer_half_w); - DECLARE_WRITE_LINE_MEMBER(layer_half2_w); DECLARE_WRITE_LINE_MEMBER(mjdialq2_blit_dest0_w); DECLARE_WRITE_LINE_MEMBER(mjdialq2_blit_dest1_w); DECLARE_WRITE8_MEMBER(dynax_layer_enable_w); DECLARE_WRITE8_MEMBER(jantouki_layer_enable_w); DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer0_enable_w); DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer1_enable_w); - DECLARE_WRITE_LINE_MEMBER(flipscreen_w); - DECLARE_WRITE8_MEMBER(dynax_blit_romregion_w); DECLARE_WRITE8_MEMBER(dynax_blit2_romregion_w); DECLARE_WRITE8_MEMBER(hanamai_blit_pixel_w); DECLARE_WRITE8_MEMBER(cdracula_blit_pixel_w); - DECLARE_WRITE8_MEMBER(hnoridur_blit_pixel_w); DECLARE_WRITE8_MEMBER(drgpunch_blit_pixel_w); DECLARE_WRITE8_MEMBER(jantouki_blit_pixel_w); DECLARE_WRITE8_MEMBER(jantouki_blit2_pixel_w); DECLARE_WRITE8_MEMBER(mjdialq2_blit_pixel_w); - DECLARE_WRITE8_MEMBER(dynax_blit_scrollx_w); - DECLARE_WRITE8_MEMBER(dynax_blit_scrolly_w); DECLARE_WRITE8_MEMBER(dynax_blit2_scrollx_w); DECLARE_WRITE8_MEMBER(dynax_blit2_scrolly_w); DECLARE_WRITE8_MEMBER(tenkai_blit_scrollx_w); @@ -147,13 +206,6 @@ public: DECLARE_WRITE8_MEMBER(tenkai_priority_w); DECLARE_WRITE8_MEMBER(mjembase_priority_w); - void init_mjelct3(); - void init_blktouch(); - void init_mjelct3a(); - void init_maya_common(); - void init_mayac(); - void init_maya(); - uint32_t screen_update_hanamai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_hnoridur(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_sprtmtch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -162,7 +214,6 @@ public: uint32_t screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_cdracula(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(sprtmtch_vblank_w); DECLARE_WRITE_LINE_MEMBER(jantouki_vblank_w); DECLARE_WRITE_LINE_MEMBER(mjfriday_vblank_w); @@ -178,12 +229,9 @@ public: DECLARE_READ8_MEMBER(tenkai_dsw_r); DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_irq_w); DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_ack_w); - DECLARE_MACHINE_RESET(dynax); - DECLARE_MACHINE_START(dynax); DECLARE_MACHINE_START(hanamai); DECLARE_MACHINE_START(hjingi); DECLARE_VIDEO_START(hanamai); - DECLARE_VIDEO_START(hnoridur); DECLARE_PALETTE_INIT(sprtmtch); DECLARE_VIDEO_START(sprtmtch); DECLARE_MACHINE_START(jantouki); @@ -198,32 +246,10 @@ public: //int blitter_drawgfx( int layer, int mask, memory_region *gfx, int src, int pen, int x, int y, int wrap, int flags ); void jantouki_copylayer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int y ); void mjdialq2_copylayer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i ); - void hanamai_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i ); int debug_mask(); int debug_viewer( bitmap_ind16 &bitmap, const rectangle &cliprect ); void dynax_common_reset(); void tenkai_show_6c(); - void mjfriday(machine_config &config); - void yarunara(machine_config &config); - void janyuki(machine_config &config); - void hnoridur(machine_config &config); - void gekisha(machine_config &config); - void majrjhdx(machine_config &config); - void mcnpshnt(machine_config &config); - void nanajign(machine_config &config); - void cdracula(machine_config &config); - void tenkai(machine_config &config); - void hjingi(machine_config &config); - void mjreach(machine_config &config); - void neruton(machine_config &config); - void mjdialq2(machine_config &config); - void jantouki(machine_config &config); - void quiztvqq(machine_config &config); - void mjelctrn(machine_config &config); - void mjembase(machine_config &config); - void mjangels(machine_config &config); - void hanamai(machine_config &config); - void sprtmtch(machine_config &config); void cdracula_io_map(address_map &map); void cdracula_mem_map(address_map &map); void gekisha_banked_map(address_map &map); @@ -235,7 +261,6 @@ public: void hnoridur_banked_map(address_map &map); void hnoridur_io_map(address_map &map); void hnoridur_mem_map(address_map &map); - void htengoku_banked_map(address_map &map); void jantouki_io_map(address_map &map); void jantouki_mem_map(address_map &map); void jantouki_sound_io_map(address_map &map); @@ -260,16 +285,8 @@ public: void yarunara_io_map(address_map &map); void yarunara_mem_map(address_map &map); -protected: /* devices */ - required_device m_maincpu; - optional_device m_soundcpu; - optional_device m_oki; optional_device m_msm; - optional_device m_screen; - required_device m_palette; - optional_device m_bankdev; - optional_device m_mainlatch; optional_device m_mainirq; optional_device m_soundirq; optional_device m_soundlatch; @@ -311,13 +328,6 @@ protected: const int *m_priority_table; int m_hanamai_priority; - /* input */ - uint8_t m_input_sel; - uint8_t m_dsw_sel; - uint8_t m_keyb; - uint8_t m_coins; - uint8_t m_hopper; - /* misc */ uint8_t m_palette_ram[16*256*2]; int m_palbank; diff --git a/src/mame/includes/dynduke.h b/src/mame/includes/dynduke.h index b1c0154b6b8..0f8fac0b5de 100644 --- a/src/mame/includes/dynduke.h +++ b/src/mame/includes/dynduke.h @@ -20,6 +20,10 @@ public: m_back_data(*this, "back_data"), m_fore_data(*this, "fore_data") { } + void dynduke(machine_config &config); + void dbldyn(machine_config &config); + +private: required_device m_maincpu; required_device m_slave; required_device m_seibu_sound; @@ -61,8 +65,6 @@ public: void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void dynduke(machine_config &config); - void dbldyn(machine_config &config); void master_map(address_map &map); void masterj_map(address_map &map); void sei80bu_encrypted_full_map(address_map &map); diff --git a/src/mame/includes/efdt.h b/src/mame/includes/efdt.h index 347944feb1d..b2e5df50d7e 100644 --- a/src/mame/includes/efdt.h +++ b/src/mame/includes/efdt.h @@ -21,6 +21,9 @@ public: m_vregs2(*this, "vregs2") { } + void efdt(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; @@ -67,7 +70,6 @@ public: uint32_t screen_update_efdt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void efdt(machine_config &config); void efdt_map(address_map &map); void efdt_snd_map(address_map &map); }; diff --git a/src/mame/includes/electron.h b/src/mame/includes/electron.h index d5c663d5eed..b90e27c61f9 100644 --- a/src/mame/includes/electron.h +++ b/src/mame/includes/electron.h @@ -32,13 +32,6 @@ class electron_state : public driver_device { public: - enum - { - TIMER_TAPE_HANDLER, - TIMER_SETUP_BEEP, - TIMER_SCANLINE_INTERRUPT - }; - electron_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -53,6 +46,21 @@ public: , m_mrb(*this, "MRB") { } + void electron(machine_config &config); + void btm2105(machine_config &config); + + void electron64(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + +private: + enum + { + TIMER_TAPE_HANDLER, + TIMER_SETUP_BEEP, + TIMER_SCANLINE_INTERRUPT + }; + emu_timer *m_tape_timer; int m_map4[256]; int m_map16[256]; @@ -80,23 +88,17 @@ public: inline uint8_t read_vram( uint16_t addr ); inline void electron_plot_pixel(bitmap_ind16 &bitmap, int x, int y, uint32_t color); void electron_interrupt_handler(int mode, int interrupt); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - void electron(machine_config &config); - void btm2105(machine_config &config); void electron_mem(address_map &map); - void electron64(machine_config &config); void electron64_opcodes(address_map &map); -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_device m_maincpu; required_device m_screen; required_device m_cassette; diff --git a/src/mame/includes/elf.h b/src/mame/includes/elf.h index b1879a5d006..eb2eea4a7d0 100644 --- a/src/mame/includes/elf.h +++ b/src/mame/includes/elf.h @@ -39,6 +39,11 @@ public: , m_led(*this, "led0") { } + void elf2(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( input_w ); + +private: DECLARE_READ8_MEMBER( dispon_r ); DECLARE_READ8_MEMBER( data_r ); DECLARE_WRITE8_MEMBER( data_w ); @@ -50,15 +55,12 @@ public: DECLARE_READ8_MEMBER( dma_r ); DECLARE_WRITE8_MEMBER( sc_w ); DECLARE_WRITE_LINE_MEMBER( da_w ); - DECLARE_INPUT_CHANGED_MEMBER( input_w ); template DECLARE_WRITE8_MEMBER( digit_w ) { m_7segs[N] = data; } DECLARE_QUICKLOAD_LOAD_MEMBER( elf ); - void elf2(machine_config &config); void elf2_io(address_map &map); void elf2_mem(address_map &map); -protected: virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h index bc09b45e06a..9a8f1f730b4 100644 --- a/src/mame/includes/eolith.h +++ b/src/mame/includes/eolith.h @@ -26,9 +26,31 @@ public: { } + void ironfort(machine_config &config); + void eolith50(machine_config &config); + void eolith45(machine_config &config); + void hidctch3(machine_config &config); + + void init_eolith(); + void init_landbrk(); + void init_hidctch2(); + void init_hidnc2k(); + void init_landbrka(); + void init_landbrkb(); + DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank); DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank); + void speedup_read(); + void init_speedup(); + +protected: + + optional_ioport m_eepromoutport; + TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup); + +private: + DECLARE_READ32_MEMBER(eolith_custom_r); DECLARE_WRITE32_MEMBER(systemcontrol_w); template DECLARE_READ32_MEMBER(hidctch3_pen_r); @@ -39,38 +61,22 @@ public: DECLARE_WRITE8_MEMBER(qs1000_p1_w); DECLARE_WRITE8_MEMBER(soundcpu_to_qs1000); - void init_eolith(); - void init_landbrk(); - void init_hidctch2(); - void init_hidnc2k(); - void init_landbrka(); - void init_landbrkb(); - DECLARE_MACHINE_RESET(eolith); DECLARE_VIDEO_START(eolith); - TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup); uint32_t screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void ironfort(machine_config &config); - void eolith50(machine_config &config); - void eolith45(machine_config &config); - void hidctch3(machine_config &config); void eolith_map(address_map &map); void hidctch3_map(address_map &map); void sound_io_map(address_map &map); void sound_prg_map(address_map &map); -protected: + virtual void machine_start() override; // shared with eolith16.cpp, vegaeo.cpp - optional_ioport m_eepromoutport; - void speedup_read(); - void init_speedup(); void patch_mcu_protection(uint32_t address); -private: required_device m_maincpu; optional_device m_soundcpu; required_device m_screen; diff --git a/src/mame/includes/epos.h b/src/mame/includes/epos.h index 0d8e702e145..398e1d44543 100644 --- a/src/mame/includes/epos.h +++ b/src/mame/includes/epos.h @@ -20,6 +20,12 @@ public: m_leds(*this, "led%u", 0U) { } + void epos(machine_config &config); + void dealer(machine_config &config); + + void init_dealer(); + +private: DECLARE_WRITE8_MEMBER(dealer_decrypt_rom); DECLARE_WRITE8_MEMBER(port_1_w); DECLARE_READ8_MEMBER(i8255_porta_r); @@ -27,21 +33,17 @@ public: DECLARE_READ8_MEMBER(ay_porta_mpx_r); DECLARE_WRITE8_MEMBER(flip_screen_w); DECLARE_WRITE8_MEMBER(dealer_pal_w); - void init_dealer(); virtual void machine_reset() override; DECLARE_MACHINE_START(epos); DECLARE_MACHINE_START(dealer); DECLARE_PALETTE_INIT(epos); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void set_pal_color( uint8_t offset, uint8_t data ); - void epos(machine_config &config); - void dealer(machine_config &config); void dealer_io_map(address_map &map); void dealer_map(address_map &map); void epos_io_map(address_map &map); void epos_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); } /* memory pointers */ diff --git a/src/mame/includes/esd16.h b/src/mame/includes/esd16.h index dcd315fffdb..6ac16c4d63c 100644 --- a/src/mame/includes/esd16.h +++ b/src/mame/includes/esd16.h @@ -31,6 +31,14 @@ public: m_soundlatch(*this, "soundlatch") {} + void jumppop(machine_config &config); + void esd16(machine_config &config); + void tangtang(machine_config &config); + void mchampdx(machine_config &config); + void hedpanio(machine_config &config); + void hedpanic(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_vram_0; required_shared_ptr m_vram_1; @@ -76,12 +84,6 @@ public: virtual void video_start() override; uint32_t screen_update_hedpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECOSPR_PRIORITY_CB_MEMBER(hedpanic_pri_callback); - void jumppop(machine_config &config); - void esd16(machine_config &config); - void tangtang(machine_config &config); - void mchampdx(machine_config &config); - void hedpanio(machine_config &config); - void hedpanic(machine_config &config); void hedpanic_map(address_map &map); void jumppop_map(address_map &map); void mchampdx_map(address_map &map); diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index b04503e3c6d..c6ac4c83416 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -29,6 +29,10 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void espial(machine_config &config); + void netwars(machine_config &config); + +private: required_shared_ptr m_videoram; required_shared_ptr m_attributeram; required_shared_ptr m_scrollram; @@ -71,8 +75,6 @@ public: INTERRUPT_GEN_MEMBER(espial_sound_nmi_gen); TIMER_DEVICE_CALLBACK_MEMBER(espial_scanline); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void espial(machine_config &config); - void netwars(machine_config &config); void espial_map(address_map &map); void espial_sound_io_map(address_map &map); void espial_sound_map(address_map &map); diff --git a/src/mame/includes/esripsys.h b/src/mame/includes/esripsys.h index c5d6acef531..8a19d13313a 100644 --- a/src/mame/includes/esripsys.h +++ b/src/mame/includes/esripsys.h @@ -49,6 +49,14 @@ public: m_dac(*this, "dac"), m_screen(*this, "screen") { } + void esripsys(machine_config &config); + + void init_esripsys(); + + DECLARE_INPUT_CHANGED_MEMBER(keypad_interrupt); + DECLARE_INPUT_CHANGED_MEMBER(coin_interrupt); + +private: required_device m_framecpu; required_device m_videocpu; required_device m_gamecpu; @@ -112,11 +120,8 @@ public: DECLARE_WRITE8_MEMBER(tms5220_w); DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(esripsys_bg_intensity_w); - DECLARE_INPUT_CHANGED_MEMBER(keypad_interrupt); - DECLARE_INPUT_CHANGED_MEMBER(coin_interrupt); DECLARE_WRITE_LINE_MEMBER(ptm_irq); DECLARE_WRITE8_MEMBER(esripsys_dac_w); - void init_esripsys(); virtual void video_start() override; uint32_t screen_update_esripsys(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(esripsys_vblank_irq); @@ -126,7 +131,6 @@ public: required_device m_dac; required_device m_screen; ESRIP_DRAW(esripsys_draw); - void esripsys(machine_config &config); void frame_cpu_map(address_map &map); void game_cpu_map(address_map &map); void sound_cpu_map(address_map &map); diff --git a/src/mame/includes/eti660.h b/src/mame/includes/eti660.h index ebe481acfa3..e2154378564 100644 --- a/src/mame/includes/eti660.h +++ b/src/mame/includes/eti660.h @@ -39,6 +39,9 @@ public: , m_leds(*this, "led%u", 0U) { } + void eti660(machine_config &config); + +private: DECLARE_READ8_MEMBER( pia_r ); DECLARE_WRITE8_MEMBER( pia_w ); DECLARE_WRITE8_MEMBER( colorram_w ); @@ -55,10 +58,9 @@ public: DECLARE_QUICKLOAD_LOAD_MEMBER( eti660 ); required_shared_ptr m_p_videoram; - void eti660(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; required_device m_cti; required_device m_pia; diff --git a/src/mame/includes/exedexes.h b/src/mame/includes/exedexes.h index dcfb64c6bc3..10d7b0fca1a 100644 --- a/src/mame/includes/exedexes.h +++ b/src/mame/includes/exedexes.h @@ -25,6 +25,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void exedexes(machine_config &config); + +private: /* memory pointers */ required_device m_spriteram; required_shared_ptr m_videoram; @@ -61,7 +64,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void exedexes(machine_config &config); void exedexes_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/exerion.h b/src/mame/includes/exerion.h index f2db520e03d..b65bd926c12 100644 --- a/src/mame/includes/exerion.h +++ b/src/mame/includes/exerion.h @@ -36,6 +36,17 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void exerion(machine_config &config); + void irion(machine_config &config); + + void init_exerion(); + void init_exerionb(); + void init_irion(); + + DECLARE_CUSTOM_INPUT_MEMBER(exerion_controls_r); + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* memory pointers */ required_shared_ptr m_main_ram; required_shared_ptr m_videoram; @@ -64,21 +75,14 @@ public: DECLARE_WRITE8_MEMBER(exerion_videoreg_w); DECLARE_WRITE8_MEMBER(exerion_video_latch_w); DECLARE_READ8_MEMBER(exerion_video_timing_r); - DECLARE_CUSTOM_INPUT_MEMBER(exerion_controls_r); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_READ8_MEMBER(exerion_porta_r); DECLARE_WRITE8_MEMBER(exerion_portb_w); - void init_exerion(); - void init_exerionb(); - void init_irion(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(exerion); uint32_t screen_update_exerion(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect); - void exerion(machine_config &config); - void irion(machine_config &config); void main_map(address_map &map); void sub_map(address_map &map); }; diff --git a/src/mame/includes/exidy.h b/src/mame/includes/exidy.h index 1f8272b115f..a1b16819dd3 100644 --- a/src/mame/includes/exidy.h +++ b/src/mame/includes/exidy.h @@ -51,8 +51,34 @@ public: m_sprite_enable(*this, "sprite_enable"), m_color_latch(*this, "color_latch"), m_characterram(*this, "characterram") { } + + void base(machine_config &config); + void mtrap(machine_config &config); + void venture(machine_config &config); + void fax(machine_config &config); + void teetert(machine_config &config); + void sidetrac(machine_config &config); + void spectar(machine_config &config); + void spectar_audio(machine_config &config); + void rallys(machine_config &config); + void pepper2(machine_config &config); + void targ(machine_config &config); + void targ_audio(machine_config &config); + void init_fax(); + void init_sidetrac(); + void init_pepper2(); + void init_targ(); + void init_rallys(); + void init_mtrap(); + void init_teetert(); + void init_venture(); + void init_spectar(); + void init_phantoma(); + DECLARE_CUSTOM_INPUT_MEMBER(teetert_input_r); + +private: required_device m_maincpu; optional_device m_dac; optional_device m_samples; @@ -83,19 +109,6 @@ public: DECLARE_WRITE8_MEMBER(fax_bank_select_w); DECLARE_READ8_MEMBER(exidy_interrupt_r); - DECLARE_CUSTOM_INPUT_MEMBER(teetert_input_r); - - void init_fax(); - void init_sidetrac(); - void init_pepper2(); - void init_targ(); - void init_rallys(); - void init_mtrap(); - void init_teetert(); - void init_venture(); - void init_spectar(); - void init_phantoma(); - virtual void video_start() override; DECLARE_MACHINE_START(teetert); @@ -127,18 +140,6 @@ public: SAMPLES_START_CB_MEMBER(spectar_audio_start); SAMPLES_START_CB_MEMBER(targ_audio_start); - void base(machine_config &config); - void mtrap(machine_config &config); - void venture(machine_config &config); - void fax(machine_config &config); - void teetert(machine_config &config); - void sidetrac(machine_config &config); - void spectar(machine_config &config); - void spectar_audio(machine_config &config); - void rallys(machine_config &config); - void pepper2(machine_config &config); - void targ(machine_config &config); - void targ_audio(machine_config &config); void exidy_map(address_map &map); void fax_map(address_map &map); void pepper2_map(address_map &map); diff --git a/src/mame/includes/exp85.h b/src/mame/includes/exp85.h index 42aaf9f074a..52ad9920ad7 100644 --- a/src/mame/includes/exp85.h +++ b/src/mame/includes/exp85.h @@ -25,6 +25,12 @@ public: m_tape_control(0) { } + void exp85(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 ); + +private: required_device m_maincpu; required_device m_rs232; required_device m_cassette; @@ -37,12 +43,9 @@ public: DECLARE_WRITE8_MEMBER( i8355_a_w ); DECLARE_READ_LINE_MEMBER( sid_r ); DECLARE_WRITE_LINE_MEMBER( sod_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 ); /* cassette state */ int m_tape_control; - void exp85(machine_config &config); void exp85_io(address_map &map); void exp85_mem(address_map &map); }; diff --git a/src/mame/includes/exprraid.h b/src/mame/includes/exprraid.h index 4283a815197..1df4f028091 100644 --- a/src/mame/includes/exprraid.h +++ b/src/mame/includes/exprraid.h @@ -24,6 +24,18 @@ public: m_videoram(*this, "videoram"), m_colorram(*this, "colorram") { } + void exprraid(machine_config &config); + void exprboot(machine_config &config); + + void init_exprraid(); + void init_wexpressb(); + void init_wexpressb2(); + void init_wexpressb3(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_deco16); + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi); + +private: /* devices */ required_device m_maincpu; required_device m_slave; @@ -60,22 +72,14 @@ public: DECLARE_WRITE8_MEMBER(exprraid_bgselect_w); DECLARE_WRITE8_MEMBER(exprraid_scrollx_w); DECLARE_WRITE8_MEMBER(exprraid_scrolly_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_deco16); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi); DECLARE_WRITE_LINE_MEMBER(irqhandler); - void init_exprraid(); - void init_wexpressb(); - void init_wexpressb2(); - void init_wexpressb3(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); uint32_t screen_update_exprraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void exprraid_gfx_expand(); - void exprraid(machine_config &config); - void exprboot(machine_config &config); void master_io_map(address_map &map); void master_map(address_map &map); void slave_map(address_map &map); diff --git a/src/mame/includes/exzisus.h b/src/mame/includes/exzisus.h index c823cb5bbda..9a247cdfe79 100644 --- a/src/mame/includes/exzisus.h +++ b/src/mame/includes/exzisus.h @@ -18,6 +18,9 @@ public: m_objectram0(*this, "objectram0"), m_videoram0(*this, "videoram0") { } + void exzisus(machine_config &config); + +private: required_device m_cpuc; required_device m_gfxdecode; required_device m_palette; @@ -37,7 +40,6 @@ public: virtual void machine_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void exzisus(machine_config &config); void cpua_map(address_map &map); void cpub_map(address_map &map); void cpuc_map(address_map &map); diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h index 5acdd173e97..3f57055c5e0 100644 --- a/src/mame/includes/f1gp.h +++ b/src/mame/includes/f1gp.h @@ -37,6 +37,11 @@ public: m_soundlatch(*this, "soundlatch"), m_acia(*this, "acia") { } + void f1gp2(machine_config &config); + void f1gpb(machine_config &config); + void f1gp(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_sharedram; optional_shared_ptr m_spr1vram; @@ -102,9 +107,6 @@ public: uint32_t screen_update_f1gpb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_f1gp2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void f1gpb_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect ); - void f1gp2(machine_config &config); - void f1gpb(machine_config &config); - void f1gp(machine_config &config); void f1gp2_cpu1_map(address_map &map); void f1gp_cpu1_map(address_map &map); void f1gp_cpu2_map(address_map &map); diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h index 376e25e7bf9..e60e730d9cf 100644 --- a/src/mame/includes/fantland.h +++ b/src/mame/includes/fantland.h @@ -24,6 +24,14 @@ public: m_spriteram(*this, "spriteram", 0), m_spriteram2(*this, "spriteram2", 0) { } + void fantland(machine_config &config); + void wheelrun(machine_config &config); + void borntofi(machine_config &config); + void galaxygn(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r); + +private: /* memory pointers */ // uint8_t * m_spriteram; // currently directly used in a 16bit map... // uint8_t * m_spriteram_2; // currently directly used in a 16bit map... @@ -64,7 +72,6 @@ public: DECLARE_WRITE8_MEMBER(borntofi_nmi_enable_w); DECLARE_READ8_MEMBER(borntofi_inputs_r); DECLARE_WRITE8_MEMBER(borntofi_msm5205_w); - DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r); DECLARE_MACHINE_START(fantland); DECLARE_MACHINE_RESET(fantland); DECLARE_MACHINE_START(borntofi); @@ -80,10 +87,6 @@ public: void borntofi_adpcm_start( msm5205_device *device, int voice ); void borntofi_adpcm_stop( msm5205_device *device, int voice ); void borntofi_adpcm_int( msm5205_device *device, int voice ); - void fantland(machine_config &config); - void wheelrun(machine_config &config); - void borntofi(machine_config &config); - void galaxygn(machine_config &config); void borntofi_map(address_map &map); void borntofi_sound_map(address_map &map); void fantland_map(address_map &map); diff --git a/src/mame/includes/fastfred.h b/src/mame/includes/fastfred.h index 469eb864db0..fd090b0abd6 100644 --- a/src/mame/includes/fastfred.h +++ b/src/mame/includes/fastfred.h @@ -20,6 +20,19 @@ public: m_background_color(*this, "bgcolor"), m_imago_fg_videoram(*this, "imago_fg_vram") { } + void jumpcoas(machine_config &config); + void imago(machine_config &config); + void fastfred(machine_config &config); + + void init_fastfred(); + void init_flyboy(); + void init_flyboyb(); + void init_imago(); + void init_boggy84(); + void init_jumpcoas(); + void init_boggy84b(); + +private: required_shared_ptr m_videoram; required_shared_ptr m_spriteram; required_shared_ptr m_attributesram; @@ -61,14 +74,6 @@ public: DECLARE_WRITE8_MEMBER(imago_fg_videoram_w); DECLARE_WRITE_LINE_MEMBER(imago_charbank_w); - void init_fastfred(); - void init_flyboy(); - void init_flyboyb(); - void init_imago(); - void init_boggy84(); - void init_jumpcoas(); - void init_boggy84b(); - TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(imago_get_tile_info_bg); TILE_GET_INFO_MEMBER(imago_get_tile_info_fg); @@ -86,9 +91,6 @@ public: uint32_t screen_update_fastfred(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void jumpcoas(machine_config &config); - void imago(machine_config &config); - void fastfred(machine_config &config); void fastfred_map(address_map &map); void imago_map(address_map &map); void jumpcoas_map(address_map &map); diff --git a/src/mame/includes/fastlane.h b/src/mame/includes/fastlane.h index 25fb486269a..f536427680e 100644 --- a/src/mame/includes/fastlane.h +++ b/src/mame/includes/fastlane.h @@ -30,6 +30,9 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void fastlane(machine_config &config); + +private: required_device m_maincpu; /* memory pointers */ @@ -69,6 +72,5 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(fastlane_scanline); DECLARE_WRITE8_MEMBER(volume_callback0); DECLARE_WRITE8_MEMBER(volume_callback1); - void fastlane(machine_config &config); void fastlane_map(address_map &map); }; diff --git a/src/mame/includes/fcombat.h b/src/mame/includes/fcombat.h index 2abf26d5c09..998b14ac93b 100644 --- a/src/mame/includes/fcombat.h +++ b/src/mame/includes/fcombat.h @@ -37,6 +37,13 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void fcombat(machine_config &config); + + void init_fcombat(); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -69,15 +76,12 @@ public: DECLARE_READ8_MEMBER(e300_r); DECLARE_WRITE8_MEMBER(ee00_w); DECLARE_WRITE8_MEMBER(fcombat_videoreg_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - void init_fcombat(); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(fcombat); uint32_t screen_update_fcombat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void fcombat(machine_config &config); void audio_map(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index bd1c643e0c8..d56c391716e 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -7,11 +7,6 @@ class fgoal_state : public driver_device { public: - enum - { - TIMER_INTERRUPT - }; - fgoal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -21,6 +16,16 @@ public: m_palette(*this, "palette"), m_video_ram(*this, "video_ram") { } + void fgoal(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(_80_r); + +private: + enum + { + TIMER_INTERRUPT + }; + /* devices */ required_device m_maincpu; required_device m_mb14241; @@ -61,8 +66,6 @@ public: DECLARE_WRITE8_MEMBER(ypos_w); DECLARE_WRITE8_MEMBER(xpos_w); - DECLARE_CUSTOM_INPUT_MEMBER(_80_r); - TIMER_CALLBACK_MEMBER(interrupt_callback); virtual void machine_start() override; @@ -74,8 +77,7 @@ public: int intensity(int bits); unsigned video_ram_address( ); - void fgoal(machine_config &config); void cpu_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/finalizr.h b/src/mame/includes/finalizr.h index 24bc57ca83f..2c9370800f9 100644 --- a/src/mame/includes/finalizr.h +++ b/src/mame/includes/finalizr.h @@ -27,6 +27,9 @@ public: m_spriteram_2(*this, "spriteram_2") { } + void finalizr(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_audiocpu; @@ -69,7 +72,6 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_finalizr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(finalizr_scanline); - void finalizr(machine_config &config); void main_map(address_map &map); void sound_io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index ba1b4ffcb09..67b38b2afcc 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -28,6 +28,12 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void firetrapbl(machine_config &config); + void firetrap(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +private: /* memory pointers */ required_shared_ptr m_bg1videoram; required_shared_ptr m_bg2videoram; @@ -78,7 +84,6 @@ public: DECLARE_WRITE8_MEMBER(firetrap_bg1_scrolly_w); DECLARE_WRITE8_MEMBER(firetrap_bg2_scrollx_w); DECLARE_WRITE8_MEMBER(firetrap_bg2_scrolly_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); TILEMAP_MAPPER_MEMBER(get_fg_memory_offset); TILEMAP_MAPPER_MEMBER(get_bg_memory_offset); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -93,8 +98,6 @@ public: inline void get_bg_tile_info(tile_data &tileinfo, int tile_index, uint8_t *bgvideoram, int gfx_region); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); DECLARE_WRITE_LINE_MEMBER(firetrap_adpcm_int); - void firetrapbl(machine_config &config); - void firetrap(machine_config &config); void firetrap_base_map(address_map &map); void firetrap_bootleg_map(address_map &map); void firetrap_map(address_map &map); diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index 78cc49b68d0..557eb036787 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -64,6 +64,20 @@ public: , m_leds(*this, "led%u", 0U) { } + void firetrk(machine_config &config); + void montecar(machine_config &config); + void superbug(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(steer_dir_r); + DECLARE_CUSTOM_INPUT_MEMBER(steer_flag_r); + DECLARE_CUSTOM_INPUT_MEMBER(skid_r); + DECLARE_CUSTOM_INPUT_MEMBER(crash_r); + DECLARE_CUSTOM_INPUT_MEMBER(gear_r); + DECLARE_INPUT_CHANGED_MEMBER(service_mode_switch_changed); + DECLARE_INPUT_CHANGED_MEMBER(firetrk_horn_changed); + DECLARE_INPUT_CHANGED_MEMBER(gear_changed); + +private: DECLARE_WRITE8_MEMBER(firetrk_output_w); DECLARE_WRITE8_MEMBER(superbug_output_w); DECLARE_WRITE8_MEMBER(montecar_output_1_w); @@ -77,14 +91,6 @@ public: DECLARE_WRITE8_MEMBER(montecar_drone_reset_w); DECLARE_WRITE8_MEMBER(steer_reset_w); DECLARE_WRITE8_MEMBER(crash_reset_w); - DECLARE_CUSTOM_INPUT_MEMBER(steer_dir_r); - DECLARE_CUSTOM_INPUT_MEMBER(steer_flag_r); - DECLARE_CUSTOM_INPUT_MEMBER(skid_r); - DECLARE_CUSTOM_INPUT_MEMBER(crash_r); - DECLARE_CUSTOM_INPUT_MEMBER(gear_r); - DECLARE_INPUT_CHANGED_MEMBER(service_mode_switch_changed); - DECLARE_INPUT_CHANGED_MEMBER(firetrk_horn_changed); - DECLARE_INPUT_CHANGED_MEMBER(gear_changed); TILE_GET_INFO_MEMBER(firetrk_get_tile_info1); TILE_GET_INFO_MEMBER(superbug_get_tile_info1); TILE_GET_INFO_MEMBER(montecar_get_tile_info1); @@ -113,14 +119,10 @@ public: void check_collision(int which); void set_service_mode(int enable); void draw_text(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t *alpha_ram, int x, int count, int height); - void firetrk(machine_config &config); - void montecar(machine_config &config); - void superbug(machine_config &config); void firetrk_map(address_map &map); void montecar_map(address_map &map); void superbug_map(address_map &map); -protected: virtual void machine_start() override { m_leds.resolve(); } virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/fitfight.h b/src/mame/includes/fitfight.h index 44431f6f969..a3789e47cfc 100644 --- a/src/mame/includes/fitfight.h +++ b/src/mame/includes/fitfight.h @@ -22,6 +22,15 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void bbprot(machine_config &config); + void fitfight(machine_config &config); + + void init_hotmindff(); + void init_fitfight(); + void init_histryma(); + void init_bbprot(); + +private: /* memory pointers */ required_shared_ptr m_fof_100000; required_shared_ptr m_fof_600000; @@ -57,10 +66,6 @@ public: DECLARE_WRITE16_MEMBER(fof_txt_tileram_w); DECLARE_READ16_MEMBER( hotmindff_unk_r ); - void init_hotmindff(); - void init_fitfight(); - void init_histryma(); - void init_bbprot(); TILE_GET_INFO_MEMBER(get_fof_bak_tile_info); TILE_GET_INFO_MEMBER(get_fof_mid_tile_info); TILE_GET_INFO_MEMBER(get_fof_txt_tile_info); @@ -73,8 +78,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void bbprot(machine_config &config); - void fitfight(machine_config &config); void bbprot_main_map(address_map &map); void fitfight_main_map(address_map &map); void snd_mem(address_map &map); diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index 1789cddfe78..00b073eee79 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -25,6 +25,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_soundlatch(*this, "soundlatch") { } + void flkatck(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_k007121_ram; @@ -60,7 +63,6 @@ public: uint32_t screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(flkatck_interrupt); DECLARE_WRITE8_MEMBER(volume_callback); - void flkatck(machine_config &config); void flkatck_map(address_map &map); void flkatck_sound_map(address_map &map); }; diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index f53f95d750b..7612d2ebe2a 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -30,6 +30,15 @@ public: m_soundlatch2(*this, "soundlatch2"), m_soundnmi(*this, "soundnmi") { } + void flstory(machine_config &config); + void rumba(machine_config &config); + void onna34ro(machine_config &config); + void victnine(machine_config &config); + void onna34ro_mcu(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(victnine_mcu_status_bit01_r); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -80,7 +89,6 @@ public: DECLARE_READ8_MEMBER(victnine_gfxctrl_r); DECLARE_WRITE8_MEMBER(victnine_gfxctrl_w); DECLARE_WRITE8_MEMBER(flstory_scrlram_w); - DECLARE_CUSTOM_INPUT_MEMBER(victnine_mcu_status_bit01_r); DECLARE_WRITE8_MEMBER(sound_control_0_w); DECLARE_WRITE8_MEMBER(sound_control_1_w); DECLARE_WRITE8_MEMBER(sound_control_2_w); @@ -100,11 +108,6 @@ public: uint32_t screen_update_rumba(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); void victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void flstory(machine_config &config); - void rumba(machine_config &config); - void onna34ro(machine_config &config); - void victnine(machine_config &config); - void onna34ro_mcu(machine_config &config); void base_map(address_map &map); void flstory_map(address_map &map); void onna34ro_map(address_map &map); diff --git a/src/mame/includes/fm7.h b/src/mame/includes/fm7.h index 9c38a06340c..27faf758134 100644 --- a/src/mame/includes/fm7.h +++ b/src/mame/includes/fm7.h @@ -112,17 +112,6 @@ struct fm7_alu_t class fm7_state : public driver_device { public: - enum - { - TIMER_FM7_BEEPER_OFF, - TIMER_FM77AV_ENCODER_ACK, - TIMER_FM7_IRQ, - TIMER_FM7_SUBTIMER_IRQ, - TIMER_FM7_KEYBOARD_POLL, - TIMER_FM77AV_ALU_TASK_END, - TIMER_FM77AV_VSYNC - }; - fm7_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_shared_ram(*this, "shared_ram"), @@ -155,8 +144,27 @@ public: m_avbank(*this, "av_bank%u", 1) { } + + void fm16beta(machine_config &config); + void fm8(machine_config &config); + void fm7(machine_config &config); + void fm77av(machine_config &config); + void fm11(machine_config &config); + void init_fm7(); +private: + enum + { + TIMER_FM7_BEEPER_OFF, + TIMER_FM77AV_ENCODER_ACK, + TIMER_FM7_IRQ, + TIMER_FM7_SUBTIMER_IRQ, + TIMER_FM7_KEYBOARD_POLL, + TIMER_FM77AV_ALU_TASK_END, + TIMER_FM77AV_VSYNC + }; + virtual void machine_reset() override; virtual void video_start() override; @@ -268,11 +276,6 @@ public: uint32_t screen_update_fm7(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void fm16beta(machine_config &config); - void fm8(machine_config &config); - void fm7(machine_config &config); - void fm77av(machine_config &config); - void fm11(machine_config &config); void fm11_mem(address_map &map); void fm11_sub_mem(address_map &map); void fm11_x86_io(address_map &map); @@ -286,7 +289,7 @@ public: void fm7_mem(address_map &map); void fm7_sub_mem(address_map &map); void fm8_mem(address_map &map); -protected: + optional_shared_ptr m_shared_ram; optional_shared_ptr m_boot_ram; diff --git a/src/mame/includes/fmtowns.h b/src/mame/includes/fmtowns.h index 5cabaf1a40e..1371416720d 100644 --- a/src/mame/includes/fmtowns.h +++ b/src/mame/includes/fmtowns.h @@ -134,6 +134,27 @@ class towns_state : public driver_device , m_serial(*this,"serial") { } + void towns_base(machine_config &config); + void towns(machine_config &config); + void townsftv(machine_config &config); + void townshr(machine_config &config); + void townssj(machine_config &config); + + INTERRUPT_GEN_MEMBER(towns_vsync_irq); + +protected: + uint16_t m_towns_machine_id; // default is 0x0101 + + void marty_mem(address_map &map); + void pcm_mem(address_map &map); + void towns16_io(address_map &map); + void towns_io(address_map &map); + void towns_mem(address_map &map); + void ux_mem(address_map &map); + + virtual void driver_start() override; + +private: /* devices */ required_device m_maincpu; required_device m_speaker; @@ -187,7 +208,6 @@ class towns_state : public driver_device uint8_t m_towns_rtc_select; uint8_t m_towns_rtc_data; uint8_t m_towns_timer_mask; - uint16_t m_towns_machine_id; // default is 0x0101 uint8_t m_towns_kb_status; uint8_t m_towns_kb_irq1_enable; uint8_t m_towns_kb_output; // key output @@ -242,7 +262,6 @@ class towns_state : public driver_device optional_shared_ptr m_nvram; optional_shared_ptr m_nvram16; - virtual void driver_start() override; virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -353,18 +372,6 @@ class towns_state : public driver_device required_memory_region m_user; optional_memory_region m_serial; - void towns_base(machine_config &config); - void towns(machine_config &config); - void townsftv(machine_config &config); - void townshr(machine_config &config); - void townssj(machine_config &config); - void marty_mem(address_map &map); - void pcm_mem(address_map &map); - void towns16_io(address_map &map); - void towns_io(address_map &map); - void towns_mem(address_map &map); - void ux_mem(address_map &map); -private: static const device_timer_id TIMER_FREERUN = 1; static const device_timer_id TIMER_INTERVAL2 = 2; static const device_timer_id TIMER_KEYBOARD = 3; @@ -388,8 +395,7 @@ private: bool m_rtc_busy; u8 m_vram_mask[4]; u8 m_vram_mask_addr; -public: - INTERRUPT_GEN_MEMBER(towns_vsync_irq); + TIMER_CALLBACK_MEMBER(towns_cdrom_read_byte); TIMER_CALLBACK_MEMBER(towns_sprite_done); TIMER_CALLBACK_MEMBER(towns_vblank_end); diff --git a/src/mame/includes/foodf.h b/src/mame/includes/foodf.h index 65c33c7778d..3272a4b1337 100644 --- a/src/mame/includes/foodf.h +++ b/src/mame/includes/foodf.h @@ -28,7 +28,7 @@ public: void foodf(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -44,7 +44,6 @@ protected: void main_map(address_map &map); -private: required_device m_nvram; required_device m_playfield_tilemap; required_device m_scan_timer; diff --git a/src/mame/includes/freekick.h b/src/mame/includes/freekick.h index 58873ccacda..5d6749ce2ee 100644 --- a/src/mame/includes/freekick.h +++ b/src/mame/includes/freekick.h @@ -16,6 +16,20 @@ public: m_bank1(*this, "bank1"), m_bank1d(*this, "bank1d") { } + void base(machine_config &config); + void oigas(machine_config &config); + void pbillrd(machine_config &config); + void gigas(machine_config &config); + void gigasm(machine_config &config); + void pbillrdm(machine_config &config); + void omega(machine_config &config); + void freekick(machine_config &config); + + void init_gigas(); + void init_gigasb(); + void init_pbillrds(); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; @@ -50,9 +64,6 @@ public: DECLARE_WRITE8_MEMBER(snd_rom_addr_l_w); DECLARE_WRITE8_MEMBER(snd_rom_addr_h_w); DECLARE_READ8_MEMBER(snd_rom_r); - void init_gigas(); - void init_gigasb(); - void init_pbillrds(); TILE_GET_INFO_MEMBER(get_freek_tile_info); virtual void video_start() override; DECLARE_MACHINE_START(pbillrd); @@ -71,14 +82,6 @@ public: required_device m_gfxdecode; required_device m_palette; optional_memory_bank m_bank1, m_bank1d; - void base(machine_config &config); - void oigas(machine_config &config); - void pbillrd(machine_config &config); - void gigas(machine_config &config); - void gigasm(machine_config &config); - void pbillrdm(machine_config &config); - void omega(machine_config &config); - void freekick(machine_config &config); void decrypted_opcodes_map(address_map &map); void freekick_io_map(address_map &map); void freekick_map(address_map &map); diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index d3529cadc51..8ef889fe92f 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -22,6 +22,18 @@ public: m_soundlatch2(*this, "soundlatch2"), m_uart(*this, "uart") { } + void fromanc2(machine_config &config); + void fromancr(machine_config &config); + void fromanc4(machine_config &config); + + void init_fromanc4(); + void init_fromanc2(); + + DECLARE_CUSTOM_INPUT_MEMBER(subcpu_int_r); + DECLARE_CUSTOM_INPUT_MEMBER(sndcpu_nmi_r); + DECLARE_CUSTOM_INPUT_MEMBER(subcpu_nmi_r); + +private: /* memory pointers */ std::unique_ptr m_videoram[2][4]; std::unique_ptr m_bankedram; @@ -87,11 +99,7 @@ public: DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_0_w); DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_1_w); DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_2_w); - DECLARE_CUSTOM_INPUT_MEMBER(subcpu_int_r); - DECLARE_CUSTOM_INPUT_MEMBER(sndcpu_nmi_r); - DECLARE_CUSTOM_INPUT_MEMBER(subcpu_nmi_r); - void init_fromanc4(); - void init_fromanc2(); + template TILE_GET_INFO_MEMBER(fromanc2_get_tile_info); template TILE_GET_INFO_MEMBER(fromancr_get_tile_info); virtual void machine_reset() override; @@ -106,9 +114,6 @@ public: inline void fromancr_vram_w(offs_t offset, uint16_t data, uint16_t mem_mask, int layer ); void fromancr_gfxbank_w( int data ); inline void fromanc4_vram_w( offs_t offset, uint16_t data, uint16_t mem_mask, int layer ); - void fromanc2(machine_config &config); - void fromancr(machine_config &config); - void fromanc4(machine_config &config); void fromanc2_main_map(address_map &map); void fromanc2_sound_io_map(address_map &map); void fromanc2_sound_map(address_map &map); diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index 686474b03f9..b8b67f756b8 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -21,23 +21,58 @@ class fromance_state : public driver_device public: fromance_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), m_spriteram(*this, "spriteram"), + m_palette(*this, "palette"), m_gga(*this, "gga"), + m_videoram(*this, "videoram"), m_spr_old(*this, "vsystem_spr_old"), - m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub"), m_sublatch(*this, "sublatch"), m_msm(*this, "msm"), m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_screen(*this, "screen") + { } + + void nekkyoku(machine_config &config); + void fromance(machine_config &config); + void idolmj(machine_config &config); + + void init_common(); + + DECLARE_WRITE8_MEMBER(fromance_gga_data_w); + +protected: + required_device m_maincpu; + optional_shared_ptr m_spriteram; + required_device m_palette; + required_device m_gga; + + DECLARE_WRITE8_MEMBER(fromance_gfxreg_w); + DECLARE_READ8_MEMBER(fromance_videoram_r); + DECLARE_WRITE8_MEMBER(fromance_videoram_w); + DECLARE_WRITE8_MEMBER(fromance_scroll_w); + + uint32_t m_scrolly_ofs; + uint32_t m_scrollx_ofs; + uint32_t m_scrollx[2]; + uint32_t m_scrolly[2]; + uint8_t m_gfxreg; + uint8_t m_flipscreen; + uint8_t m_flipscreen_old; + uint8_t m_selected_videoram; + uint8_t m_selected_paletteram; + DECLARE_VIDEO_START(hatris); + DECLARE_VIDEO_START(pipedrm); + + uint32_t screen_update_fromance(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_pipedrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +private: /* memory pointers (used by pipedrm) */ optional_shared_ptr m_videoram; - optional_shared_ptr m_spriteram; - required_device m_gga; optional_device m_spr_old; // only used by pipe dream, split this state up and clean things... /* video-related */ @@ -45,15 +80,6 @@ public: tilemap_t *m_fg_tilemap; std::unique_ptr m_local_videoram[2]; std::unique_ptr m_local_paletteram; - uint8_t m_selected_videoram; - uint8_t m_selected_paletteram; - uint32_t m_scrollx[2]; - uint32_t m_scrolly[2]; - uint8_t m_gfxreg; - uint8_t m_flipscreen; - uint8_t m_flipscreen_old; - uint32_t m_scrolly_ofs; - uint32_t m_scrollx_ofs; emu_timer *m_crtc_timer; @@ -71,13 +97,8 @@ public: DECLARE_WRITE8_MEMBER(fromance_portselect_w); DECLARE_READ8_MEMBER(fromance_keymatrix_r); DECLARE_WRITE8_MEMBER(fromance_coinctr_w); - DECLARE_WRITE8_MEMBER(fromance_gfxreg_w); DECLARE_READ8_MEMBER(fromance_paletteram_r); DECLARE_WRITE8_MEMBER(fromance_paletteram_w); - DECLARE_READ8_MEMBER(fromance_videoram_r); - DECLARE_WRITE8_MEMBER(fromance_videoram_w); - DECLARE_WRITE8_MEMBER(fromance_scroll_w); - DECLARE_WRITE8_MEMBER(fromance_gga_data_w); DECLARE_WRITE8_MEMBER(fromance_adpcm_reset_w); TILE_GET_INFO_MEMBER(get_fromance_bg_tile_info); TILE_GET_INFO_MEMBER(get_fromance_fg_tile_info); @@ -87,26 +108,16 @@ public: DECLARE_MACHINE_RESET(fromance); DECLARE_VIDEO_START(nekkyoku); DECLARE_VIDEO_START(fromance); - DECLARE_VIDEO_START(pipedrm); - DECLARE_VIDEO_START(hatris); - uint32_t screen_update_fromance(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_pipedrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(crtc_interrupt_gen); inline void get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer ); inline void get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer ); - void init_common(); void crtc_refresh(); DECLARE_WRITE_LINE_MEMBER(fromance_adpcm_int); - required_device m_maincpu; required_device m_subcpu; optional_device m_sublatch; optional_device m_msm; required_device m_gfxdecode; required_device m_screen; - required_device m_palette; - void nekkyoku(machine_config &config); - void fromance(machine_config &config); - void idolmj(machine_config &config); void fromance_main_map(address_map &map); void fromance_sub_io_map(address_map &map); void fromance_sub_map(address_map &map); diff --git a/src/mame/includes/funkybee.h b/src/mame/includes/funkybee.h index 45019bd7f57..fcd71b828cd 100644 --- a/src/mame/includes/funkybee.h +++ b/src/mame/includes/funkybee.h @@ -17,6 +17,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void funkybee(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -44,7 +47,6 @@ public: required_device m_watchdog; required_device m_gfxdecode; required_device m_palette; - void funkybee(machine_config &config); void funkybee_map(address_map &map); void io_map(address_map &map); }; diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h index adaa0ef1d84..57208429c1a 100644 --- a/src/mame/includes/funkyjet.h +++ b/src/mame/includes/funkyjet.h @@ -26,6 +26,11 @@ public: , m_deco_tilegen(*this, "tilegen") { } + void funkyjet(machine_config &config); + + void init_funkyjet(); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_device m_deco146; @@ -36,12 +41,10 @@ public: required_device m_maincpu; required_device m_audiocpu; required_device m_deco_tilegen; - void init_funkyjet(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_READ16_MEMBER( funkyjet_protection_region_0_146_r ); DECLARE_WRITE16_MEMBER( funkyjet_protection_region_0_146_w ); - void funkyjet(machine_config &config); void funkyjet_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h index 4aa1c47fb47..1ff9958de2a 100644 --- a/src/mame/includes/funworld.h +++ b/src/mame/includes/funworld.h @@ -16,16 +16,20 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_READ8_MEMBER(questions_r); - DECLARE_WRITE8_MEMBER(question_bank_w); - DECLARE_WRITE8_MEMBER(funworld_videoram_w); - DECLARE_WRITE8_MEMBER(funworld_colorram_w); - DECLARE_WRITE8_MEMBER(funworld_lamp_a_w); - DECLARE_WRITE8_MEMBER(funworld_lamp_b_w); - DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w); - DECLARE_READ8_MEMBER(funquiz_ay8910_a_r); - DECLARE_READ8_MEMBER(funquiz_ay8910_b_r); - DECLARE_READ8_MEMBER(chinatow_r_32f0); + void royalcd1(machine_config &config); + void royalcd2(machine_config &config); + void fw1stpal(machine_config &config); + void chinatow(machine_config &config); + void magicrd2(machine_config &config); + void fw_a7_11(machine_config &config); + void fw2ndpal(machine_config &config); + void saloon(machine_config &config); + void cuoreuno(machine_config &config); + void funquiz(machine_config &config); + void rcdino4(machine_config &config); + void intrgmes(machine_config &config); + void witchryl(machine_config &config); + void init_magicd2b(); void init_magicd2c(); void init_saloon(); @@ -38,39 +42,41 @@ public: void init_ctunk(); void init_rcdino4(); void init_rcdinch(); - TILE_GET_INFO_MEMBER(get_bg_tile_info); + + DECLARE_WRITE8_MEMBER(funworld_videoram_w); + DECLARE_WRITE8_MEMBER(funworld_colorram_w); + +protected: + virtual void machine_start() override { m_lamps.resolve(); } DECLARE_VIDEO_START(funworld); DECLARE_PALETTE_INIT(funworld); + uint32_t screen_update_funworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void lunapark_map(address_map &map); + +private: + DECLARE_READ8_MEMBER(questions_r); + DECLARE_WRITE8_MEMBER(question_bank_w); + DECLARE_WRITE8_MEMBER(funworld_lamp_a_w); + DECLARE_WRITE8_MEMBER(funworld_lamp_b_w); + DECLARE_WRITE_LINE_MEMBER(pia1_ca2_w); + DECLARE_READ8_MEMBER(funquiz_ay8910_a_r); + DECLARE_READ8_MEMBER(funquiz_ay8910_b_r); + DECLARE_READ8_MEMBER(chinatow_r_32f0); + + TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_VIDEO_START(magicrd2); DECLARE_VIDEO_START(chinatow); - uint32_t screen_update_funworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void royalcd1(machine_config &config); - void royalcd2(machine_config &config); - void fw1stpal(machine_config &config); - void chinatow(machine_config &config); - void magicrd2(machine_config &config); - void fw_a7_11(machine_config &config); - void fw2ndpal(machine_config &config); - void saloon(machine_config &config); - void cuoreuno(machine_config &config); - void funquiz(machine_config &config); - void rcdino4(machine_config &config); - void intrgmes(machine_config &config); - void witchryl(machine_config &config); void chinatow_map(address_map &map); void cuoreuno_map(address_map &map); void funquiz_map(address_map &map); void funworld_map(address_map &map); void fw_a7_11_map(address_map &map); void intergames_map(address_map &map); - void lunapark_map(address_map &map); void magicrd2_map(address_map &map); void saloon_map(address_map &map); void witchryl_map(address_map &map); -protected: - virtual void machine_start() override { m_lamps.resolve(); } - required_shared_ptr m_videoram; required_shared_ptr m_colorram; tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index 1f90c7f0d26..2dcce7ab081 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -18,6 +18,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void funybubl(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_paletteram; @@ -40,7 +43,6 @@ public: virtual void video_start() override; uint32_t screen_update_funybubl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void funybubl(machine_config &config); void funybubl_map(address_map &map); void io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/fuukifg2.h b/src/mame/includes/fuukifg2.h index 402e8d592d0..42ce992bdf5 100644 --- a/src/mame/includes/fuukifg2.h +++ b/src/mame/includes/fuukifg2.h @@ -10,13 +10,6 @@ class fuuki16_state : public driver_device { public: - enum - { - TIMER_LEVEL_1_INTERRUPT, - TIMER_VBLANK_INTERRUPT, - TIMER_RASTER_INTERRUPT - }; - fuuki16_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -34,6 +27,16 @@ public: , m_soundbank(*this, "soundbank") { } + void fuuki16(machine_config &config); + +private: + enum + { + TIMER_LEVEL_1_INTERRUPT, + TIMER_VBLANK_INTERRUPT, + TIMER_RASTER_INTERRUPT + }; + /* devices */ required_device m_maincpu; required_device m_audiocpu; @@ -75,10 +78,9 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_layer( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri ); - void fuuki16(machine_config &config); void fuuki16_map(address_map &map); void fuuki16_sound_io_map(address_map &map); void fuuki16_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/fuukifg3.h b/src/mame/includes/fuukifg3.h index 2fdd0723372..5f5677955d2 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -16,13 +16,6 @@ class fuuki32_state : public driver_device { public: - enum - { - TIMER_LEVEL_1_INTERRUPT, - TIMER_VBLANK_INTERRUPT, - TIMER_RASTER_INTERRUPT - }; - fuuki32_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -38,6 +31,16 @@ public: , m_soundbank(*this, "soundbank") { } + void fuuki32(machine_config &config); + +private: + enum + { + TIMER_LEVEL_1_INTERRUPT, + TIMER_VBLANK_INTERRUPT, + TIMER_RASTER_INTERRUPT + }; + /* devices */ required_device m_maincpu; required_device m_gfxdecode; @@ -82,10 +85,9 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank); void draw_layer( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri ); - void fuuki32(machine_config &config); void fuuki32_map(address_map &map); void fuuki32_sound_io_map(address_map &map); void fuuki32_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/gaelco.h b/src/mame/includes/gaelco.h index 0b8a9f67b99..bfe35e2e088 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -26,6 +26,12 @@ public: m_spriteram(*this, "spriteram"), m_screenram(*this, "screenram") { } + void bigkarnk(machine_config &config); + void thoop(machine_config &config); + void maniacsq(machine_config &config); + void squash(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; @@ -64,10 +70,7 @@ public: uint32_t screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - void bigkarnk(machine_config &config); - void thoop(machine_config &config); - void maniacsq(machine_config &config); - void squash(machine_config &config); + void bigkarnk_map(address_map &map); void bigkarnk_snd_map(address_map &map); void maniacsq_map(address_map &map); diff --git a/src/mame/includes/gaelco2.h b/src/mame/includes/gaelco2.h index 571dd6a08d9..1e78703faf9 100644 --- a/src/mame/includes/gaelco2.h +++ b/src/mame/includes/gaelco2.h @@ -13,65 +13,76 @@ public: gaelco2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), + m_mainlatch(*this, "mainlatch"), m_spriteram(*this,"spriteram"), m_vregs(*this, "vregs"), m_snowboar_protection(*this, "snowboar_prot"), m_eeprom(*this, "eeprom"), - m_mainlatch(*this, "mainlatch"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), m_generic_paletteram_16(*this, "paletteram"), m_shareram(*this, "shareram") { } + void maniacsq_d5002fp(machine_config &config); + void play2000(machine_config &config); + void alighunt(machine_config &config); + void touchgo(machine_config &config); + void alighunt_d5002fp(machine_config &config); + void snowboar(machine_config &config); + void maniacsq(machine_config &config); + void maniacsqs(machine_config &config); + void touchgo_d5002fp(machine_config &config); + + void init_touchgo(); + void init_snowboar(); + void init_alighunt(); + void init_wrally2(); + + DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); + DECLARE_WRITE_LINE_MEMBER(coin2_counter_w); + + DECLARE_VIDEO_START(gaelco2); + DECLARE_VIDEO_START(gaelco2_dual); + + uint32_t screen_update_gaelco2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_gaelco2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_gaelco2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + required_device m_maincpu; + optional_device m_mainlatch; + + DECLARE_WRITE16_MEMBER(gaelco2_vram_w); + DECLARE_WRITE16_MEMBER(gaelco2_palette_w); + + DECLARE_WRITE16_MEMBER(wrally2_latch_w); + + void mcu_hostmem_map(address_map &map); + +private: DECLARE_WRITE8_MEMBER(shareram_w); DECLARE_READ8_MEMBER(shareram_r); - DECLARE_WRITE16_MEMBER(wrally2_latch_w); DECLARE_WRITE16_MEMBER(alighunt_coin_w); - DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); - DECLARE_WRITE_LINE_MEMBER(coin2_counter_w); DECLARE_WRITE_LINE_MEMBER(coin3_counter_w); DECLARE_WRITE_LINE_MEMBER(coin4_counter_w); DECLARE_READ16_MEMBER(snowboar_protection_r); DECLARE_WRITE16_MEMBER(snowboar_protection_w); DECLARE_READ16_MEMBER(play2000_shareram_68k_r); DECLARE_WRITE16_MEMBER(play2000_shareram_68k_w); - DECLARE_WRITE16_MEMBER(gaelco2_vram_w); - DECLARE_WRITE16_MEMBER(gaelco2_palette_w); - void init_touchgo(); - void init_snowboar(); - void init_alighunt(); - void init_wrally2(); TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen0); TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen1); TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen0_dual); TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen1_dual); - DECLARE_VIDEO_START(gaelco2); - DECLARE_VIDEO_START(gaelco2_dual); - uint32_t screen_update_gaelco2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_gaelco2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_gaelco2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int mask, int xoffs); uint32_t dual_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int index); void gaelco2_ROM16_split_gfx(const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2); - void maniacsq_d5002fp(machine_config &config); - void play2000(machine_config &config); - void alighunt(machine_config &config); - void touchgo(machine_config &config); - void alighunt_d5002fp(machine_config &config); - void snowboar(machine_config &config); - void maniacsq(machine_config &config); - void maniacsqs(machine_config &config); - void touchgo_d5002fp(machine_config &config); void alighunt_map(address_map &map); void maniacsq_map(address_map &map); - void mcu_hostmem_map(address_map &map); void play2000_map(address_map &map); void snowboar_map(address_map &map); void touchgo_map(address_map &map); -protected: - required_device m_maincpu; uint32_t snowboard_latch; @@ -83,7 +94,6 @@ protected: required_shared_ptr m_vregs; optional_shared_ptr m_snowboar_protection; optional_device m_eeprom; - optional_device m_mainlatch; required_device m_gfxdecode; required_device m_palette; required_shared_ptr m_generic_paletteram_16; @@ -102,6 +112,11 @@ public: , m_light1_y(*this, "LIGHT1_Y") {} + void bang(machine_config &config); + + void init_bang(); + +private: required_ioport m_light0_x; required_ioport m_light0_y; required_ioport m_light1_x; @@ -115,8 +130,6 @@ public: DECLARE_READ16_MEMBER(p2_gun_y); DECLARE_WRITE16_MEMBER(bang_clr_gun_int_w); TIMER_DEVICE_CALLBACK_MEMBER(bang_irq); - void init_bang(); - void bang(machine_config &config); void bang_map(address_map &map); }; @@ -130,6 +143,11 @@ public: , m_analog1(*this, "ANALOG1") {} + void wrally2(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(wrally2_analog_bit_r); + +private: required_ioport m_analog0; required_ioport m_analog1; @@ -137,7 +155,5 @@ public: DECLARE_WRITE_LINE_MEMBER(wrally2_adc_clk); DECLARE_WRITE_LINE_MEMBER(wrally2_adc_cs); - DECLARE_CUSTOM_INPUT_MEMBER(wrally2_analog_bit_r); - void wrally2(machine_config &config); void wrally2_map(address_map &map); }; diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index 3387df698f1..b7f607e7369 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -55,7 +55,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(analog_bit_r); DECLARE_CUSTOM_INPUT_MEMBER(fp_analog_bit_r); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -97,7 +97,6 @@ protected: void render_alphablend(int32_t scanline, const extent_t &extent, const gaelco3d_object_data &extra, int threadid); }; -private: required_shared_ptr m_adsp_ram_base; required_shared_ptr m_m68k_ram_base; required_shared_ptr m_tms_comm_base; diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index 1ddaeb681e5..5a57c352948 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -34,6 +34,20 @@ public: m_adpcm_select(*this, "adpcm_select%u", 1) { } + void raiga(machine_config &config); + void drgnbowl(machine_config &config); + void mastninj(machine_config &config); + void shadoww(machine_config &config); + void wildfang(machine_config &config); + + void init_raiga(); + void init_drgnbowl(); + void init_drgnbowla(); + void init_mastninj(); + void init_shadoww(); + void init_wildfang(); + +private: /* memory pointers */ required_shared_ptr_array m_videoram; required_shared_ptr m_spriteram; @@ -100,12 +114,6 @@ public: DECLARE_WRITE16_MEMBER(bg_videoram_w); DECLARE_WRITE16_MEMBER(fg_videoram_w); DECLARE_WRITE16_MEMBER(tx_videoram_w); - void init_raiga(); - void init_drgnbowl(); - void init_drgnbowla(); - void init_mastninj(); - void init_shadoww(); - void init_wildfang(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info_raiga); @@ -120,11 +128,7 @@ public: void drgnbowl_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void descramble_drgnbowl(int descramble_cpu); void descramble_mastninj_gfx(uint8_t* src); - void raiga(machine_config &config); - void drgnbowl(machine_config &config); - void mastninj(machine_config &config); - void shadoww(machine_config &config); - void wildfang(machine_config &config); + void drgnbowl_map(address_map &map); void drgnbowl_sound_map(address_map &map); void drgnbowl_sound_port_map(address_map &map); diff --git a/src/mame/includes/galaxia.h b/src/mame/includes/galaxia.h index bf65a808a0e..57953ec93af 100644 --- a/src/mame/includes/galaxia.h +++ b/src/mame/includes/galaxia.h @@ -14,7 +14,12 @@ public: galaxia_state(const machine_config &mconfig, device_type type, const char *tag) : cvs_state(mconfig, type, tag) { } + void astrowar(machine_config &config); + void galaxia(machine_config &config); + + void init_common(); +private: tilemap_t *m_bg_tilemap; bitmap_ind16 m_temp_bitmap; DECLARE_WRITE8_MEMBER(galaxia_video_w); @@ -32,9 +37,6 @@ public: uint32_t screen_update_galaxia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_astrowar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void init_common(); - void astrowar(machine_config &config); - void galaxia(machine_config &config); void astrowar_mem_map(address_map &map); void galaxia_data_map(address_map &map); void galaxia_io_map(address_map &map); diff --git a/src/mame/includes/galaxy.h b/src/mame/includes/galaxy.h index 45fc06b272c..0c1327972f5 100644 --- a/src/mame/includes/galaxy.h +++ b/src/mame/includes/galaxy.h @@ -25,10 +25,15 @@ public: , m_ram(*this, RAM_TAG) , m_region_gfx1(*this, "gfx1") {} - DECLARE_READ8_MEMBER(galaxy_keyboard_r); - DECLARE_WRITE8_MEMBER(galaxy_latch_w); + void galaxy(machine_config &config); + void galaxyp(machine_config &config); + void init_galaxy(); void init_galaxyp(); + +private: + DECLARE_READ8_MEMBER(galaxy_keyboard_r); + DECLARE_WRITE8_MEMBER(galaxy_latch_w); virtual void video_start() override; DECLARE_MACHINE_RESET(galaxy); DECLARE_MACHINE_RESET(galaxyp); @@ -39,13 +44,10 @@ public: void galaxy_set_timer(); void galaxy_setup_snapshot (const uint8_t * data, uint32_t size); DECLARE_SNAPSHOT_LOAD_MEMBER( galaxy ); - void galaxy(machine_config &config); - void galaxyp(machine_config &config); void galaxy_mem(address_map &map); void galaxyp_io(address_map &map); void galaxyp_mem(address_map &map); -protected: required_device m_maincpu; required_device m_screen; required_device m_cassette; diff --git a/src/mame/includes/galeb.h b/src/mame/includes/galeb.h index 4f847931a34..292d318f921 100644 --- a/src/mame/includes/galeb.h +++ b/src/mame/includes/galeb.h @@ -27,6 +27,9 @@ public: { } + void galeb(machine_config &config); + +private: required_shared_ptr m_video_ram; DECLARE_WRITE8_MEMBER(dac_w); DECLARE_READ8_MEMBER(keyboard_r); @@ -41,12 +44,10 @@ public: required_ioport_array<8> m_keyboard; required_device m_dac; - void galeb(machine_config &config); void galeb_mem(address_map &map); -protected: + virtual void machine_start() override; -private: int m_dac_state; }; diff --git a/src/mame/includes/galivan.h b/src/mame/includes/galivan.h index c95e6d9d686..f50a2febcd5 100644 --- a/src/mame/includes/galivan.h +++ b/src/mame/includes/galivan.h @@ -25,6 +25,16 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void galivan(machine_config &config); + void ninjemak(machine_config &config); + void youmab(machine_config &config); + + void init_youmab(); + +protected: + void io_map(address_map &map); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_device m_spriteram; @@ -55,7 +65,6 @@ public: DECLARE_WRITE8_MEMBER(ninjemak_gfxbank_w); DECLARE_WRITE8_MEMBER(galivan_scrollx_w); DECLARE_WRITE8_MEMBER(galivan_scrolly_w); - void init_youmab(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); TILE_GET_INFO_MEMBER(ninjemak_get_bg_tile_info); @@ -75,11 +84,8 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void galivan(machine_config &config); - void ninjemak(machine_config &config); - void youmab(machine_config &config); + void galivan_map(address_map &map); - void io_map(address_map &map); void ninjemak_io_map(address_map &map); void ninjemak_map(address_map &map); void sound_io_map(address_map &map); diff --git a/src/mame/includes/galpani2.h b/src/mame/includes/galpani2.h index 87b681e736f..1400116da4c 100644 --- a/src/mame/includes/galpani2.h +++ b/src/mame/includes/galpani2.h @@ -29,6 +29,9 @@ public: m_spriteram(*this, "spriteram") { } + void galpani2(machine_config &config); + +private: required_device m_maincpu; required_device m_subcpu; optional_device m_kaneko_spr; @@ -72,7 +75,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(galpani2_interrupt2); void galpani2_mcu_nmi1(); void galpani2_mcu_nmi2(); - void galpani2(machine_config &config); void galpani2_mem1(address_map &map); void galpani2_mem2(address_map &map); }; diff --git a/src/mame/includes/galpanic.h b/src/mame/includes/galpanic.h index ff00da6b9d3..1a3654be71e 100644 --- a/src/mame/includes/galpanic.h +++ b/src/mame/includes/galpanic.h @@ -20,6 +20,10 @@ public: m_pandora(*this, "pandora") { } + void galpanica(machine_config &config); + void galpanic(machine_config &config); + +private: required_device m_maincpu; required_shared_ptr m_bgvideoram; required_shared_ptr m_fgvideoram; @@ -42,8 +46,7 @@ public: DECLARE_WRITE_LINE_MEMBER(screen_vblank); TIMER_DEVICE_CALLBACK_MEMBER(scanline); void draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); - void galpanica(machine_config &config); - void galpanic(machine_config &config); + void galpanic_map(address_map &map); void galpanic_oki_map(address_map &map); void galpanica_map(address_map &map); diff --git a/src/mame/includes/galspnbl.h b/src/mame/includes/galspnbl.h index 7dba79d208b..692b3eeed87 100644 --- a/src/mame/includes/galspnbl.h +++ b/src/mame/includes/galspnbl.h @@ -32,6 +32,9 @@ public: m_soundlatch(*this, "soundlatch") { } + void galspnbl(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_colorram; @@ -58,7 +61,6 @@ public: void mix_sprite_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); - void galspnbl(machine_config &config); void audio_map(address_map &map); void main_map(address_map &map); }; diff --git a/src/mame/includes/gamecom.h b/src/mame/includes/gamecom.h index d6c871ef621..fb3638cfdbe 100644 --- a/src/mame/includes/gamecom.h +++ b/src/mame/includes/gamecom.h @@ -236,11 +236,16 @@ public: { } + void gamecom(machine_config &config); + + void init_gamecom(); + +private: + DECLARE_READ8_MEMBER( gamecom_internal_r ); DECLARE_READ8_MEMBER( gamecom_pio_r ); DECLARE_WRITE8_MEMBER( gamecom_internal_w ); DECLARE_WRITE8_MEMBER( gamecom_pio_w ); - void init_gamecom(); DECLARE_PALETTE_INIT(gamecom); INTERRUPT_GEN_MEMBER(gamecom_interrupt); TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback); @@ -252,9 +257,8 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 ); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 ); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void gamecom(machine_config &config); void gamecom_mem_map(address_map &map); -private: + uint8_t *m_p_ram; uint8_t *m_cart_ptr; uint8_t m_lcdc_reg; diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index 0eb102f8e18..7acd9397a98 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -48,6 +48,14 @@ public: m_screen(*this, "screen"), m_soundlatch(*this, "soundlatch") { } + void gameplan(machine_config &config); + void gameplan_video(machine_config &config); + void leprechn(machine_config &config); + void leprechn_video(machine_config &config); + void trvquest(machine_config &config); + void trvquest_video(machine_config &config); + +private: /* machine state */ uint8_t m_current_port; optional_shared_ptr m_trvquest_question; @@ -107,16 +115,10 @@ public: DECLARE_WRITE_LINE_MEMBER(trvquest_coin_w); DECLARE_WRITE_LINE_MEMBER(trvquest_misc_w); - void gameplan(machine_config &config); - void gameplan_video(machine_config &config); - void leprechn(machine_config &config); - void leprechn_video(machine_config &config); - void trvquest(machine_config &config); - void trvquest_video(machine_config &config); void cpu_map(address_map &map); void gameplan_audio_map(address_map &map); void gameplan_main_map(address_map &map); void leprechn_audio_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/gamepock.h b/src/mame/includes/gamepock.h index ad3d0d68af2..353aa2c493d 100644 --- a/src/mame/includes/gamepock.h +++ b/src/mame/includes/gamepock.h @@ -26,6 +26,9 @@ public: m_cart(*this, "cartslot") { } + void gamepock(machine_config &config); + +private: virtual void machine_reset() override; uint8_t m_port_a; @@ -45,7 +48,6 @@ public: required_device m_speaker; required_device m_cart; DECLARE_WRITE_LINE_MEMBER(gamepock_to_w); - void gamepock(machine_config &config); void gamepock_mem(address_map &map); }; diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h index 63e65b82a94..bc547db18d0 100644 --- a/src/mame/includes/gauntlet.h +++ b/src/mame/includes/gauntlet.h @@ -40,7 +40,7 @@ public: void gaunt2p(machine_config &config); void gauntlet2(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -64,7 +64,6 @@ protected: void main_map(address_map &map); void sound_map(address_map &map); -private: required_device m_audiocpu; required_device m_soundcomm; required_device m_ym2151; diff --git a/src/mame/includes/gba.h b/src/mame/includes/gba.h index 58eb6f394ee..de7464e6dd2 100644 --- a/src/mame/includes/gba.h +++ b/src/mame/includes/gba.h @@ -28,6 +28,11 @@ public: m_bios_hack(*this, "SKIP_CHECK") { } + void gbadv(machine_config &config); + + void init_gbadv(); + +private: required_device m_maincpu; required_device m_ldaca; required_device m_rdaca; @@ -67,7 +72,6 @@ public: DECLARE_WRITE32_MEMBER(gba_io_w); DECLARE_READ32_MEMBER(gba_bios_r); DECLARE_READ32_MEMBER(gba_10000000_r); - void init_gbadv(); DECLARE_WRITE_LINE_MEMBER(int_hblank_callback); DECLARE_WRITE_LINE_MEMBER(int_vblank_callback); DECLARE_WRITE_LINE_MEMBER(int_vcount_callback); @@ -79,9 +83,8 @@ public: TIMER_CALLBACK_MEMBER(timer_expire); TIMER_CALLBACK_MEMBER(handle_irq); - void gbadv(machine_config &config); void gba_map(address_map &map); -protected: + required_region_ptr m_region_maincpu; required_ioport m_io_inputs; required_ioport m_bios_hack; diff --git a/src/mame/includes/gberet.h b/src/mame/includes/gberet.h index 2bc02d34efb..e14bac0aeea 100644 --- a/src/mame/includes/gberet.h +++ b/src/mame/includes/gberet.h @@ -26,6 +26,13 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void gberetb(machine_config &config); + void mrgoemon(machine_config &config); + void gberet(machine_config &config); + + void init_mrgoemon(); + +private: /* memory pointers */ required_shared_ptr m_colorram; required_shared_ptr m_videoram; @@ -56,7 +63,6 @@ public: DECLARE_WRITE8_MEMBER(gberet_scroll_w); DECLARE_WRITE8_MEMBER(gberet_sprite_bank_w); DECLARE_WRITE8_MEMBER(gberetb_scroll_w); - void init_mrgoemon(); TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_MACHINE_START(gberet); DECLARE_MACHINE_RESET(gberet); @@ -70,9 +76,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void gberetb(machine_config &config); - void mrgoemon(machine_config &config); - void gberet(machine_config &config); void gberet_map(address_map &map); void gberetb_map(address_map &map); void mrgoemon_map(address_map &map); diff --git a/src/mame/includes/gcpinbal.h b/src/mame/includes/gcpinbal.h index 94baa317ae9..6b7c76e0690 100644 --- a/src/mame/includes/gcpinbal.h +++ b/src/mame/includes/gcpinbal.h @@ -11,11 +11,6 @@ class gcpinbal_state : public driver_device { public: - enum - { - TIMER_GCPINBAL_INTERRUPT1 - }; - gcpinbal_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -31,6 +26,14 @@ public: , m_sprgen(*this, "spritegen") { } + void gcpinbal(machine_config &config); + +private: + enum + { + TIMER_GCPINBAL_INTERRUPT1 + }; + /* devices */ required_device m_maincpu; required_device m_eeprom; @@ -81,8 +84,7 @@ public: DECLARE_WRITE_LINE_MEMBER(gcp_adpcm_int); required_device m_sprgen; - void gcpinbal(machine_config &config); void gcpinbal_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/gijoe.h b/src/mame/includes/gijoe.h index 344741df46b..37a1eae06ff 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -30,6 +30,9 @@ public: m_palette(*this, "palette"), m_k054321(*this, "k054321") { } + void gijoe(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_workram; @@ -68,7 +71,6 @@ public: void gijoe_objdma(); K056832_CB_MEMBER(tile_callback); K053246_CB_MEMBER(sprite_callback); - void gijoe(machine_config &config); void gijoe_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/ginganin.h b/src/mame/includes/ginganin.h index bd6401b382b..4693a6e02cb 100644 --- a/src/mame/includes/ginganin.h +++ b/src/mame/includes/ginganin.h @@ -24,6 +24,11 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void ginganin(machine_config &config); + + void init_ginganin(); + +private: /* memory pointers */ required_shared_ptr m_txtram; required_shared_ptr m_spriteram; @@ -52,7 +57,6 @@ public: DECLARE_WRITE16_MEMBER(ginganin_txtram16_w); DECLARE_WRITE16_MEMBER(ginganin_vregs16_w); DECLARE_WRITE_LINE_MEMBER(ptm_irq); - void init_ginganin(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_txt_tile_info); @@ -61,7 +65,6 @@ public: virtual void video_start() override; uint32_t screen_update_ginganin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ); - void ginganin(machine_config &config); void ginganin_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/glass.h b/src/mame/includes/glass.h index ca8db27f65e..b36e62d673b 100644 --- a/src/mame/includes/glass.h +++ b/src/mame/includes/glass.h @@ -25,7 +25,12 @@ public: m_pant{ nullptr, nullptr } { } + void glass(machine_config &config); + void glass_ds5002fp(machine_config &config); + + void init_glass(); +private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; @@ -61,7 +66,6 @@ public: DECLARE_WRITE_LINE_MEMBER(coin1_counter_w); DECLARE_WRITE_LINE_MEMBER(coin2_counter_w); - void init_glass(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -72,8 +76,6 @@ public: INTERRUPT_GEN_MEMBER(interrupt); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 ); - void glass(machine_config &config); - void glass_ds5002fp(machine_config &config); void glass_map(address_map &map); void mcu_hostmem_map(address_map &map); void oki_map(address_map &map); diff --git a/src/mame/includes/gng.h b/src/mame/includes/gng.h index 7969f8eadc5..06940c6347a 100644 --- a/src/mame/includes/gng.h +++ b/src/mame/includes/gng.h @@ -31,7 +31,7 @@ public: void gng(machine_config &config); void diamond(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(gng_bankswitch_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); @@ -54,7 +54,6 @@ protected: void gng_map(address_map &map); void sound_map(address_map &map); -private: /* memory pointers */ required_device m_spriteram; required_shared_ptr m_fgvideoram; diff --git a/src/mame/includes/goal92.h b/src/mame/includes/goal92.h index 666bbecfaf0..25d8ce05b4a 100644 --- a/src/mame/includes/goal92.h +++ b/src/mame/includes/goal92.h @@ -27,6 +27,9 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch") { } + void goal92(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_bg_data; required_shared_ptr m_fg_data; @@ -73,7 +76,6 @@ public: void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); DECLARE_WRITE_LINE_MEMBER(irqhandler); DECLARE_WRITE_LINE_MEMBER(goal92_adpcm_int); - void goal92(machine_config &config); void goal92_map(address_map &map); void sound_cpu(address_map &map); }; diff --git a/src/mame/includes/goindol.h b/src/mame/includes/goindol.h index 1a1ff0fc99b..5b6a2c178eb 100644 --- a/src/mame/includes/goindol.h +++ b/src/mame/includes/goindol.h @@ -24,6 +24,10 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void goindol(machine_config &config); + void init_goindol(); + +private: /* memory pointers */ required_shared_ptr m_ram; required_shared_ptr m_fg_scrolly; @@ -48,7 +52,6 @@ public: DECLARE_WRITE8_MEMBER(prot_fcb0_w); DECLARE_WRITE8_MEMBER(goindol_fg_videoram_w); DECLARE_WRITE8_MEMBER(goindol_bg_videoram_w); - void init_goindol(); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_start() override; @@ -59,7 +62,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void goindol(machine_config &config); void goindol_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/gomoku.h b/src/mame/includes/gomoku.h index 3aacf184cf6..4fbaad1ccb9 100644 --- a/src/mame/includes/gomoku.h +++ b/src/mame/includes/gomoku.h @@ -19,6 +19,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen") { } + void gomoku(machine_config &config); + +private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; required_shared_ptr m_bgram; @@ -40,7 +43,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_screen; - void gomoku(machine_config &config); void gomoku_map(address_map &map); }; diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index 53254facfe0..b4fbc1a74a0 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -29,14 +29,6 @@ class gottlieb_state : public driver_device { public: - enum - { - TIMER_LASERDISC_PHILIPS, - TIMER_LASERDISC_BIT_OFF, - TIMER_LASERDISC_BIT, - TIMER_NMI_CLEAR - }; - gottlieb_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -56,6 +48,38 @@ public: , m_leds(*this, "led%u", 0U) { } + void gottlieb_core(machine_config &config); + void cobram3(machine_config &config); + void screwloo(machine_config &config); + void gottlieb2(machine_config &config); + void reactor(machine_config &config); + void tylz(machine_config &config); + void g2laser(machine_config &config); + void qbert(machine_config &config); + void qbert_knocker(machine_config &config); + void gottlieb1(machine_config &config); + void gottlieb1_votrax(machine_config &config); + + void init_romtiles(); + void init_screwloo(); + void init_vidvince(); + void init_ramtiles(); + void init_stooges(); + void init_qbert(); + void init_qbertqub(); + + DECLARE_CUSTOM_INPUT_MEMBER(analog_delta_r); + DECLARE_CUSTOM_INPUT_MEMBER(stooges_joystick_r); + +private: + enum + { + TIMER_LASERDISC_PHILIPS, + TIMER_LASERDISC_BIT_OFF, + TIMER_LASERDISC_BIT, + TIMER_NMI_CLEAR + }; + void qbert_knocker(uint8_t knock); DECLARE_WRITE8_MEMBER(gottlieb_analog_reset_w); @@ -73,15 +97,6 @@ public: DECLARE_WRITE8_MEMBER(gottlieb_laserdisc_video_control_w); DECLARE_WRITE8_MEMBER(gottlieb_videoram_w); DECLARE_WRITE8_MEMBER(gottlieb_charram_w); - DECLARE_CUSTOM_INPUT_MEMBER(analog_delta_r); - DECLARE_CUSTOM_INPUT_MEMBER(stooges_joystick_r); - void init_romtiles(); - void init_screwloo(); - void init_vidvince(); - void init_ramtiles(); - void init_stooges(); - void init_qbert(); - void init_qbertqub(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_screwloo_bg_tile_info); DECLARE_VIDEO_START(screwloo); @@ -97,20 +112,9 @@ public: void audio_handle_zero_crossing(const attotime &zerotime, bool logit); void laserdisc_audio_process(laserdisc_device &device, int samplerate, int samples, const int16_t *ch0, const int16_t *ch1); - void gottlieb_core(machine_config &config); - void cobram3(machine_config &config); - void screwloo(machine_config &config); - void gottlieb2(machine_config &config); - void reactor(machine_config &config); - void tylz(machine_config &config); - void g2laser(machine_config &config); - void qbert(machine_config &config); - void qbert_knocker(machine_config &config); - void gottlieb1(machine_config &config); - void gottlieb1_votrax(machine_config &config); void gottlieb_map(address_map &map); void reactor_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/includes/gotya.h b/src/mame/includes/gotya.h index cf05e0e119b..caa111e0c1c 100644 --- a/src/mame/includes/gotya.h +++ b/src/mame/includes/gotya.h @@ -18,6 +18,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void gotya(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_scroll; required_shared_ptr m_videoram; @@ -51,6 +54,5 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void gotya(machine_config &config); void gotya_map(address_map &map); }; diff --git a/src/mame/includes/gp32.h b/src/mame/includes/gp32.h index 06b35205e4b..e221759dd31 100644 --- a/src/mame/includes/gp32.h +++ b/src/mame/includes/gp32.h @@ -107,6 +107,9 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette") { } + void gp32(machine_config &config); + +private: virtual void video_start() override; required_shared_ptr m_s3c240x_ram; @@ -187,9 +190,8 @@ public: TIMER_CALLBACK_MEMBER(s3c240x_dma_timer_exp); TIMER_CALLBACK_MEMBER(s3c240x_iic_timer_exp); TIMER_CALLBACK_MEMBER(s3c240x_iis_timer_exp); - void gp32(machine_config &config); void gp32_map(address_map &map); -protected: + required_device m_maincpu; required_device m_smartmedia; required_device m_ldac; diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index 648d47da7ea..9bc9b099d85 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -26,6 +26,9 @@ public: m_k052109(*this, "k052109"), m_k051960(*this, "k051960") { } + void gradius3(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_gfxram; required_region_ptr m_gfxrom; @@ -66,7 +69,6 @@ public: DECLARE_WRITE8_MEMBER(volume_callback); K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); - void gradius3(machine_config &config); void gradius3_map(address_map &map); void gradius3_map2(address_map &map); void gradius3_s_map(address_map &map); diff --git a/src/mame/includes/grchamp.h b/src/mame/includes/grchamp.h index 0f8dbb374d6..e112d4129d2 100644 --- a/src/mame/includes/grchamp.h +++ b/src/mame/includes/grchamp.h @@ -35,6 +35,9 @@ public: m_digits(*this, "digit%u", 0U) { } + void grchamp(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(cpu0_outputs_w); DECLARE_WRITE8_MEMBER(led_board_w); DECLARE_WRITE8_MEMBER(cpu1_outputs_w); @@ -72,14 +75,12 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_objects(int y, uint8_t *objdata); - void grchamp(machine_config &config); void main_map(address_map &map); void main_portmap(address_map &map); void sound_map(address_map &map); void sub_map(address_map &map); void sub_portmap(address_map &map); -private: uint8_t m_cpu0_out[16]; uint8_t m_cpu1_out[16]; diff --git a/src/mame/includes/gridlee.h b/src/mame/includes/gridlee.h index 4d0df9a0436..285003099d1 100644 --- a/src/mame/includes/gridlee.h +++ b/src/mame/includes/gridlee.h @@ -44,7 +44,7 @@ public: void gridlee(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(analog_port_r); DECLARE_READ8_MEMBER(random_num_r); DECLARE_WRITE8_MEMBER(latch_w); @@ -66,7 +66,6 @@ protected: virtual void machine_reset() override; virtual void video_start() override; -private: required_shared_ptr m_spriteram; required_shared_ptr m_videoram; required_device m_maincpu; diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h index 7e1c693edca..02174a8d431 100644 --- a/src/mame/includes/gstriker.h +++ b/src/mame/includes/gstriker.h @@ -36,6 +36,16 @@ public: m_mixerregs(*this, "mixerregs") { } + void twc94(machine_config &config); + void gstriker(machine_config &config); + void vgoal(machine_config &config); + + void init_vgoalsoc(); + void init_twcup94(); + void init_twcup94a(); + void init_twcup94b(); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_spr; @@ -75,18 +85,11 @@ public: virtual void machine_start() override; virtual void video_start() override; - void init_vgoalsoc(); - void init_twcup94(); - void init_twcup94a(); - void init_twcup94b(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); void mcu_init(); - void twc94(machine_config &config); - void gstriker(machine_config &config); - void vgoal(machine_config &config); void gstriker_map(address_map &map); void sound_io_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/gumbo.h b/src/mame/includes/gumbo.h index ba7fc54c9fb..f9949459fee 100644 --- a/src/mame/includes/gumbo.h +++ b/src/mame/includes/gumbo.h @@ -16,6 +16,11 @@ public: m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode") { } + void mspuzzle(machine_config &config); + void dblpoint(machine_config &config); + void gumbo(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_bg_videoram; required_shared_ptr m_fg_videoram; @@ -31,9 +36,6 @@ public: uint32_t screen_update_gumbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; required_device m_gfxdecode; - void mspuzzle(machine_config &config); - void dblpoint(machine_config &config); - void gumbo(machine_config &config); void dblpoint_map(address_map &map); void gumbo_map(address_map &map); void mspuzzle_map(address_map &map); diff --git a/src/mame/includes/gunbustr.h b/src/mame/includes/gunbustr.h index 39109daa603..9b6c764cc0a 100644 --- a/src/mame/includes/gunbustr.h +++ b/src/mame/includes/gunbustr.h @@ -17,11 +17,6 @@ struct gb_tempsprite class gunbustr_state : public driver_device { public: - enum - { - TIMER_GUNBUSTR_INTERRUPT5 - }; - gunbustr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), @@ -35,6 +30,17 @@ public: m_coin_lockout = true; } + void gunbustr(machine_config &config); + + void init_gunbustrj(); + void init_gunbustr(); + +private: + enum + { + TIMER_GUNBUSTR_INTERRUPT5 + }; + required_device m_maincpu; required_device m_tc0480scp; required_shared_ptr m_ram; @@ -53,15 +59,12 @@ public: DECLARE_WRITE32_MEMBER(gunbustr_gun_w); DECLARE_READ32_MEMBER(main_cycle_r); DECLARE_WRITE8_MEMBER(coin_word_w); - void init_gunbustrj(); - void init_gunbustr(); virtual void video_start() override; uint32_t screen_update_gunbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(gunbustr_interrupt); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs); - void gunbustr(machine_config &config); void gunbustr_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/gundealr.h b/src/mame/includes/gundealr.h index b840c2bd3b8..2bdad732f6b 100644 --- a/src/mame/includes/gundealr.h +++ b/src/mame/includes/gundealr.h @@ -25,6 +25,11 @@ public: , m_palette(*this, "palette") { } + void gundealr(machine_config &config); + void gundealrbl(machine_config &config); + void yamyam(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_paletteram; required_shared_ptr m_bg_videoram; @@ -59,9 +64,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void gundealr(machine_config &config); - void gundealrbl(machine_config &config); - void yamyam(machine_config &config); void base_map(address_map &map); void gundealr_main_map(address_map &map); void main_portmap(address_map &map); diff --git a/src/mame/includes/gunsmoke.h b/src/mame/includes/gunsmoke.h index 610770f642e..b8c0b19fc4a 100644 --- a/src/mame/includes/gunsmoke.h +++ b/src/mame/includes/gunsmoke.h @@ -22,6 +22,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } + void gunsmoke(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; @@ -52,7 +55,6 @@ public: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - void gunsmoke(machine_config &config); void gunsmoke_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/gyruss.h b/src/mame/includes/gyruss.h index bb9bc18674f..f20d08def1e 100644 --- a/src/mame/includes/gyruss.h +++ b/src/mame/includes/gyruss.h @@ -28,6 +28,11 @@ public: m_palette(*this, "palette") { } + void gyruss(machine_config &config); + + void init_gyruss(); + +private: /* devices/memory pointers */ required_device m_maincpu; required_device m_subcpu; @@ -60,7 +65,6 @@ public: DECLARE_WRITE8_MEMBER(gyruss_dac_w); DECLARE_WRITE8_MEMBER(gyruss_filter0_w); DECLARE_WRITE8_MEMBER(gyruss_filter1_w); - void init_gyruss(); TILE_GET_INFO_MEMBER(gyruss_get_tile_info); virtual void machine_start() override; virtual void video_start() override; @@ -69,7 +73,6 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void filter_w(address_space &space, int chip, int data ); - void gyruss(machine_config &config); void audio_cpu1_io_map(address_map &map); void audio_cpu1_map(address_map &map); void audio_cpu2_io_map(address_map &map); -- cgit v1.2.3