diff options
46 files changed, 153 insertions, 390 deletions
diff --git a/src/devices/bus/spc1000/fdd.cpp b/src/devices/bus/spc1000/fdd.cpp index 04dca094d73..3156e6814ec 100644 --- a/src/devices/bus/spc1000/fdd.cpp +++ b/src/devices/bus/spc1000/fdd.cpp @@ -73,10 +73,14 @@ static SLOT_INTERFACE_START( sd725_floppies ) SLOT_INTERFACE("sd320", EPSON_SD_320) SLOT_INTERFACE_END -static MACHINE_CONFIG_START(spc1000_fdd) +//------------------------------------------------- +// device_add_mconfig +//------------------------------------------------- + +MACHINE_CONFIG_MEMBER( spc1000_fdd_exp_device::device_add_mconfig ) - /* sub CPU(5 inch floppy drive) */ - MCFG_CPU_ADD("fdccpu", Z80, XTAL_4MHz) /* 4 MHz */ + // sub CPU (5 inch floppy drive) + MCFG_CPU_ADD("fdccpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(sd725_mem) MCFG_CPU_IO_MAP(sd725_io) @@ -96,15 +100,6 @@ static MACHINE_CONFIG_START(spc1000_fdd) MCFG_FLOPPY_DRIVE_ADD("upd765:1", sd725_floppies, "sd320", floppy_image_device::default_floppy_formats) MACHINE_CONFIG_END -//------------------------------------------------- -// device_mconfig_additions -//------------------------------------------------- - -machine_config_constructor spc1000_fdd_exp_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( spc1000_fdd ); -} - ROM_START( spc1000_fdd ) ROM_REGION(0x10000, "fdccpu", 0) ROM_LOAD("sd725a.bin", 0x0000, 0x1000, CRC(96ac2eb8) SHA1(8e9d8f63a7fb87af417e95603e71cf537a6e83f1)) diff --git a/src/devices/bus/spc1000/fdd.h b/src/devices/bus/spc1000/fdd.h index 007ca775467..8a999eca25d 100644 --- a/src/devices/bus/spc1000/fdd.h +++ b/src/devices/bus/spc1000/fdd.h @@ -22,21 +22,21 @@ public: // construction/destruction spc1000_fdd_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual const tiny_rom_entry *device_rom_region() const override; + // not really public + DECLARE_READ8_MEMBER(tc_r); + DECLARE_WRITE8_MEMBER(control_w); -public: +protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual DECLARE_READ8_MEMBER(read) override; virtual DECLARE_WRITE8_MEMBER(write) override; - DECLARE_READ8_MEMBER(tc_r); - DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(i8255_b_w); DECLARE_READ8_MEMBER(i8255_c_r); DECLARE_WRITE8_MEMBER(i8255_c_w); diff --git a/src/devices/bus/spc1000/vdp.cpp b/src/devices/bus/spc1000/vdp.cpp index ff4ba551efb..92fe25b6fe0 100644 --- a/src/devices/bus/spc1000/vdp.cpp +++ b/src/devices/bus/spc1000/vdp.cpp @@ -19,7 +19,11 @@ WRITE_LINE_MEMBER(spc1000_vdp_exp_device::vdp_interrupt) // nothing here? } -static MACHINE_CONFIG_START(scp1000_vdp) +//------------------------------------------------- +// device_add_mconfig +//------------------------------------------------- + +MACHINE_CONFIG_MEMBER(spc1000_vdp_exp_device::device_add_mconfig) MCFG_DEVICE_ADD("tms", TMS9928A, XTAL_10_738635MHz / 2) // TODO: which clock? MCFG_TMS9928A_VRAM_SIZE(0x4000) @@ -28,15 +32,6 @@ static MACHINE_CONFIG_START(scp1000_vdp) MCFG_SCREEN_UPDATE_DEVICE("tms", tms9928a_device, screen_update) MACHINE_CONFIG_END -//------------------------------------------------- -// device_mconfig_additions -//------------------------------------------------- - -machine_config_constructor spc1000_vdp_exp_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( scp1000_vdp ); -} - //************************************************************************** // GLOBAL VARIABLES diff --git a/src/devices/bus/spc1000/vdp.h b/src/devices/bus/spc1000/vdp.h index 4619f719ece..757c6cda0ec 100644 --- a/src/devices/bus/spc1000/vdp.h +++ b/src/devices/bus/spc1000/vdp.h @@ -21,13 +21,11 @@ public: // construction/destruction spc1000_vdp_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - -public: +protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; virtual DECLARE_READ8_MEMBER(read) override; virtual DECLARE_WRITE8_MEMBER(write) override; diff --git a/src/devices/bus/tiki100/8088.cpp b/src/devices/bus/tiki100/8088.cpp index 4f4a3ecdf98..3b46be60875 100644 --- a/src/devices/bus/tiki100/8088.cpp +++ b/src/devices/bus/tiki100/8088.cpp @@ -65,24 +65,13 @@ ADDRESS_MAP_END // MACHINE_CONFIG_START( tiki100_8088 ) //------------------------------------------------- -static MACHINE_CONFIG_START( tiki100_8088 ) +MACHINE_CONFIG_MEMBER( tiki100_8088_device::device_add_mconfig ) MCFG_CPU_ADD(I8088_TAG, I8088, 6000000) MCFG_CPU_PROGRAM_MAP(i8088_mem) MCFG_CPU_IO_MAP(i8088_io) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor tiki100_8088_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( tiki100_8088 ); -} - - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h index b2a131eb113..2e946cd1c55 100644 --- a/src/devices/bus/tiki100/8088.h +++ b/src/devices/bus/tiki100/8088.h @@ -29,10 +29,6 @@ public: // construction/destruction tiki100_8088_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); @@ -40,6 +36,8 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; // device_tiki100bus_card_interface overrides virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/tiki100/hdc.cpp b/src/devices/bus/tiki100/hdc.cpp index 555b7cc1166..b7bdbcad7fe 100644 --- a/src/devices/bus/tiki100/hdc.cpp +++ b/src/devices/bus/tiki100/hdc.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(TIKI100_HDC, tiki100_hdc_device, "tiki100_hdc", "TIKI-100 Win // MACHINE_CONFIG_START( tiki100_hdc ) //------------------------------------------------- -static MACHINE_CONFIG_START( tiki100_hdc ) +MACHINE_CONFIG_MEMBER( tiki100_hdc_device::device_add_mconfig ) MCFG_DEVICE_ADD(WD1010_TAG, WD2010, 5000000) //MCFG_WD2010_OUT_INTRQ_CB() MCFG_WD2010_IN_DRDY_CB(VCC) @@ -44,17 +44,6 @@ static MACHINE_CONFIG_START( tiki100_hdc ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor tiki100_hdc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( tiki100_hdc ); -} - - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/tiki100/hdc.h b/src/devices/bus/tiki100/hdc.h index 7e0109f0ecd..1c0447acff5 100644 --- a/src/devices/bus/tiki100/hdc.h +++ b/src/devices/bus/tiki100/hdc.h @@ -29,13 +29,11 @@ public: // construction/destruction tiki100_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; // device_tiki100bus_card_interface overrides virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/tvc/hbf.cpp b/src/devices/bus/tvc/hbf.cpp index 4cc816771e6..0c4b1256ce4 100644 --- a/src/devices/bus/tvc/hbf.cpp +++ b/src/devices/bus/tvc/hbf.cpp @@ -22,12 +22,6 @@ static SLOT_INTERFACE_START( tvc_hbf_floppies ) SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) SLOT_INTERFACE_END -static MACHINE_CONFIG_START(tvc_hbf) - MCFG_FD1793_ADD("fdc", XTAL_16MHz / 16) - MCFG_FLOPPY_DRIVE_ADD("fdc:0", tvc_hbf_floppies, "525qd", tvc_hbf_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("fdc:1", tvc_hbf_floppies, "525qd", tvc_hbf_device::floppy_formats) -MACHINE_CONFIG_END - ROM_START( tvc_hbf ) ROM_REGION(0x4000, "hbf", 0) ROM_DEFAULT_BIOS("basic") @@ -86,13 +80,15 @@ void tvc_hbf_device::device_reset() } //------------------------------------------------- -// device_mconfig_additions +// device_add_mconfig //------------------------------------------------- -machine_config_constructor tvc_hbf_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( tvc_hbf ); -} +MACHINE_CONFIG_MEMBER(tvc_hbf_device::device_add_mconfig) + MCFG_FD1793_ADD("fdc", XTAL_16MHz / 16) + MCFG_FLOPPY_DRIVE_ADD("fdc:0", tvc_hbf_floppies, "525qd", tvc_hbf_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fdc:1", tvc_hbf_floppies, "525qd", tvc_hbf_device::floppy_formats) +MACHINE_CONFIG_END + //------------------------------------------------- // device_rom_region diff --git a/src/devices/bus/tvc/hbf.h b/src/devices/bus/tvc/hbf.h index 6aa3bca563f..74c022c77e4 100644 --- a/src/devices/bus/tvc/hbf.h +++ b/src/devices/bus/tvc/hbf.h @@ -24,16 +24,12 @@ public: // construction/destruction tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual const tiny_rom_entry *device_rom_region() const override; - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; // tvcexp_interface overrides virtual uint8_t id_r() override { return 0x02; } // ID_A to GND, ID_B to VCC @@ -43,6 +39,8 @@ protected: virtual DECLARE_WRITE8_MEMBER(io_write) override; private: + DECLARE_FLOPPY_FORMATS( floppy_formats ); + // internal state required_device<fd1793_device> m_fdc; diff --git a/src/devices/bus/vip/vp550.cpp b/src/devices/bus/vip/vp550.cpp index 9b345c2d4d3..583089f7c0d 100644 --- a/src/devices/bus/vip/vp550.cpp +++ b/src/devices/bus/vip/vp550.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(VP550, vp550_device, "vp550", "VP-550 Super Sound") // MACHINE_CONFIG_START( vp550 ) //------------------------------------------------- -static MACHINE_CONFIG_START( vp550 ) +MACHINE_CONFIG_MEMBER( vp550_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_CDP1863_ADD(CDP1863_A_TAG, 0, 0) @@ -61,17 +61,6 @@ static MACHINE_CONFIG_START( vp550 ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor vp550_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( vp550 ); -} - - //************************************************************************** // LIVE DEVICE @@ -85,7 +74,8 @@ vp550_device::vp550_device(const machine_config &mconfig, const char *tag, devic device_t(mconfig, VP550, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_pfg_a(*this, CDP1863_A_TAG), - m_pfg_b(*this, CDP1863_B_TAG), m_sync_timer(nullptr) + m_pfg_b(*this, CDP1863_B_TAG), + m_sync_timer(nullptr) { } diff --git a/src/devices/bus/vip/vp550.h b/src/devices/bus/vip/vp550.h index ecc4b640f04..c61bf8d7e86 100644 --- a/src/devices/bus/vip/vp550.h +++ b/src/devices/bus/vip/vp550.h @@ -29,19 +29,11 @@ public: // construction/destruction vp550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - // not really public - DECLARE_WRITE8_MEMBER( octave_w ); - DECLARE_WRITE8_MEMBER( vlmna_w ); - DECLARE_WRITE8_MEMBER( vlmnb_w ); - DECLARE_WRITE8_MEMBER( sync_w ); - protected: // device-level overrides virtual void device_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + virtual void device_add_mconfig(machine_config &config) override; // device_vip_expansion_card_interface overrides virtual void vip_program_w(address_space &space, offs_t offset, uint8_t data, int cdef, int *minh) override; @@ -50,6 +42,11 @@ protected: virtual void vip_run_w(int state) override; private: + DECLARE_WRITE8_MEMBER( octave_w ); + DECLARE_WRITE8_MEMBER( vlmna_w ); + DECLARE_WRITE8_MEMBER( vlmnb_w ); + DECLARE_WRITE8_MEMBER( sync_w ); + required_device<cdp1863_device> m_pfg_a; required_device<cdp1863_device> m_pfg_b; diff --git a/src/devices/bus/vip/vp575.cpp b/src/devices/bus/vip/vp575.cpp index 163e8c53f02..9af34a16325 100644 --- a/src/devices/bus/vip/vp575.cpp +++ b/src/devices/bus/vip/vp575.cpp @@ -45,7 +45,7 @@ void vp575_device::update_interrupts() // MACHINE_CONFIG_START( vp575 ) //------------------------------------------------- -static MACHINE_CONFIG_START( vp575 ) +MACHINE_CONFIG_MEMBER( vp575_device::device_add_mconfig ) MCFG_VIP_EXPANSION_SLOT_ADD("exp1", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr) MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp1_int_w)) MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp1_dma_out_w)) @@ -73,17 +73,6 @@ static MACHINE_CONFIG_START( vp575 ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor vp575_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( vp575 ); -} - - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vip/vp575.h b/src/devices/bus/vip/vp575.h index 915d1d12725..604af9716dd 100644 --- a/src/devices/bus/vip/vp575.h +++ b/src/devices/bus/vip/vp575.h @@ -28,33 +28,10 @@ public: // construction/destruction vp575_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - // not really public - DECLARE_WRITE_LINE_MEMBER( exp1_int_w ) { m_int[0] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp2_int_w ) { m_int[1] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp3_int_w ) { m_int[2] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp4_int_w ) { m_int[3] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp5_int_w ) { m_int[4] = state; update_interrupts(); } - - DECLARE_WRITE_LINE_MEMBER( exp1_dma_out_w ) { m_dma_out[0] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp2_dma_out_w ) { m_dma_out[1] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp3_dma_out_w ) { m_dma_out[2] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp4_dma_out_w ) { m_dma_out[3] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp5_dma_out_w ) { m_dma_out[4] = state; update_interrupts(); } - - DECLARE_WRITE_LINE_MEMBER( exp1_dma_in_w ) { m_dma_in[0] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp2_dma_in_w ) { m_dma_in[1] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp3_dma_in_w ) { m_dma_in[2] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp4_dma_in_w ) { m_dma_in[3] = state; update_interrupts(); } - DECLARE_WRITE_LINE_MEMBER( exp5_dma_in_w ) { m_dma_in[4] = state; update_interrupts(); } - - void update_interrupts(); - protected: // device-level overrides virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; // device_vip_expansion_card_interface overrides virtual uint8_t vip_program_r(address_space &space, offs_t offset, int cs, int cdef, int *minh) override; @@ -74,6 +51,26 @@ protected: private: static constexpr unsigned MAX_SLOTS = 5; + DECLARE_WRITE_LINE_MEMBER( exp1_int_w ) { m_int[0] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp2_int_w ) { m_int[1] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp3_int_w ) { m_int[2] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp4_int_w ) { m_int[3] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp5_int_w ) { m_int[4] = state; update_interrupts(); } + + DECLARE_WRITE_LINE_MEMBER( exp1_dma_out_w ) { m_dma_out[0] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp2_dma_out_w ) { m_dma_out[1] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp3_dma_out_w ) { m_dma_out[2] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp4_dma_out_w ) { m_dma_out[3] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp5_dma_out_w ) { m_dma_out[4] = state; update_interrupts(); } + + DECLARE_WRITE_LINE_MEMBER( exp1_dma_in_w ) { m_dma_in[0] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp2_dma_in_w ) { m_dma_in[1] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp3_dma_in_w ) { m_dma_in[2] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp4_dma_in_w ) { m_dma_in[3] = state; update_interrupts(); } + DECLARE_WRITE_LINE_MEMBER( exp5_dma_in_w ) { m_dma_in[4] = state; update_interrupts(); } + + void update_interrupts(); + required_device_array<vip_expansion_slot_device, MAX_SLOTS> m_expansion_slot; int m_int[MAX_SLOTS]; diff --git a/src/devices/bus/vip/vp590.cpp b/src/devices/bus/vip/vp590.cpp index f829b2c8885..3b23075d47f 100644 --- a/src/devices/bus/vip/vp590.cpp +++ b/src/devices/bus/vip/vp590.cpp @@ -53,7 +53,7 @@ READ_LINE_MEMBER( vp590_device::gd_r ) // MACHINE_CONFIG_START( vp590 ) //------------------------------------------------- -static MACHINE_CONFIG_START( vp590 ) +MACHINE_CONFIG_MEMBER( vp590_device::device_add_mconfig ) MCFG_DEVICE_ADD(CDP1862_TAG, CDP1862, CPD1862_CLOCK) MCFG_CDP1861_RD_CALLBACK(DEVREADLINE(DEVICE_SELF, vp590_device, rd_r)) MCFG_CDP1861_BD_CALLBACK(DEVREADLINE(DEVICE_SELF, vp590_device, bd_r)) @@ -65,17 +65,6 @@ MACHINE_CONFIG_END //------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor vp590_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( vp590 ); -} - - -//------------------------------------------------- // INPUT_PORTS( vp590 ) //------------------------------------------------- diff --git a/src/devices/bus/vip/vp590.h b/src/devices/bus/vip/vp590.h index 9524e81b6e5..2dfdece5ab7 100644 --- a/src/devices/bus/vip/vp590.h +++ b/src/devices/bus/vip/vp590.h @@ -30,18 +30,11 @@ public: // construction/destruction vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual ioport_constructor device_input_ports() const override; - - // not really public - DECLARE_READ_LINE_MEMBER( rd_r ); - DECLARE_READ_LINE_MEMBER( bd_r ); - DECLARE_READ_LINE_MEMBER( gd_r ); - protected: // device-level overrides virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; // device_vip_expansion_card_interface overrides virtual void vip_program_w(address_space &space, offs_t offset, uint8_t data, int cdef, int *minh) override; @@ -52,6 +45,10 @@ protected: virtual int vip_ef4_r() override; private: + DECLARE_READ_LINE_MEMBER( rd_r ); + DECLARE_READ_LINE_MEMBER( bd_r ); + DECLARE_READ_LINE_MEMBER( gd_r ); + required_device<cdp1862_device> m_cgc; optional_shared_ptr<uint8_t> m_color_ram; required_ioport m_j1; diff --git a/src/devices/bus/vip/vp595.cpp b/src/devices/bus/vip/vp595.cpp index 5774af965cc..17eaf4f299c 100644 --- a/src/devices/bus/vip/vp595.cpp +++ b/src/devices/bus/vip/vp595.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(VP595, vp595_device, "vp595", "VP-595 Simple Sound") // MACHINE_CONFIG_START( vp595 ) //------------------------------------------------- -static MACHINE_CONFIG_START( vp595 ) +MACHINE_CONFIG_MEMBER( vp595_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_CDP1863_ADD(CDP1863_TAG, 0, CDP1863_XTAL) @@ -41,17 +41,6 @@ static MACHINE_CONFIG_START( vp595 ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor vp595_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( vp595 ); -} - - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vip/vp595.h b/src/devices/bus/vip/vp595.h index 5751a35e6d0..9de9c8a6071 100644 --- a/src/devices/bus/vip/vp595.h +++ b/src/devices/bus/vip/vp595.h @@ -29,12 +29,10 @@ public: // construction/destruction vp595_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - protected: // device-level overrides virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; // device_vip_expansion_card_interface overrides virtual void vip_io_w(address_space &space, offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/vip/vp620.cpp b/src/devices/bus/vip/vp620.cpp index 5a1683c5332..a6af0cdfd0e 100644 --- a/src/devices/bus/vip/vp620.cpp +++ b/src/devices/bus/vip/vp620.cpp @@ -36,23 +36,12 @@ void vp620_device::kb_w(uint8_t data) // MACHINE_CONFIG_START( vp620 ) //------------------------------------------------- -static MACHINE_CONFIG_START( vp620 ) +MACHINE_CONFIG_MEMBER( vp620_device::device_add_mconfig ) MCFG_DEVICE_ADD("keyboard", GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(PUT(vp620_device, kb_w)) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor vp620_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( vp620 ); -} - - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vip/vp620.h b/src/devices/bus/vip/vp620.h index 4917f5760da..3541db5d8e5 100644 --- a/src/devices/bus/vip/vp620.h +++ b/src/devices/bus/vip/vp620.h @@ -29,21 +29,18 @@ public: // construction/destruction vp620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - // not really public - void kb_w(uint8_t data); - protected: // device-level overrides virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; // device_vip_byteio_port_interface overrides virtual uint8_t vip_in_r() override; virtual int vip_ef4_r() override; private: + void kb_w(uint8_t data); + uint8_t m_keydata; int m_keystb; }; diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp index 3cd3a82dfbb..5f35253242e 100644 --- a/src/devices/bus/vtech/ioexp/printer.cpp +++ b/src/devices/bus/vtech/ioexp/printer.cpp @@ -24,17 +24,12 @@ DEFINE_DEVICE_TYPE(VTECH_PRINTER_INTERFACE, vtech_printer_interface_device, "vte // machine configurations //------------------------------------------------- -static MACHINE_CONFIG_START( printer_interface ) +MACHINE_CONFIG_MEMBER( vtech_printer_interface_device::device_add_mconfig ) MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(vtech_printer_interface_device, busy_w)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics") MACHINE_CONFIG_END -machine_config_constructor vtech_printer_interface_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( printer_interface ); -} - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vtech/ioexp/printer.h b/src/devices/bus/vtech/ioexp/printer.h index 8a05106bf59..013d2366528 100644 --- a/src/devices/bus/vtech/ioexp/printer.h +++ b/src/devices/bus/vtech/ioexp/printer.h @@ -29,16 +29,16 @@ public: // construction/destruction vtech_printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_WRITE_LINE_MEMBER( busy_w ); - DECLARE_READ8_MEMBER( busy_r ); - DECLARE_WRITE8_MEMBER( strobe_w ); - protected: - virtual machine_config_constructor device_mconfig_additions() const override; + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; private: + DECLARE_WRITE_LINE_MEMBER( busy_w ); + DECLARE_READ8_MEMBER( busy_r ); + DECLARE_WRITE8_MEMBER( strobe_w ); + required_device<centronics_device> m_centronics; required_device<output_latch_device> m_latch; diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp index f0cbe001471..86ce0d7a349 100644 --- a/src/devices/bus/vtech/memexp/floppy.cpp +++ b/src/devices/bus/vtech/memexp/floppy.cpp @@ -49,16 +49,12 @@ static SLOT_INTERFACE_START( laser_floppies ) SLOT_INTERFACE("525", FLOPPY_525_SSSD) SLOT_INTERFACE_END -static MACHINE_CONFIG_START( floppy_controller ) +MACHINE_CONFIG_MEMBER( vtech_floppy_controller_device::device_add_mconfig ) MCFG_MEMEXP_SLOT_ADD("mem") MCFG_FLOPPY_DRIVE_ADD("0", laser_floppies, "525", floppy_image_device::default_floppy_formats) MCFG_FLOPPY_DRIVE_ADD("1", laser_floppies, "525", floppy_image_device::default_floppy_formats) MACHINE_CONFIG_END -machine_config_constructor vtech_floppy_controller_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( floppy_controller ); -} //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vtech/memexp/floppy.h b/src/devices/bus/vtech/memexp/floppy.h index d361ca5a4fc..5c462a2279c 100644 --- a/src/devices/bus/vtech/memexp/floppy.h +++ b/src/devices/bus/vtech/memexp/floppy.h @@ -30,6 +30,13 @@ public: // construction/destruction vtech_floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +protected: + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; + virtual void device_reset() override; + +private: DECLARE_ADDRESS_MAP(map, 8); DECLARE_WRITE8_MEMBER(latch_w); @@ -37,12 +44,6 @@ public: DECLARE_READ8_MEMBER(rd_r); DECLARE_READ8_MEMBER(wpt_r); -protected: - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - virtual void device_start() override; - virtual void device_reset() override; - void index_callback(floppy_image_device *floppy, int state); void update_latching_inverter(); void flush_writes(bool keep_margin = false); diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp index 517ce26f416..0b51ccbcad6 100644 --- a/src/devices/bus/vtech/memexp/rs232.cpp +++ b/src/devices/bus/vtech/memexp/rs232.cpp @@ -35,16 +35,11 @@ const tiny_rom_entry *vtech_rs232_interface_device::device_rom_region() const // machine configurations //------------------------------------------------- -static MACHINE_CONFIG_START( rs232 ) +MACHINE_CONFIG_MEMBER( vtech_rs232_interface_device::device_add_mconfig ) MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr) MCFG_RS232_RXD_HANDLER(WRITELINE(vtech_rs232_interface_device, rs232_rx_w)) MACHINE_CONFIG_END -machine_config_constructor vtech_rs232_interface_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( rs232 ); -} - //************************************************************************** // LIVE DEVICE diff --git a/src/devices/bus/vtech/memexp/rs232.h b/src/devices/bus/vtech/memexp/rs232.h index 189653258dd..272ef41e2d6 100644 --- a/src/devices/bus/vtech/memexp/rs232.h +++ b/src/devices/bus/vtech/memexp/rs232.h @@ -27,17 +27,17 @@ public: // construction/destruction vtech_rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_WRITE_LINE_MEMBER( rs232_rx_w ); - DECLARE_READ8_MEMBER( receive_data_r ); - DECLARE_WRITE8_MEMBER( transmit_data_w ); - protected: virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; private: + DECLARE_WRITE_LINE_MEMBER( rs232_rx_w ); + DECLARE_READ8_MEMBER( receive_data_r ); + DECLARE_WRITE8_MEMBER( transmit_data_w ); + required_device<rs232_port_device> m_rs232; int m_rx; diff --git a/src/devices/bus/wangpc/lic.cpp b/src/devices/bus/wangpc/lic.cpp index 61d6ec53c2a..081bcdb7e2a 100644 --- a/src/devices/bus/wangpc/lic.cpp +++ b/src/devices/bus/wangpc/lic.cpp @@ -47,22 +47,12 @@ const tiny_rom_entry *wangpc_lic_device::device_rom_region() const //------------------------------------------------- -// MACHINE_CONFIG_START( wangpc_lic ) -//------------------------------------------------- - -static MACHINE_CONFIG_START( wangpc_lic ) -MACHINE_CONFIG_END - - -//------------------------------------------------- // machine_config_additions - device-specific // machine configurations //------------------------------------------------- -machine_config_constructor wangpc_lic_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_lic ); -} +MACHINE_CONFIG_MEMBER( wangpc_lic_device::device_add_mconfig ) +MACHINE_CONFIG_END diff --git a/src/devices/bus/wangpc/lic.h b/src/devices/bus/wangpc/lic.h index 292dd0a5aa3..f3a27f0bc77 100644 --- a/src/devices/bus/wangpc/lic.h +++ b/src/devices/bus/wangpc/lic.h @@ -28,14 +28,12 @@ public: // construction/destruction wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_mrdc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp index 2de87dc54bd..e5a0c3e0d44 100644 --- a/src/devices/bus/wangpc/lvc.cpp +++ b/src/devices/bus/wangpc/lvc.cpp @@ -116,7 +116,7 @@ WRITE_LINE_MEMBER( wangpc_lvc_device::vsync_w ) // MACHINE_CONFIG_START( wangpc_lvc ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_lvc ) +MACHINE_CONFIG_MEMBER( wangpc_lvc_device::device_add_mconfig ) MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_SCREEN_SIZE(80*8, 25*9) @@ -132,17 +132,6 @@ static MACHINE_CONFIG_START( wangpc_lvc ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_lvc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_lvc ); -} - - //************************************************************************** // INLINE HELPERS diff --git a/src/devices/bus/wangpc/lvc.h b/src/devices/bus/wangpc/lvc.h index 01f12abad83..7b4f9203007 100644 --- a/src/devices/bus/wangpc/lvc.h +++ b/src/devices/bus/wangpc/lvc.h @@ -29,17 +29,11 @@ public: // construction/destruction wangpc_lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - // not really public - MC6845_UPDATE_ROW( crtc_update_row ); - DECLARE_WRITE_LINE_MEMBER( vsync_w ); - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_mrdc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; @@ -48,6 +42,9 @@ protected: virtual void wangpcbus_aiowc_w(address_space &space, offs_t offset, uint16_t mem_mask, uint16_t data) override; private: + MC6845_UPDATE_ROW( crtc_update_row ); + DECLARE_WRITE_LINE_MEMBER( vsync_w ); + inline void set_irq(int state); required_device<mc6845_device> m_crtc; diff --git a/src/devices/bus/wangpc/mcc.cpp b/src/devices/bus/wangpc/mcc.cpp index 7a9b4f4fe33..a3c9f9c8e03 100644 --- a/src/devices/bus/wangpc/mcc.cpp +++ b/src/devices/bus/wangpc/mcc.cpp @@ -55,23 +55,12 @@ DEFINE_DEVICE_TYPE(WANGPC_MCC, wangpc_mcc_device, "wangpc_mcc", "Wang PC-PM043 M // MACHINE_CONFIG_START( wangpc_mcc ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_mcc ) +MACHINE_CONFIG_MEMBER( wangpc_mcc_device::device_add_mconfig ) MCFG_Z80SIO2_ADD(Z80SIO2_TAG, 4000000, 0, 0, 0, 0) MCFG_Z80DART_ADD(Z80DART_TAG, 4000000, 0, 0, 0, 0) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_mcc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_mcc ); -} - - //************************************************************************** // INLINE HELPERS diff --git a/src/devices/bus/wangpc/mcc.h b/src/devices/bus/wangpc/mcc.h index be716cb264f..d09f2e23cba 100644 --- a/src/devices/bus/wangpc/mcc.h +++ b/src/devices/bus/wangpc/mcc.h @@ -29,13 +29,11 @@ public: // construction/destruction wangpc_mcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_iorc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; diff --git a/src/devices/bus/wangpc/mvc.cpp b/src/devices/bus/wangpc/mvc.cpp index f4c229044c4..418b33e5b9a 100644 --- a/src/devices/bus/wangpc/mvc.cpp +++ b/src/devices/bus/wangpc/mvc.cpp @@ -136,7 +136,7 @@ WRITE_LINE_MEMBER( wangpc_mvc_device::vsync_w ) // MACHINE_CONFIG_START( wangpc_mvc ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_mvc ) +MACHINE_CONFIG_MEMBER( wangpc_mvc_device::device_add_mconfig ) MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_SCREEN_SIZE(80*10, 25*12) @@ -152,17 +152,6 @@ static MACHINE_CONFIG_START( wangpc_mvc ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_mvc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_mvc ); -} - - //************************************************************************** // INLINE HELPERS diff --git a/src/devices/bus/wangpc/mvc.h b/src/devices/bus/wangpc/mvc.h index 7ac0ac7da06..4620126c04e 100644 --- a/src/devices/bus/wangpc/mvc.h +++ b/src/devices/bus/wangpc/mvc.h @@ -29,17 +29,11 @@ public: // construction/destruction wangpc_mvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - // not really public - MC6845_UPDATE_ROW( crtc_update_row ); - DECLARE_WRITE_LINE_MEMBER( vsync_w ); - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_mrdc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; @@ -48,6 +42,9 @@ protected: virtual void wangpcbus_aiowc_w(address_space &space, offs_t offset, uint16_t mem_mask, uint16_t data) override; private: + MC6845_UPDATE_ROW( crtc_update_row ); + DECLARE_WRITE_LINE_MEMBER( vsync_w ); + inline void set_irq(int state); required_device<mc6845_device> m_crtc; diff --git a/src/devices/bus/wangpc/rtc.cpp b/src/devices/bus/wangpc/rtc.cpp index c2698bd30d4..db42d5179ee 100644 --- a/src/devices/bus/wangpc/rtc.cpp +++ b/src/devices/bus/wangpc/rtc.cpp @@ -103,7 +103,7 @@ static const z80_daisy_config wangpc_rtc_daisy_chain[] = // MACHINE_CONFIG_START( wangpc_rtc ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_rtc ) +MACHINE_CONFIG_MEMBER( wangpc_rtc_device::device_add_mconfig ) MCFG_CPU_ADD(Z80_TAG, Z80, 2000000) MCFG_Z80_DAISY_CHAIN(wangpc_rtc_daisy_chain) MCFG_CPU_PROGRAM_MAP(wangpc_rtc_mem) @@ -123,17 +123,6 @@ MACHINE_CONFIG_END //------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_rtc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_rtc ); -} - - -//------------------------------------------------- // INPUT_PORTS( wangpc_rtc ) //------------------------------------------------- diff --git a/src/devices/bus/wangpc/rtc.h b/src/devices/bus/wangpc/rtc.h index da931f80b89..d7b7dbd4058 100644 --- a/src/devices/bus/wangpc/rtc.h +++ b/src/devices/bus/wangpc/rtc.h @@ -32,15 +32,13 @@ public: // construction/destruction wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - virtual ioport_constructor device_input_ports() const override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_mrdc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp index 06934703e8f..94c84cfa8e1 100644 --- a/src/devices/bus/wangpc/tig.cpp +++ b/src/devices/bus/wangpc/tig.cpp @@ -112,7 +112,7 @@ UPD7220_DISPLAY_PIXELS_MEMBER( wangpc_tig_device::hgdc_display_pixels ) // MACHINE_CONFIG_START( wangpc_tig ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_tig ) +MACHINE_CONFIG_MEMBER( wangpc_tig_device::device_add_mconfig ) MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green()) MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, wangpc_tig_device, screen_update) MCFG_SCREEN_SIZE(80*10, 25*12) @@ -134,17 +134,6 @@ static MACHINE_CONFIG_START( wangpc_tig ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_tig_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_tig ); -} - - //************************************************************************** // LIVE DEVICE //************************************************************************** diff --git a/src/devices/bus/wangpc/tig.h b/src/devices/bus/wangpc/tig.h index 66d782cfd42..dbe2ef2c324 100644 --- a/src/devices/bus/wangpc/tig.h +++ b/src/devices/bus/wangpc/tig.h @@ -29,18 +29,12 @@ public: // construction/destruction wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); - UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_iorc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; @@ -50,6 +44,11 @@ protected: virtual bool wangpcbus_have_dack(int line) override; private: + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text ); + UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); + // internal state required_device<upd7220_device> m_hgdc0; required_device<upd7220_device> m_hgdc1; diff --git a/src/devices/bus/wangpc/wdc.cpp b/src/devices/bus/wangpc/wdc.cpp index 19e1d483fee..dee97420274 100644 --- a/src/devices/bus/wangpc/wdc.cpp +++ b/src/devices/bus/wangpc/wdc.cpp @@ -90,7 +90,7 @@ ADDRESS_MAP_END // MACHINE_CONFIG_START( wangpc_wdc ) //------------------------------------------------- -static MACHINE_CONFIG_START( wangpc_wdc ) +MACHINE_CONFIG_MEMBER( wangpc_wdc_device::device_add_mconfig ) MCFG_CPU_ADD(Z80_TAG, Z80, 2000000) // XTAL_10MHz / ? //MCFG_Z80_DAISY_CHAIN(wangpc_wdc_daisy_chain) MCFG_CPU_PROGRAM_MAP(wangpc_wdc_mem) @@ -103,17 +103,6 @@ static MACHINE_CONFIG_START( wangpc_wdc ) MACHINE_CONFIG_END -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor wangpc_wdc_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( wangpc_wdc ); -} - - //************************************************************************** // INLINE HELPERS diff --git a/src/devices/bus/wangpc/wdc.h b/src/devices/bus/wangpc/wdc.h index d665c453366..c90f23c8d15 100644 --- a/src/devices/bus/wangpc/wdc.h +++ b/src/devices/bus/wangpc/wdc.h @@ -31,10 +31,6 @@ public: // construction/destruction wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - virtual machine_config_constructor device_mconfig_additions() const override; - // not really public DECLARE_READ8_MEMBER( port_r ); DECLARE_WRITE8_MEMBER( status_w ); @@ -51,6 +47,8 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; // device_wangpcbus_card_interface overrides virtual uint16_t wangpcbus_mrdc_r(address_space &space, offs_t offset, uint16_t mem_mask) override; diff --git a/src/devices/bus/x68k/x68k_neptunex.cpp b/src/devices/bus/x68k/x68k_neptunex.cpp index 5d0ca87c09a..a1abc7bd394 100644 --- a/src/devices/bus/x68k/x68k_neptunex.cpp +++ b/src/devices/bus/x68k/x68k_neptunex.cpp @@ -5,9 +5,10 @@ */ #include "emu.h" -#include "machine/dp8390.h" #include "x68k_neptunex.h" +#include "machine/dp8390.h" + //************************************************************************** // DEVICE DEFINITIONS @@ -16,18 +17,13 @@ DEFINE_DEVICE_TYPE(X68K_NEPTUNEX, x68k_neptune_device, "x68k_neptunex", "Neptune-X") // device machine config -static MACHINE_CONFIG_START( x68k_neptunex ) +MACHINE_CONFIG_MEMBER( x68k_neptune_device::device_add_mconfig ) MCFG_DEVICE_ADD("dp8390d", DP8390D, 0) MCFG_DP8390D_IRQ_CB(WRITELINE(x68k_neptune_device, x68k_neptune_irq_w)) MCFG_DP8390D_MEM_READ_CB(READ8(x68k_neptune_device, x68k_neptune_mem_read)) MCFG_DP8390D_MEM_WRITE_CB(WRITE8(x68k_neptune_device, x68k_neptune_mem_write)) MACHINE_CONFIG_END -machine_config_constructor x68k_neptune_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( x68k_neptunex ); -} - x68k_neptune_device::x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, X68K_NEPTUNEX, tag, owner, clock) , device_x68k_expansion_card_interface(mconfig, *this) diff --git a/src/devices/bus/x68k/x68k_neptunex.h b/src/devices/bus/x68k/x68k_neptunex.h index 3fa0736dcdd..71fb9549325 100644 --- a/src/devices/bus/x68k/x68k_neptunex.h +++ b/src/devices/bus/x68k/x68k_neptunex.h @@ -27,22 +27,20 @@ public: // construction/destruction x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - DECLARE_READ8_MEMBER(x68k_neptune_mem_read); - DECLARE_WRITE8_MEMBER(x68k_neptune_mem_write); DECLARE_READ16_MEMBER(x68k_neptune_port_r); DECLARE_WRITE16_MEMBER(x68k_neptune_port_w); - void x68k_neptune_irq_w(int state); - protected: // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; private: + DECLARE_READ8_MEMBER(x68k_neptune_mem_read); + DECLARE_WRITE8_MEMBER(x68k_neptune_mem_write); + void x68k_neptune_irq_w(int state); + x68k_expansion_slot_device *m_slot; required_device<dp8390d_device> m_dp8390; diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index 2c2af217926..7bb776ac688 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -9,10 +9,12 @@ */ #include "emu.h" +#include "x68k_scsiext.h" + #include "bus/scsi/scsi.h" #include "bus/scsi/scsihd.h" #include "machine/mb89352.h" -#include "x68k_scsiext.h" + //************************************************************************** // DEVICE DEFINITIONS @@ -35,7 +37,7 @@ const tiny_rom_entry *x68k_scsiext_device::device_rom_region() const } // device machine config -static MACHINE_CONFIG_START( x68k_scsiext ) +MACHINE_CONFIG_MEMBER( x68k_scsiext_device::device_add_mconfig ) MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0) MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_0) MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE2, "harddisk", SCSIHD, SCSI_ID_1) @@ -51,11 +53,6 @@ static MACHINE_CONFIG_START( x68k_scsiext ) MCFG_MB89352A_DRQ_CB(WRITELINE(x68k_scsiext_device, drq_w)) MACHINE_CONFIG_END -machine_config_constructor x68k_scsiext_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( x68k_scsiext ); -} - x68k_scsiext_device::x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, X68K_SCSIEXT, tag, owner, clock) , device_x68k_expansion_card_interface(mconfig, *this) diff --git a/src/devices/bus/x68k/x68k_scsiext.h b/src/devices/bus/x68k/x68k_scsiext.h index b3448e25dfb..40f5b17b6ae 100644 --- a/src/devices/bus/x68k/x68k_scsiext.h +++ b/src/devices/bus/x68k/x68k_scsiext.h @@ -21,12 +21,6 @@ public: // construction/destruction x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual const tiny_rom_entry *device_rom_region() const override; - - void irq_w(int state); - void drq_w(int state); DECLARE_READ8_MEMBER(register_r); DECLARE_WRITE8_MEMBER(register_w); @@ -34,8 +28,13 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; private: + void irq_w(int state); + void drq_w(int state); + x68k_expansion_slot_device *m_slot; required_device<mb89352_device> m_spc; diff --git a/src/devices/bus/z88/flash.cpp b/src/devices/bus/z88/flash.cpp index b15d0311f67..d082b4b68d5 100644 --- a/src/devices/bus/z88/flash.cpp +++ b/src/devices/bus/z88/flash.cpp @@ -24,14 +24,6 @@ DEFINE_DEVICE_TYPE(Z88_1024K_FLASH, z88_1024k_flash_device, "z88_1024k_flash", "Z88 1024KB Flash") -//------------------------------------------------- -// MACHINE_CONFIG_START( z88_flash ) -//------------------------------------------------- - -static MACHINE_CONFIG_START(z88_flash) - MCFG_INTEL_E28F008SA_ADD(FLASH_TAG) -MACHINE_CONFIG_END - //************************************************************************** // LIVE DEVICE @@ -58,13 +50,12 @@ void z88_1024k_flash_device::device_start() //------------------------------------------------- -// device_mconfig_additions +// device_add_mconfig //------------------------------------------------- -machine_config_constructor z88_1024k_flash_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( z88_flash ); -} +MACHINE_CONFIG_MEMBER(z88_1024k_flash_device::device_add_mconfig) + MCFG_INTEL_E28F008SA_ADD(FLASH_TAG) +MACHINE_CONFIG_END /*------------------------------------------------- get_cart_base diff --git a/src/devices/bus/z88/flash.h b/src/devices/bus/z88/flash.h index b33507f059e..b26be3b515d 100644 --- a/src/devices/bus/z88/flash.h +++ b/src/devices/bus/z88/flash.h @@ -21,11 +21,9 @@ public: // construction/destruction z88_1024k_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - protected: // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; // z88cart_interface overrides |