From 5fc872cfcc5a8fc97dfa21530e9d2da12d115064 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 2 Jul 2018 01:08:47 +0100 Subject: private: use (W,X,Y,Z,#) (#3721) * private: use (W,X,Y,Z,#) * A part 1 (nw) --- src/mame/drivers/1945kiii.cpp | 3 +- src/mame/drivers/24cdjuke.cpp | 6 ++- src/mame/drivers/2mindril.cpp | 8 ++- src/mame/drivers/3x3puzzl.cpp | 6 ++- src/mame/drivers/4004clk.cpp | 3 +- src/mame/drivers/4dpi.cpp | 7 ++- src/mame/drivers/4enlinea.cpp | 3 +- src/mame/drivers/5clown.cpp | 8 ++- src/mame/drivers/68ksbc.cpp | 3 +- src/mame/drivers/a1supply.cpp | 9 ++-- src/mame/drivers/a5105.cpp | 6 ++- src/mame/drivers/a51xx.cpp | 6 ++- src/mame/drivers/a6809.cpp | 3 +- src/mame/drivers/a7150.cpp | 5 +- src/mame/drivers/a7800.cpp | 1 - src/mame/drivers/aa310.cpp | 35 ++++++------ src/mame/drivers/aaa.cpp | 4 +- src/mame/drivers/accomm.cpp | 3 +- src/mame/drivers/acd.cpp | 6 +-- src/mame/drivers/ace.cpp | 3 +- src/mame/drivers/aceex.cpp | 5 +- src/mame/drivers/acefruit.cpp | 15 +++--- src/mame/drivers/acesp.cpp | 9 ++-- src/mame/drivers/acommand.cpp | 8 +-- src/mame/drivers/acrnsys1.cpp | 3 +- src/mame/drivers/acvirus.cpp | 6 +-- src/mame/drivers/adp.cpp | 15 +++--- src/mame/drivers/agat.cpp | 6 ++- src/mame/drivers/age_candy.cpp | 4 +- src/mame/drivers/aim65_40.cpp | 8 +-- src/mame/drivers/airraid.cpp | 11 ++-- src/mame/drivers/akaiax80.cpp | 4 +- src/mame/drivers/albazc.cpp | 3 +- src/mame/drivers/albazg.cpp | 3 +- src/mame/drivers/aleck64.cpp | 9 ++-- src/mame/drivers/alesis_qs.cpp | 4 +- src/mame/drivers/alien.cpp | 9 ++-- src/mame/drivers/alinvade.cpp | 6 ++- src/mame/drivers/allied.cpp | 6 ++- src/mame/drivers/alphasma.cpp | 15 ++++-- src/mame/drivers/alphatro.cpp | 19 ++++--- src/mame/drivers/altair.cpp | 3 +- src/mame/drivers/alto1.cpp | 6 +-- src/mame/drivers/altos2.cpp | 3 +- src/mame/drivers/altos486.cpp | 3 +- src/mame/drivers/altos5.cpp | 6 +-- src/mame/drivers/altos8600.cpp | 3 +- src/mame/drivers/alvg.cpp | 7 +-- src/mame/drivers/ambush.cpp | 10 ++-- src/mame/drivers/amerihok.cpp | 4 +- src/mame/drivers/amico2k.cpp | 6 ++- src/mame/drivers/ampex.cpp | 6 ++- src/mame/drivers/ampro.cpp | 7 ++- src/mame/drivers/ampscarp.cpp | 3 +- src/mame/drivers/amstr_pc.cpp | 11 ++-- src/mame/drivers/amusco.cpp | 12 ++--- src/mame/drivers/amust.cpp | 17 +++--- src/mame/drivers/anes.cpp | 7 +-- src/mame/drivers/anzterm.cpp | 4 +- src/mame/drivers/apc.cpp | 13 +++-- src/mame/drivers/apf.cpp | 8 +-- src/mame/drivers/apogee.cpp | 4 +- src/mame/drivers/applix.cpp | 13 +++-- src/mame/drivers/apricot.cpp | 9 ++-- src/mame/drivers/apricotf.cpp | 5 +- src/mame/drivers/apricotp.cpp | 5 +- src/mame/drivers/arachnid.cpp | 4 +- src/mame/drivers/argo.cpp | 19 ++++--- src/mame/drivers/argox.cpp | 5 +- src/mame/drivers/aristmk4.cpp | 13 +++-- src/mame/drivers/aristmk5.cpp | 26 ++++----- src/mame/drivers/aristmk6.cpp | 3 +- src/mame/drivers/arsystems.cpp | 16 +++--- src/mame/drivers/asst128.cpp | 4 +- src/mame/drivers/astinvad.cpp | 30 ++++++----- src/mame/drivers/astrafr.cpp | 34 ++++++------ src/mame/drivers/astrcorp.cpp | 19 ++++--- src/mame/drivers/astropc.cpp | 7 +-- src/mame/drivers/at.cpp | 37 +++++++------ src/mame/drivers/atari400.cpp | 30 ++++++----- src/mame/drivers/atari_s1.cpp | 5 +- src/mame/drivers/atari_s2.cpp | 3 +- src/mame/drivers/atarisy4.cpp | 4 +- src/mame/drivers/atlantis.cpp | 7 ++- src/mame/drivers/atm.cpp | 9 ++-- src/mame/drivers/atronic.cpp | 5 +- src/mame/drivers/att4425.cpp | 3 +- src/mame/drivers/att630.cpp | 6 ++- src/mame/drivers/attache.cpp | 45 ++++++++++------ src/mame/drivers/attckufo.cpp | 6 ++- src/mame/drivers/atvtrack.cpp | 12 +++-- src/mame/drivers/avt.cpp | 8 +-- src/mame/drivers/ax20.cpp | 5 +- src/mame/drivers/wacky_gator.cpp | 3 +- src/mame/drivers/wardner.cpp | 9 ++-- src/mame/drivers/warpsped.cpp | 4 +- src/mame/drivers/white_mod.cpp | 7 +-- src/mame/drivers/whitestar.cpp | 4 +- src/mame/drivers/wicat.cpp | 7 +-- src/mame/drivers/wico.cpp | 6 ++- src/mame/drivers/wildpkr.cpp | 9 ++-- src/mame/drivers/wink.cpp | 7 ++- src/mame/drivers/wmg.cpp | 10 ++-- src/mame/drivers/wms.cpp | 22 ++++---- src/mame/drivers/wpc_95.cpp | 26 ++++----- src/mame/drivers/wpc_an.cpp | 10 ++-- src/mame/drivers/wpc_dcs.cpp | 23 ++++---- src/mame/drivers/wpc_s.cpp | 27 +++++----- src/mame/drivers/wyse.cpp | 12 +++-- src/mame/drivers/wyvernf0.cpp | 5 +- src/mame/drivers/x1twin.cpp | 7 ++- src/mame/drivers/xtheball.cpp | 4 +- src/mame/drivers/xtom3d.cpp | 5 +- src/mame/drivers/y2.cpp | 4 +- src/mame/drivers/ymmu100.cpp | 21 +++++--- src/mame/drivers/yuvomz80.cpp | 4 +- src/mame/drivers/z100.cpp | 2 +- src/mame/drivers/z1013.cpp | 8 +-- src/mame/drivers/z80dev.cpp | 3 +- src/mame/drivers/z9001.cpp | 6 ++- src/mame/drivers/zac_1.cpp | 9 ++-- src/mame/drivers/zac_2.cpp | 6 ++- src/mame/drivers/zac_proto.cpp | 6 ++- src/mame/drivers/zapcomputer.cpp | 6 ++- src/mame/drivers/zaurus.cpp | 6 ++- src/mame/drivers/zexall.cpp | 6 ++- src/mame/drivers/zms8085.cpp | 6 ++- src/mame/drivers/zn.cpp | 66 ++++++++++++----------- src/mame/drivers/zr107.cpp | 14 ++--- src/mame/drivers/zrt80.cpp | 16 +++--- src/mame/drivers/zsbc3.cpp | 4 +- src/mame/drivers/zt8802.cpp | 6 +-- src/mame/drivers/zwackery.cpp | 7 +-- src/mame/includes/1943.h | 11 ++-- src/mame/includes/20pacgal.h | 15 ++++-- src/mame/includes/40love.h | 2 +- src/mame/includes/4enraya.h | 11 ++-- src/mame/includes/8080bw.h | 83 ++++++++++++++-------------- src/mame/includes/88games.h | 5 +- src/mame/includes/warpwarp.h | 31 ++++++----- src/mame/includes/warriorb.h | 7 ++- src/mame/includes/wc90.h | 8 +-- src/mame/includes/wc90b.h | 5 +- src/mame/includes/wecleman.h | 29 +++++----- src/mame/includes/welltris.h | 10 ++-- src/mame/includes/wgp.h | 29 +++++----- src/mame/includes/williams.h | 114 ++++++++++++++++++++++++--------------- src/mame/includes/wiping.h | 5 +- src/mame/includes/witch.h | 49 +++++++++-------- src/mame/includes/wiz.h | 15 +++--- src/mame/includes/wolfpack.h | 16 +++--- src/mame/includes/wrally.h | 3 +- src/mame/includes/wwfsstar.h | 9 ++-- src/mame/includes/x07.h | 18 ++++--- src/mame/includes/x68k.h | 53 +++++++++--------- src/mame/includes/xain.h | 8 +-- src/mame/includes/xavix.h | 18 +++---- src/mame/includes/xbox.h | 6 ++- src/mame/includes/xerox820.h | 14 +++-- src/mame/includes/xevious.h | 11 ++-- src/mame/includes/xexex.h | 9 +++- src/mame/includes/xmen.h | 11 ++-- src/mame/includes/xor100.h | 6 ++- src/mame/includes/xorworld.h | 8 ++- src/mame/includes/xxmissio.h | 8 ++- src/mame/includes/xybots.h | 6 +-- src/mame/includes/xyonix.h | 4 +- src/mame/includes/yiear.h | 5 +- src/mame/includes/yunsun16.h | 11 ++-- src/mame/includes/yunsung8.h | 5 +- src/mame/includes/z80ne.h | 46 +++++++++------- src/mame/includes/z88.h | 3 +- src/mame/includes/zac2650.h | 5 +- src/mame/includes/zaccaria.h | 6 ++- src/mame/includes/zaxxon.h | 38 +++++++------ src/mame/includes/zerozone.h | 5 +- src/mame/includes/zodiack.h | 10 ++-- src/mame/includes/zorba.h | 3 +- src/mame/includes/zx.h | 22 ++++---- 179 files changed, 1216 insertions(+), 829 deletions(-) diff --git a/src/mame/drivers/1945kiii.cpp b/src/mame/drivers/1945kiii.cpp index 17a9d2160d9..8ae6d31158e 100644 --- a/src/mame/drivers/1945kiii.cpp +++ b/src/mame/drivers/1945kiii.cpp @@ -70,7 +70,7 @@ public: void flagrall(machine_config &config); void k3(machine_config &config); -protected: +private: DECLARE_WRITE16_MEMBER(bgram_w); DECLARE_WRITE16_MEMBER(scrollx_w); DECLARE_WRITE16_MEMBER(scrolly_w); @@ -88,7 +88,6 @@ protected: void flagrall_map(address_map &map); void k3_base_map(address_map &map); -private: /* devices */ optional_device_array m_oki; /* memory pointers */ diff --git a/src/mame/drivers/24cdjuke.cpp b/src/mame/drivers/24cdjuke.cpp index 212cb5f9ac9..6febdf03bf6 100644 --- a/src/mame/drivers/24cdjuke.cpp +++ b/src/mame/drivers/24cdjuke.cpp @@ -71,6 +71,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void midcoin24cdjuke(machine_config &config); + +private: required_device m_maincpu; required_ioport m_io_row0; required_ioport m_io_row1; @@ -88,10 +91,9 @@ public: DECLARE_READ8_MEMBER(unknown_r) { return machine().rand(); } - void midcoin24cdjuke(machine_config &config); void midcoin24cdjuke_io(address_map &map); void midcoin24cdjuke_map(address_map &map); -private: + uint8_t m_kb_col; }; diff --git a/src/mame/drivers/2mindril.cpp b/src/mame/drivers/2mindril.cpp index c62f4038bf0..615fb3a1a75 100644 --- a/src/mame/drivers/2mindril.cpp +++ b/src/mame/drivers/2mindril.cpp @@ -50,6 +50,11 @@ public: : taito_f3_state(mconfig, type, tag), m_in0(*this, "IN0") { } + void drill(machine_config &config); + + void init_drill(); + +private: /* input-related */ required_ioport m_in0; uint8_t m_defender_sensor; @@ -63,7 +68,7 @@ public: DECLARE_WRITE16_MEMBER(sensors_w); DECLARE_READ16_MEMBER(drill_irq_r); DECLARE_WRITE16_MEMBER(drill_irq_w); - void init_drill(); + DECLARE_MACHINE_START(drill); DECLARE_MACHINE_RESET(drill); INTERRUPT_GEN_MEMBER(drill_vblank_irq); @@ -71,7 +76,6 @@ public: void tile_decode(); DECLARE_WRITE_LINE_MEMBER(irqhandler); - void drill(machine_config &config); void drill_map(address_map &map); #ifdef UNUSED_FUNCTION diff --git a/src/mame/drivers/3x3puzzl.cpp b/src/mame/drivers/3x3puzzl.cpp index 2c1493ba2a7..27dafa67738 100644 --- a/src/mame/drivers/3x3puzzl.cpp +++ b/src/mame/drivers/3x3puzzl.cpp @@ -63,6 +63,9 @@ public: m_screen(*this, "screen") { } + void _3x3puzzle(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_videoram1; required_shared_ptr m_videoram2; @@ -97,9 +100,8 @@ public: DECLARE_WRITE16_MEMBER(tilemap1_scrollx_w); DECLARE_WRITE16_MEMBER(tilemap1_scrolly_w); - void _3x3puzzle(machine_config &config); void _3x3puzzle_map(address_map &map); -protected: + virtual void video_start() override; virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/4004clk.cpp b/src/mame/drivers/4004clk.cpp index a31d15659f2..85520cd9129 100644 --- a/src/mame/drivers/4004clk.cpp +++ b/src/mame/drivers/4004clk.cpp @@ -29,7 +29,7 @@ public: void _4004clk(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER( nixie_w ); DECLARE_WRITE8_MEMBER( neon_w ); @@ -41,7 +41,6 @@ protected: virtual void machine_start() override; -private: static constexpr uint8_t nixie_to_num(uint16_t val) { return diff --git a/src/mame/drivers/4dpi.cpp b/src/mame/drivers/4dpi.cpp index d3354aa2ca9..a463ef7493e 100644 --- a/src/mame/drivers/4dpi.cpp +++ b/src/mame/drivers/4dpi.cpp @@ -34,6 +34,11 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") { } + void sgi_ip6(machine_config &config); + + void init_sgi_ip6(); + +private: ip6_regs_t m_ip6_regs; DECLARE_READ32_MEMBER(ip6_unk1_r); DECLARE_WRITE32_MEMBER(ip6_unk1_w); @@ -41,7 +46,6 @@ public: DECLARE_WRITE32_MEMBER(ip6_unk2_w); DECLARE_READ32_MEMBER(ip6_unk3_r); DECLARE_WRITE32_MEMBER(ip6_unk3_w); - void init_sgi_ip6(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -49,7 +53,6 @@ public: INTERRUPT_GEN_MEMBER(sgi_ip6_vbl); inline void ATTR_PRINTF(3,4) verboselog( int n_level, const char *s_fmt, ... ); required_device m_maincpu; - void sgi_ip6(machine_config &config); void sgi_ip6_map(address_map &map); }; diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp index b37fab2bed5..4732d131382 100644 --- a/src/mame/drivers/4enlinea.cpp +++ b/src/mame/drivers/4enlinea.cpp @@ -214,7 +214,9 @@ public: m_maincpu(*this, "maincpu") { } + void _4enlinea(machine_config &config); +private: required_device m_ay; DECLARE_READ8_MEMBER(serial_r); @@ -233,7 +235,6 @@ public: virtual void machine_reset() override; required_device m_maincpu; - void _4enlinea(machine_config &config); void audio_map(address_map &map); void audio_portmap(address_map &map); void main_map(address_map &map); diff --git a/src/mame/drivers/5clown.cpp b/src/mame/drivers/5clown.cpp index 6796c5694b5..ce90e8b2075 100644 --- a/src/mame/drivers/5clown.cpp +++ b/src/mame/drivers/5clown.cpp @@ -471,6 +471,11 @@ public: { } + void fclown(machine_config &config); + + void init_fclown(); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_ay8910; @@ -501,13 +506,12 @@ public: DECLARE_READ8_MEMBER(pia0_b_r); DECLARE_READ8_MEMBER(pia1_b_r); DECLARE_WRITE8_MEMBER(fclown_ay8910_w); - void init_fclown(); TILE_GET_INFO_MEMBER(get_fclown_tile_info); virtual void machine_start() override; virtual void video_start() override; DECLARE_PALETTE_INIT(_5clown); uint32_t screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void fclown(machine_config &config); + void fcaudio_map(address_map &map); void fclown_map(address_map &map); }; diff --git a/src/mame/drivers/68ksbc.cpp b/src/mame/drivers/68ksbc.cpp index 6ccce54a734..f0a4b623010 100644 --- a/src/mame/drivers/68ksbc.cpp +++ b/src/mame/drivers/68ksbc.cpp @@ -42,8 +42,9 @@ public: { } void c68ksbc(machine_config &config); - void c68ksbc_mem(address_map &map); + private: + void c68ksbc_mem(address_map &map); required_device m_maincpu; }; diff --git a/src/mame/drivers/a1supply.cpp b/src/mame/drivers/a1supply.cpp index ae67afdeb5c..38dd35768df 100644 --- a/src/mame/drivers/a1supply.cpp +++ b/src/mame/drivers/a1supply.cpp @@ -45,21 +45,18 @@ public: { } + void a1supply(machine_config &config); + +private: // devices required_device m_maincpu; required_device m_video; - void a1supply(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/a5105.cpp b/src/mame/drivers/a5105.cpp index 8e65e31626f..26062cb51b2 100644 --- a/src/mame/drivers/a5105.cpp +++ b/src/mame/drivers/a5105.cpp @@ -59,6 +59,9 @@ public: , m_palette(*this, "palette") { } + void a5105(machine_config &config); + +private: DECLARE_READ8_MEMBER(a5105_memsel_r); DECLARE_READ8_MEMBER(key_r); DECLARE_READ8_MEMBER(key_mux_r); @@ -73,11 +76,10 @@ public: UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); - void a5105(machine_config &config); void a5105_io(address_map &map); void a5105_mem(address_map &map); void upd7220_map(address_map &map); -private: + uint8_t *m_ram_base; uint8_t *m_rom_base; uint8_t *m_char_ram; diff --git a/src/mame/drivers/a51xx.cpp b/src/mame/drivers/a51xx.cpp index 675d168aed3..853b4ee1887 100644 --- a/src/mame/drivers/a51xx.cpp +++ b/src/mame/drivers/a51xx.cpp @@ -26,6 +26,10 @@ public: , m_maincpu(*this, "maincpu") { } + void a5130(machine_config &config); + void a5120(machine_config &config); + +private: virtual void machine_reset() override; virtual void video_start() override; DECLARE_MACHINE_RESET(a5130); @@ -33,8 +37,6 @@ public: uint32_t screen_update_a5120(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_a5130(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; - void a5130(machine_config &config); - void a5120(machine_config &config); void a5120_io(address_map &map); void a5120_mem(address_map &map); void a5130_io(address_map &map); diff --git a/src/mame/drivers/a6809.cpp b/src/mame/drivers/a6809.cpp index 93b2e89ad2f..5e269148804 100644 --- a/src/mame/drivers/a6809.cpp +++ b/src/mame/drivers/a6809.cpp @@ -77,7 +77,7 @@ public: void a6809(machine_config &config); -protected: +private: void kbd_put(u8 data); DECLARE_READ8_MEMBER(videoram_r); DECLARE_WRITE8_MEMBER(a6809_address_w); @@ -89,7 +89,6 @@ protected: void a6809_mem(address_map &map); -private: required_shared_ptr m_p_videoram; uint16_t m_start_address; uint16_t m_cursor_address; diff --git a/src/mame/drivers/a7150.cpp b/src/mame/drivers/a7150.cpp index a2b9eaada4f..a93a74d0886 100644 --- a/src/mame/drivers/a7150.cpp +++ b/src/mame/drivers/a7150.cpp @@ -67,6 +67,9 @@ public: , m_palette(*this, "palette") { } + void a7150(machine_config &config); + +private: virtual void machine_reset() override; virtual void machine_start() override; @@ -104,7 +107,7 @@ public: required_shared_ptr m_video_ram; required_device m_video_bankdev; required_device m_palette; - void a7150(machine_config &config); + void a7150_io(address_map &map); void a7150_mem(address_map &map); void k7070_cpu_banked(address_map &map); diff --git a/src/mame/drivers/a7800.cpp b/src/mame/drivers/a7800.cpp index 9f65e746fe1..16673069c22 100644 --- a/src/mame/drivers/a7800.cpp +++ b/src/mame/drivers/a7800.cpp @@ -157,7 +157,6 @@ protected: int m_p2_one_button; int m_bios_enabled; -private: required_device m_maincpu; required_device m_tia; required_device m_maria; diff --git a/src/mame/drivers/aa310.cpp b/src/mame/drivers/aa310.cpp index 1baf9417261..90b0fa15fae 100644 --- a/src/mame/drivers/aa310.cpp +++ b/src/mame/drivers/aa310.cpp @@ -107,20 +107,6 @@ public: , m_ram(*this, RAM_TAG) { } - required_shared_ptr m_physram; - - DECLARE_READ32_MEMBER(aa310_psy_wram_r); - DECLARE_WRITE32_MEMBER(aa310_psy_wram_w); - DECLARE_WRITE_LINE_MEMBER(aa310_wd177x_intrq_w); - DECLARE_WRITE_LINE_MEMBER(aa310_wd177x_drq_w); - void init_aa310(); - virtual void machine_start() override; - virtual void machine_reset() override; - DECLARE_INPUT_CHANGED_MEMBER(key_stroke); - DECLARE_INPUT_CHANGED_MEMBER(send_mouse_input); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - void aa5000a(machine_config &config); void aa305(machine_config &config); void aa310(machine_config &config); @@ -135,8 +121,27 @@ public: void aa540(machine_config &config); void aa440(machine_config &config); void aa4201(machine_config &config); + + void init_aa310(); + + DECLARE_INPUT_CHANGED_MEMBER(key_stroke); + DECLARE_INPUT_CHANGED_MEMBER(send_mouse_input); + +private: + required_shared_ptr m_physram; + + DECLARE_READ32_MEMBER(aa310_psy_wram_r); + DECLARE_WRITE32_MEMBER(aa310_psy_wram_w); + DECLARE_WRITE_LINE_MEMBER(aa310_wd177x_intrq_w); + DECLARE_WRITE_LINE_MEMBER(aa310_wd177x_drq_w); + + virtual void machine_start() override; + virtual void machine_reset() override; + + DECLARE_FLOPPY_FORMATS( floppy_formats ); + void aa310_mem(address_map &map); -protected: + required_device m_ram; }; diff --git a/src/mame/drivers/aaa.cpp b/src/mame/drivers/aaa.cpp index 8f2d2b76dae..96731408da4 100644 --- a/src/mame/drivers/aaa.cpp +++ b/src/mame/drivers/aaa.cpp @@ -19,9 +19,11 @@ public: { } void aaa(machine_config &config); + +private: void mem_map(address_map &map); void io_map(address_map &map); -private: + required_device m_maincpu; required_region_ptr m_p_chargen; }; diff --git a/src/mame/drivers/accomm.cpp b/src/mame/drivers/accomm.cpp index 60a678dc84a..d22d79516e3 100644 --- a/src/mame/drivers/accomm.cpp +++ b/src/mame/drivers/accomm.cpp @@ -60,7 +60,7 @@ public: void accomm(machine_config &config); -protected: +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(ch00switch_w); @@ -98,7 +98,6 @@ protected: inline uint8_t read_vram( uint16_t addr ); inline void plot_pixel(bitmap_ind16 &bitmap, int x, int y, uint32_t color); -private: bool m_ch00rom_enabled; /* ULA context */ diff --git a/src/mame/drivers/acd.cpp b/src/mame/drivers/acd.cpp index 46cc6775810..64ff4cd0863 100644 --- a/src/mame/drivers/acd.cpp +++ b/src/mame/drivers/acd.cpp @@ -15,12 +15,12 @@ class acd_state : public driver_device public: acd_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void acd(machine_config &config); + void acd(machine_config &config); private: -// required_device m_maincpu; + // required_device m_maincpu; }; static INPUT_PORTS_START( acd ) diff --git a/src/mame/drivers/ace.cpp b/src/mame/drivers/ace.cpp index d92f938edc4..882e06f842a 100644 --- a/src/mame/drivers/ace.cpp +++ b/src/mame/drivers/ace.cpp @@ -64,7 +64,7 @@ public: void ace(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(ace_objpos_w); DECLARE_WRITE8_MEMBER(ace_characterram_w); DECLARE_WRITE8_MEMBER(ace_scoreram_w); @@ -76,7 +76,6 @@ protected: void ace_postload(); void main_map(address_map &map); -private: required_device m_maincpu; /* video-related */ diff --git a/src/mame/drivers/aceex.cpp b/src/mame/drivers/aceex.cpp index 1ab43c466df..d4830b3906f 100644 --- a/src/mame/drivers/aceex.cpp +++ b/src/mame/drivers/aceex.cpp @@ -56,10 +56,13 @@ public: : driver_device(mconfig, type, tag) ,m_maincpu(*this, "maincpu") { } + + void aceex2814(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; - void aceex2814(machine_config &config); void aceex2814_map(address_map &map); }; diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp index 7ddb093d839..df1a1ef0146 100644 --- a/src/mame/drivers/acefruit.cpp +++ b/src/mame/drivers/acefruit.cpp @@ -23,11 +23,6 @@ Inputs and Dip Switches by Stephh class acefruit_state : public driver_device { public: - enum - { - TIMER_ACEFRUIT_REFRESH - }; - acefruit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -44,15 +39,20 @@ public: m_refresh_timer(nullptr) { } + void acefruit(machine_config &config); + void init_sidewndr(); DECLARE_CUSTOM_INPUT_MEMBER(sidewndr_payout_r); DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r); DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r); - void acefruit(machine_config &config); +private: + enum + { + TIMER_ACEFRUIT_REFRESH + }; -protected: DECLARE_WRITE8_MEMBER(acefruit_colorram_w); DECLARE_WRITE8_MEMBER(acefruit_coin_w); DECLARE_WRITE8_MEMBER(acefruit_sound_w); @@ -71,7 +71,6 @@ protected: void acefruit_io(address_map &map); void acefruit_map(address_map &map); -private: required_device m_maincpu; required_shared_ptr m_videoram; required_shared_ptr m_colorram; diff --git a/src/mame/drivers/acesp.cpp b/src/mame/drivers/acesp.cpp index 788e25dcccc..cc33ff16dff 100644 --- a/src/mame/drivers/acesp.cpp +++ b/src/mame/drivers/acesp.cpp @@ -29,15 +29,16 @@ public: { } void ace_sp(machine_config &config); + + void init_ace_sp(); + void init_ace_cr(); + +private: void ace_sp_map(address_map &map); void ace_sp_portmap(address_map &map); -protected: // devices required_device m_maincpu; -public: - void init_ace_sp(); - void init_ace_cr(); }; diff --git a/src/mame/drivers/acommand.cpp b/src/mame/drivers/acommand.cpp index 9eaa10a03dd..ddd862e1784 100644 --- a/src/mame/drivers/acommand.cpp +++ b/src/mame/drivers/acommand.cpp @@ -85,6 +85,9 @@ public: m_digits(*this, "digit%u", 0U) { } + void acommand(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(oki_bank_w); DECLARE_WRITE16_MEMBER(output_7seg0_w); DECLARE_WRITE16_MEMBER(output_7seg1_w); @@ -101,13 +104,10 @@ public: uint32_t screen_update_acommand(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(acommand_scanline); - - void acommand(machine_config &config); void acommand_map(address_map &map); -protected: + virtual void machine_start() override; -private: required_shared_ptr m_spriteram; required_device m_maincpu; required_device m_oki1; diff --git a/src/mame/drivers/acrnsys1.cpp b/src/mame/drivers/acrnsys1.cpp index 145e7a71392..ab8b51af0bb 100644 --- a/src/mame/drivers/acrnsys1.cpp +++ b/src/mame/drivers/acrnsys1.cpp @@ -72,7 +72,7 @@ public: void acrnsys1(machine_config &config); -protected: +private: virtual void machine_start() override; DECLARE_READ8_MEMBER(ins8154_b1_port_a_r); DECLARE_WRITE8_MEMBER(ins8154_b1_port_a_w); @@ -81,7 +81,6 @@ protected: TIMER_DEVICE_CALLBACK_MEMBER(acrnsys1_p); void acrnsys1_map(address_map &map); -private: required_device m_maincpu; required_device m_ttl74145; required_device m_cass; diff --git a/src/mame/drivers/acvirus.cpp b/src/mame/drivers/acvirus.cpp index 9ec47a1ad9b..79aaa6f16c8 100644 --- a/src/mame/drivers/acvirus.cpp +++ b/src/mame/drivers/acvirus.cpp @@ -76,16 +76,16 @@ public: m_rombank(*this, "rombank") { } - void init_virus(); void virus(machine_config &config); -protected: + void init_virus(); + +private: virtual void machine_start() override; virtual void machine_reset() override; void virus_map(address_map &map); -private: required_device m_maincpu; required_memory_bank m_rombank; }; diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp index a16d62b5e99..5f521639e1c 100644 --- a/src/mame/drivers/adp.cpp +++ b/src/mame/drivers/adp.cpp @@ -181,6 +181,14 @@ public: m_in0(*this, "IN0") { } + void skattv(machine_config &config); + void quickjac(machine_config &config); + void fashiong(machine_config &config); + void fstation(machine_config &config); + void funland(machine_config &config); + void skattva(machine_config &config); + +private: required_device m_microtouch; required_device m_maincpu; required_device m_duart; @@ -200,12 +208,7 @@ public: IRQ_CALLBACK_MEMBER(duart_iack_handler); //INTERRUPT_GEN_MEMBER(adp_int); void skattva_nvram_init(nvram_device &nvram, void *base, size_t size); - void skattv(machine_config &config); - void quickjac(machine_config &config); - void fashiong(machine_config &config); - void fstation(machine_config &config); - void funland(machine_config &config); - void skattva(machine_config &config); + void adp_hd63484_map(address_map &map); void fashiong_hd63484_map(address_map &map); void fstation_hd63484_map(address_map &map); diff --git a/src/mame/drivers/agat.cpp b/src/mame/drivers/agat.cpp index b52b54fc231..d428bfffe05 100644 --- a/src/mame/drivers/agat.cpp +++ b/src/mame/drivers/agat.cpp @@ -106,6 +106,9 @@ public: , m_upperbank(*this, A7_UPPERBANK_TAG) { } + void agat7(machine_config &config); + +private: required_device m_maincpu; required_device m_ram; required_device m_ay3600; @@ -160,10 +163,9 @@ public: DECLARE_READ8_MEMBER(controller_strobe_r); DECLARE_WRITE8_MEMBER(controller_strobe_w); - void agat7(machine_config &config); void agat7_map(address_map &map); void inhbank_map(address_map &map); -private: + int m_speaker_state; int m_cassette_state; diff --git a/src/mame/drivers/age_candy.cpp b/src/mame/drivers/age_candy.cpp index e9672ab82b8..331a421c7f7 100644 --- a/src/mame/drivers/age_candy.cpp +++ b/src/mame/drivers/age_candy.cpp @@ -24,10 +24,12 @@ public: // ,m_maincpu(*this, "maincpu") { } + void age_candy(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void age_candy(machine_config &config); void age_candy_map(address_map &map); // required_device m_maincpu; }; diff --git a/src/mame/drivers/aim65_40.cpp b/src/mame/drivers/aim65_40.cpp index c0ec29c8121..1ecd8fd5078 100644 --- a/src/mame/drivers/aim65_40.cpp +++ b/src/mame/drivers/aim65_40.cpp @@ -74,10 +74,12 @@ class aim65_40_state : public driver_device public: aim65_40_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - { } + { } - void aim65_40(machine_config &config); - void aim65_40_mem(address_map &map); + void aim65_40(machine_config &config); + +private: + void aim65_40_mem(address_map &map); // devices //device_t *m_via0; //device_t *m_via1; diff --git a/src/mame/drivers/airraid.cpp b/src/mame/drivers/airraid.cpp index 0036d85a313..9dcd18f2065 100644 --- a/src/mame/drivers/airraid.cpp +++ b/src/mame/drivers/airraid.cpp @@ -172,7 +172,13 @@ public: , m_airraid_video(*this,"airraid_vid") { } + void airraid(machine_config &config); + void airraid_crypt(machine_config &config); + + void init_cshootere(); + void init_cshooter(); +private: required_device m_maincpu; optional_device m_seibu_sound; optional_shared_ptr m_mainram; @@ -185,12 +191,9 @@ public: DECLARE_WRITE8_MEMBER(cshooter_c500_w); DECLARE_WRITE8_MEMBER(cshooter_c700_w); DECLARE_WRITE8_MEMBER(bank_w); - void init_cshootere(); - void init_cshooter(); DECLARE_MACHINE_RESET(cshooter); TIMER_DEVICE_CALLBACK_MEMBER(cshooter_scanline); - void airraid(machine_config &config); - void airraid_crypt(machine_config &config); + void airraid_map(address_map &map); void airraid_sound_decrypted_opcodes_map(address_map &map); void airraid_sound_map(address_map &map); diff --git a/src/mame/drivers/akaiax80.cpp b/src/mame/drivers/akaiax80.cpp index 612299bbd66..f2dd789a289 100644 --- a/src/mame/drivers/akaiax80.cpp +++ b/src/mame/drivers/akaiax80.cpp @@ -60,8 +60,10 @@ public: { } void ax80(machine_config &config); - void ax80_map(address_map &map); + private: + void ax80_map(address_map &map); + virtual void machine_reset() override; required_device m_maincpu; }; diff --git a/src/mame/drivers/albazc.cpp b/src/mame/drivers/albazc.cpp index 32a9e1b981f..3e5a2c1b10b 100644 --- a/src/mame/drivers/albazc.cpp +++ b/src/mame/drivers/albazc.cpp @@ -37,7 +37,7 @@ public: void hanaroku(machine_config &config); -protected: +private: /* video-related */ DECLARE_WRITE8_MEMBER(hanaroku_out_0_w); DECLARE_WRITE8_MEMBER(hanaroku_out_1_w); @@ -49,7 +49,6 @@ protected: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void hanaroku_map(address_map &map); -private: required_shared_ptr m_spriteram1; required_shared_ptr m_spriteram2; required_shared_ptr m_spriteram3; diff --git a/src/mame/drivers/albazg.cpp b/src/mame/drivers/albazg.cpp index 25b94f74c28..37a75ccf01f 100644 --- a/src/mame/drivers/albazg.cpp +++ b/src/mame/drivers/albazg.cpp @@ -61,7 +61,7 @@ public: virtual void yumefuda(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -80,7 +80,6 @@ protected: void main_map(address_map &map); void port_map(address_map &map); -private: /* memory pointers */ required_shared_ptr m_cus_ram; required_shared_ptr m_videoram; diff --git a/src/mame/drivers/aleck64.cpp b/src/mame/drivers/aleck64.cpp index bf0e0f38b3d..01ae969d44c 100644 --- a/src/mame/drivers/aleck64.cpp +++ b/src/mame/drivers/aleck64.cpp @@ -193,7 +193,12 @@ public: m_e90_pal(*this,"e90pal"), m_dip_read_offset(0) { } + void aleck64(machine_config &config); + void a64_e90(machine_config &config); + void init_aleck64(); + +private: DECLARE_WRITE32_MEMBER(aleck_dips_w); DECLARE_READ32_MEMBER(aleck_dips_r); DECLARE_READ16_MEMBER(e90_prot_r); @@ -201,16 +206,12 @@ public: uint32_t screen_update_e90(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void aleck64(machine_config &config); - void a64_e90(machine_config &config); void e90_map(address_map &map); void n64_map(address_map &map); void rsp_map(address_map &map); -protected: optional_shared_ptr m_e90_vram; optional_shared_ptr m_e90_pal; -private: uint32_t m_dip_read_offset; }; diff --git a/src/mame/drivers/alesis_qs.cpp b/src/mame/drivers/alesis_qs.cpp index e254d1c9d35..0ad9d363649 100644 --- a/src/mame/drivers/alesis_qs.cpp +++ b/src/mame/drivers/alesis_qs.cpp @@ -25,8 +25,10 @@ public: { } void qs7(machine_config &config); + +private: void qs7_prog_map(address_map &map); -protected: + required_device m_maincpu; }; diff --git a/src/mame/drivers/alien.cpp b/src/mame/drivers/alien.cpp index 365396822e2..b95ec90cbd3 100644 --- a/src/mame/drivers/alien.cpp +++ b/src/mame/drivers/alien.cpp @@ -81,16 +81,17 @@ public: m_maincpu(*this, "maincpu") { } + void alien(machine_config &config); + + void init_dkbanans(); + +private: DECLARE_READ64_MEMBER(test_r); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void alien(machine_config &config); void alien_map(address_map &map); - void init_dkbanans(); -protected: - // devices required_device m_maincpu; diff --git a/src/mame/drivers/alinvade.cpp b/src/mame/drivers/alinvade.cpp index 27c07353f6d..7c6658b248a 100644 --- a/src/mame/drivers/alinvade.cpp +++ b/src/mame/drivers/alinvade.cpp @@ -38,6 +38,9 @@ public: , m_discrete(*this, "discrete") { } + void alinvade(machine_config &config); + +private: DECLARE_READ8_MEMBER(irqmask_r); DECLARE_WRITE8_MEMBER(irqmask_w); DECLARE_WRITE8_MEMBER(sound_w); @@ -45,9 +48,8 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void alinvade(machine_config &config); void alinvade_map(address_map &map); -private: + uint8_t m_irqmask; uint8_t m_irqff; virtual void machine_start() override; diff --git a/src/mame/drivers/allied.cpp b/src/mame/drivers/allied.cpp index ff0ffc86fd9..ef4790e55e9 100644 --- a/src/mame/drivers/allied.cpp +++ b/src/mame/drivers/allied.cpp @@ -68,6 +68,9 @@ public: , m_leds(*this, "led%u", 0U) { } + void allied(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(ic1_b_w); DECLARE_WRITE8_MEMBER(ic2_b_w); DECLARE_WRITE_LINE_MEMBER(ic2_cb2_w); @@ -88,9 +91,8 @@ public: DECLARE_READ8_MEMBER(ic7_a_r); DECLARE_WRITE_LINE_MEMBER(ic8_cb2_w); TIMER_DEVICE_CALLBACK_MEMBER(timer_a); - void allied(machine_config &config); void allied_map(address_map &map); -private: + uint32_t m_player_score[6]; uint8_t m_display; uint8_t m_bit_counter; diff --git a/src/mame/drivers/alphasma.cpp b/src/mame/drivers/alphasma.cpp index cc323119c12..3dea2e98106 100644 --- a/src/mame/drivers/alphasma.cpp +++ b/src/mame/drivers/alphasma.cpp @@ -37,6 +37,11 @@ public: { } + void alphasmart(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(kb_irq); + +protected: required_device m_maincpu; required_device m_lcdc0; required_device m_lcdc1; @@ -51,7 +56,6 @@ public: DECLARE_PALETTE_INIT(alphasmart); virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_INPUT_CHANGED_MEMBER(kb_irq); DECLARE_READ8_MEMBER(kb_r); DECLARE_WRITE8_MEMBER(kb_matrixl_w); DECLARE_WRITE8_MEMBER(kb_matrixh_w); @@ -61,10 +65,9 @@ public: DECLARE_WRITE8_MEMBER(port_d_w); void update_lcdc(address_space &space, bool lcdc0, bool lcdc1); - void alphasmart(machine_config &config); void alphasmart_io(address_map &map); void alphasmart_mem(address_map &map); -protected: + uint8_t m_matrix[2]; uint8_t m_port_a; uint8_t m_port_d; @@ -80,15 +83,17 @@ public: { } + void asma2k(machine_config &config); + +private: required_shared_ptr m_intram; DECLARE_READ8_MEMBER(io_r); DECLARE_WRITE8_MEMBER(io_w); virtual DECLARE_WRITE8_MEMBER(port_a_w) override; - void asma2k(machine_config &config); void asma2k_mem(address_map &map); -private: + uint8_t m_lcd_ctrl; }; diff --git a/src/mame/drivers/alphatro.cpp b/src/mame/drivers/alphatro.cpp index 64b3f5745fb..fcebc5d0290 100644 --- a/src/mame/drivers/alphatro.cpp +++ b/src/mame/drivers/alphatro.cpp @@ -52,11 +52,6 @@ class alphatro_state : public driver_device { public: - enum - { - TIMER_SYSTEM - }; - alphatro_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_ram(*this, RAM_TAG) @@ -79,6 +74,16 @@ public: , m_cart(*this, "cartslot") { } + void alphatro(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(alphatro_break); + +private: + enum + { + TIMER_SYSTEM + }; + DECLARE_READ8_MEMBER (ram0000_r); DECLARE_WRITE8_MEMBER(ram0000_w); DECLARE_READ8_MEMBER (ram6000_r); @@ -94,7 +99,6 @@ public: DECLARE_WRITE8_MEMBER(port30_w); DECLARE_READ8_MEMBER(portf0_r); DECLARE_WRITE8_MEMBER(portf0_w); - DECLARE_INPUT_CHANGED_MEMBER(alphatro_break); DECLARE_WRITE_LINE_MEMBER(txdata_callback); DECLARE_WRITE_LINE_MEMBER(hrq_w); DECLARE_WRITE_LINE_MEMBER(fdc_irq_w); @@ -107,13 +111,12 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load) { return load_cart(image, m_cart); } DECLARE_FLOPPY_FORMATS( floppy_formats ); - void alphatro(machine_config &config); void alphatro_io(address_map &map); void alphatro_map(address_map &map); void cartbank_map(address_map &map); void monbank_map(address_map &map); void rombank_map(address_map &map); -private: + uint8_t *m_ram_ptr; required_device m_ram; required_shared_ptr m_p_videoram; diff --git a/src/mame/drivers/altair.cpp b/src/mame/drivers/altair.cpp index c9d015a96af..8840e4dda67 100644 --- a/src/mame/drivers/altair.cpp +++ b/src/mame/drivers/altair.cpp @@ -43,14 +43,13 @@ public: void altair(machine_config &config); -protected: +private: DECLARE_QUICKLOAD_LOAD_MEMBER(altair); virtual void machine_reset() override; void io_map(address_map &map); void mem_map(address_map &map); -private: required_device m_maincpu; required_shared_ptr m_ram; }; diff --git a/src/mame/drivers/alto1.cpp b/src/mame/drivers/alto1.cpp index 414cec36910..3031a9a937e 100644 --- a/src/mame/drivers/alto1.cpp +++ b/src/mame/drivers/alto1.cpp @@ -18,12 +18,12 @@ class alto1_state : public driver_device public: alto1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void alto1(machine_config &config); + void alto1(machine_config &config); private: -// required_device m_maincpu; + // required_device m_maincpu; }; diff --git a/src/mame/drivers/altos2.cpp b/src/mame/drivers/altos2.cpp index 5b20b3149a6..db1272a1d8c 100644 --- a/src/mame/drivers/altos2.cpp +++ b/src/mame/drivers/altos2.cpp @@ -38,7 +38,7 @@ public: void altos2(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(video_mode_w); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -47,7 +47,6 @@ protected: void io_map(address_map &map); void mem_map(address_map &map); -private: required_device m_maincpu; required_device m_novram; required_region_ptr m_p_chargen; diff --git a/src/mame/drivers/altos486.cpp b/src/mame/drivers/altos486.cpp index 6a3528b8634..098386f982b 100644 --- a/src/mame/drivers/altos486.cpp +++ b/src/mame/drivers/altos486.cpp @@ -26,7 +26,7 @@ public: void altos486(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(read_rmx_ack); DECLARE_READ16_MEMBER(mmu_ram_r); @@ -40,7 +40,6 @@ protected: void altos486_z80_io(address_map &map); void altos486_z80_mem(address_map &map); -private: required_device m_maincpu; required_shared_ptr m_ram; required_memory_region m_rom; diff --git a/src/mame/drivers/altos5.cpp b/src/mame/drivers/altos5.cpp index e33cc861711..958a81ed330 100644 --- a/src/mame/drivers/altos5.cpp +++ b/src/mame/drivers/altos5.cpp @@ -38,12 +38,13 @@ public: , m_floppy1(*this, "fdc:1") { } - void init_altos5(); void altos5(machine_config &config); + void init_altos5(); + DECLARE_QUICKLOAD_LOAD_MEMBER(altos5); -protected: +private: DECLARE_READ8_MEMBER(memory_read_byte); DECLARE_WRITE8_MEMBER(memory_write_byte); DECLARE_READ8_MEMBER(io_read_byte); @@ -59,7 +60,6 @@ protected: void io_map(address_map &map); void mem_map(address_map &map); -private: uint8_t m_port08; uint8_t m_port09; uint8_t *m_p_prom; diff --git a/src/mame/drivers/altos8600.cpp b/src/mame/drivers/altos8600.cpp index ed90babd6d4..78565331a70 100644 --- a/src/mame/drivers/altos8600.cpp +++ b/src/mame/drivers/altos8600.cpp @@ -35,7 +35,7 @@ public: void altos8600(machine_config &config); -protected: +private: DECLARE_READ16_MEMBER(cpuram_r); DECLARE_WRITE16_MEMBER(cpuram_w); DECLARE_READ16_MEMBER(stkram_r); @@ -82,7 +82,6 @@ protected: void extra_mem(address_map &map); void stack_mem(address_map &map); -private: u16 xlate_r(address_space &space, offs_t offset, u16 mem_mask, int permbit); void xlate_w(address_space &space, offs_t offset, u16 data, u16 mem_mask, int permbit); void seterr(offs_t offset, u16 mem_mask, u16 err_mask); diff --git a/src/mame/drivers/alvg.cpp b/src/mame/drivers/alvg.cpp index c9b31fb7c7e..150803c825a 100644 --- a/src/mame/drivers/alvg.cpp +++ b/src/mame/drivers/alvg.cpp @@ -13,16 +13,17 @@ public: { } void alvg(machine_config &config); + + void init_alvg(); + +private: void alvg_map(address_map &map); -protected: // devices required_device m_maincpu; // driver_device overrides virtual void machine_reset() override; -public: - void init_alvg(); }; diff --git a/src/mame/drivers/ambush.cpp b/src/mame/drivers/ambush.cpp index 2d63e3cd67d..542789e1389 100644 --- a/src/mame/drivers/ambush.cpp +++ b/src/mame/drivers/ambush.cpp @@ -72,6 +72,11 @@ public: m_color_bank(0) { } + void mariobl(machine_config &config); + void ambush(machine_config &config); + void dkong3abl(machine_config &config); + +private: DECLARE_PALETTE_INIT(ambush); DECLARE_PALETTE_INIT(mario); DECLARE_PALETTE_INIT(dkong3); @@ -96,13 +101,10 @@ public: DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); DECLARE_WRITE8_MEMBER(output_latches_w); - void mariobl(machine_config &config); - void ambush(machine_config &config); - void dkong3abl(machine_config &config); void bootleg_map(address_map &map); void main_map(address_map &map); void main_portmap(address_map &map); -private: + void register_save_states(); required_device m_gfxdecode; diff --git a/src/mame/drivers/amerihok.cpp b/src/mame/drivers/amerihok.cpp index d4fd70d4239..fea63c12224 100644 --- a/src/mame/drivers/amerihok.cpp +++ b/src/mame/drivers/amerihok.cpp @@ -33,6 +33,9 @@ public: , m_oki(*this, "oki") { } + void amerihok(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -40,7 +43,6 @@ public: required_device m_maincpu; required_device m_oki; - void amerihok(machine_config &config); void amerihok_data_map(address_map &map); void amerihok_map(address_map &map); }; diff --git a/src/mame/drivers/amico2k.cpp b/src/mame/drivers/amico2k.cpp index d4049565c0b..a9e8688dce1 100644 --- a/src/mame/drivers/amico2k.cpp +++ b/src/mame/drivers/amico2k.cpp @@ -45,6 +45,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void amico2k(machine_config &config); + +private: void machine_start() override; DECLARE_READ8_MEMBER( ppi_pa_r ); @@ -55,9 +58,8 @@ public: // timers emu_timer *m_led_refresh_timer; TIMER_CALLBACK_MEMBER(led_refresh); - void amico2k(machine_config &config); void amico2k_mem(address_map &map); -private: + int m_ls145_p; uint8_t m_segment; required_device m_maincpu; diff --git a/src/mame/drivers/ampex.cpp b/src/mame/drivers/ampex.cpp index a30a05a8449..866f2b12bf2 100644 --- a/src/mame/drivers/ampex.cpp +++ b/src/mame/drivers/ampex.cpp @@ -36,6 +36,9 @@ public: , m_p_chargen(*this, "chargen") { } + void ampex(machine_config &config); + +private: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER(read_5840); @@ -54,9 +57,8 @@ public: DECLARE_WRITE_LINE_MEMBER(so_w); DECLARE_WRITE_LINE_MEMBER(dav_w); - void ampex(machine_config &config); void mem_map(address_map &map); -private: + virtual void machine_start() override; u8 m_page; diff --git a/src/mame/drivers/ampro.cpp b/src/mame/drivers/ampro.cpp index 4bf5e013dca..005ef171d3f 100644 --- a/src/mame/drivers/ampro.cpp +++ b/src/mame/drivers/ampro.cpp @@ -44,17 +44,20 @@ public: , m_floppy0(*this, "fdc:0") { } + void ampro(machine_config &config); + void init_ampro(); + +private: DECLARE_MACHINE_RESET(ampro); TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); DECLARE_WRITE8_MEMBER(port00_w); DECLARE_READ8_MEMBER(io_r); DECLARE_WRITE8_MEMBER(io_w); - void ampro(machine_config &config); void ampro_io(address_map &map); void ampro_mem(address_map &map); -private: + required_device m_maincpu; required_device m_dart; required_device m_ctc; diff --git a/src/mame/drivers/ampscarp.cpp b/src/mame/drivers/ampscarp.cpp index 89f1b5d327b..05b72db1734 100644 --- a/src/mame/drivers/ampscarp.cpp +++ b/src/mame/drivers/ampscarp.cpp @@ -23,8 +23,9 @@ public: { } void ampscarp(machine_config &config); - void mem_map(address_map &map); + private: + void mem_map(address_map &map); required_device m_maincpu; }; diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index 9f030172dd0..f7ca2989485 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -53,6 +53,12 @@ public: { } + void pc200(machine_config &config); + void pc2086(machine_config &config); + void ppc640(machine_config &config); + void ppc512(machine_config &config); + +private: required_device m_maincpu; required_device m_mb; required_device m_keyboard; @@ -86,10 +92,7 @@ public: int m_dipstate; static void cfg_com(device_t *device); - void pc200(machine_config &config); - void pc2086(machine_config &config); - void ppc640(machine_config &config); - void ppc512(machine_config &config); + void pc200_io(address_map &map); void pc2086_map(address_map &map); void ppc512_io(address_map &map); diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp index f0fd89b7edf..0c18032b648 100644 --- a/src/mame/drivers/amusco.cpp +++ b/src/mame/drivers/amusco.cpp @@ -115,8 +115,13 @@ public: m_lamps(*this, "lamp%u", 0U) { } - TILE_GET_INFO_MEMBER(get_bg_tile_info); + void amusco(machine_config &config); + void draw88pkr(machine_config &config); + DECLARE_WRITE_LINE_MEMBER(coin_irq); + +private: + TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_READ8_MEMBER(mc6845_r); DECLARE_WRITE8_MEMBER(mc6845_w); DECLARE_WRITE8_MEMBER(output_a_w); @@ -130,14 +135,9 @@ public: MC6845_UPDATE_ROW(update_row); DECLARE_PALETTE_INIT(amusco); - void amusco(machine_config &config); - void draw88pkr(machine_config &config); - -protected: virtual void video_start() override; virtual void machine_start() override; -private: void amusco_mem_map(address_map &map); void amusco_io_map(address_map &map); diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp index 26b455ca4ca..bdc8dd3dfba 100644 --- a/src/mame/drivers/amust.cpp +++ b/src/mame/drivers/amust.cpp @@ -98,11 +98,6 @@ ToDo: class amust_state : public driver_device { public: - enum - { - TIMER_BEEP_OFF - }; - amust_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_palette(*this, "palette") @@ -114,8 +109,17 @@ public: , m_floppy0(*this, "fdc:0") , m_floppy1(*this, "fdc:1") { } + + void amust(machine_config &config); void init_amust(); + +private: + enum + { + TIMER_BEEP_OFF + }; + DECLARE_MACHINE_RESET(amust); DECLARE_READ8_MEMBER(port04_r); DECLARE_WRITE8_MEMBER(port04_w); @@ -132,10 +136,9 @@ public: INTERRUPT_GEN_MEMBER(irq_vs); MC6845_UPDATE_ROW(crtc_update_row); - void amust(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + u8 m_port04; u8 m_port06; u8 m_port08; diff --git a/src/mame/drivers/anes.cpp b/src/mame/drivers/anes.cpp index fcf16ab1a80..c7370d40d4a 100644 --- a/src/mame/drivers/anes.cpp +++ b/src/mame/drivers/anes.cpp @@ -37,18 +37,19 @@ public: { } + void anes(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(vram_offset_w); DECLARE_WRITE8_MEMBER(blit_trigger_w); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void anes(machine_config &config); void io_map(address_map &map); void prg_map(address_map &map); -protected: + virtual void machine_start() override; -private: uint8_t m_vram_offset[3]; }; diff --git a/src/mame/drivers/anzterm.cpp b/src/mame/drivers/anzterm.cpp index 80322e5e53a..c9031a13f11 100644 --- a/src/mame/drivers/anzterm.cpp +++ b/src/mame/drivers/anzterm.cpp @@ -364,11 +364,13 @@ public: { } + void anzterm(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; } - void anzterm(machine_config &config); void anzterm(address_map &map); }; diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp index db0526a8fec..6457de80048 100644 --- a/src/mame/drivers/apc.cpp +++ b/src/mame/drivers/apc.cpp @@ -95,6 +95,13 @@ public: m_palette(*this, "palette") { } + void apc(machine_config &config); + + void init_apc(); + + DECLARE_INPUT_CHANGED_MEMBER(key_stroke); + +private: // devices required_device m_maincpu; required_device m_hgdc1; @@ -144,7 +151,6 @@ public: uint8_t sig; //switch signal port uint8_t sh; //shift switches }m_keyb; - DECLARE_INPUT_CHANGED_MEMBER(key_stroke); DECLARE_READ8_MEMBER(get_slave_ack); DECLARE_WRITE_LINE_MEMBER(apc_dma_hrq_changed); @@ -158,20 +164,17 @@ public: DECLARE_READ8_MEMBER(apc_dma_read_byte); DECLARE_WRITE8_MEMBER(apc_dma_write_byte); - void init_apc(); - int m_dack; uint8_t m_dma_offset[4]; UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); - void apc(machine_config &config); void apc_io(address_map &map); void apc_map(address_map &map); void upd7220_1_map(address_map &map); void upd7220_2_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp index 67417342206..1b474bcd421 100644 --- a/src/mame/drivers/apf.cpp +++ b/src/mame/drivers/apf.cpp @@ -110,6 +110,10 @@ public: , m_p_videoram(*this, "videoram") { } + void apfm1000(machine_config &config); + void apfimag(machine_config &config); + +private: DECLARE_READ8_MEMBER(videoram_r); DECLARE_READ8_MEMBER(pia0_porta_r); DECLARE_WRITE8_MEMBER(pia0_portb_w); @@ -121,11 +125,9 @@ public: DECLARE_READ8_MEMBER(serial_r); DECLARE_WRITE8_MEMBER(serial_w); - void apfm1000(machine_config &config); - void apfimag(machine_config &config); void apfimag_map(address_map &map); void apfm1000_map(address_map &map); -private: + uint8_t m_latch; uint8_t m_keyboard_data; uint8_t m_pad_data; diff --git a/src/mame/drivers/apogee.cpp b/src/mame/drivers/apogee.cpp index d602192eb47..8c0b584f77a 100644 --- a/src/mame/drivers/apogee.cpp +++ b/src/mame/drivers/apogee.cpp @@ -33,6 +33,9 @@ public: : radio86_state(mconfig, type, tag), m_speaker(*this, "speaker") { } + void apogee(machine_config &config); + +private: uint8_t m_out0; uint8_t m_out1; uint8_t m_out2; @@ -42,7 +45,6 @@ public: I8275_DRAW_CHARACTER_MEMBER(display_pixels); required_device m_speaker; - void apogee(machine_config &config); void apogee_mem(address_map &map); }; diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp index 130e7a7d406..f46e363de44 100644 --- a/src/mame/drivers/applix.cpp +++ b/src/mame/drivers/applix.cpp @@ -101,6 +101,11 @@ public: m_expansion(*this, "expansion"), m_palette(*this, "palette"){ } + void applix(machine_config &config); + + void init_applix(); + +private: DECLARE_READ16_MEMBER(applix_inputs_r); DECLARE_WRITE16_MEMBER(palette_w); DECLARE_WRITE16_MEMBER(analog_latch_w); @@ -135,7 +140,7 @@ public: DECLARE_READ8_MEMBER( p3_read ); DECLARE_WRITE8_MEMBER( p3_write ); TIMER_DEVICE_CALLBACK_MEMBER(cass_timer); - void init_applix(); + MC6845_UPDATE_ROW(crtc_update_row); uint8_t m_video_latch; uint8_t m_pa; @@ -144,13 +149,13 @@ public: DECLARE_PALETTE_INIT(applix); uint8_t m_palette_latch[4]; required_shared_ptr m_base; - void applix(machine_config &config); + void applix_mem(address_map &map); void keytronic_pc3270_io(address_map &map); void keytronic_pc3270_program(address_map &map); void subcpu_io(address_map &map); void subcpu_mem(address_map &map); -private: + uint8_t m_pb; uint8_t m_analog_latch; uint8_t m_dac_latch; @@ -205,7 +210,7 @@ private: required_ioport m_io_k3b0; required_ioport m_io_k0b; required_shared_ptr m_expansion; -public: + required_device m_palette; }; diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp index e2eb8edecb4..736f9726a59 100644 --- a/src/mame/drivers/apricot.cpp +++ b/src/mame/drivers/apricot.cpp @@ -68,6 +68,10 @@ public: m_bus_locked(0) { } + void apricot(machine_config &config); + void apricotxi(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_WRITE_LINE_MEMBER(i8086_lock_w); @@ -90,14 +94,11 @@ public: MC6845_UPDATE_ROW(crtc_update_row); uint32_t screen_update_apricot(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void apricot(machine_config &config); - void apricotxi(machine_config &config); void apricot_io(address_map &map); void apricot_mem(address_map &map); -protected: + virtual void machine_start() override; -private: required_device m_cpu; required_device m_iop; required_device m_ram; diff --git a/src/mame/drivers/apricotf.cpp b/src/mame/drivers/apricotf.cpp index b6cb02c1d4b..07cc1fb7153 100644 --- a/src/mame/drivers/apricotf.cpp +++ b/src/mame/drivers/apricotf.cpp @@ -76,6 +76,9 @@ public: , m_palette(*this, "palette") { } + void act_f1(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); virtual void machine_start() override; @@ -104,7 +107,7 @@ public: int m_40_80; int m_200_256; - void act_f1(machine_config &config); + void act_f1_io(address_map &map); void act_f1_mem(address_map &map); }; diff --git a/src/mame/drivers/apricotp.cpp b/src/mame/drivers/apricotp.cpp index 1b80bfcdf7d..b8efc914a2f 100644 --- a/src/mame/drivers/apricotp.cpp +++ b/src/mame/drivers/apricotp.cpp @@ -105,6 +105,9 @@ public: m_video_ram(*this, "video_ram") { } + void fp(machine_config &config); + +private: DECLARE_FLOPPY_FORMATS(floppy_formats); required_device m_maincpu; @@ -155,7 +158,7 @@ public: DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); DECLARE_WRITE_LINE_MEMBER( write_centronics_fault ); DECLARE_WRITE_LINE_MEMBER( write_centronics_perror ); - void fp(machine_config &config); + void fp_io(address_map &map); void fp_mem(address_map &map); void sound_io(address_map &map); diff --git a/src/mame/drivers/arachnid.cpp b/src/mame/drivers/arachnid.cpp index 65b01f47053..246be1b5e9d 100644 --- a/src/mame/drivers/arachnid.cpp +++ b/src/mame/drivers/arachnid.cpp @@ -86,6 +86,9 @@ public: m_speaker(*this, SPEAKER_TAG) { } + void arachnid(machine_config &config); + +private: required_device m_maincpu; required_device m_pia_u4; required_device m_pia_u17; @@ -109,7 +112,6 @@ public: DECLARE_WRITE_LINE_MEMBER(ptm_o1_callback); uint8_t read_keyboard(int pa); - void arachnid(machine_config &config); void arachnid_map(address_map &map); }; diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp index eccf3a1447e..8cfe5601103 100644 --- a/src/mame/drivers/argo.cpp +++ b/src/mame/drivers/argo.cpp @@ -31,11 +31,6 @@ ToDo: class argo_state : public driver_device { public: - enum - { - TIMER_BOOT - }; - argo_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -43,16 +38,24 @@ public: , m_p_chargen(*this, "chargen") { } + void argo(machine_config &config); + + void init_argo(); + +private: + enum + { + TIMER_BOOT + }; + DECLARE_WRITE8_MEMBER(argo_videoram_w); DECLARE_READ8_MEMBER(argo_io_r); DECLARE_WRITE8_MEMBER(argo_io_w); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void init_argo(); - void argo(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; required_shared_ptr m_p_videoram; required_region_ptr m_p_chargen; diff --git a/src/mame/drivers/argox.cpp b/src/mame/drivers/argox.cpp index c74f57195aa..d24fde057ca 100644 --- a/src/mame/drivers/argox.cpp +++ b/src/mame/drivers/argox.cpp @@ -51,9 +51,12 @@ public: m_maincpu(*this, "maincpu") { } + void os214(machine_config &config); + void init_os214(); + +private: required_device m_maincpu; - void os214(machine_config &config); void os214_io_map(address_map &map); void os214_prg_map(address_map &map); }; diff --git a/src/mame/drivers/aristmk4.cpp b/src/mame/drivers/aristmk4.cpp index f7a629bdd20..a2ff4bc9606 100644 --- a/src/mame/drivers/aristmk4.cpp +++ b/src/mame/drivers/aristmk4.cpp @@ -371,6 +371,13 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void aristmk4_poker(machine_config &config); + void aristmk4(machine_config &config); + void _86lions(machine_config &config); + + void init_aristmk4(); + +private: required_device m_maincpu; required_device m_rtc; required_device m_ay1; @@ -431,7 +438,7 @@ public: DECLARE_READ8_MEMBER(pa1_r); DECLARE_READ8_MEMBER(pb1_r); DECLARE_READ8_MEMBER(pc1_r); - void init_aristmk4(); + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -443,9 +450,7 @@ public: TIMER_CALLBACK_MEMBER(hopper_reset); TIMER_DEVICE_CALLBACK_MEMBER(aristmk4_pf); inline void uBackgroundColour(); - void aristmk4_poker(machine_config &config); - void aristmk4(machine_config &config); - void _86lions(machine_config &config); + void aristmk4_map(address_map &map); void aristmk4_poker_map(address_map &map); }; diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp index 4ad362d3474..d4ca739dd12 100644 --- a/src/mame/drivers/aristmk5.cpp +++ b/src/mame/drivers/aristmk5.cpp @@ -483,6 +483,19 @@ public: , m_lamps(*this, "lamp%u", 0U) { } + void aristmk5(machine_config &config); + void aristmk5_touch(machine_config &config); + void aristmk5_usa(machine_config &config); + void aristmk5_usa_touch(machine_config &config); + + void init_aristmk5(); + + INPUT_CHANGED_MEMBER(coin_start); + CUSTOM_INPUT_MEMBER(coin_r); + CUSTOM_INPUT_MEMBER(coin_usa_r); + CUSTOM_INPUT_MEMBER(hopper_r); + +private: DECLARE_WRITE32_MEMBER(Ns5w48); DECLARE_READ32_MEMBER(Ns5x58); DECLARE_READ32_MEMBER(Ns5r50); @@ -507,18 +520,6 @@ public: DECLARE_READ8_MEMBER(spi_data_r); DECLARE_WRITE_LINE_MEMBER(uart_irq_callback); - void init_aristmk5(); - void aristmk5(machine_config &config); - void aristmk5_touch(machine_config &config); - void aristmk5_usa(machine_config &config); - void aristmk5_usa_touch(machine_config &config); - - INPUT_CHANGED_MEMBER(coin_start); - CUSTOM_INPUT_MEMBER(coin_r); - CUSTOM_INPUT_MEMBER(coin_usa_r); - CUSTOM_INPUT_MEMBER(hopper_r); - -protected: virtual void machine_start() override; virtual void machine_reset() override; TIMER_CALLBACK_MEMBER(mk5_VSYNC_callback); @@ -535,7 +536,6 @@ protected: uint64_t m_coin_start_cycles; uint8_t m_coin_div; -private: required_device_array m_eeprom; required_device m_rtc; required_device m_nvram; diff --git a/src/mame/drivers/aristmk6.cpp b/src/mame/drivers/aristmk6.cpp index 5b901c598b8..303c87813fe 100644 --- a/src/mame/drivers/aristmk6.cpp +++ b/src/mame/drivers/aristmk6.cpp @@ -47,7 +47,7 @@ public: void aristmk6(machine_config &config); -protected: +private: void testIrq(); DECLARE_READ8_MEMBER(irqpend_r); @@ -62,7 +62,6 @@ protected: void aristmk6_map(address_map &map); void aristmk6_port(address_map &map); -private: #if 0 u32 m_test_x,m_test_y,m_start_offs; u8 m_type; diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp index 700f6702ea5..1e8128dec16 100644 --- a/src/mame/drivers/arsystems.cpp +++ b/src/mame/drivers/arsystems.cpp @@ -69,10 +69,8 @@ public: { } - DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game); - DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r); - DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback); - DECLARE_WRITE8_MEMBER(arcadia_cia_0_portb_w); + void arcadia(machine_config &config); + void argh(machine_config &config); void init_arcadia(); void init_xeon(); @@ -90,15 +88,19 @@ public: void init_dlta(); void init_argh(); + DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game); + DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r); + DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback); + DECLARE_WRITE8_MEMBER(arcadia_cia_0_portb_w); + +private: inline void generic_decode(const char *tag, int bit7, int bit6, int bit5, int bit4, int bit3, int bit2, int bit1, int bit0); - void arcadia(machine_config &config); - void argh(machine_config &config); void a500_mem(address_map &map); void arcadia_map(address_map &map); void argh_map(address_map &map); void overlay_512kb_map(address_map &map); -protected: + virtual void machine_reset() override; optional_memory_region m_bios_region; diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp index e4ee88990be..4bdc2b1bbf7 100644 --- a/src/mame/drivers/asst128.cpp +++ b/src/mame/drivers/asst128.cpp @@ -46,6 +46,9 @@ public: , m_fdc(*this, "fdc") { } + void asst128(machine_config &config); + +private: required_device m_maincpu; required_device m_fdc; @@ -53,7 +56,6 @@ public: DECLARE_WRITE8_MEMBER(asst128_fdc_dor_w); void machine_start() override; - void asst128(machine_config &config); void asst128_io(address_map &map); void asst128_map(address_map &map); }; diff --git a/src/mame/drivers/astinvad.cpp b/src/mame/drivers/astinvad.cpp index c365d9ca08b..5f9bc6b5823 100644 --- a/src/mame/drivers/astinvad.cpp +++ b/src/mame/drivers/astinvad.cpp @@ -50,12 +50,6 @@ enum class astinvad_state : public driver_device { public: - enum - { - TIMER_INT_OFF, - TIMER_INT_GEN - }; - astinvad_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -68,20 +62,33 @@ public: , m_color_prom(*this, "proms") { } + void spcking2(machine_config &config); + void spaceint(machine_config &config); + void kamikaze(machine_config &config); + + void init_kamikaze(); + void init_spcking2(); + + DECLARE_INPUT_CHANGED_MEMBER(spaceint_coin_inserted); + +private: + enum + { + TIMER_INT_OFF, + TIMER_INT_GEN + }; + DECLARE_WRITE8_MEMBER(color_latch_w); DECLARE_WRITE8_MEMBER(spaceint_videoram_w); DECLARE_READ8_MEMBER(kamikaze_ppi_r); DECLARE_WRITE8_MEMBER(kamikaze_ppi_w); DECLARE_WRITE8_MEMBER(spaceint_sound1_w); DECLARE_WRITE8_MEMBER(spaceint_sound2_w); - DECLARE_INPUT_CHANGED_MEMBER(spaceint_coin_inserted); DECLARE_WRITE8_MEMBER(kamikaze_sound1_w); DECLARE_WRITE8_MEMBER(kamikaze_sound2_w); DECLARE_WRITE8_MEMBER(spcking2_sound1_w); DECLARE_WRITE8_MEMBER(spcking2_sound2_w); DECLARE_WRITE8_MEMBER(spcking2_sound3_w); - void init_kamikaze(); - void init_spcking2(); DECLARE_MACHINE_START(kamikaze); DECLARE_MACHINE_RESET(kamikaze); DECLARE_MACHINE_START(spaceint); @@ -93,14 +100,11 @@ public: TIMER_CALLBACK_MEMBER(kamikaze_int_off); TIMER_CALLBACK_MEMBER(kamizake_int_gen); - void spcking2(machine_config &config); - void spaceint(machine_config &config); - void kamikaze(machine_config &config); void kamikaze_map(address_map &map); void kamikaze_portmap(address_map &map); void spaceint_map(address_map &map); void spaceint_portmap(address_map &map); -private: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void plot_byte( bitmap_rgb32 &bitmap, uint8_t y, uint8_t x, uint8_t data, uint8_t color ); diff --git a/src/mame/drivers/astrafr.cpp b/src/mame/drivers/astrafr.cpp index 7070f0a82ec..acd401df68c 100644 --- a/src/mame/drivers/astrafr.cpp +++ b/src/mame/drivers/astrafr.cpp @@ -31,6 +31,24 @@ public: fgpa_after_rom_write_addr = 0xffff; } + void astra_single(machine_config &config); + void astra_single_alt(machine_config &config); + void astrafr_dual(machine_config &config); + void astrafr_dual_alt(machine_config &config); + void astrafr_dual_alt_37(machine_config &config); + void astra_single_2e(machine_config &config); + void astra_single_alt_37(machine_config &config); + void astra_single_alt_57(machine_config &config); + void astra_single_37(machine_config &config); + void astrafr_dual_2e(machine_config &config); + void astrafr_dual_37(machine_config &config); + + void init_astradec_sml(); + void init_astradec(); + void init_astradec_dual(); + void init_astradec_sml_dual(); + +private: uint32_t* m_cpuregion; int m_cpuregion_size; std::unique_ptr m_mainram; @@ -110,25 +128,11 @@ public: required_device m_maincpu; optional_device m_slavecpu; - void init_astradec_sml(); - void init_astradec(); - void init_astradec_dual(); - void init_astradec_sml_dual(); DECLARE_MACHINE_START(astra_common); DECLARE_MACHINE_START(astra_2e); DECLARE_MACHINE_START(astra_37); DECLARE_MACHINE_START(astra_57); - void astra_single(machine_config &config); - void astra_single_alt(machine_config &config); - void astrafr_dual(machine_config &config); - void astrafr_dual_alt(machine_config &config); - void astrafr_dual_alt_37(machine_config &config); - void astra_single_2e(machine_config &config); - void astra_single_alt_37(machine_config &config); - void astra_single_alt_57(machine_config &config); - void astra_single_37(machine_config &config); - void astrafr_dual_2e(machine_config &config); - void astrafr_dual_37(machine_config &config); + void astra_map(address_map &map); void astrafr_master_alt_map(address_map &map); void astrafr_master_map(address_map &map); diff --git a/src/mame/drivers/astrcorp.cpp b/src/mame/drivers/astrcorp.cpp index a735a95839a..81c6bd5bd36 100644 --- a/src/mame/drivers/astrcorp.cpp +++ b/src/mame/drivers/astrcorp.cpp @@ -64,6 +64,16 @@ public: m_lamps(*this, "lamp%u", 0U) { } + void skilldrp(machine_config &config); + void showhand(machine_config &config); + void speeddrp(machine_config &config); + void showhanc(machine_config &config); + + void init_astoneag(); + void init_showhanc(); + void init_showhand(); + +private: // devices required_device m_maincpu; required_device m_oki; @@ -88,23 +98,16 @@ public: DECLARE_READ16_MEMBER(astrocorp_unk_r); DECLARE_WRITE16_MEMBER(astrocorp_sound_bank_w); DECLARE_WRITE16_MEMBER(skilldrp_sound_bank_w); - void init_astoneag(); - void init_showhanc(); - void init_showhand(); DECLARE_VIDEO_START(astrocorp); uint32_t screen_update_astrocorp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(skilldrp_scanline); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void skilldrp(machine_config &config); - void showhand(machine_config &config); - void speeddrp(machine_config &config); - void showhanc(machine_config &config); + void showhanc_map(address_map &map); void showhand_map(address_map &map); void skilldrp_map(address_map &map); void speeddrp_map(address_map &map); -protected: virtual void machine_start() override; output_finder<7> m_lamps; diff --git a/src/mame/drivers/astropc.cpp b/src/mame/drivers/astropc.cpp index 65c45433ce1..810a97b111c 100644 --- a/src/mame/drivers/astropc.cpp +++ b/src/mame/drivers/astropc.cpp @@ -24,14 +24,15 @@ public: { } void astropc(machine_config &config); + + void init_astropc(); + +private: void astropc_io(address_map &map); void astropc_map(address_map &map); -protected: // devices required_device m_maincpu; -public: - void init_astropc(); }; void astropc_state::astropc_map(address_map &map) diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp index c8f8ba62b69..0960bf87bd4 100644 --- a/src/mame/drivers/at.cpp +++ b/src/mame/drivers/at.cpp @@ -109,17 +109,7 @@ public: m_mb(*this, "mb"), m_ram(*this, RAM_TAG) { } - required_device m_maincpu; - required_device m_mb; - required_device m_ram; - void init_at(); - void init_atpci(); - DECLARE_READ16_MEMBER(ps1_unk_r); - DECLARE_WRITE16_MEMBER(ps1_unk_w); - DECLARE_READ8_MEMBER(ps1_portb_r); - void init_at_common(int xmsbase); - uint16_t m_ps1_reg[2]; void pc30iii(machine_config &config); void k286i(machine_config &config); void ibm5170(machine_config &config); @@ -141,6 +131,20 @@ public: void at386(machine_config &config); void ews286(machine_config &config); + void init_at(); + void init_atpci(); + +protected: + required_device m_maincpu; + required_device m_mb; + required_device m_ram; + DECLARE_READ16_MEMBER(ps1_unk_r); + DECLARE_WRITE16_MEMBER(ps1_unk_w); + DECLARE_READ8_MEMBER(ps1_portb_r); + + void init_at_common(int xmsbase); + uint16_t m_ps1_reg[2]; + static void cfg_single_360K(device_t *device); static void cfg_single_1200K(device_t *device); void at16_io(address_map &map); @@ -180,22 +184,23 @@ public: m_speaker(*this, "speaker") { } -public: + void megapcpl(machine_config &config); + void megapc(machine_config &config); + + void init_megapc(); + void init_megapcpl(); + +private: required_device m_maincpu; required_device m_wd7600; required_device m_isabus; required_device m_speaker; - void init_megapc(); - void init_megapcpl(); - DECLARE_READ16_MEMBER( wd7600_ior ); DECLARE_WRITE16_MEMBER( wd7600_iow ); DECLARE_WRITE_LINE_MEMBER( wd7600_hold ); DECLARE_WRITE8_MEMBER( wd7600_tc ) { m_isabus->eop_w(offset, data); } DECLARE_WRITE_LINE_MEMBER( wd7600_spkr ) { m_speaker->level_w(state); } - void megapcpl(machine_config &config); - void megapc(machine_config &config); void megapc_io(address_map &map); void megapc_map(address_map &map); void megapcpl_io(address_map &map); diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp index 56cc7b23bd6..199c2d1952f 100644 --- a/src/mame/drivers/atari400.cpp +++ b/src/mame/drivers/atari400.cpp @@ -261,6 +261,21 @@ public: m_cart(*this, "cartleft"), m_cart2(*this, "cartright") { } + void atari_common_nodac(machine_config &config); + void atari_common(machine_config &config); + void a800pal(machine_config &config); + void a400pal(machine_config &config); + void a5200(machine_config &config); + void a800(machine_config &config); + void a1200xl(machine_config &config); + void a800xlpal(machine_config &config); + void a130xe(machine_config &config); + void a800xl(machine_config &config); + void a600xl(machine_config &config); + void xegs(machine_config &config); + void a400(machine_config &config); + +private: DECLARE_MACHINE_START(a400); DECLARE_MACHINE_START(a800); DECLARE_MACHINE_START(a800xl); @@ -300,19 +315,6 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(a800xl_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(a5200_interrupt); - void atari_common_nodac(machine_config &config); - void atari_common(machine_config &config); - void a800pal(machine_config &config); - void a400pal(machine_config &config); - void a5200(machine_config &config); - void a800(machine_config &config); - void a1200xl(machine_config &config); - void a800xlpal(machine_config &config); - void a130xe(machine_config &config); - void a800xl(machine_config &config); - void a600xl(machine_config &config); - void xegs(machine_config &config); - void a400(machine_config &config); void a1200xl_mem(address_map &map); void a130xe_mem(address_map &map); void a400_mem(address_map &map); @@ -320,7 +322,7 @@ public: void a600xl_mem(address_map &map); void a800xl_mem(address_map &map); void xegs_mem(address_map &map); -protected: + //required_device m_maincpu; // maincpu is already contained in atari_common_state required_device m_ram; required_device m_pia; diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp index cf75c68f65a..b86e679551e 100644 --- a/src/mame/drivers/atari_s1.cpp +++ b/src/mame/drivers/atari_s1.cpp @@ -78,7 +78,8 @@ public: void midearth(machine_config &config); void atari_s1(machine_config &config); void atarians(machine_config &config); -protected: + +private: DECLARE_READ8_MEMBER(m1080_r); DECLARE_WRITE8_MEMBER(m1080_w); DECLARE_READ8_MEMBER(m1084_r); @@ -97,7 +98,7 @@ protected: void atari_s1_map(address_map &map); void atarians_map(address_map &map); void midearth_map(address_map &map); -private: + bool m_audiores; uint8_t m_timer_s[3]; uint8_t m_vol; diff --git a/src/mame/drivers/atari_s2.cpp b/src/mame/drivers/atari_s2.cpp index 1226c39504c..fc72dacb506 100644 --- a/src/mame/drivers/atari_s2.cpp +++ b/src/mame/drivers/atari_s2.cpp @@ -48,7 +48,7 @@ public: void atari_s2(machine_config &config); void atari_s3(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(sound0_w); DECLARE_WRITE8_MEMBER(sound1_w); DECLARE_WRITE8_MEMBER(lamp_w) { }; @@ -62,7 +62,6 @@ protected: void atari_s2_map(address_map &map); void atari_s3_map(address_map &map); -private: bool m_timer_sb; uint8_t m_timer_s[5]; uint8_t m_sound0; diff --git a/src/mame/drivers/atarisy4.cpp b/src/mame/drivers/atarisy4.cpp index c51320b66ad..977845b7795 100644 --- a/src/mame/drivers/atarisy4.cpp +++ b/src/mame/drivers/atarisy4.cpp @@ -40,10 +40,10 @@ public: { } - void init_laststar(); - void atarisy4(machine_config &config); + void init_laststar(); + protected: struct atarisy4_polydata { diff --git a/src/mame/drivers/atlantis.cpp b/src/mame/drivers/atlantis.cpp index f2de1df68a8..681e4562586 100644 --- a/src/mame/drivers/atlantis.cpp +++ b/src/mame/drivers/atlantis.cpp @@ -114,7 +114,12 @@ public: m_rtc(*this, "rtc"), m_io_analog(*this, "AN.%u", 0) { } + + void mwskins(machine_config &config); + void init_mwskins(); + +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -183,7 +188,7 @@ public: DECLARE_READ8_MEMBER(parallel_r); DECLARE_WRITE8_MEMBER(parallel_w); - void mwskins(machine_config &config); + void map0(address_map &map); void map1(address_map &map); void map2(address_map &map); diff --git a/src/mame/drivers/atm.cpp b/src/mame/drivers/atm.cpp index f176b04a860..9c03c237a67 100644 --- a/src/mame/drivers/atm.cpp +++ b/src/mame/drivers/atm.cpp @@ -29,25 +29,26 @@ public: , m_beta(*this, BETA_DISK_TAG) { } + void atm(machine_config &config); + void atmtb2(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(atm_port_7ffd_w); DECLARE_READ8_MEMBER(beta_neutral_r); DECLARE_READ8_MEMBER(beta_enable_r); DECLARE_READ8_MEMBER(beta_disable_r); DECLARE_MACHINE_RESET(atm); - void atm(machine_config &config); - void atmtb2(machine_config &config); void atm_io(address_map &map); void atm_mem(address_map &map); void atm_switch(address_map &map); -protected: + required_memory_bank m_bank1; required_memory_bank m_bank2; required_memory_bank m_bank3; required_memory_bank m_bank4; required_device m_beta; -private: address_space *m_program; uint8_t *m_p_ram; void atm_update_memory(); diff --git a/src/mame/drivers/atronic.cpp b/src/mame/drivers/atronic.cpp index 69689acf5ce..f198a5e0e23 100644 --- a/src/mame/drivers/atronic.cpp +++ b/src/mame/drivers/atronic.cpp @@ -28,12 +28,13 @@ public: m_maincpu(*this, "maincpu") { } + void atronic(machine_config &config); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void atronic(machine_config &config); void atronic_map(address_map &map); void atronic_portmap(address_map &map); -protected: // devices required_device m_maincpu; diff --git a/src/mame/drivers/att4425.cpp b/src/mame/drivers/att4425.cpp index 1c5fb4576ce..dae9b7c37b8 100644 --- a/src/mame/drivers/att4425.cpp +++ b/src/mame/drivers/att4425.cpp @@ -53,7 +53,7 @@ public: void att4425(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER(port10_w); DECLARE_WRITE8_MEMBER(port14_w); DECLARE_READ8_MEMBER(port14_r); @@ -69,7 +69,6 @@ protected: void att4425_io(address_map &map); void att4425_mem(address_map &map); -private: required_device m_maincpu; required_device m_i8251; required_device m_sio; diff --git a/src/mame/drivers/att630.cpp b/src/mame/drivers/att630.cpp index d1709b1fd2c..2aff41ae86e 100644 --- a/src/mame/drivers/att630.cpp +++ b/src/mame/drivers/att630.cpp @@ -19,11 +19,13 @@ public: , m_maincpu(*this, "maincpu") { } + void att630(machine_config &config); + +private: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void att630(machine_config &config); void mem_map(address_map &map); -private: + required_device m_maincpu; }; diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp index d8a86599d41..ad11531f6f1 100644 --- a/src/mame/drivers/attache.cpp +++ b/src/mame/drivers/attache.cpp @@ -125,6 +125,26 @@ public: m_kb_empty(true) { } + void attache(machine_config &config); + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + DECLARE_READ8_MEMBER(pio_portA_r); + DECLARE_READ8_MEMBER(pio_portB_r); + DECLARE_WRITE8_MEMBER(pio_portA_w); + DECLARE_WRITE8_MEMBER(pio_portB_w); + + DECLARE_READ8_MEMBER(dma_mem_r); + DECLARE_WRITE8_MEMBER(dma_mem_w); + + DECLARE_READ8_MEMBER(fdc_dma_r); + DECLARE_WRITE8_MEMBER(fdc_dma_w); + + DECLARE_WRITE_LINE_MEMBER(hreq_w); + DECLARE_WRITE_LINE_MEMBER(eop_w); + DECLARE_WRITE_LINE_MEMBER(fdc_dack_w); + +protected: // PIO port B operation select enum { @@ -152,39 +172,30 @@ public: }; // overrides - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); virtual void driver_start() override; virtual void machine_start() override; virtual void machine_reset() override; DECLARE_READ8_MEMBER(rom_r); DECLARE_WRITE8_MEMBER(rom_w); - DECLARE_READ8_MEMBER(pio_portA_r); - DECLARE_READ8_MEMBER(pio_portB_r); - DECLARE_WRITE8_MEMBER(pio_portA_w); - DECLARE_WRITE8_MEMBER(pio_portB_w); + DECLARE_WRITE8_MEMBER(display_command_w); DECLARE_READ8_MEMBER(display_data_r); DECLARE_WRITE8_MEMBER(display_data_w); DECLARE_READ8_MEMBER(dma_mask_r); DECLARE_WRITE8_MEMBER(dma_mask_w); - DECLARE_READ8_MEMBER(fdc_dma_r); - DECLARE_WRITE8_MEMBER(fdc_dma_w); + DECLARE_READ8_MEMBER(memmap_r); DECLARE_WRITE8_MEMBER(memmap_w); - DECLARE_READ8_MEMBER(dma_mem_r); - DECLARE_WRITE8_MEMBER(dma_mem_w); - DECLARE_WRITE_LINE_MEMBER(hreq_w); - DECLARE_WRITE_LINE_MEMBER(eop_w); - DECLARE_WRITE_LINE_MEMBER(fdc_dack_w); + void operation_strobe(address_space& space,uint8_t data); void keyboard_clock_w(bool state); uint8_t keyboard_data_r(); uint16_t get_key(); - void attache(machine_config &config); + void attache_io(address_map &map); void attache_map(address_map &map); -protected: + required_device m_maincpu; required_memory_region m_rom; required_device m_ram; @@ -248,6 +259,9 @@ public: m_z80_tx_ready(false) { } + void attache816(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(x86_comms_w); DECLARE_READ8_MEMBER(x86_comms_r); DECLARE_WRITE8_MEMBER(x86_irq_enable); @@ -261,11 +275,10 @@ public: virtual void machine_reset() override; - void attache816(machine_config &config); void attache816_io(address_map &map); void attache_x86_io(address_map &map); void attache_x86_map(address_map &map); -private: + required_device m_extcpu; required_device m_ppi; diff --git a/src/mame/drivers/attckufo.cpp b/src/mame/drivers/attckufo.cpp index f2311b32319..873c183f434 100644 --- a/src/mame/drivers/attckufo.cpp +++ b/src/mame/drivers/attckufo.cpp @@ -29,14 +29,16 @@ public: m_maincpu(*this, "maincpu") {} + void attckufo(machine_config &config); + +private: DECLARE_READ8_MEMBER( vic_videoram_r ); DECLARE_READ8_MEMBER( vic_colorram_r ); - void attckufo(machine_config &config); void cpu_map(address_map &map); void vic_colorram_map(address_map &map); void vic_videoram_map(address_map &map); -private: + required_device m_maincpu; }; diff --git a/src/mame/drivers/atvtrack.cpp b/src/mame/drivers/atvtrack.cpp index 4c0de0683d2..1111fb04371 100644 --- a/src/mame/drivers/atvtrack.cpp +++ b/src/mame/drivers/atvtrack.cpp @@ -117,6 +117,9 @@ public: m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu") { } + void atvtrack(machine_config &config); + +protected: DECLARE_READ64_MEMBER(control_r); DECLARE_WRITE64_MEMBER(control_w); DECLARE_READ64_MEMBER(nand_data_r); @@ -145,12 +148,12 @@ public: u16 gpu_irq_mask; void gpu_irq_test(); void gpu_irq_set(int); - void atvtrack(machine_config &config); + void atvtrack_main_map(address_map &map); void atvtrack_main_port(address_map &map); void atvtrack_sub_map(address_map &map); void atvtrack_sub_port(address_map &map); -protected: + bool m_slaverun; }; @@ -161,9 +164,12 @@ public: smashdrv_state(const machine_config &mconfig, device_type type, const char *tag) : atvtrack_state(mconfig, type, tag) { } + void smashdrv(machine_config &config); + +private: virtual void machine_start() override; virtual void machine_reset() override; - void smashdrv(machine_config &config); + void smashdrv_main_map(address_map &map); void smashdrv_main_port(address_map &map); }; diff --git a/src/mame/drivers/avt.cpp b/src/mame/drivers/avt.cpp index 7d84ec32727..d55989411dc 100644 --- a/src/mame/drivers/avt.cpp +++ b/src/mame/drivers/avt.cpp @@ -449,6 +449,10 @@ public: , m_palette(*this, "palette") { } + void avtnfl(machine_config &config); + void avt(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(avt_6845_address_w); DECLARE_WRITE8_MEMBER(avt_6845_data_w); DECLARE_READ8_MEMBER( avt_6845_data_r ); @@ -460,11 +464,9 @@ public: DECLARE_PALETTE_INIT(avt); uint32_t screen_update_avt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void avtnfl(machine_config &config); - void avt(machine_config &config); void avt_map(address_map &map); void avt_portmap(address_map &map); -private: + tilemap_t *m_bg_tilemap; uint8_t m_crtc_vreg[0x100],m_crtc_index; virtual void video_start() override; diff --git a/src/mame/drivers/ax20.cpp b/src/mame/drivers/ax20.cpp index d454d4192bc..bcee6d7cd3e 100644 --- a/src/mame/drivers/ax20.cpp +++ b/src/mame/drivers/ax20.cpp @@ -33,6 +33,9 @@ public: m_palette(*this, "palette"), m_fdc(*this, "fdc") { } + void ax20(machine_config &config); + +private: required_device m_maincpu; required_shared_ptr m_p_vram; required_device m_gfxdecode; @@ -45,7 +48,7 @@ public: DECLARE_READ8_MEMBER(unk_r); DECLARE_WRITE8_MEMBER(tc_w); DECLARE_WRITE8_MEMBER(ctl_w); - void ax20(machine_config &config); + void ax20_io(address_map &map); void ax20_map(address_map &map); }; diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp index f1ed95e5026..691e11841fe 100644 --- a/src/mame/drivers/wacky_gator.cpp +++ b/src/mame/drivers/wacky_gator.cpp @@ -50,7 +50,7 @@ public: void wackygtr(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -76,7 +76,6 @@ protected: void program_map(address_map &map); -private: required_device m_maincpu; required_device m_msm; required_device m_pit8253_0; diff --git a/src/mame/drivers/wardner.cpp b/src/mame/drivers/wardner.cpp index 771fa4eeb72..3b866d011f6 100644 --- a/src/mame/drivers/wardner.cpp +++ b/src/mame/drivers/wardner.cpp @@ -147,12 +147,15 @@ public: { } + void wardner(machine_config &config); + + void init_wardner(); + +private: required_device m_membank; DECLARE_WRITE8_MEMBER(wardner_bank_w); - void init_wardner(); - void wardner(machine_config &config); void DSP_io_map(address_map &map); void DSP_program_map(address_map &map); void main_bank_map(address_map &map); @@ -160,7 +163,7 @@ public: void main_program_map(address_map &map); void sound_io_map(address_map &map); void sound_program_map(address_map &map); -protected: + virtual void driver_start() override; virtual void machine_reset() override; }; diff --git a/src/mame/drivers/warpsped.cpp b/src/mame/drivers/warpsped.cpp index c7e437f92e1..85e584710fd 100644 --- a/src/mame/drivers/warpsped.cpp +++ b/src/mame/drivers/warpsped.cpp @@ -100,6 +100,9 @@ public: m_videoram(*this, "videoram"), m_workram(*this, "workram") { } + void warpspeed(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; @@ -121,7 +124,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_circles(bitmap_ind16 &bitmap); - void warpspeed(machine_config &config); void warpspeed_io_map(address_map &map); void warpspeed_map(address_map &map); }; diff --git a/src/mame/drivers/white_mod.cpp b/src/mame/drivers/white_mod.cpp index 1be1c6c96c4..a25b063b680 100644 --- a/src/mame/drivers/white_mod.cpp +++ b/src/mame/drivers/white_mod.cpp @@ -17,16 +17,17 @@ public: { } void whitestar_mod(machine_config &config); + + void init_whitestar_mod(); + +private: void whitestar_mod_map(address_map &map); -protected: // devices required_device m_maincpu; // driver_device overrides virtual void machine_reset() override; -public: - void init_whitestar_mod(); }; diff --git a/src/mame/drivers/whitestar.cpp b/src/mame/drivers/whitestar.cpp index 1e762a9dc40..139af6f02e5 100644 --- a/src/mame/drivers/whitestar.cpp +++ b/src/mame/drivers/whitestar.cpp @@ -21,6 +21,9 @@ public: m_decodmd(*this, "decodmd") { } + void whitestar(machine_config &config); + +private: required_device m_maincpu; //required_device m_dmdcpu; //required_device m_mc6845; @@ -39,7 +42,6 @@ public: DECLARE_WRITE8_MEMBER(switch_w); virtual void machine_start() override; INTERRUPT_GEN_MEMBER(whitestar_firq_interrupt); - void whitestar(machine_config &config); void whitestar_map(address_map &map); }; diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp index d6cbf9d17db..ebde6b78860 100644 --- a/src/mame/drivers/wicat.cpp +++ b/src/mame/drivers/wicat.cpp @@ -68,6 +68,9 @@ public: { } + void wicat(machine_config &config); + +private: DECLARE_READ16_MEMBER(invalid_r); DECLARE_WRITE16_MEMBER(invalid_w); DECLARE_READ16_MEMBER(memmap_r); @@ -131,14 +134,12 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; } virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - - void wicat(machine_config &config); void wicat_mem(address_map &map); void wicat_video_io(address_map &map); void wicat_video_mem(address_map &map); void wicat_wd1000_io(address_map &map); void wicat_wd1000_mem(address_map &map); -private: + virtual void machine_start() override; virtual void machine_reset() override; virtual void driver_start() override; diff --git a/src/mame/drivers/wico.cpp b/src/mame/drivers/wico.cpp index ecff547d02e..ee0b234c0c9 100644 --- a/src/mame/drivers/wico.cpp +++ b/src/mame/drivers/wico.cpp @@ -60,6 +60,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void wico(machine_config &config); + +private: DECLARE_READ8_MEMBER(lampst_r); DECLARE_READ8_MEMBER(switch_r); DECLARE_WRITE8_MEMBER(muxen_w); @@ -73,10 +76,9 @@ public: DECLARE_READ8_MEMBER(gentmrcl_r); TIMER_DEVICE_CALLBACK_MEMBER(irq_housekeeping); TIMER_DEVICE_CALLBACK_MEMBER(firq_housekeeping); - void wico(machine_config &config); void ccpu_map(address_map &map); void hcpu_map(address_map &map); -private: + bool m_zcen; bool m_gten; bool m_disp_on; diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp index 628a8fc229b..f27e049562b 100644 --- a/src/mame/drivers/wildpkr.cpp +++ b/src/mame/drivers/wildpkr.cpp @@ -192,6 +192,12 @@ public: m_nvram(*this, "nvram") { } + void wildpkr(machine_config &config); + void tabpkr(machine_config &config); + + void init_wildpkr(); + +private: required_device m_maincpu; required_device m_duart; optional_device m_id; @@ -202,7 +208,6 @@ public: u16 m_clock_rate; - void init_wildpkr(); virtual void machine_start() override; virtual void video_start() override; DECLARE_PALETTE_INIT(wildpkr); @@ -218,8 +223,6 @@ public: DECLARE_WRITE16_MEMBER(clock_rate_w); DECLARE_WRITE16_MEMBER(unknown_trigger_w); IRQ_CALLBACK_MEMBER(tabpkr_irq_ack); - void wildpkr(machine_config &config); - void tabpkr(machine_config &config); void hd63484_map(address_map &map); void ramdac_map(address_map &map); void tabpkr_map(address_map &map); diff --git a/src/mame/drivers/wink.cpp b/src/mame/drivers/wink.cpp index 9fd8443924e..81820d350b9 100644 --- a/src/mame/drivers/wink.cpp +++ b/src/mame/drivers/wink.cpp @@ -33,6 +33,11 @@ public: m_gfxdecode(*this, "gfxdecode"), m_videoram(*this, "videoram") { } + void wink(machine_config &config); + + void init_wink(); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -60,7 +65,6 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); - void init_wink(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -68,7 +72,6 @@ public: uint32_t screen_update_wink(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(wink_sound); - void wink(machine_config &config); void wink_io(address_map &map); void wink_map(address_map &map); void wink_sound_io(address_map &map); diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp index c5050da637f..d97f97c97ae 100644 --- a/src/mame/drivers/wmg.cpp +++ b/src/mame/drivers/wmg.cpp @@ -93,7 +93,13 @@ public: , m_soundbank(*this, "soundbank") { } + void wmg(machine_config &config); + void init_wmg(); + + DECLARE_CUSTOM_INPUT_MEMBER(wmg_mux_r); + +private: DECLARE_READ8_MEMBER(wmg_nvram_r); DECLARE_WRITE8_MEMBER(wmg_nvram_w); DECLARE_READ8_MEMBER(wmg_pia_0_r); @@ -103,18 +109,14 @@ public: DECLARE_WRITE_LINE_MEMBER(wmg_port_select_w); DECLARE_WRITE8_MEMBER(wmg_sound_reset_w); DECLARE_WRITE8_MEMBER(wmg_vram_select_w); - DECLARE_CUSTOM_INPUT_MEMBER(wmg_mux_r); - void wmg(machine_config &config); void wmg_cpu1(address_map &map); void wmg_cpu2(address_map &map); void wmg_banked_map(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; -private: uint8_t m_wmg_c400; uint8_t m_wmg_d000; uint8_t m_wmg_port_select; diff --git a/src/mame/drivers/wms.cpp b/src/mame/drivers/wms.cpp index 74ce8564ead..6cd6df6855a 100644 --- a/src/mame/drivers/wms.cpp +++ b/src/mame/drivers/wms.cpp @@ -94,25 +94,25 @@ class wms_state : public driver_device { public: wms_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") { } + void wms(machine_config &config); + void init_wms(); + +private: DECLARE_READ8_MEMBER(test_r); - uint32_t screen_update_wms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_wms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void wms(machine_config &config); - void adsp_data_map(address_map &map); - void adsp_program_map(address_map &map); - void wms_io(address_map &map); - void wms_map(address_map &map); -protected: + void adsp_data_map(address_map &map); + void adsp_program_map(address_map &map); + void wms_io(address_map &map); + void wms_map(address_map &map); // devices required_device m_maincpu; - -private: }; uint32_t wms_state::screen_update_wms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) diff --git a/src/mame/drivers/wpc_95.cpp b/src/mame/drivers/wpc_95.cpp index 559533fef95..318e0af90a3 100644 --- a/src/mame/drivers/wpc_95.cpp +++ b/src/mame/drivers/wpc_95.cpp @@ -29,16 +29,7 @@ public: out(*this, "out") { } - DECLARE_WRITE8_MEMBER(bank_w); - DECLARE_WRITE8_MEMBER(watchdog_w); - DECLARE_WRITE8_MEMBER(irq_ack_w); - DECLARE_READ8_MEMBER(firq_src_r); - DECLARE_READ8_MEMBER(zc_r); - DECLARE_READ8_MEMBER(dcs_data_r); - DECLARE_WRITE8_MEMBER(dcs_data_w); - DECLARE_READ8_MEMBER(dcs_ctrl_r); - DECLARE_WRITE8_MEMBER(dcs_reset_w); - DECLARE_READ8_MEMBER(rtc_r); + void wpc_95(machine_config &config); void init(); void init_tf95(); @@ -57,12 +48,23 @@ public: void init_cp(); void init_ttt(); +private: + DECLARE_WRITE8_MEMBER(bank_w); + DECLARE_WRITE8_MEMBER(watchdog_w); + DECLARE_WRITE8_MEMBER(irq_ack_w); + DECLARE_READ8_MEMBER(firq_src_r); + DECLARE_READ8_MEMBER(zc_r); + DECLARE_READ8_MEMBER(dcs_data_r); + DECLARE_WRITE8_MEMBER(dcs_data_w); + DECLARE_READ8_MEMBER(dcs_ctrl_r); + DECLARE_WRITE8_MEMBER(dcs_reset_w); + DECLARE_READ8_MEMBER(rtc_r); + DECLARE_WRITE_LINE_MEMBER(scanline_irq); TIMER_DEVICE_CALLBACK_MEMBER(zc_timer); - void wpc_95(machine_config &config); void wpc_95_map(address_map &map); -protected: + // devices required_device maincpu; required_device dcs; diff --git a/src/mame/drivers/wpc_an.cpp b/src/mame/drivers/wpc_an.cpp index 8386c1b4ad3..e82a82ec545 100644 --- a/src/mame/drivers/wpc_an.cpp +++ b/src/mame/drivers/wpc_an.cpp @@ -34,8 +34,11 @@ public: void wpc_an_dd(machine_config &config); void wpc_an(machine_config &config); void wpc_an_base(machine_config &config); + + void init_wpc_an(); + +private: void wpc_an_map(address_map &map); -protected: // devices required_device m_maincpu; @@ -51,8 +54,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; static const device_timer_id TIMER_VBLANK = 0; static const device_timer_id TIMER_IRQ = 1; -public: - void init_wpc_an(); + DECLARE_READ8_MEMBER(ram_r); DECLARE_WRITE8_MEMBER(ram_w); DECLARE_WRITE_LINE_MEMBER(wpcsnd_reply_w); @@ -64,7 +66,7 @@ public: DECLARE_WRITE8_MEMBER(wpc_sound_data_w); DECLARE_WRITE8_MEMBER(wpc_sound_s11_w); DECLARE_WRITE8_MEMBER(wpc_rombank_w); -private: + uint16_t m_vblank_count; uint32_t m_irq_count; uint8_t m_bankmask; diff --git a/src/mame/drivers/wpc_dcs.cpp b/src/mame/drivers/wpc_dcs.cpp index f43c9b0eb15..45938a1f65f 100644 --- a/src/mame/drivers/wpc_dcs.cpp +++ b/src/mame/drivers/wpc_dcs.cpp @@ -28,6 +28,17 @@ public: , swarray(*this, "SW.%u", 0) { } + void wpc_dcs(machine_config &config); + + void init(); + void init_dm(); + void init_ij(); + void init_jd(); + void init_pop(); + void init_sttng(); + void init_afv(); + +private: DECLARE_WRITE8_MEMBER(bank_w); DECLARE_WRITE8_MEMBER(watchdog_w); DECLARE_WRITE8_MEMBER(irq_ack_w); @@ -41,20 +52,11 @@ public: DECLARE_READ8_MEMBER(switches_r); DECLARE_WRITE8_MEMBER(switches_w); - void init(); - void init_dm(); - void init_ij(); - void init_jd(); - void init_pop(); - void init_sttng(); - void init_afv(); - DECLARE_WRITE_LINE_MEMBER(scanline_irq); TIMER_DEVICE_CALLBACK_MEMBER(zc_timer); - void wpc_dcs(machine_config &config); void wpc_dcs_map(address_map &map); -protected: + // devices required_device maincpu; required_device dcs; @@ -68,7 +70,6 @@ protected: // driver_device overrides virtual void machine_reset() override; -private: uint8_t firq_src, zc, switch_col; uint16_t rtc_base_day; }; diff --git a/src/mame/drivers/wpc_s.cpp b/src/mame/drivers/wpc_s.cpp index 9614fe16dfc..493b4c52704 100644 --- a/src/mame/drivers/wpc_s.cpp +++ b/src/mame/drivers/wpc_s.cpp @@ -26,16 +26,7 @@ public: out(*this, "out") { } - DECLARE_WRITE8_MEMBER(bank_w); - DECLARE_WRITE8_MEMBER(watchdog_w); - DECLARE_WRITE8_MEMBER(irq_ack_w); - DECLARE_READ8_MEMBER(firq_src_r); - DECLARE_READ8_MEMBER(zc_r); - DECLARE_READ8_MEMBER(dcs_data_r); - DECLARE_WRITE8_MEMBER(dcs_data_w); - DECLARE_READ8_MEMBER(dcs_ctrl_r); - DECLARE_WRITE8_MEMBER(dcs_reset_w); - DECLARE_READ8_MEMBER(rtc_r); + void wpc_s(machine_config &config); void init(); void init_corv(); @@ -52,12 +43,23 @@ public: void init_wcs(); void init_tfs(); +private: + DECLARE_WRITE8_MEMBER(bank_w); + DECLARE_WRITE8_MEMBER(watchdog_w); + DECLARE_WRITE8_MEMBER(irq_ack_w); + DECLARE_READ8_MEMBER(firq_src_r); + DECLARE_READ8_MEMBER(zc_r); + DECLARE_READ8_MEMBER(dcs_data_r); + DECLARE_WRITE8_MEMBER(dcs_data_w); + DECLARE_READ8_MEMBER(dcs_ctrl_r); + DECLARE_WRITE8_MEMBER(dcs_reset_w); + DECLARE_READ8_MEMBER(rtc_r); + DECLARE_WRITE_LINE_MEMBER(scanline_irq); TIMER_DEVICE_CALLBACK_MEMBER(zc_timer); - void wpc_s(machine_config &config); void wpc_s_map(address_map &map); -protected: + // devices required_device maincpu; required_device dcs; @@ -71,7 +73,6 @@ protected: // driver_device overrides virtual void machine_reset() override; -private: static const char *const lamps_corv[64]; static const char *const outputs_corv[54]; static const char *const lamps_dh[64]; diff --git a/src/mame/drivers/wyse.cpp b/src/mame/drivers/wyse.cpp index 2ece24283a1..71858de40fb 100644 --- a/src/mame/drivers/wyse.cpp +++ b/src/mame/drivers/wyse.cpp @@ -36,14 +36,16 @@ class wyse_state : public driver_device public: wyse_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void wyse(machine_config &config); -void io_map(address_map &map); -void mem_map(address_map &map); + void wyse(machine_config &config); + private: -// required_device m_maincpu; + void io_map(address_map &map); + void mem_map(address_map &map); + + // required_device m_maincpu; }; void wyse_state::mem_map(address_map &map) diff --git a/src/mame/drivers/wyvernf0.cpp b/src/mame/drivers/wyvernf0.cpp index 7ac83574179..8fdb481e6d3 100644 --- a/src/mame/drivers/wyvernf0.cpp +++ b/src/mame/drivers/wyvernf0.cpp @@ -61,6 +61,9 @@ public: m_soundlatch(*this, "soundlatch") { } + void wyvernf0(machine_config &config); + +private: // memory pointers required_shared_ptr m_bgram; required_shared_ptr m_fgram; @@ -109,7 +112,7 @@ public: required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; - void wyvernf0(machine_config &config); + void sound_map(address_map &map); void wyvernf0_map(address_map &map); }; diff --git a/src/mame/drivers/x1twin.cpp b/src/mame/drivers/x1twin.cpp index 510f965e214..336383ae730 100644 --- a/src/mame/drivers/x1twin.cpp +++ b/src/mame/drivers/x1twin.cpp @@ -31,10 +31,13 @@ public: : x1_state(mconfig, type, tag) { } - uint32_t screen_update_x1pce(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void x1twin(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(ipl_reset); DECLARE_INPUT_CHANGED_MEMBER(nmi_reset); - void x1twin(machine_config &config); + +private: + uint32_t screen_update_x1pce(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void pce_io(address_map &map); void pce_mem(address_map &map); void x1_io(address_map &map); diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp index 9aeb374c189..e6106a1c766 100644 --- a/src/mame/drivers/xtheball.cpp +++ b/src/mame/drivers/xtheball.cpp @@ -35,6 +35,9 @@ public: m_analog_x(*this, "ANALOGX"), m_analog_y(*this, "ANALOGY") { } + void xtheball(machine_config &config); + +private: required_device m_maincpu; required_device m_watchdog; required_device m_tlc34076; @@ -57,7 +60,6 @@ public: TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update); - void xtheball(machine_config &config); void main_map(address_map &map); }; diff --git a/src/mame/drivers/xtom3d.cpp b/src/mame/drivers/xtom3d.cpp index dd2571f482e..3a7253bdfdd 100644 --- a/src/mame/drivers/xtom3d.cpp +++ b/src/mame/drivers/xtom3d.cpp @@ -56,6 +56,9 @@ public: : pcat_base_state(mconfig, type, tag) { } + void xtom3d(machine_config &config); + +private: std::unique_ptr m_bios_ram; std::unique_ptr m_bios_ext1_ram; std::unique_ptr m_bios_ext2_ram; @@ -78,7 +81,7 @@ public: virtual void machine_start() override; virtual void machine_reset() override; void intel82439tx_init(); - void xtom3d(machine_config &config); + void xtom3d_io(address_map &map); void xtom3d_map(address_map &map); diff --git a/src/mame/drivers/y2.cpp b/src/mame/drivers/y2.cpp index 46012b0dfc9..f67b35e0957 100644 --- a/src/mame/drivers/y2.cpp +++ b/src/mame/drivers/y2.cpp @@ -33,9 +33,11 @@ public: : driver_device(mconfig, type, tag) { } + void system_board_y2(machine_config &config); + +private: virtual void video_start() override; uint32_t screen_update_system_board_y2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void system_board_y2(machine_config &config); }; void system_board_y2_state::video_start() diff --git a/src/mame/drivers/ymmu100.cpp b/src/mame/drivers/ymmu100.cpp index 75912e9ebff..825bd084e0c 100644 --- a/src/mame/drivers/ymmu100.cpp +++ b/src/mame/drivers/ymmu100.cpp @@ -152,12 +152,6 @@ INPUT_PORTS_END class mu100_state : public driver_device { public: - enum { - P2_LCD_RS = 0x01, - P2_LCD_RW = 0x02, - P2_LCD_ENABLE = 0x04 - }; - mu100_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -166,6 +160,18 @@ public: m_ioport_p8(*this, "P8") { } + void mu100(machine_config &config); + +protected: + virtual DECLARE_READ16_MEMBER(adc7_r); + +private: + enum { + P2_LCD_RS = 0x01, + P2_LCD_RW = 0x02, + P2_LCD_ENABLE = 0x04 + }; + required_device m_maincpu; required_device m_lcd; required_ioport m_ioport_p7; @@ -179,7 +185,6 @@ public: DECLARE_READ16_MEMBER(adc2_r); DECLARE_READ16_MEMBER(adc4_r); DECLARE_READ16_MEMBER(adc6_r); - virtual DECLARE_READ16_MEMBER(adc7_r); DECLARE_WRITE16_MEMBER(p1_w); DECLARE_READ16_MEMBER(p1_r); @@ -199,7 +204,6 @@ public: float lightlevel(const uint8_t *src, const uint8_t *render); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); virtual void machine_start() override; - void mu100(machine_config &config); void mu100_iomap(address_map &map); void mu100_map(address_map &map); }; @@ -210,6 +214,7 @@ public: : mu100_state(mconfig, type, tag) { } +private: virtual DECLARE_READ16_MEMBER(adc7_r) override; }; diff --git a/src/mame/drivers/yuvomz80.cpp b/src/mame/drivers/yuvomz80.cpp index 7d3ece77237..5978812dd72 100644 --- a/src/mame/drivers/yuvomz80.cpp +++ b/src/mame/drivers/yuvomz80.cpp @@ -50,12 +50,14 @@ public: void goldhexa(machine_config &config); void hexapres(machine_config &config); + +private: void audio_io_map(address_map &map); void audio_mem_map(address_map &map); void hexapres_audio_io_map(address_map &map); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; }; diff --git a/src/mame/drivers/z100.cpp b/src/mame/drivers/z100.cpp index 8247b366af9..fd964962330 100644 --- a/src/mame/drivers/z100.cpp +++ b/src/mame/drivers/z100.cpp @@ -180,7 +180,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(key_stroke); -protected: +private: virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/drivers/z1013.cpp b/src/mame/drivers/z1013.cpp index 4df304761c1..5692af62a33 100644 --- a/src/mame/drivers/z1013.cpp +++ b/src/mame/drivers/z1013.cpp @@ -71,6 +71,10 @@ public: , m_p_chargen(*this, "chargen") { } + void z1013k76(machine_config &config); + void z1013(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(z1013_keyboard_w); DECLARE_READ8_MEMBER(port_b_r); DECLARE_WRITE8_MEMBER(port_b_w); @@ -78,11 +82,9 @@ public: DECLARE_SNAPSHOT_LOAD_MEMBER(z1013); uint32_t screen_update_z1013(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void z1013k76(machine_config &config); - void z1013(machine_config &config); void z1013_io(address_map &map); void z1013_mem(address_map &map); -private: + uint8_t m_keyboard_line; bool m_keyboard_part; virtual void machine_reset() override; diff --git a/src/mame/drivers/z80dev.cpp b/src/mame/drivers/z80dev.cpp index a678a42b08d..18e914cfeca 100644 --- a/src/mame/drivers/z80dev.cpp +++ b/src/mame/drivers/z80dev.cpp @@ -36,7 +36,7 @@ public: void z80dev(machine_config &config); -protected: +private: DECLARE_WRITE8_MEMBER( display_w ); DECLARE_READ8_MEMBER( test_r ); @@ -45,7 +45,6 @@ protected: void io_map(address_map &map); void mem_map(address_map &map); -private: required_device m_maincpu; output_finder<6> m_digits; }; diff --git a/src/mame/drivers/z9001.cpp b/src/mame/drivers/z9001.cpp index d9b0c800408..489451bf276 100644 --- a/src/mame/drivers/z9001.cpp +++ b/src/mame/drivers/z9001.cpp @@ -58,16 +58,18 @@ public: { } + void z9001(machine_config &config); + +private: void kbd_put(u8 data); DECLARE_WRITE8_MEMBER(port88_w); DECLARE_WRITE_LINE_MEMBER(cass_w); TIMER_DEVICE_CALLBACK_MEMBER(timer_callback); uint32_t screen_update_z9001(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void z9001(machine_config &config); void z9001_io(address_map &map); void z9001_mem(address_map &map); -private: + uint8_t m_framecnt; bool m_cassbit; virtual void machine_reset() override; diff --git a/src/mame/drivers/zac_1.cpp b/src/mame/drivers/zac_1.cpp index f874d5b36ae..93a531d019f 100644 --- a/src/mame/drivers/zac_1.cpp +++ b/src/mame/drivers/zac_1.cpp @@ -46,6 +46,10 @@ public: , m_digits(*this, "digit%u", 0U) { } + void locomotp(machine_config &config); + void zac_1(machine_config &config); + +private: DECLARE_READ8_MEMBER(ctrl_r); DECLARE_WRITE8_MEMBER(ctrl_w); DECLARE_READ_LINE_MEMBER(serial_r); @@ -54,15 +58,14 @@ public: DECLARE_WRITE8_MEMBER(reset_int_w); TIMER_DEVICE_CALLBACK_MEMBER(zac_1_inttimer); TIMER_DEVICE_CALLBACK_MEMBER(zac_1_outtimer); - void locomotp(machine_config &config); - void zac_1(machine_config &config); + void locomotp_data(address_map &map); void locomotp_io(address_map &map); void locomotp_map(address_map &map); void zac_1_data(address_map &map); void zac_1_io(address_map &map); void zac_1_map(address_map &map); -private: + uint8_t m_t_c; uint8_t m_out_offs; uint8_t m_input_line; diff --git a/src/mame/drivers/zac_2.cpp b/src/mame/drivers/zac_2.cpp index 888a45b72fb..eb3a90a1207 100644 --- a/src/mame/drivers/zac_2.cpp +++ b/src/mame/drivers/zac_2.cpp @@ -25,6 +25,9 @@ public: , m_digits(*this, "digit%u", 0U) { } + void zac_2(machine_config &config); + +private: DECLARE_READ8_MEMBER(ctrl_r); DECLARE_WRITE8_MEMBER(ctrl_w); DECLARE_READ8_MEMBER(data_r); @@ -33,11 +36,10 @@ public: DECLARE_WRITE_LINE_MEMBER(serial_w); TIMER_DEVICE_CALLBACK_MEMBER(zac_2_inttimer); TIMER_DEVICE_CALLBACK_MEMBER(zac_2_outtimer); - void zac_2(machine_config &config); void zac_2_data(address_map &map); void zac_2_io(address_map &map); void zac_2_map(address_map &map); -private: + uint8_t m_input_line; uint8_t m_t_c; uint8_t m_out_offs; diff --git a/src/mame/drivers/zac_proto.cpp b/src/mame/drivers/zac_proto.cpp index 62e73978191..59dbe2c762e 100644 --- a/src/mame/drivers/zac_proto.cpp +++ b/src/mame/drivers/zac_proto.cpp @@ -34,13 +34,15 @@ public: , m_digits(*this, "digit%u", 0U) { } + void zac_proto(machine_config &config); + +private: DECLARE_WRITE8_MEMBER(out0_w); DECLARE_WRITE8_MEMBER(out1_w); DECLARE_WRITE8_MEMBER(digit_w); DECLARE_WRITE8_MEMBER(sound_w); - void zac_proto(machine_config &config); void zac_proto_map(address_map &map); -private: + virtual void machine_reset() override; virtual void machine_start() override { m_digits.resolve(); } required_device m_maincpu; diff --git a/src/mame/drivers/zapcomputer.cpp b/src/mame/drivers/zapcomputer.cpp index 89c45b25a12..5ad54d10a1d 100644 --- a/src/mame/drivers/zapcomputer.cpp +++ b/src/mame/drivers/zapcomputer.cpp @@ -40,13 +40,15 @@ public: , m_digits(*this, "digit%u", 0U) { } + void zapcomp(machine_config &config); + +private: DECLARE_READ8_MEMBER(keyboard_r); DECLARE_WRITE8_MEMBER(display_7seg_w); - void zapcomp(machine_config &config); void zapcomp_io(address_map &map); void zapcomp_mem(address_map &map); -private: + uint8_t decode7seg(uint8_t data); virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/zaurus.cpp b/src/mame/drivers/zaurus.cpp index c2ee8419df9..6fa7840220f 100644 --- a/src/mame/drivers/zaurus.cpp +++ b/src/mame/drivers/zaurus.cpp @@ -1425,6 +1425,9 @@ public: , m_ram(*this, "ram") { } + void zaurus(machine_config &config); + +private: // devices required_device m_pxa_periphs; required_device m_maincpu; @@ -1438,9 +1441,8 @@ public: // screen updates uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void zaurus(machine_config &config); void zaurus_map(address_map &map); -protected: + // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/zexall.cpp b/src/mame/drivers/zexall.cpp index 5cef690759c..4a0912b1984 100644 --- a/src/mame/drivers/zexall.cpp +++ b/src/mame/drivers/zexall.cpp @@ -39,6 +39,9 @@ public: { } + void zexall(machine_config &config); + +private: DECLARE_READ8_MEMBER( output_ack_r ); DECLARE_READ8_MEMBER( output_req_r ); DECLARE_READ8_MEMBER( output_data_r ); @@ -46,9 +49,8 @@ public: DECLARE_WRITE8_MEMBER( output_req_w ); DECLARE_WRITE8_MEMBER( output_data_w ); - void zexall(machine_config &config); void z80_mem(address_map &map); -private: + required_device m_maincpu; required_device m_terminal; required_shared_ptr m_main_ram; diff --git a/src/mame/drivers/zms8085.cpp b/src/mame/drivers/zms8085.cpp index a518ad00253..c4ae07a89e6 100644 --- a/src/mame/drivers/zms8085.cpp +++ b/src/mame/drivers/zms8085.cpp @@ -32,6 +32,9 @@ public: , m_p_chargen(*this, "chargen") { } + void zephyr(machine_config &config); + +private: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER(special_r); @@ -39,10 +42,9 @@ public: virtual void machine_start() override; - void zephyr(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + required_device m_maincpu; required_device m_uart; required_device m_rs232; diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index a5fc27eeca3..b9ae2221cdc 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -76,6 +76,39 @@ public: std::fill(std::begin(m_cat702_dataout), std::end(m_cat702_dataout), 1); } + void zn1_1mb_vram(machine_config &config); + void zn1_2mb_vram(machine_config &config); + void zn2(machine_config &config); + void jdredd(machine_config &config); + void coh1002msnd(machine_config &config); + void coh1002tb(machine_config &config); + void coh1000a(machine_config &config); + void coh1000tb(machine_config &config); + void coh1002m(machine_config &config); + void coh1002ml(machine_config &config); + void coh1001l(machine_config &config); + void bam2(machine_config &config); + void beastrzrb(machine_config &config); + void glpracr(machine_config &config); + void coh1000ta(machine_config &config); + void coh1002v(machine_config &config); + void nbajamex(machine_config &config); + void coh1000c(machine_config &config); + void coh1000w(machine_config &config); + void coh1002e(machine_config &config); + void coh3002c(machine_config &config); + void coh1002c(machine_config &config); + + void init_coh1000tb(); + void init_nbajamex(); + void init_bam2(); + void init_jdredd(); + void init_coh1000w(); + void init_primrag2(); + + DECLARE_CUSTOM_INPUT_MEMBER(jdredd_gun_mux_read); + +private: DECLARE_WRITE_LINE_MEMBER(sio0_sck){ m_cat702[0]->write_clock(state); m_cat702[1]->write_clock(state); m_znmcu->write_clock(state); } DECLARE_WRITE_LINE_MEMBER(sio0_txd){ m_cat702[0]->write_datain(state); m_cat702[1]->write_datain(state); } template DECLARE_WRITE_LINE_MEMBER(cat702_dataout){ m_cat702_dataout[Chip] = state; update_sio0_rxd(); } @@ -83,7 +116,6 @@ public: DECLARE_WRITE_LINE_MEMBER(znmcu_dsrout){ m_znmcu_dsrout = state; update_sio0_dsr(); } void update_sio0_rxd(){ m_sio0->write_rxd(m_cat702_dataout[0] && m_cat702_dataout[1] && m_znmcu_dataout); } void update_sio0_dsr(){ m_sio0->write_dsr(m_znmcu_dsrout); } - DECLARE_CUSTOM_INPUT_MEMBER(jdredd_gun_mux_read); DECLARE_READ8_MEMBER(znsecsel_r); DECLARE_WRITE8_MEMBER(znsecsel_w); DECLARE_READ8_MEMBER(boardconfig_r); @@ -118,12 +150,7 @@ public: DECLARE_WRITE16_MEMBER(vt83c461_16_w); DECLARE_READ16_MEMBER(vt83c461_32_r); DECLARE_WRITE16_MEMBER(vt83c461_32_w); - void init_coh1000tb(); - void init_nbajamex(); - void init_bam2(); - void init_jdredd(); - void init_coh1000w(); - void init_primrag2(); + DECLARE_MACHINE_START(coh1000c); DECLARE_MACHINE_START(coh1000ta); DECLARE_MACHINE_START(coh1002e); @@ -146,28 +173,6 @@ public: void atpsx_dma_write(uint32_t *p_n_psxram, uint32_t n_address, int32_t n_size ); void jdredd_vblank(screen_device &screen, bool vblank_state); - void zn1_1mb_vram(machine_config &config); - void zn1_2mb_vram(machine_config &config); - void zn2(machine_config &config); - void jdredd(machine_config &config); - void coh1002msnd(machine_config &config); - void coh1002tb(machine_config &config); - void coh1000a(machine_config &config); - void coh1000tb(machine_config &config); - void coh1002m(machine_config &config); - void coh1002ml(machine_config &config); - void coh1001l(machine_config &config); - void bam2(machine_config &config); - void beastrzrb(machine_config &config); - void glpracr(machine_config &config); - void coh1000ta(machine_config &config); - void coh1002v(machine_config &config); - void nbajamex(machine_config &config); - void coh1000c(machine_config &config); - void coh1000w(machine_config &config); - void coh1002e(machine_config &config); - void coh3002c(machine_config &config); - void coh1002c(machine_config &config); void atlus_snd_map(address_map &map); void bam2_map(address_map &map); void beastrzrb_snd_map(address_map &map); @@ -194,10 +199,9 @@ public: void qsound_map(address_map &map); void qsound_portmap(address_map &map); void zn_map(address_map &map); -protected: + virtual void machine_start() override; -private: inline void ATTR_PRINTF(3,4) verboselog( int n_level, const char *s_fmt, ... ); inline void psxwriteword( uint32_t *p_n_psxram, uint32_t n_address, uint16_t n_data ); diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp index 01ca946be75..079fe7f1e6f 100644 --- a/src/mame/drivers/zr107.cpp +++ b/src/mame/drivers/zr107.cpp @@ -215,7 +215,14 @@ public: m_generic_paletteram_32(*this, "paletteram"), m_konppc(*this, "konppc") { } + void zr107(machine_config &config); + void jetwave(machine_config &config); + + void init_common(); + void init_zr107(); + void init_jetwave(); +private: required_device m_maincpu; required_device m_audiocpu; required_device m_dsp; @@ -250,9 +257,6 @@ public: DECLARE_WRITE32_MEMBER(dsp_dataram_w); DECLARE_WRITE16_MEMBER(sound_ctrl_w); - void init_common(); - void init_zr107(); - void init_jetwave(); DECLARE_VIDEO_START(zr107); DECLARE_VIDEO_START(jetwave); uint32_t screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -262,14 +266,12 @@ public: ADC083X_INPUT_CB(adc0838_callback); K056832_CB_MEMBER(tile_callback); - void zr107(machine_config &config); - void jetwave(machine_config &config); void jetwave_map(address_map &map); void k054539_map(address_map &map); void sharc_map(address_map &map); void sound_memmap(address_map &map); void zr107_map(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; }; diff --git a/src/mame/drivers/zrt80.cpp b/src/mame/drivers/zrt80.cpp index 9f99b79304f..ceee36980e8 100644 --- a/src/mame/drivers/zrt80.cpp +++ b/src/mame/drivers/zrt80.cpp @@ -29,11 +29,6 @@ class zrt80_state : public driver_device { public: - enum - { - TIMER_BEEP_OFF - }; - zrt80_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_p_videoram(*this, "videoram") @@ -46,16 +41,23 @@ public: { } + void zrt80(machine_config &config); + +private: + enum + { + TIMER_BEEP_OFF + }; + DECLARE_READ8_MEMBER(zrt80_10_r); DECLARE_WRITE8_MEMBER(zrt80_30_w); DECLARE_WRITE8_MEMBER(zrt80_38_w); void kbd_put(u8 data); MC6845_UPDATE_ROW(crtc_update_row); - void zrt80(machine_config &config); void io_map(address_map &map); void mem_map(address_map &map); -private: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; uint8_t m_term_data; virtual void machine_reset() override; diff --git a/src/mame/drivers/zsbc3.cpp b/src/mame/drivers/zsbc3.cpp index 4bf550482b9..46a0301019a 100644 --- a/src/mame/drivers/zsbc3.cpp +++ b/src/mame/drivers/zsbc3.cpp @@ -52,9 +52,11 @@ public: { } void zsbc3(machine_config &config); + +private: void zsbc3_io(address_map &map); void zsbc3_mem(address_map &map); -private: + required_device m_maincpu; }; diff --git a/src/mame/drivers/zt8802.cpp b/src/mame/drivers/zt8802.cpp index b144a9c9882..6521a49cb8d 100644 --- a/src/mame/drivers/zt8802.cpp +++ b/src/mame/drivers/zt8802.cpp @@ -22,12 +22,12 @@ class zt8802_state : public driver_device public: zt8802_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) -// , m_maincpu(*this, "maincpu") + // , m_maincpu(*this, "maincpu") { } -void zt8802(machine_config &config); + void zt8802(machine_config &config); private: -// required_device m_maincpu; + // required_device m_maincpu; }; static INPUT_PORTS_START( zt8802 ) diff --git a/src/mame/drivers/zwackery.cpp b/src/mame/drivers/zwackery.cpp index b21ef46f52b..67a58692d95 100644 --- a/src/mame/drivers/zwackery.cpp +++ b/src/mame/drivers/zwackery.cpp @@ -53,6 +53,9 @@ public: m_fg_tilemap(nullptr) { } + void zwackery(machine_config &config); + +private: DECLARE_VIDEO_START(zwackery); TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb); DECLARE_WRITE16_MEMBER(videoram_w); @@ -72,12 +75,10 @@ public: DECLARE_READ8_MEMBER(ptm_r); - void zwackery(machine_config &config); void zwackery_map(address_map &map); -protected: + virtual void machine_start() override; -private: required_device m_maincpu; required_device m_pia0; required_device m_pia1; diff --git a/src/mame/includes/1943.h b/src/mame/includes/1943.h index 7efcb5320ab..67a197cfc70 100644 --- a/src/mame/includes/1943.h +++ b/src/mame/includes/1943.h @@ -24,6 +24,12 @@ public: m_palette(*this, "palette") { } + void _1943(machine_config &config); + + void init_1943b(); + void init_1943(); + +private: /* devices / memory pointers */ required_device m_maincpu; required_shared_ptr m_videoram; @@ -54,8 +60,7 @@ public: DECLARE_WRITE8_MEMBER(c1943_colorram_w); DECLARE_WRITE8_MEMBER(c1943_c804_w); DECLARE_WRITE8_MEMBER(c1943_d806_w); - void init_1943b(); - void init_1943(); + TILE_GET_INFO_MEMBER(c1943_get_bg2_tile_info); TILE_GET_INFO_MEMBER(c1943_get_bg_tile_info); TILE_GET_INFO_MEMBER(c1943_get_fg_tile_info); @@ -65,7 +70,7 @@ public: DECLARE_PALETTE_INIT(1943); uint32_t screen_update_1943(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); - void _1943(machine_config &config); + void c1943_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index f1e8769f0b1..8b503fd3095 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -33,6 +33,13 @@ public: m_eeprom(*this, "eeprom"), m_palette(*this, "palette") { } + void _20pacgal(machine_config &config); + void _20pacgal_video(machine_config &config); + + void init_25pacman(); + void init_20pacgal(); + +protected: /* memory pointers */ required_shared_ptr m_video_ram; required_shared_ptr m_char_gfx_ram; @@ -69,8 +76,7 @@ public: DECLARE_WRITE8_MEMBER(sprite_gfx_w); DECLARE_WRITE8_MEMBER(sprite_ram_w); DECLARE_WRITE8_MEMBER(sprite_lookup_w); - void init_25pacman(); - void init_20pacgal(); + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -85,8 +91,7 @@ public: void draw_sprite(bitmap_rgb32 &bitmap, const rectangle &cliprect, int y, int x, uint8_t code, uint8_t color, int flip_y, int flip_x); void common_save_state(); - void _20pacgal(machine_config &config); - void _20pacgal_video(machine_config &config); + void _20pacgal_io_map(address_map &map); void _20pacgal_map(address_map &map); }; @@ -101,7 +106,7 @@ public: void _25pacman(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER( _25pacman_io_87_r ); virtual void machine_start() override; diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h index c7319a427e3..eaa3e2428af 100644 --- a/src/mame/includes/40love.h +++ b/src/mame/includes/40love.h @@ -45,7 +45,7 @@ public: void sound_map(address_map &map); void undoukai_map(address_map &map); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/4enraya.h b/src/mame/includes/4enraya.h index 6b833d282c0..edd11139ae8 100644 --- a/src/mame/includes/4enraya.h +++ b/src/mame/includes/4enraya.h @@ -28,19 +28,21 @@ public: { } + void _4enraya(machine_config &config); + + DECLARE_WRITE8_MEMBER(fenraya_videoram_w); + +protected: DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_READ8_MEMBER(fenraya_custom_map_r); DECLARE_WRITE8_MEMBER(fenraya_custom_map_w); - DECLARE_WRITE8_MEMBER(fenraya_videoram_w); DECLARE_WRITE8_MEMBER(sound_control_w); TILE_GET_INFO_MEMBER(get_tile_info); uint32_t screen_update_4enraya(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void _4enraya(machine_config &config); void main_map(address_map &map); void main_portmap(address_map &map); -protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -73,10 +75,11 @@ public: } void unkpacg(machine_config &config); + +private: void unkpacg_main_map(address_map &map); void unkpacg_main_portmap(address_map &map); -protected: void driver_init() override; }; diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index 51ae8d05618..1aa38f84a98 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -40,6 +40,48 @@ public: m_guny(*this, "GUNY") { } + void indianbtbr(machine_config &config); + void claybust(machine_config &config); + void shuttlei(machine_config &config); + void spcewarla(machine_config &config); + void escmars(machine_config &config); + void lrescue(machine_config &config); + void invmulti(machine_config &config); + void yosakdon(machine_config &config); + void polaris(machine_config &config); + void attackfc(machine_config &config); + void astropal(machine_config &config); + void rollingc(machine_config &config); + void vortex(machine_config &config); + void invrvnge(machine_config &config); + void sflush(machine_config &config); + void invadpt2(machine_config &config); + void lupin3a(machine_config &config); + void indianbt(machine_config &config); + void starw1(machine_config &config); + void cosmo(machine_config &config); + void spcewars(machine_config &config); + void cosmicmo(machine_config &config); + void darthvdr(machine_config &config); + void ballbomb(machine_config &config); + void spacecom(machine_config &config); + void crashrd(machine_config &config); + void schasercv(machine_config &config); + void lupin3(machine_config &config); + void spacerng(machine_config &config); + void steelwkr(machine_config &config); + void schaser(machine_config &config); + + void init_invmulti(); + void init_spacecom(); + void init_vortex(); + void init_attackfc(); + + DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r); + DECLARE_INPUT_CHANGED_MEMBER(claybust_gun_trigger); + DECLARE_CUSTOM_INPUT_MEMBER(claybust_gun_on_r); + +private: /* devices/memory pointers */ optional_device m_schaser_effect_555_timer; optional_device m_claybust_gun_on; @@ -65,10 +107,6 @@ public: uint8_t m_schaser_background_select; uint16_t m_claybust_gun_pos; - DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r); - DECLARE_INPUT_CHANGED_MEMBER(claybust_gun_trigger); - DECLARE_CUSTOM_INPUT_MEMBER(claybust_gun_on_r); - DECLARE_READ8_MEMBER(indianbt_r); DECLARE_READ8_MEMBER(polaris_port00_r); DECLARE_WRITE8_MEMBER(steelwkr_sh_port_3_w); @@ -124,11 +162,6 @@ public: DECLARE_READ8_MEMBER(schaser_scattered_colorram_r); DECLARE_WRITE8_MEMBER(schaser_scattered_colorram_w); - void init_invmulti(); - void init_spacecom(); - void init_vortex(); - void init_attackfc(); - DECLARE_MACHINE_START(extra_8080bw); DECLARE_MACHINE_START(rollingc); DECLARE_MACHINE_START(sflush); @@ -172,37 +205,7 @@ public: inline void set_pixel( bitmap_rgb32 &bitmap, uint8_t y, uint8_t x, int color ); inline void set_8_pixels( bitmap_rgb32 &bitmap, uint8_t y, uint8_t x, uint8_t data, int fore_color, int back_color ); void clear_extra_columns( bitmap_rgb32 &bitmap, int color ); - void indianbtbr(machine_config &config); - void claybust(machine_config &config); - void shuttlei(machine_config &config); - void spcewarla(machine_config &config); - void escmars(machine_config &config); - void lrescue(machine_config &config); - void invmulti(machine_config &config); - void yosakdon(machine_config &config); - void polaris(machine_config &config); - void attackfc(machine_config &config); - void astropal(machine_config &config); - void rollingc(machine_config &config); - void vortex(machine_config &config); - void invrvnge(machine_config &config); - void sflush(machine_config &config); - void invadpt2(machine_config &config); - void lupin3a(machine_config &config); - void indianbt(machine_config &config); - void starw1(machine_config &config); - void cosmo(machine_config &config); - void spcewars(machine_config &config); - void cosmicmo(machine_config &config); - void darthvdr(machine_config &config); - void ballbomb(machine_config &config); - void spacecom(machine_config &config); - void crashrd(machine_config &config); - void schasercv(machine_config &config); - void lupin3(machine_config &config); - void spacerng(machine_config &config); - void steelwkr(machine_config &config); - void schaser(machine_config &config); + void astropal_io_map(address_map &map); void attackfc_io_map(address_map &map); void ballbomb_io_map(address_map &map); diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index b6e5c9b0d37..a2d6d7bd3a5 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -27,6 +27,9 @@ public: m_bank1000(*this, "bank1000"), m_ram(*this, "ram") { } + void _88games(machine_config &config); + +private: /* video-related */ int m_k88games_priority; int m_videobank; @@ -65,7 +68,7 @@ public: K052109_CB_MEMBER(tile_callback); K051960_CB_MEMBER(sprite_callback); DECLARE_WRITE8_MEMBER(banking_callback); - void _88games(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index 12c0996dc33..8917d0c764f 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -29,6 +29,22 @@ public: m_ports(*this, { { "SW0", "SW1", "DSW2", "PLACEHOLDER" } }) // "IN1" & "IN2" are read separately when offset==3 { } + void warpwarp(machine_config &config); + void geebee(machine_config &config); + void navarone(machine_config &config); + void kaitei(machine_config &config); + void bombbee(machine_config &config); + void geebeeb(machine_config &config); + + void init_navarone(); + void init_geebee(); + void init_kaitein(); + void init_warpwarp(); + void init_sos(); + void init_kaitei(); + void init_bombbee(); + +private: required_device m_maincpu; optional_device m_watchdog; required_device m_gfxdecode; @@ -76,13 +92,7 @@ public: virtual void machine_start() override; DECLARE_MACHINE_RESET(kaitei); - void init_navarone(); - void init_geebee(); - void init_kaitein(); - void init_warpwarp(); - void init_sos(); - void init_kaitei(); - void init_bombbee(); + DECLARE_VIDEO_START(geebee); DECLARE_PALETTE_INIT(geebee); DECLARE_VIDEO_START(warpwarp); @@ -100,12 +110,7 @@ public: void draw_ball(bitmap_ind16 &bitmap, const rectangle &cliprect,pen_t pen); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - void warpwarp(machine_config &config); - void geebee(machine_config &config); - void navarone(machine_config &config); - void kaitei(machine_config &config); - void bombbee(machine_config &config); - void geebeeb(machine_config &config); + void bombbee_map(address_map &map); void geebee_map(address_map &map); void geebee_port_map(address_map &map); diff --git a/src/mame/includes/warriorb.h b/src/mame/includes/warriorb.h index b0b45c75465..0077583c1c5 100644 --- a/src/mame/includes/warriorb.h +++ b/src/mame/includes/warriorb.h @@ -32,6 +32,10 @@ public: m_spriteram(*this, "spriteram"), m_z80bank(*this, "z80bank") { } + void warriorb(machine_config &config); + void darius2d(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_tc0140syt; @@ -67,8 +71,7 @@ public: uint32_t screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int x_offs, int y_offs ); uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, int chip); - void warriorb(machine_config &config); - void darius2d(machine_config &config); + void darius2d_map(address_map &map); void warriorb_map(address_map &map); void z80_sound_map(address_map &map); diff --git a/src/mame/includes/wc90.h b/src/mame/includes/wc90.h index 7cd993b8bd5..16fbb5fc18b 100644 --- a/src/mame/includes/wc90.h +++ b/src/mame/includes/wc90.h @@ -34,7 +34,11 @@ public: m_spriteram(*this, "spriteram") { } + void wc90t(machine_config &config); + void wc90(machine_config &config); + void pac90(machine_config &config); +private: required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -80,9 +84,7 @@ public: DECLARE_VIDEO_START(wc90t); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void wc90t(machine_config &config); - void wc90(machine_config &config); - void pac90(machine_config &config); + void sound_map(address_map &map); void wc90_map_1(address_map &map); void wc90_map_2(address_map &map); diff --git a/src/mame/includes/wc90b.h b/src/mame/includes/wc90b.h index ec1aec4fa0c..cb39b39b774 100644 --- a/src/mame/includes/wc90b.h +++ b/src/mame/includes/wc90b.h @@ -27,6 +27,9 @@ public: m_scroll_x_lo(*this, "scroll_x_lo"), m_spriteram(*this, "spriteram") { } + void wc90b(machine_config &config); + +private: required_device m_maincpu; required_device m_subcpu; required_device m_audiocpu; @@ -72,7 +75,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); - void wc90b(machine_config &config); + void sound_cpu(address_map &map); void wc90b_map1(address_map &map); void wc90b_map2(address_map &map); diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index 4fe07797f48..b2f07de2a10 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -14,11 +14,6 @@ class wecleman_state : public driver_device { public: - enum - { - WECLEMAN_ID = 0, - HOTCHASE_ID - }; wecleman_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_videostatus(*this, "videostatus") @@ -41,7 +36,20 @@ public: , m_led(*this, "led%u", 0U) { } - // [RH] TODO: Make this less awful and put stuff behind protected and private wherever possible. + void hotchase(machine_config &config); + void wecleman(machine_config &config); + + void init_wecleman(); + void init_hotchase(); + + DECLARE_CUSTOM_INPUT_MEMBER(hotchase_sound_status_r); + +private: + enum + { + WECLEMAN_ID = 0, + HOTCHASE_ID + }; optional_shared_ptr m_videostatus; optional_shared_ptr m_protection_ram; @@ -98,8 +106,7 @@ public: DECLARE_WRITE8_MEMBER(wecleman_volume_callback); template DECLARE_READ8_MEMBER(hotchase_k007232_r); template DECLARE_WRITE8_MEMBER(hotchase_k007232_w); - void init_wecleman(); - void init_hotchase(); + TILE_GET_INFO_MEMBER(wecleman_get_txt_tile_info); TILE_GET_INFO_MEMBER(wecleman_get_bg_tile_info); TILE_GET_INFO_MEMBER(wecleman_get_fg_tile_info); @@ -127,7 +134,7 @@ public: void hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect); K051316_CB_MEMBER(hotchase_zoom_callback_1); K051316_CB_MEMBER(hotchase_zoom_callback_2); - DECLARE_CUSTOM_INPUT_MEMBER(hotchase_sound_status_r); + DECLARE_WRITE8_MEMBER(hotchase_sound_hs_w); required_device m_maincpu; @@ -141,8 +148,6 @@ public: output_finder<1> m_led; - void hotchase(machine_config &config); - void wecleman(machine_config &config); void hotchase_map(address_map &map); void hotchase_sound_map(address_map &map); void hotchase_sub_map(address_map &map); @@ -150,8 +155,6 @@ public: void wecleman_sound_map(address_map &map); void wecleman_sub_map(address_map &map); - -private: struct sprite_t { sprite_t() { } diff --git a/src/mame/includes/welltris.h b/src/mame/includes/welltris.h index aa732ee30f6..7ff69828a85 100644 --- a/src/mame/includes/welltris.h +++ b/src/mame/includes/welltris.h @@ -18,7 +18,13 @@ public: m_pixelram(*this, "pixelram"), m_charvideoram(*this, "charvideoram") { } + void quiz18k(machine_config &config); + void welltris(machine_config &config); + + void init_quiz18k(); + void init_welltris(); +private: required_device m_maincpu; required_device m_audiocpu; required_device m_spr_old; @@ -43,8 +49,6 @@ public: DECLARE_WRITE16_MEMBER(scrollreg_w); DECLARE_WRITE16_MEMBER(charvideoram_w); - void init_quiz18k(); - void init_welltris(); virtual void machine_start() override; virtual void video_start() override; @@ -52,8 +56,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); void setbank(int num, int bank); - void quiz18k(machine_config &config); - void welltris(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); void sound_port_map(address_map &map); diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index eed6a2ba83b..8b923363ca1 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -15,13 +15,6 @@ class wgp_state : public driver_device { public: - enum - { - TIMER_INTERRUPT4, - TIMER_INTERRUPT6, - TIMER_CPUB_INTERRUPT6 - }; - wgp_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_spritemap(*this, "spritemap"), @@ -42,6 +35,20 @@ public: m_fake(*this, "FAKE") { } + void wgp2(machine_config &config); + void wgp(machine_config &config); + + void init_wgp(); + void init_wgp2(); + +private: + enum + { + TIMER_INTERRUPT4, + TIMER_INTERRUPT6, + TIMER_CPUB_INTERRUPT6 + }; + DECLARE_WRITE8_MEMBER(coins_w); DECLARE_WRITE16_MEMBER(cpua_ctrl_w); DECLARE_READ16_MEMBER(lan_status_r); @@ -51,24 +58,20 @@ public: DECLARE_WRITE8_MEMBER(sound_bankswitch_w); DECLARE_WRITE16_MEMBER(pivram_word_w); DECLARE_WRITE16_MEMBER(piv_ctrl_word_w); - void init_wgp(); - void init_wgp2(); + DECLARE_VIDEO_START(wgp2); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(cpub_interrupt); - void wgp2(machine_config &config); - void wgp(machine_config &config); void cpu2_map(address_map &map); void main_map(address_map &map); void z80_sound_map(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: TILE_GET_INFO_MEMBER(get_piv0_tile_info); TILE_GET_INFO_MEMBER(get_piv1_tile_info); TILE_GET_INFO_MEMBER(get_piv2_tile_info); diff --git a/src/mame/includes/williams.h b/src/mame/includes/williams.h index 8f54d27ee39..7a3c32183fa 100644 --- a/src/mame/includes/williams.h +++ b/src/mame/includes/williams.h @@ -36,6 +36,42 @@ public: m_paletteram(*this, "paletteram"), m_pia(*this, "pia_%u", 0U) { } + void playball(machine_config &config); + void defender(machine_config &config); + void sinistar(machine_config &config); + void lottofun(machine_config &config); + void williams(machine_config &config); + void williams_muxed(machine_config &config); + void jin(machine_config &config); + + void init_sinistar(); + void init_stargate(); + void init_playball(); + void init_defender(); + void init_mayday(); + void init_lottofun(); + void init_alienaru(); + void init_defndjeu(); + void init_splat(); + void init_joust(); + void init_alienar(); + void init_robotron(); + void init_bubbles(); + + DECLARE_READ8_MEMBER(williams_49way_port_0_r); + DECLARE_WRITE8_MEMBER(williams_snd_cmd_w); + DECLARE_WRITE8_MEMBER(defender_video_control_w); + DECLARE_READ8_MEMBER(williams_video_counter_r); + DECLARE_WRITE8_MEMBER(williams_watchdog_reset_w); + + TIMER_DEVICE_CALLBACK_MEMBER(williams_va11_callback); + TIMER_DEVICE_CALLBACK_MEMBER(williams_count240_callback); + + uint32_t screen_update_williams(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + DECLARE_VIDEO_START(williams); + DECLARE_PALETTE_INIT(williams); + +protected: enum { //controlbyte (0xCA00) bit definitions @@ -66,40 +102,21 @@ public: DECLARE_WRITE8_MEMBER(williams_vram_select_w); DECLARE_WRITE8_MEMBER(williams_cmos_w); DECLARE_WRITE8_MEMBER(bubbles_cmos_w); - DECLARE_WRITE8_MEMBER(williams_watchdog_reset_w); - DECLARE_WRITE8_MEMBER(defender_video_control_w); DECLARE_WRITE8_MEMBER(defender_bank_select_w); DECLARE_READ8_MEMBER(mayday_protection_r); DECLARE_WRITE8_MEMBER(sinistar_vram_select_w); - DECLARE_READ8_MEMBER(williams_video_counter_r); DECLARE_WRITE8_MEMBER(williams_blitter_w); - void init_sinistar(); - void init_stargate(); - void init_playball(); - void init_defender(); - void init_mayday(); - void init_lottofun(); - void init_alienaru(); - void init_defndjeu(); - void init_splat(); - void init_joust(); - void init_alienar(); - void init_robotron(); - void init_bubbles(); + DECLARE_MACHINE_START(defender); DECLARE_MACHINE_RESET(defender); - DECLARE_VIDEO_START(williams); DECLARE_MACHINE_START(williams); DECLARE_MACHINE_START(williams_common); - uint32_t screen_update_williams(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + TIMER_CALLBACK_MEMBER(williams_deferred_snd_cmd_w); - TIMER_DEVICE_CALLBACK_MEMBER(williams_va11_callback); - TIMER_DEVICE_CALLBACK_MEMBER(williams_count240_callback); - DECLARE_WRITE8_MEMBER(williams_snd_cmd_w); + DECLARE_WRITE8_MEMBER(playball_snd_cmd_w); - DECLARE_READ8_MEMBER(williams_49way_port_0_r); + DECLARE_WRITE_LINE_MEMBER(lottofun_coin_lock_w); - DECLARE_PALETTE_INIT(williams); void state_save_register(); void blitter_init(int blitter_config, const uint8_t *remap_prom); @@ -114,13 +131,7 @@ public: optional_device m_palette; optional_shared_ptr m_paletteram; optional_device_array m_pia; - void playball(machine_config &config); - void defender(machine_config &config); - void sinistar(machine_config &config); - void lottofun(machine_config &config); - void williams(machine_config &config); - void williams_muxed(machine_config &config); - void jin(machine_config &config); + void defender_bankc000_map(address_map &map); void defender_map(address_map &map); void defender_sound_map(address_map &map); @@ -135,9 +146,11 @@ public: spdball_state(const machine_config &mconfig, device_type type, const char *tag) : williams_state(mconfig, type, tag) { } + void spdball(machine_config &config); + void driver_init() override; - void spdball(machine_config &config); +private: void spdball_map(address_map &map); }; @@ -151,6 +164,12 @@ public: m_blaster_scanline_control(*this, "blaster_scan"), m_blaster_bankb(*this, "blaster_bankb") { } + void blastkit(machine_config &config); + void blaster(machine_config &config); + + void init_blaster(); + +private: optional_device m_soundcpu_b; required_shared_ptr m_blaster_palette_0; required_shared_ptr m_blaster_scanline_control; @@ -168,14 +187,12 @@ public: TIMER_CALLBACK_MEMBER(blaster_deferred_snd_cmd_w); DECLARE_WRITE8_MEMBER(blaster_snd_cmd_w); - void init_blaster(); DECLARE_MACHINE_START(blaster); DECLARE_VIDEO_START(blaster); uint32_t screen_update_blaster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); inline void update_blaster_banking(); - void blastkit(machine_config &config); - void blaster(machine_config &config); + void blaster_map(address_map &map); void sound_map_b(address_map &map); }; @@ -190,6 +207,15 @@ public: m_gfxdecode(*this, "gfxdecode"), m_williams2_tileram(*this, "williams2_tile") { } + void williams2(machine_config &config); + void mysticm(machine_config &config); + void inferno(machine_config &config); + + void init_mysticm(); + void init_tshoot(); + void init_inferno(); + +protected: required_device m_bank8000; required_device m_gfxdecode; required_shared_ptr m_williams2_tileram; @@ -215,16 +241,11 @@ public: TIMER_CALLBACK_MEMBER(williams2_deferred_snd_cmd_w); DECLARE_WRITE8_MEMBER(williams2_snd_cmd_w); - void init_mysticm(); - void init_tshoot(); - void init_inferno(); DECLARE_MACHINE_START(williams2); DECLARE_MACHINE_RESET(williams2); DECLARE_VIDEO_START(williams2); uint32_t screen_update_williams2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void williams2(machine_config &config); - void mysticm(machine_config &config); - void inferno(machine_config &config); + void williams2_bank8000_map(address_map &map); void williams2_common_map(address_map &map); void williams2_d000_ram_map(address_map &map); @@ -244,14 +265,16 @@ public: m_p1_gun_recoil(*this, "Player1_Gun_Recoil"), m_feather_blower(*this, "Feather_Blower") { } + void tshoot(machine_config &config); + DECLARE_CUSTOM_INPUT_MEMBER(gun_r); + +private: DECLARE_WRITE_LINE_MEMBER(maxvol_w); DECLARE_WRITE8_MEMBER(lamp_w); DECLARE_MACHINE_START(tshoot); - void tshoot(machine_config &config); -private: required_ioport_array<2> m_gun; output_finder<> m_grenade_lamp; output_finder<> m_gun_lamp; @@ -266,16 +289,19 @@ public: : williams2_state(mconfig, type, tag), m_cvsd_sound(*this, "cvsd") { } + void joust2(machine_config &config); + + void init_joust2(); + +private: required_device m_cvsd_sound; uint16_t m_joust2_current_sound_data; - void init_joust2(); DECLARE_MACHINE_START(joust2); DECLARE_MACHINE_RESET(joust2); TIMER_CALLBACK_MEMBER(joust2_deferred_snd_cmd_w); DECLARE_WRITE8_MEMBER(joust2_snd_cmd_w); DECLARE_WRITE_LINE_MEMBER(joust2_pia_3_cb1_w); - void joust2(machine_config &config); }; /*----------- defined in video/williams.cpp -----------*/ diff --git a/src/mame/includes/wiping.h b/src/mame/includes/wiping.h index 3e46963f3b0..9a10e6c8e16 100644 --- a/src/mame/includes/wiping.h +++ b/src/mame/includes/wiping.h @@ -16,6 +16,9 @@ public: m_colorram(*this, "colorram"), m_spriteram(*this, "spriteram") { } + void wiping(machine_config &config); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -42,7 +45,7 @@ public: INTERRUPT_GEN_MEMBER(vblank_irq); INTERRUPT_GEN_MEMBER(sound_timer_irq); - void wiping(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/witch.h b/src/mame/includes/witch.h index c1170fad725..5da3ef72d86 100644 --- a/src/mame/includes/witch.h +++ b/src/mame/includes/witch.h @@ -49,6 +49,28 @@ public: , m_mainbank(*this, "mainbank") { } + void witch(machine_config &config); + + void init_witch(); + + DECLARE_WRITE8_MEMBER(gfx0_vram_w); + DECLARE_WRITE8_MEMBER(gfx0_cram_w); + DECLARE_WRITE8_MEMBER(gfx1_vram_w); + DECLARE_WRITE8_MEMBER(gfx1_cram_w); + DECLARE_READ8_MEMBER(gfx1_vram_r); + DECLARE_READ8_MEMBER(gfx1_cram_r); + DECLARE_READ8_MEMBER(read_a000); + DECLARE_WRITE8_MEMBER(write_a002); + DECLARE_WRITE8_MEMBER(write_a006); + DECLARE_WRITE8_MEMBER(main_write_a008); + DECLARE_WRITE8_MEMBER(sub_write_a008); + DECLARE_READ8_MEMBER(prot_read_700x); + DECLARE_WRITE8_MEMBER(xscroll_w); + DECLARE_WRITE8_MEMBER(yscroll_w); + +protected: + void common_map(address_map &map); + tilemap_t *m_gfx0a_tilemap; tilemap_t *m_gfx0b_tilemap; tilemap_t *m_gfx1_tilemap; @@ -72,21 +94,7 @@ public: int m_scrolly; uint8_t m_reg_a002; uint8_t m_motor_active; - DECLARE_WRITE8_MEMBER(gfx0_vram_w); - DECLARE_WRITE8_MEMBER(gfx0_cram_w); - DECLARE_WRITE8_MEMBER(gfx1_vram_w); - DECLARE_WRITE8_MEMBER(gfx1_cram_w); - DECLARE_READ8_MEMBER(gfx1_vram_r); - DECLARE_READ8_MEMBER(gfx1_cram_r); - DECLARE_READ8_MEMBER(read_a000); - DECLARE_WRITE8_MEMBER(write_a002); - DECLARE_WRITE8_MEMBER(write_a006); - DECLARE_WRITE8_MEMBER(main_write_a008); - DECLARE_WRITE8_MEMBER(sub_write_a008); - DECLARE_READ8_MEMBER(prot_read_700x); - DECLARE_WRITE8_MEMBER(xscroll_w); - DECLARE_WRITE8_MEMBER(yscroll_w); - void init_witch(); + TILE_GET_INFO_MEMBER(get_gfx0b_tile_info); TILE_GET_INFO_MEMBER(get_gfx0a_tile_info); TILE_GET_INFO_MEMBER(get_gfx1_tile_info); @@ -94,13 +102,11 @@ public: uint32_t screen_update_witch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); virtual void machine_reset() override; - void witch(machine_config &config); - void common_map(address_map &map); + void witch_common_map(address_map &map); void witch_main_map(address_map &map); void witch_sub_map(address_map &map); -protected: void video_common_init(); bool has_spr_rom_bank; uint8_t m_spr_bank; @@ -114,22 +120,21 @@ public: m_paletteram(*this, "paletteram") { } + void keirinou(machine_config &config); + +private: void keirinou_common_map(address_map &map); void keirinou_main_map(address_map &map); void keirinou_sub_map(address_map &map); - void keirinou(machine_config &config); DECLARE_WRITE8_MEMBER(write_keirinou_a002); DECLARE_WRITE8_MEMBER(palette_w); TILE_GET_INFO_MEMBER(get_keirinou_gfx1_tile_info); -protected: virtual void video_start() override; -private: uint8_t m_bg_bank; required_shared_ptr m_paletteram; - }; diff --git a/src/mame/includes/wiz.h b/src/mame/includes/wiz.h index 071706c1975..f9f7f73d2af 100644 --- a/src/mame/includes/wiz.h +++ b/src/mame/includes/wiz.h @@ -30,6 +30,14 @@ public: m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void wiz(machine_config &config); + void kungfut(machine_config &config); + void scion(machine_config &config); + void stinger(machine_config &config); + + void init_stinger(); + +private: required_device m_maincpu; required_device m_audiocpu; optional_device m_discrete; @@ -71,8 +79,6 @@ public: DECLARE_WRITE8_MEMBER(stinger_explosion_w); DECLARE_WRITE8_MEMBER(stinger_shot_w); - void init_stinger(); - virtual void machine_reset() override; virtual void machine_start() override; DECLARE_PALETTE_INIT(wiz); @@ -83,10 +89,7 @@ public: INTERRUPT_GEN_MEMBER(wiz_sound_interrupt); void draw_tiles(bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int charbank, int colortype); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int set, int charbank); - void wiz(machine_config &config); - void kungfut(machine_config &config); - void scion(machine_config &config); - void stinger(machine_config &config); + void decrypted_opcodes_map(address_map &map); void kungfut_main_map(address_map &map); void kungfut_sound_map(address_map &map); diff --git a/src/mame/includes/wolfpack.h b/src/mame/includes/wolfpack.h index ded58e096eb..fd54848a09a 100644 --- a/src/mame/includes/wolfpack.h +++ b/src/mame/includes/wolfpack.h @@ -17,11 +17,6 @@ class wolfpack_state : public driver_device { public: - enum - { - TIMER_PERIODIC - }; - wolfpack_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_alpha_num_ram(*this, "alpha_num_ram"), @@ -33,10 +28,16 @@ public: m_led(*this, "led0") { } - DECLARE_CUSTOM_INPUT_MEMBER(dial_r); void wolfpack(machine_config &config); -protected: + DECLARE_CUSTOM_INPUT_MEMBER(dial_r); + +private: + enum + { + TIMER_PERIODIC + }; + DECLARE_READ8_MEMBER(misc_r); DECLARE_WRITE8_MEMBER(high_explo_w); DECLARE_WRITE8_MEMBER(sonar_ping_w); @@ -82,7 +83,6 @@ protected: void main_map(address_map &map); -private: // devices, pointers required_shared_ptr m_alpha_num_ram; required_device m_maincpu; diff --git a/src/mame/includes/wrally.h b/src/mame/includes/wrally.h index 3982185b3ce..4e7dfee74fb 100644 --- a/src/mame/includes/wrally.h +++ b/src/mame/includes/wrally.h @@ -27,7 +27,7 @@ public: void wrally(machine_config &config); -protected: +private: DECLARE_READ8_MEMBER(shareram_r); DECLARE_WRITE8_MEMBER(shareram_w); DECLARE_WRITE16_MEMBER(vram_w); @@ -51,7 +51,6 @@ protected: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); -private: required_device m_maincpu; required_device m_outlatch; required_device m_gfxdecode; diff --git a/src/mame/includes/wwfsstar.h b/src/mame/includes/wwfsstar.h index b3f843c34f3..7a9857bc61e 100644 --- a/src/mame/includes/wwfsstar.h +++ b/src/mame/includes/wwfsstar.h @@ -21,6 +21,11 @@ public: m_fg0_videoram(*this, "fg0_videoram"), m_bg0_videoram(*this, "bg0_videoram") { } + void wwfsstar(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); + +private: required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -44,8 +49,6 @@ public: DECLARE_WRITE16_MEMBER(fg0_videoram_w); DECLARE_WRITE16_MEMBER(bg0_videoram_w); - DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); - TIMER_DEVICE_CALLBACK_MEMBER(scanline); TILE_GET_INFO_MEMBER(get_fg0_tile_info); @@ -56,7 +59,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void wwfsstar(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/x07.h b/src/mame/includes/x07.h index 31b58ef3106..1d1c770b042 100644 --- a/src/mame/includes/x07.h +++ b/src/mame/includes/x07.h @@ -174,6 +174,16 @@ public: m_warm_start(1) { } + void x07(machine_config &config); + + void init_x07(); + + DECLARE_INPUT_CHANGED_MEMBER( kb_keys ); + DECLARE_INPUT_CHANGED_MEMBER( kb_func_keys ); + DECLARE_INPUT_CHANGED_MEMBER( kb_break ); + DECLARE_INPUT_CHANGED_MEMBER( kb_update_udk ); + +private: required_device m_maincpu; required_device m_printer; required_device m_beep; @@ -189,12 +199,6 @@ public: DECLARE_READ8_MEMBER( x07_io_r ); DECLARE_WRITE8_MEMBER( x07_io_w ); - DECLARE_INPUT_CHANGED_MEMBER( kb_keys ); - DECLARE_INPUT_CHANGED_MEMBER( kb_func_keys ); - DECLARE_INPUT_CHANGED_MEMBER( kb_break ); - DECLARE_INPUT_CHANGED_MEMBER( kb_update_udk ); - - void init_x07(); void nvram_init(nvram_device &nvram, void *data, size_t size); void t6834_cmd(uint8_t cmd); @@ -283,7 +287,7 @@ public: TIMER_CALLBACK_MEMBER(rstb_clear); TIMER_CALLBACK_MEMBER(beep_stop); TIMER_DEVICE_CALLBACK_MEMBER(blink_timer); - void x07(machine_config &config); + void x07_io(address_map &map); void x07_mem(address_map &map); }; diff --git a/src/mame/includes/x68k.h b/src/mame/includes/x68k.h index 34d9076b54f..cbd8efbbaf7 100644 --- a/src/mame/includes/x68k.h +++ b/src/mame/includes/x68k.h @@ -37,23 +37,6 @@ class x68k_state : public driver_device { public: - enum - { - TIMER_X68K_LED, - TIMER_X68K_SCC_ACK, - TIMER_MD_6BUTTON_PORT1_TIMEOUT, - TIMER_MD_6BUTTON_PORT2_TIMEOUT, - TIMER_X68K_BUS_ERROR, - TIMER_X68K_NET_IRQ, - TIMER_X68K_CRTC_OPERATION_END, - TIMER_X68K_HSYNC, - TIMER_X68K_CRTC_RASTER_END, - TIMER_X68K_CRTC_RASTER_IRQ, - TIMER_X68K_CRTC_VBLANK_IRQ, - TIMER_X68K_FDC_TC, - TIMER_X68K_ADPCM - }; - x68k_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -92,6 +75,33 @@ public: , m_spritereg(0x8000/sizeof(uint16_t), 0) { } + void x68kxvi(machine_config &config); + void x68ksupr(machine_config &config); + void x68030(machine_config &config); + void x68000(machine_config &config); + + void init_x68kxvi(); + void init_x68030(); + void init_x68000(); + +private: + enum + { + TIMER_X68K_LED, + TIMER_X68K_SCC_ACK, + TIMER_MD_6BUTTON_PORT1_TIMEOUT, + TIMER_MD_6BUTTON_PORT2_TIMEOUT, + TIMER_X68K_BUS_ERROR, + TIMER_X68K_NET_IRQ, + TIMER_X68K_CRTC_OPERATION_END, + TIMER_X68K_HSYNC, + TIMER_X68K_CRTC_RASTER_END, + TIMER_X68K_CRTC_RASTER_IRQ, + TIMER_X68K_CRTC_VBLANK_IRQ, + TIMER_X68K_FDC_TC, + TIMER_X68K_ADPCM + }; + required_device m_maincpu; required_device m_okim6258; required_device m_hd63450; @@ -266,9 +276,7 @@ public: int m_sprite_shift; int m_oddscanline; bool m_is_32bit; - void init_x68kxvi(); - void init_x68030(); - void init_x68000(); + TILE_GET_INFO_MEMBER(x68k_get_bg0_tile); TILE_GET_INFO_MEMBER(x68k_get_bg1_tile); TILE_GET_INFO_MEMBER(x68k_get_bg0_tile_16); @@ -350,11 +358,6 @@ public: DECLARE_READ16_MEMBER(x68k_tvram_r); IRQ_CALLBACK_MEMBER(x68k_int_ack); - void x68kxvi(machine_config &config); - void x68ksupr(machine_config &config); - void x68030(machine_config &config); - void x68000(machine_config &config); - void x68030_map(address_map &map); void x68k_map(address_map &map); void x68kxvi_map(address_map &map); diff --git a/src/mame/includes/xain.h b/src/mame/includes/xain.h index ab4eefec77d..91e2a0ba810 100644 --- a/src/mame/includes/xain.h +++ b/src/mame/includes/xain.h @@ -34,13 +34,13 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); - DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); - void xsleena(machine_config &config); void xsleenab(machine_config &config); -protected: + DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); + DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); + +private: DECLARE_WRITE8_MEMBER(cpuA_bankswitch_w); DECLARE_WRITE8_MEMBER(cpuB_bankswitch_w); DECLARE_WRITE8_MEMBER(main_irq_w); diff --git a/src/mame/includes/xavix.h b/src/mame/includes/xavix.h index 8bac9e0be4e..dd39f99b38a 100644 --- a/src/mame/includes/xavix.h +++ b/src/mame/includes/xavix.h @@ -38,32 +38,30 @@ public: m_lowbus(*this, "lowbus") { } - // screen updates - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void xavix(machine_config &config); void xavixp(machine_config &config); void xavix2000(machine_config &config); + void init_xavix(); + void init_taitons1(); + void init_rad_box(); + +private: + // screen updates + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void xavix_map(address_map &map); void xavix_lowbus_map(address_map &map); INTERRUPT_GEN_MEMBER(interrupt); TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb); - void init_xavix(); - void init_taitons1(); - void init_rad_box(); - -protected: // driver_device overrides virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; -private: - DECLARE_READ8_MEMBER(main_r); DECLARE_WRITE8_MEMBER(main_w); DECLARE_READ8_MEMBER(main2_r); diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h index fb113a78b63..ec40353b14a 100644 --- a/src/mame/includes/xbox.h +++ b/src/mame/includes/xbox.h @@ -23,6 +23,9 @@ public: m_maincpu(*this, "maincpu"), debugc_bios(nullptr) { } + void xbox_base(machine_config &config); + +protected: DECLARE_READ8_MEMBER(superio_read); DECLARE_WRITE8_MEMBER(superio_write); DECLARE_READ8_MEMBER(superiors232_read); @@ -72,10 +75,9 @@ public: } debugp[]; const debugger_constants *debugc_bios; - void xbox_base(machine_config &config); void xbox_base_map(address_map &map); void xbox_base_map_io(address_map &map); -private: + void dump_string_command(int ref, const std::vector ¶ms); void dump_process_command(int ref, const std::vector ¶ms); void dump_list_command(int ref, const std::vector ¶ms); diff --git a/src/mame/includes/xerox820.h b/src/mame/includes/xerox820.h index 6b626039b0b..120c81a80d8 100644 --- a/src/mame/includes/xerox820.h +++ b/src/mame/includes/xerox820.h @@ -68,8 +68,11 @@ public: m_8n5(0), m_400_460(0) { } + + void mk83(machine_config &config); + void xerox820(machine_config &config); - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + DECLARE_QUICKLOAD_LOAD_MEMBER(xerox820); DECLARE_READ8_MEMBER( fdc_r ); DECLARE_WRITE8_MEMBER( fdc_w ); @@ -81,16 +84,17 @@ public: DECLARE_WRITE_LINE_MEMBER( fr_w ); DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_QUICKLOAD_LOAD_MEMBER(xerox820); + +protected: + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - void mk83(machine_config &config); - void xerox820(machine_config &config); void mk83_mem(address_map &map); void xerox820_io(address_map &map); void xerox820_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/xevious.h b/src/mame/includes/xevious.h index 422d6650176..f105611fd72 100644 --- a/src/mame/includes/xevious.h +++ b/src/mame/includes/xevious.h @@ -23,6 +23,12 @@ public: m_samples(*this, "samples"), m_subcpu3(*this, "sub3") { } + void xevious(machine_config &config); + + void init_xevious(); + void init_xevios(); + +protected: required_shared_ptr m_xevious_sr1; required_shared_ptr m_xevious_sr2; required_shared_ptr m_xevious_sr3; @@ -33,8 +39,7 @@ public: optional_device m_samples; int32_t m_xevious_bs[2]; - void init_xevious(); - void init_xevios(); + TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_VIDEO_START(xevious); @@ -51,7 +56,7 @@ public: DECLARE_READ8_MEMBER( xevious_bb_r ); optional_device m_subcpu3; - void xevious(machine_config &config); + void xevious_map(address_map &map); }; diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index 72e2554b6c6..9c73f944ffa 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -45,6 +45,11 @@ public: { } + void xexex(machine_config &config); + + void init_xexex(); + +private: /* memory pointers */ required_shared_ptr m_workram; required_shared_ptr m_spriteram; @@ -89,7 +94,7 @@ public: DECLARE_WRITE16_MEMBER(control2_w); DECLARE_WRITE16_MEMBER(sound_irq_w); DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - void init_xexex(); + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -102,7 +107,7 @@ public: K056832_CB_MEMBER(tile_callback); K053246_CB_MEMBER(sprite_callback); K054539_CB_MEMBER(ym_set_mixing); - void xexex(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h index ea8afb8f7a3..baf26ca9cab 100644 --- a/src/mame/includes/xmen.h +++ b/src/mame/includes/xmen.h @@ -30,6 +30,12 @@ public: m_k054321(*this, "k054321"), m_z80bank(*this, "z80bank") { } + void xmen(machine_config &config); + void xmen6p(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(xmen_frame_r); + +private: /* video-related */ int m_layer_colorbase[3]; int m_sprite_colorbase; @@ -61,7 +67,7 @@ public: DECLARE_WRITE16_MEMBER(eeprom_w); DECLARE_WRITE16_MEMBER(xmen_18fa00_w); DECLARE_WRITE8_MEMBER(sound_bankswitch_w); - DECLARE_CUSTOM_INPUT_MEMBER(xmen_frame_r); + virtual void machine_start() override; virtual void machine_reset() override; DECLARE_VIDEO_START(xmen6p); @@ -72,8 +78,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(xmen_scanline); K052109_CB_MEMBER(tile_callback); K053246_CB_MEMBER(sprite_callback); - void xmen(machine_config &config); - void xmen6p(machine_config &config); + void _6p_main_map(address_map &map); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/xor100.h b/src/mame/includes/xor100.h index c1b00d77085..f3bb7b1ab13 100644 --- a/src/mame/includes/xor100.h +++ b/src/mame/includes/xor100.h @@ -48,6 +48,9 @@ public: , m_rom(*this, Z80_TAG) { } + void xor100(machine_config &config); + +private: DECLARE_WRITE8_MEMBER( mmu_w ); DECLARE_WRITE8_MEMBER( prom_toggle_w ); DECLARE_READ8_MEMBER( prom_disable_r ); @@ -66,10 +69,9 @@ public: DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - void xor100(machine_config &config); void xor100_io(address_map &map); void xor100_mem(address_map &map); -protected: + virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/xorworld.h b/src/mame/includes/xorworld.h index 8e0681b5c1a..b734f2d4765 100644 --- a/src/mame/includes/xorworld.h +++ b/src/mame/includes/xorworld.h @@ -16,6 +16,11 @@ public: m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram") { } + void xorworld(machine_config &config); + + void init_xorworld(); + +private: required_device m_maincpu; required_device m_eeprom; required_device m_gfxdecode; @@ -32,12 +37,11 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); - void init_xorworld(); virtual void video_start() override; DECLARE_PALETTE_INIT(xorworld); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - void xorworld(machine_config &config); + void xorworld_map(address_map &map); }; diff --git a/src/mame/includes/xxmissio.h b/src/mame/includes/xxmissio.h index 9284bbecaff..4e7816b619a 100644 --- a/src/mame/includes/xxmissio.h +++ b/src/mame/includes/xxmissio.h @@ -16,6 +16,11 @@ public: m_fgram(*this, "fgram"), m_spriteram(*this, "spriteram") { } + void xxmissio(machine_config &config); + + DECLARE_CUSTOM_INPUT_MEMBER(status_r); + +private: required_device m_maincpu; required_device m_subcpu; required_device m_gfxdecode; @@ -41,7 +46,6 @@ public: DECLARE_WRITE8_MEMBER(scroll_x_w); DECLARE_WRITE8_MEMBER(scroll_y_w); - DECLARE_CUSTOM_INPUT_MEMBER(status_r); DECLARE_WRITE_LINE_MEMBER(interrupt_m); INTERRUPT_GEN_MEMBER(interrupt_s); @@ -56,7 +60,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx); - void xxmissio(machine_config &config); + void map1(address_map &map); void map2(address_map &map); }; diff --git a/src/mame/includes/xybots.h b/src/mame/includes/xybots.h index dc37a503eda..90d7c6477e4 100644 --- a/src/mame/includes/xybots.h +++ b/src/mame/includes/xybots.h @@ -25,10 +25,11 @@ public: m_mob(*this, "mob") { } - void init_xybots(); void xybots(machine_config &config); -protected: + void init_xybots(); + +private: virtual void update_interrupts() override; DECLARE_READ16_MEMBER(special_port1_r); TILE_GET_INFO_MEMBER(get_alpha_tile_info); @@ -36,7 +37,6 @@ protected: uint32_t screen_update_xybots(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void main_map(address_map &map); -private: required_device m_jsa; required_device m_playfield_tilemap; required_device m_alpha_tilemap; diff --git a/src/mame/includes/xyonix.h b/src/mame/includes/xyonix.h index 6050b07d969..381022d981f 100644 --- a/src/mame/includes/xyonix.h +++ b/src/mame/includes/xyonix.h @@ -12,6 +12,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_vidram(*this, "vidram") { } + void xyonix(machine_config &config); + +private: required_device m_maincpu; required_device m_gfxdecode; @@ -40,7 +43,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void handle_coins(int coin); - void xyonix(machine_config &config); void main_map(address_map &map); void port_map(address_map &map); }; diff --git a/src/mame/includes/yiear.h b/src/mame/includes/yiear.h index ebb9043805a..6ccd0c76565 100644 --- a/src/mame/includes/yiear.h +++ b/src/mame/includes/yiear.h @@ -30,6 +30,9 @@ public: m_palette(*this, "palette") { } + void yiear(machine_config &config); + +private: /* memory pointers */ required_shared_ptr m_spriteram; required_shared_ptr m_spriteram2; @@ -66,7 +69,7 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); INTERRUPT_GEN_MEMBER(yiear_nmi_interrupt); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void yiear(machine_config &config); + void main_map(address_map &map); void vlm_map(address_map &map); }; diff --git a/src/mame/includes/yunsun16.h b/src/mame/includes/yunsun16.h index 09b46d9c783..a305e5d6730 100644 --- a/src/mame/includes/yunsun16.h +++ b/src/mame/includes/yunsun16.h @@ -29,6 +29,12 @@ public: m_priorityram(*this, "priorityram"), m_spriteram(*this, "spriteram") { } + void magicbub(machine_config &config); + void shocking(machine_config &config); + + void init_magicbub(); + +private: /* devices */ required_device m_maincpu; optional_device m_audiocpu; @@ -55,7 +61,7 @@ public: DECLARE_WRITE16_MEMBER(magicbub_sound_command_w); DECLARE_WRITE16_MEMBER(vram_0_w); DECLARE_WRITE16_MEMBER(vram_1_w); - void init_magicbub(); + DECLARE_MACHINE_START(shocking); DECLARE_MACHINE_RESET(shocking); TILEMAP_MAPPER_MEMBER(tilemap_scan_pages); @@ -66,8 +72,7 @@ public: virtual void video_start() override; uint32_t screen_update_yunsun16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - void magicbub(machine_config &config); - void shocking(machine_config &config); + void main_map(address_map &map); void oki_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/yunsung8.h b/src/mame/includes/yunsung8.h index 2fb54cadac8..836b64d2683 100644 --- a/src/mame/includes/yunsung8.h +++ b/src/mame/includes/yunsung8.h @@ -24,6 +24,9 @@ public: { } + void yunsung8(machine_config &config); + +private: /* video-related */ tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; @@ -63,7 +66,7 @@ public: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void yunsung8(machine_config &config); + void main_map(address_map &map); void port_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/z80ne.h b/src/mame/includes/z80ne.h index bddb77dc363..05f8c50bd03 100644 --- a/src/mame/includes/z80ne.h +++ b/src/mame/includes/z80ne.h @@ -87,6 +87,20 @@ public: { } + void z80net(machine_config &config); + void z80ne(machine_config &config); + void z80netb(machine_config &config); + + void init_z80net(); + void init_z80netb(); + void init_z80ne(); + + DECLARE_INPUT_CHANGED_MEMBER(z80ne_reset); + DECLARE_INPUT_CHANGED_MEMBER(z80ne_nmi); + + DECLARE_READ8_MEMBER(lx388_mc6847_videoram_r); + +protected: DECLARE_FLOPPY_FORMATS(floppy_formats); optional_device m_vdg; @@ -108,9 +122,6 @@ public: DECLARE_READ_LINE_MEMBER(lx387_control_r); DECLARE_READ8_MEMBER(lx387_data_r); DECLARE_READ8_MEMBER(lx388_read_field_sync); - void init_z80net(); - void init_z80netb(); - void init_z80ne(); DECLARE_MACHINE_START(z80ne); DECLARE_MACHINE_RESET(z80ne); DECLARE_MACHINE_START(z80netb); @@ -118,21 +129,16 @@ public: DECLARE_MACHINE_START(z80net); DECLARE_MACHINE_RESET(z80net); DECLARE_MACHINE_RESET(z80ne_base); - DECLARE_INPUT_CHANGED_MEMBER(z80ne_reset); - DECLARE_INPUT_CHANGED_MEMBER(z80ne_nmi); + TIMER_CALLBACK_MEMBER(z80ne_cassette_tc); TIMER_CALLBACK_MEMBER(z80ne_kbd_scan); - DECLARE_READ8_MEMBER(lx388_mc6847_videoram_r); - void z80net(machine_config &config); - void z80ne(machine_config &config); - void z80netb(machine_config &config); void z80ne_io(address_map &map); void z80ne_mem(address_map &map); void z80net_io(address_map &map); void z80net_mem(address_map &map); void z80netb_mem(address_map &map); -protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; required_device m_maincpu; @@ -162,14 +168,6 @@ protected: class z80netf_state : public z80ne_state { - struct wd17xx_state_t - { - int drq; - int intrq; - uint8_t drive; /* current drive */ - uint8_t head; /* current head */ - }; - public: z80netf_state(const machine_config &mconfig, device_type type, const char *tag) : z80ne_state(mconfig, type, tag), @@ -180,9 +178,19 @@ public: { } - void init_z80netf(); void z80netf(machine_config &config); + + void init_z80netf(); + private: + struct wd17xx_state_t + { + int drq; + int intrq; + uint8_t drive; /* current drive */ + uint8_t head; /* current head */ + }; + void z80netf_io(address_map &map); void z80netf_mem(address_map &map); diff --git a/src/mame/includes/z88.h b/src/mame/includes/z88.h index d1a38dffc50..ae644f4d746 100644 --- a/src/mame/includes/z88.h +++ b/src/mame/includes/z88.h @@ -57,7 +57,7 @@ public: void z88(machine_config &config); -protected: +private: enum { Z88_BANK_ROM = 1, @@ -94,7 +94,6 @@ protected: void z88_io(address_map &map); void z88_mem(address_map &map); -private: required_device m_maincpu; required_memory_region m_bios_region; required_device m_ram; diff --git a/src/mame/includes/zac2650.h b/src/mame/includes/zac2650.h index aa0792aa1e9..3a7554bb2cc 100644 --- a/src/mame/includes/zac2650.h +++ b/src/mame/includes/zac2650.h @@ -17,6 +17,9 @@ public: m_videoram(*this, "videoram"), m_s2636_0_ram(*this, "s2636_0_ram") { } + void tinvader(machine_config &config); + +private: /* devices */ required_device m_maincpu; required_device m_s2636; @@ -45,6 +48,6 @@ public: uint32_t screen_update_tinvader(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int SpriteCollision(int first,int second); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void tinvader(machine_config &config); + void main_map(address_map &map); }; diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h index be3e14c1fc1..729a7003762 100644 --- a/src/mame/includes/zaccaria.h +++ b/src/mame/includes/zaccaria.h @@ -19,6 +19,9 @@ public: , m_dsw_port(*this, "DSW.%u", 0) { } + void zaccaria(machine_config &config); + +private: DECLARE_READ8_MEMBER(dsw_r); DECLARE_READ8_MEMBER(prot1_r); DECLARE_READ8_MEMBER(prot2_r); @@ -38,9 +41,8 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,uint8_t *spriteram,int color,int section); - void zaccaria(machine_config &config); void main_map(address_map &map); -protected: + required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h index 105a063460f..23ae710ad0f 100644 --- a/src/mame/includes/zaxxon.h +++ b/src/mame/includes/zaxxon.h @@ -26,6 +26,26 @@ public: m_colorram(*this, "colorram"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } + void root(machine_config &config); + void ixion(machine_config &config); + void futspye(machine_config &config); + void congo(machine_config &config); + void szaxxon(machine_config &config); + void razmataze(machine_config &config); + void szaxxone(machine_config &config); + void zaxxon(machine_config &config); + void zaxxon_samples(machine_config &config); + void congo_samples(machine_config &config); + + void init_razmataz(); + void init_zaxxonj(); + + DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r); + DECLARE_CUSTOM_INPUT_MEMBER(zaxxon_coin_r); + DECLARE_INPUT_CHANGED_MEMBER(service_switch); + DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted); + +private: required_device m_maincpu; required_device_array m_mainlatch; optional_device m_samples; @@ -75,12 +95,7 @@ public: DECLARE_WRITE8_MEMBER(zaxxon_videoram_w); DECLARE_WRITE8_MEMBER(congo_colorram_w); DECLARE_WRITE8_MEMBER(congo_sprite_custom_w); - DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r); - DECLARE_CUSTOM_INPUT_MEMBER(zaxxon_coin_r); - DECLARE_INPUT_CHANGED_MEMBER(service_switch); - DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted); - void init_razmataz(); - void init_zaxxonj(); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(zaxxon_get_fg_tile_info); TILE_GET_INFO_MEMBER(razmataz_get_fg_tile_info); @@ -105,16 +120,7 @@ public: inline int find_minimum_y(uint8_t value, int flip); inline int find_minimum_x(uint8_t value, int flip); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t flipxmask, uint16_t flipymask); - void root(machine_config &config); - void ixion(machine_config &config); - void futspye(machine_config &config); - void congo(machine_config &config); - void szaxxon(machine_config &config); - void razmataze(machine_config &config); - void szaxxone(machine_config &config); - void zaxxon(machine_config &config); - void zaxxon_samples(machine_config &config); - void congo_samples(machine_config &config); + void congo_map(address_map &map); void congo_sound_map(address_map &map); void decrypted_opcodes_map(address_map &map); diff --git a/src/mame/includes/zerozone.h b/src/mame/includes/zerozone.h index 02b400a5066..cf77992507b 100644 --- a/src/mame/includes/zerozone.h +++ b/src/mame/includes/zerozone.h @@ -21,6 +21,9 @@ public: m_gfxdecode(*this, "gfxdecode") { } + void zerozone(machine_config &config); + +private: // in drivers/zerozone.c DECLARE_WRITE16_MEMBER(sound_w); @@ -45,10 +48,8 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void zerozone(machine_config &config); void main_map(address_map &map); void sound_map(address_map &map); -protected: // driver_device overrides virtual void machine_start() override; diff --git a/src/mame/includes/zodiack.h b/src/mame/includes/zodiack.h index 512cffd3986..1914c571531 100644 --- a/src/mame/includes/zodiack.h +++ b/src/mame/includes/zodiack.h @@ -22,6 +22,12 @@ public: m_bulletsram(*this, "bulletsram") { } + void zodiack(machine_config &config); + + void init_zodiack(); + void init_percuss(); + +private: // in drivers/zodiack.c DECLARE_WRITE8_MEMBER(nmi_mask_w); DECLARE_WRITE8_MEMBER(sound_nmi_enable_w); @@ -64,14 +70,12 @@ public: virtual void machine_reset() override; virtual void video_start() override; - void init_zodiack(); - void init_percuss(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); DECLARE_PALETTE_INIT(zodiack); INTERRUPT_GEN_MEMBER(zodiack_sound_nmi_gen); INTERRUPT_GEN_MEMBER(zodiack_main_nmi_gen); - void zodiack(machine_config &config); + void io_map(address_map &map); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/mame/includes/zorba.h b/src/mame/includes/zorba.h index 09f3b6de62e..e7201a5214a 100644 --- a/src/mame/includes/zorba.h +++ b/src/mame/includes/zorba.h @@ -47,7 +47,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(printer_type); void zorba(machine_config &config); -protected: +private: virtual void machine_start() override; virtual void machine_reset() override; @@ -87,7 +87,6 @@ protected: DECLARE_WRITE_LINE_MEMBER(printer_fault_w); DECLARE_WRITE_LINE_MEMBER(printer_select_w); -private: required_ioport m_config_port; required_memory_bank m_read_bank; diff --git a/src/mame/includes/zx.h b/src/mame/includes/zx.h index 1dec874c189..aa0409069dc 100644 --- a/src/mame/includes/zx.h +++ b/src/mame/includes/zx.h @@ -47,6 +47,17 @@ public: m_screen(*this, "screen") { } + void zx81(machine_config &config); + void zx81_spk(machine_config &config); + void ts1000(machine_config &config); + void pc8300(machine_config &config); + void pow3000(machine_config &config); + void ts1500(machine_config &config); + void zx80(machine_config &config); + + void init_zx(); + +private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER(ula_high_r); @@ -58,20 +69,13 @@ public: DECLARE_READ8_MEMBER(pow3000_io_r); DECLARE_WRITE8_MEMBER(zx80_io_w); DECLARE_WRITE8_MEMBER(zx81_io_w); - void init_zx(); + virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(zx); void zx_tape_input(); void zx_ula_hsync(); - void zx81(machine_config &config); - void zx81_spk(machine_config &config); - void ts1000(machine_config &config); - void pc8300(machine_config &config); - void pow3000(machine_config &config); - void ts1500(machine_config &config); - void zx80(machine_config &config); void pc8300_io_map(address_map &map); void pow3000_io_map(address_map &map); void ula_map(address_map &map); @@ -79,7 +83,7 @@ public: void zx80_map(address_map &map); void zx81_io_map(address_map &map); void zx81_map(address_map &map); -protected: + enum { TIMER_TAPE_INPUT, -- cgit v1.2.3