diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2019-02-08 18:35:41 +0100 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2019-02-08 18:35:41 +0100 |
commit | c9922586a39b1325d470af995f1e8bd9ecce1be9 (patch) | |
tree | 58f3acce93d7fa18e824053f6ae09f776b14eb2f | |
parent | 17cd12e89620152835a0be986822900e4570d43b (diff) |
some more MCFG macros removal (nw)
344 files changed, 523 insertions, 551 deletions
diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp index 6885d528128..6a2f22601f0 100644 --- a/src/devices/bus/a2bus/a2eauxslot.cpp +++ b/src/devices/bus/a2bus/a2eauxslot.cpp @@ -70,11 +70,10 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char * a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock) - , m_maincpu(nullptr) + , m_maincpu(*this, finder_base::DUMMY_TAG) , m_out_irq_cb(*this) , m_out_nmi_cb(*this) , m_device(nullptr) - , m_cputag(nullptr) { } //------------------------------------------------- @@ -83,8 +82,6 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type void a2eauxslot_device::device_start() { - m_maincpu = machine().device<cpu_device>(m_cputag); - // resolve callbacks m_out_irq_cb.resolve_safe(); m_out_nmi_cb.resolve_safe(); diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h index 782ff3dfb2d..29f3339d53a 100644 --- a/src/devices/bus/a2bus/a2eauxslot.h +++ b/src/devices/bus/a2bus/a2eauxslot.h @@ -15,24 +15,6 @@ #include "a2bus.h" -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_A2EAUXSLOT_CPU(_cputag) \ - downcast<a2eauxslot_device &>(*device).set_cputag(_cputag); - -#define MCFG_A2EAUXSLOT_OUT_IRQ_CB(_devcb) \ - downcast<a2eauxslot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb); - -#define MCFG_A2EAUXSLOT_OUT_NMI_CB(_devcb) \ - downcast<a2eauxslot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb); - -#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \ - downcast<a2eauxslot_slot_device &>(*device).set_a2eauxslot_slot(_nbtag, _tag); - //************************************************************************** // TYPE DEFINITIONS @@ -45,7 +27,18 @@ class a2eauxslot_slot_device : public device_t, { public: // construction/destruction - a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <typename T> + a2eauxslot_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, char const *slottag) + : a2eauxslot_slot_device(mconfig, tag, owner, 0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + set_a2eauxslot_slot(slottag, tag); + } + + a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // device-level overrides virtual void device_start() override; @@ -74,9 +67,9 @@ public: a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // inline configuration - void set_cputag(const char *tag) { m_cputag = tag; } - template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); } + template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); } + auto out_irq_callback() { return m_out_irq_cb.bind(); } + auto out_nmi_callback() { return m_out_nmi_cb.bind(); } void add_a2eauxslot_card(device_a2eauxslot_card_interface *card); device_a2eauxslot_card_interface *get_a2eauxslot_card(); @@ -95,13 +88,12 @@ protected: virtual void device_reset() override; // internal state - cpu_device *m_maincpu; + required_device<cpu_device> m_maincpu; devcb_write_line m_out_irq_cb; devcb_write_line m_out_nmi_cb; device_a2eauxslot_card_interface *m_device; - const char *m_cputag; }; diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp index 65e22414e94..b56ef4f1786 100644 --- a/src/devices/bus/acorn/system/vdu80.cpp +++ b/src/devices/bus/acorn/system/vdu80.cpp @@ -87,13 +87,14 @@ GFXDECODE_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(acorn_vdu80_device::device_add_mconfig) - device = &SCREEN(config, m_screen, SCREEN_TYPE_RASTER); +void acorn_vdu80_device::device_add_mconfig(machine_config &config) +{ + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_color(rgb_t::white()); m_screen->set_raw(12_MHz_XTAL, 768, 132, 612, 312, 20, 270); - MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update) + m_screen->set_screen_update("mc6845", FUNC(mc6845_device::screen_update)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acorn_vdu80) + GFXDECODE(config, "gfxdecode", m_palette, gfx_acorn_vdu80); PALETTE(config, m_palette, palette_device::MONOCHROME); H46505(config, m_crtc, 2_MHz_XTAL); @@ -101,7 +102,7 @@ MACHINE_CONFIG_START(acorn_vdu80_device::device_add_mconfig) m_crtc->set_show_border_area(false); m_crtc->set_char_width(6); m_crtc->set_update_row_callback(FUNC(acorn_vdu80_device::crtc_update_row), this); -MACHINE_CONFIG_END +} const tiny_rom_entry *acorn_vdu80_device::device_rom_region() const diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index fbeacd759b3..050bd4db64f 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -130,7 +130,7 @@ MACHINE_CONFIG_START(c64_xl80_device::device_add_mconfig) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1) MCFG_SCREEN_REFRESH_RATE(50) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_c64_xl80) + GFXDECODE(config, "gfxdecode", m_palette, gfx_c64_xl80); PALETTE(config, m_palette, palette_device::MONOCHROME); H46505(config, m_crtc, XTAL(14'318'181) / 8); diff --git a/src/devices/bus/cgenie/expansion/expansion.h b/src/devices/bus/cgenie/expansion/expansion.h index d64651d8968..86c4d42d41f 100644 --- a/src/devices/bus/cgenie/expansion/expansion.h +++ b/src/devices/bus/cgenie/expansion/expansion.h @@ -42,23 +42,6 @@ // include here so drivers don't need to #include "carts.h" -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_CG_EXP_SLOT_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, CG_EXP_SLOT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(cg_exp_slot_carts, nullptr, false) - -#define MCFG_CG_EXP_SLOT_INT_HANDLER(_devcb) \ - downcast<cg_exp_slot_device &>(*device).set_int_handler(DEVCB_##_devcb); - -#define MCFG_CG_EXP_SLOT_NMI_HANDLER(_devcb) \ - downcast<cg_exp_slot_device &>(*device).set_nmi_handler(DEVCB_##_devcb); - -#define MCFG_CG_EXP_SLOT_RESET_HANDLER(_devcb) \ - downcast<cg_exp_slot_device &>(*device).set_reset_handler(DEVCB_##_devcb); - //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp index 333566eda1a..a7809731bcd 100644 --- a/src/devices/bus/comx35/clm.cpp +++ b/src/devices/bus/comx35/clm.cpp @@ -145,7 +145,7 @@ MACHINE_CONFIG_START(comx_clm_device::device_add_mconfig) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_REFRESH_RATE(50) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_comx_clm) + GFXDECODE(config, "gfxdecode", m_palette, gfx_comx_clm); PALETTE(config, m_palette, palette_device::MONOCHROME); MC6845(config, m_crtc, XTAL(14'318'181)/7); diff --git a/src/devices/bus/einstein/userport/userport.h b/src/devices/bus/einstein/userport/userport.h index 4bdbaed36d2..f5bd8dcfeb3 100644 --- a/src/devices/bus/einstein/userport/userport.h +++ b/src/devices/bus/einstein/userport/userport.h @@ -24,32 +24,32 @@ //************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_EINSTEIN_USERPORT_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, EINSTEIN_USERPORT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(einstein_userport_cards, nullptr, false) - -#define MCFG_EINSTEIN_USERPORT_BSTB_HANDLER(_devcb) \ - downcast<einstein_userport_device &>(*device).set_bstb_handler(DEVCB_##_devcb); - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** class device_einstein_userport_interface; +// supported devices +void einstein_userport_cards(device_slot_interface &device); + class einstein_userport_device : public device_t, public device_slot_interface { public: // construction/destruction + einstein_userport_device(machine_config const &mconfig, char const *tag, device_t *owner) + : einstein_userport_device(mconfig, tag, owner, (uint32_t)0) + { + option_reset(); + einstein_userport_cards(*this); + set_default_option(nullptr); + set_fixed(false); + } + einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~einstein_userport_device(); // callbacks - template <class Object> devcb_base &set_bstb_handler(Object &&cb) { return m_bstb_handler.set_callback(std::forward<Object>(cb)); } + auto bstb_handler() { return m_bstb_handler.bind(); } // called from card device DECLARE_WRITE_LINE_MEMBER( bstb_w ) { m_bstb_handler(state); } @@ -89,7 +89,4 @@ protected: // device type definition DECLARE_DEVICE_TYPE(EINSTEIN_USERPORT, einstein_userport_device) -// supported devices -void einstein_userport_cards(device_slot_interface &device); - #endif // MAME_BUS_EINSTEIN_USERPORT_USERPORT_H diff --git a/src/devices/bus/epson_sio/epson_sio.h b/src/devices/bus/epson_sio/epson_sio.h index 189e36c5bdf..5d93c42ba74 100644 --- a/src/devices/bus/epson_sio/epson_sio.h +++ b/src/devices/bus/epson_sio/epson_sio.h @@ -12,40 +12,35 @@ #pragma once - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_EPSON_SIO_ADD(_tag, _def_slot) \ - MCFG_DEVICE_ADD(_tag, EPSON_SIO, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(epson_sio_devices, _def_slot, false) - -#define MCFG_EPSON_SIO_RX(_rx) \ - downcast<epson_sio_device *>(device)->set_rx_callback(DEVCB_##_rx); - -#define MCFG_EPSON_SIO_PIN(_pin) \ - downcast<epson_sio_device *>(device)->set_pin_callback(DEVCB_##_pin); - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** class device_epson_sio_interface; +// supported devices +void epson_sio_devices(device_slot_interface &device); class epson_sio_device : public device_t, public device_slot_interface { public: // construction/destruction - epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_sio_device(machine_config const &mconfig, char const *tag, device_t *owner, char const *dflt) + : epson_sio_device(mconfig, tag, owner, (uint32_t)0) + { + option_reset(); + epson_sio_devices(*this); + set_default_option(dflt); + set_fixed(false); + } + + epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~epson_sio_device(); // callbacks - template <class Object> devcb_base &set_rx_callback(Object &&rx) { return m_write_rx.set_callback(std::forward<Object>(rx)); } - template <class Object> devcb_base &set_pin_callback(Object &&pin) { return m_write_pin.set_callback(std::forward<Object>(pin)); } + auto rx_callback() { return m_write_rx.bind(); } + auto pin_callback() { return m_write_pin.bind(); } // called from owner DECLARE_WRITE_LINE_MEMBER( tx_w ); @@ -88,9 +83,4 @@ protected: // device type definition DECLARE_DEVICE_TYPE(EPSON_SIO, epson_sio_device) - -// supported devices -void epson_sio_devices(device_slot_interface &device); - - #endif // MAME_BUS_EPSON_SIO_EPSON_SIO_H diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp index 99061f112b6..f986bb5d4c2 100644 --- a/src/devices/bus/epson_sio/pf10.cpp +++ b/src/devices/bus/epson_sio/pf10.cpp @@ -60,7 +60,8 @@ static void pf10_floppies(device_slot_interface &device) device.option_add("smd165", EPSON_SMD_165); } -MACHINE_CONFIG_START(epson_pf10_device::device_add_mconfig) +void epson_pf10_device::device_add_mconfig(machine_config &config) +{ HD6303Y(config, m_cpu, XTAL(4'915'200)); // HD63A03XF m_cpu->set_addrmap(AS_PROGRAM, &epson_pf10_device::cpu_mem); m_cpu->in_p1_cb().set(FUNC(epson_pf10_device::port1_r)); @@ -72,10 +73,10 @@ MACHINE_CONFIG_START(epson_pf10_device::device_add_mconfig) UPD765A(config, m_fdc, 4'000'000, false, true); FLOPPY_CONNECTOR(config, m_floppy, pf10_floppies, "smd165", floppy_image_device::default_floppy_formats); - MCFG_EPSON_SIO_ADD("sio", nullptr) - MCFG_EPSON_SIO_RX(WRITELINE(DEVICE_SELF, epson_pf10_device, rxc_w)) - MCFG_EPSON_SIO_PIN(WRITELINE(DEVICE_SELF, epson_pf10_device, pinc_w)) -MACHINE_CONFIG_END + EPSON_SIO(config, m_sio_output, nullptr); + m_sio_output->rx_callback().set(DEVICE_SELF, FUNC(epson_pf10_device::rxc_w)); + m_sio_output->pin_callback().set(DEVICE_SELF, FUNC(epson_pf10_device::pinc_w)); +} //************************************************************************** diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp index 037c6d9473c..1fb12a66c0e 100644 --- a/src/devices/bus/epson_sio/tf20.cpp +++ b/src/devices/bus/epson_sio/tf20.cpp @@ -86,7 +86,8 @@ static void tf20_floppies(device_slot_interface &device) device.option_add("sd320", EPSON_SD_320); } -MACHINE_CONFIG_START(epson_tf20_device::device_add_mconfig) +void epson_tf20_device::device_add_mconfig(machine_config &config) +{ Z80(config, m_cpu, XTAL_CR1 / 2); /* uPD780C */ m_cpu->set_addrmap(AS_PROGRAM, &epson_tf20_device::cpu_mem); m_cpu->set_addrmap(AS_IO, &epson_tf20_device::cpu_io); @@ -109,10 +110,10 @@ MACHINE_CONFIG_START(epson_tf20_device::device_add_mconfig) FLOPPY_CONNECTOR(config, fd, tf20_floppies, "sd320", floppy_image_device::default_floppy_formats); // serial interface to another device - MCFG_EPSON_SIO_ADD("sio", nullptr) - MCFG_EPSON_SIO_RX(WRITELINE(DEVICE_SELF, epson_tf20_device, rxc_w)) - MCFG_EPSON_SIO_PIN(WRITELINE(DEVICE_SELF, epson_tf20_device, pinc_w)) -MACHINE_CONFIG_END + EPSON_SIO(config, m_sio_output, nullptr); + m_sio_output->rx_callback().set(DEVICE_SELF, FUNC(epson_tf20_device::rxc_w)); + m_sio_output->pin_callback().set(DEVICE_SELF, FUNC(epson_tf20_device::pinc_w)); +} //************************************************************************** diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index 46e19c94ad0..b638aa37ae9 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -122,7 +122,7 @@ MACHINE_CONFIG_START(isa8_mda_device::device_add_mconfig) m_crtc->out_hsync_callback().set(FUNC(isa8_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_mda_device::vsync_changed)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pcmda) + GFXDECODE(config, "gfxdecode", m_palette, gfx_pcmda); PC_LPT(config, m_lpt); m_lpt->irq_handler().set(FUNC(isa8_mda_device::pc_cpu_line)); @@ -547,7 +547,7 @@ MACHINE_CONFIG_START(isa8_hercules_device::device_add_mconfig) m_crtc->out_hsync_callback().set(FUNC(isa8_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_mda_device::vsync_changed)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pcherc) + GFXDECODE(config, "gfxdecode", m_palette, gfx_pcherc); PC_LPT(config, m_lpt); m_lpt->irq_handler().set(FUNC(isa8_mda_device::pc_cpu_line)); diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index 96b3233a76f..4db56f5eaa4 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -172,7 +172,7 @@ MACHINE_CONFIG_START(isa8_pgc_device::device_add_mconfig) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, isa8_pgc_device, vblank_irq)) #endif - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pgc) + GFXDECODE(config, "gfxdecode", m_palette, gfx_pgc); MCFG_PALETTE_ADD( "palette", 256 ) MACHINE_CONFIG_END diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp index 841d4265a1b..3e8c708742b 100644 --- a/src/devices/bus/vic20/videopak.cpp +++ b/src/devices/bus/vic20/videopak.cpp @@ -104,7 +104,7 @@ MACHINE_CONFIG_START(vic20_video_pak_device::device_add_mconfig) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1) MCFG_SCREEN_REFRESH_RATE(50) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vic20_video_pak) + GFXDECODE(config, "gfxdecode", m_palette, gfx_vic20_video_pak); PALETTE(config, m_palette, palette_device::MONOCHROME); H46505(config, m_crtc, XTAL(14'318'181) / 8); diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp index 02b98a77e63..47a86182927 100644 --- a/src/mame/drivers/1942.cpp +++ b/src/mame/drivers/1942.cpp @@ -576,7 +576,7 @@ MACHINE_CONFIG_START(_1942_state::_1942) /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_1942); PALETTE(config, m_palette, FUNC(_1942_state::_1942_palette), 64*4+4*32*8+16*16, 256); @@ -641,7 +641,7 @@ MACHINE_CONFIG_START(_1942p_state::_1942p) /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942p) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_1942p); PALETTE(config, m_palette, FUNC(_1942p_state::_1942p_palette), 0x500, 0x400); diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp index f404a87765e..f7ba70f0cdb 100644 --- a/src/mame/drivers/1943.cpp +++ b/src/mame/drivers/1943.cpp @@ -333,7 +333,7 @@ MACHINE_CONFIG_START(_1943_state::_1943) MCFG_SCREEN_UPDATE_DRIVER(_1943_state, screen_update_1943) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_1943) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_1943); PALETTE(config, m_palette, FUNC(_1943_state::_1943_palette), 32*4+16*16+16*16+16*16, 256); // sound hardware diff --git a/src/mame/drivers/4enraya.cpp b/src/mame/drivers/4enraya.cpp index 7a05333266f..de7ff0a810b 100644 --- a/src/mame/drivers/4enraya.cpp +++ b/src/mame/drivers/4enraya.cpp @@ -487,7 +487,7 @@ MACHINE_CONFIG_START(_4enraya_state::_4enraya ) MCFG_SCREEN_UPDATE_DRIVER(_4enraya_state, screen_update_4enraya) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_4enraya) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_4enraya); PALETTE(config, m_palette, palette_device::RGB_3BIT); diff --git a/src/mame/drivers/4roses.cpp b/src/mame/drivers/4roses.cpp index 9ec63144db4..585904cc60b 100644 --- a/src/mame/drivers/4roses.cpp +++ b/src/mame/drivers/4roses.cpp @@ -472,7 +472,7 @@ MACHINE_CONFIG_START(_4roses_state::_4roses) MCFG_SCREEN_UPDATE_DRIVER(_4roses_state, screen_update_funworld) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_4roses) + GFXDECODE(config, m_gfxdecode, "palette", gfx_4roses); PALETTE(config, "palette", FUNC(_4roses_state::funworld_palette), 0x1000); diff --git a/src/mame/drivers/a51xx.cpp b/src/mame/drivers/a51xx.cpp index 7273d616ecf..b3d2d2a3521 100644 --- a/src/mame/drivers/a51xx.cpp +++ b/src/mame/drivers/a51xx.cpp @@ -142,7 +142,7 @@ MACHINE_CONFIG_START(a51xx_state::a5120) MCFG_SCREEN_UPDATE_DRIVER(a51xx_state, screen_update_a5120) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_a51xx) + GFXDECODE(config, "gfxdecode", "palette", gfx_a51xx); PALETTE(config, "palette", palette_device::MONOCHROME); MACHINE_CONFIG_END diff --git a/src/mame/drivers/ac1.cpp b/src/mame/drivers/ac1.cpp index 9d43738780f..877821ec2ff 100644 --- a/src/mame/drivers/ac1.cpp +++ b/src/mame/drivers/ac1.cpp @@ -150,7 +150,7 @@ MACHINE_CONFIG_START(ac1_state::ac1) MCFG_SCREEN_UPDATE_DRIVER(ac1_state, screen_update_ac1) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ac1 ) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ac1); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/ace.cpp b/src/mame/drivers/ace.cpp index 91c30b4ce10..97574d561b1 100644 --- a/src/mame/drivers/ace.cpp +++ b/src/mame/drivers/ace.cpp @@ -337,7 +337,7 @@ MACHINE_CONFIG_START(aceal_state::ace) MCFG_SCREEN_UPDATE_DRIVER(aceal_state, screen_update_ace) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ace) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ace); PALETTE(config, m_palette, palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/aeroboto.cpp b/src/mame/drivers/aeroboto.cpp index 45a7daa8de6..cce96b7a489 100644 --- a/src/mame/drivers/aeroboto.cpp +++ b/src/mame/drivers/aeroboto.cpp @@ -263,7 +263,7 @@ MACHINE_CONFIG_START(aeroboto_state::formatz) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, aeroboto_state, vblank_irq)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_aeroboto) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_aeroboto); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); diff --git a/src/mame/drivers/albazc.cpp b/src/mame/drivers/albazc.cpp index 649759b1b68..efd285a48ce 100644 --- a/src/mame/drivers/albazc.cpp +++ b/src/mame/drivers/albazc.cpp @@ -295,9 +295,9 @@ MACHINE_CONFIG_START(albazc_state::hanaroku) MCFG_SCREEN_UPDATE_DRIVER(albazc_state, screen_update_hanaroku) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_hanaroku) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_hanaroku); - PALETTE(config, "palette", FUNC(albazc_state::albazc_palette), 0x200); + PALETTE(config, m_palette, FUNC(albazc_state::albazc_palette), 0x200); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/albazg.cpp b/src/mame/drivers/albazg.cpp index 52c05ed8d9e..190c104741f 100644 --- a/src/mame/drivers/albazg.cpp +++ b/src/mame/drivers/albazg.cpp @@ -390,7 +390,7 @@ MACHINE_CONFIG_START(albazg_state::yumefuda) crtc.set_show_border_area(false); crtc.set_char_width(8); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_yumefuda) + GFXDECODE(config, m_gfxdecode, "palette", gfx_yumefuda); PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x80); diff --git a/src/mame/drivers/alphatpx.cpp b/src/mame/drivers/alphatpx.cpp index 4f6c6a9578c..8020a1e2543 100644 --- a/src/mame/drivers/alphatpx.cpp +++ b/src/mame/drivers/alphatpx.cpp @@ -1232,7 +1232,7 @@ MACHINE_CONFIG_START(alphatp_12_state::alphatp2) m_crtc->vsyn_callback().set_inputline("maincpu", I8085_RST65_LINE).exor(1); m_crtc->set_screen("screen"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_alphatp3) + GFXDECODE(config, "gfxdecode", m_palette, gfx_alphatp3); // sound hardware SPEAKER(config, "mono").front_center(); @@ -1309,7 +1309,7 @@ MACHINE_CONFIG_START(alphatp_34_state::alphatp3) m_crtc->vsyn_callback().set_inputline("maincpu", I8085_RST65_LINE).exor(1); m_crtc->set_screen("screen"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_alphatp3) + GFXDECODE(config, "gfxdecode", m_palette, gfx_alphatp3); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp index c218bade1b6..c8b6a3e88f7 100644 --- a/src/mame/drivers/amust.cpp +++ b/src/mame/drivers/amust.cpp @@ -447,7 +447,7 @@ MACHINE_CONFIG_START(amust_state::amust) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_amust) + GFXDECODE(config, "gfxdecode", m_palette, gfx_amust); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/anzterm.cpp b/src/mame/drivers/anzterm.cpp index c2d72c10133..5bc346ad21c 100644 --- a/src/mame/drivers/anzterm.cpp +++ b/src/mame/drivers/anzterm.cpp @@ -431,7 +431,7 @@ MACHINE_CONFIG_START(anzterm_state::anzterm) PALETTE(config, "palette", palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_anzterm) + GFXDECODE(config, "gfxdecode", "palette", gfx_anzterm); MACHINE_CONFIG_END diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp index 00c186b681b..398ddb225f1 100644 --- a/src/mame/drivers/apc.cpp +++ b/src/mame/drivers/apc.cpp @@ -991,7 +991,7 @@ MACHINE_CONFIG_START(apc_state::apc) PALETTE(config, m_palette, palette_device::BRG_3BIT); - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_apc) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_apc); UPD7220(config, m_hgdc1, 3579545); // unk clock m_hgdc1->set_addrmap(0, &apc_state::upd7220_1_map); diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp index 24d18f16582..f1422ea17a6 100644 --- a/src/mame/drivers/apple2e.cpp +++ b/src/mame/drivers/apple2e.cpp @@ -3956,7 +3956,8 @@ static void apple2eaux_cards(device_slot_interface &device) device.option_add("rw3", A2EAUX_RAMWORKS3); /* Applied Engineering RamWorks III */ } -MACHINE_CONFIG_START(apple2e_state::apple2e) +void apple2e_state::apple2e(machine_config &config) +{ /* basic machine hardware */ M6502(config, m_maincpu, 1021800); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2e_map); @@ -4052,11 +4053,11 @@ MACHINE_CONFIG_START(apple2e_state::apple2e) A2BUS_SLOT(config, "sl6", m_a2bus, apple2_cards, "diskiing"); A2BUS_SLOT(config, "sl7", m_a2bus, apple2_cards, nullptr); - MCFG_DEVICE_ADD(A2_AUXSLOT_TAG, A2EAUXSLOT, 0) - MCFG_A2EAUXSLOT_CPU("maincpu") - MCFG_A2EAUXSLOT_OUT_IRQ_CB(WRITELINE(*this, apple2e_state, a2bus_irq_w)) - MCFG_A2EAUXSLOT_OUT_NMI_CB(WRITELINE(*this, apple2e_state, a2bus_nmi_w)) - MCFG_A2EAUXSLOT_SLOT_ADD(A2_AUXSLOT_TAG, "aux", apple2eaux_cards, "ext80") // default to an extended 80-column card + A2EAUXSLOT(config, m_a2eauxslot, 0); + m_a2eauxslot->set_cputag(m_maincpu); + m_a2eauxslot->out_irq_callback().set(FUNC(apple2e_state::a2bus_irq_w)); + m_a2eauxslot->out_nmi_callback().set(FUNC(apple2e_state::a2bus_nmi_w)); + A2EAUXSLOT_SLOT(config, "aux", apple2eaux_cards, "ext80", A2_AUXSLOT_TAG); /* softlist config for baseline A2E By default, filter lists where possible to compatible disks for A2E */ @@ -4066,8 +4067,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2e) CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED); - -MACHINE_CONFIG_END +} void apple2e_state::mprof3(machine_config &config) { @@ -4076,39 +4076,44 @@ void apple2e_state::mprof3(machine_config &config) m_ram->set_default_size("128K"); } -MACHINE_CONFIG_START(apple2e_state::apple2ee) +void apple2e_state::apple2ee(machine_config &config) +{ apple2e(config); subdevice<software_list_device>("flop525_orig")->set_filter("A2EE"); // Filter list to compatible disks for this machine. M65C02(config.replace(), m_maincpu, 1021800); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2e_map); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(apple2e_state::spectred) +void apple2e_state::spectred(machine_config &config) +{ apple2e(config); - MCFG_DEVICE_ADD("keyb_mcu", I8035, XTAL(4'000'000)) /* guessed frequency */ - MCFG_DEVICE_PROGRAM_MAP(spectred_keyb_map) + i8035_device &keyb_mcu(I8035(config, "keyb_mcu", XTAL(4'000'000))); /* guessed frequency */ + keyb_mcu.set_addrmap(AS_PROGRAM, &apple2e_state::spectred_keyb_map); //TODO: implement the actual interfacing to this 8035 MCU and // and then remove the keyb CPU inherited from apple2e -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(apple2e_state::tk3000) +void apple2e_state::tk3000(machine_config &config) +{ apple2e(config); M65C02(config.replace(), m_maincpu, 1021800); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2e_map); -// MCFG_DEVICE_ADD("subcpu", Z80, 1021800) // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock -// MCFG_DEVICE_PROGRAM_MAP(tk3000_kbd_map) -MACHINE_CONFIG_END +// z80_device &subcpu(Z80(config, "subcpu", 1021800)); // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock +// subcpu.set_addrmap(AS_PROGRAM, &apple2e_state::tk3000_kbd_map); +} -MACHINE_CONFIG_START(apple2e_state::apple2ep) +void apple2e_state::apple2ep(machine_config &config) +{ apple2e(config); M65C02(config.replace(), m_maincpu, 1021800); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2e_map); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(apple2e_state::apple2c) +void apple2e_state::apple2c(machine_config &config) +{ apple2ee(config); subdevice<software_list_device>("flop525_orig")->set_filter("A2C"); // Filter list to compatible disks for this machine. @@ -4154,7 +4159,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2c) config.device_remove(A2_AUXSLOT_TAG); m_ram->set_default_size("128K").set_extra_options("128K"); -MACHINE_CONFIG_END +} static void apple2cp_set_lines(device_t *device, uint8_t lines) { @@ -4272,14 +4277,16 @@ MACHINE_CONFIG_START(apple2e_state::apple2cp) m_ram->set_default_size("128K").set_extra_options("128K, 384K, 640K, 896K, 1152K"); MACHINE_CONFIG_END -MACHINE_CONFIG_START(apple2e_state::apple2c_iwm) +void apple2e_state::apple2c_iwm(machine_config &config) +{ apple2c(config); config.device_remove("sl6"); A2BUS_IWM_FDC(config, "sl6", A2BUS_7M_CLOCK).set_onboard(m_a2bus); -MACHINE_CONFIG_END +} -MACHINE_CONFIG_START(apple2e_state::apple2c_mem) +void apple2e_state::apple2c_mem(machine_config &config) +{ apple2c(config); M65C02(config.replace(), m_maincpu, 1021800); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2c_memexp_map); @@ -4288,7 +4295,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2c_mem) A2BUS_IWM_FDC(config, "sl6", A2BUS_7M_CLOCK).set_onboard(m_a2bus); m_ram->set_default_size("128K").set_extra_options("128K, 384K, 640K, 896K, 1152K"); -MACHINE_CONFIG_END +} const applefdc_interface fdc_interface = { @@ -4344,7 +4351,8 @@ MACHINE_CONFIG_START(apple2e_state::laser128ex2) m_ram->set_default_size("128K").set_extra_options("128K, 384K, 640K, 896K, 1152K"); MACHINE_CONFIG_END -MACHINE_CONFIG_START(apple2e_state::ceci) +void apple2e_state::ceci(machine_config &config) +{ apple2e(config); config.device_remove("sl1"); config.device_remove("sl2"); @@ -4361,7 +4369,7 @@ MACHINE_CONFIG_START(apple2e_state::ceci) config.device_remove(A2_AUXSLOT_TAG); m_ram->set_default_size("64K"); -MACHINE_CONFIG_END +} /*************************************************************************** diff --git a/src/mame/drivers/apricotf.cpp b/src/mame/drivers/apricotf.cpp index a9d0cd30ad0..f94215f1183 100644 --- a/src/mame/drivers/apricotf.cpp +++ b/src/mame/drivers/apricotf.cpp @@ -363,7 +363,7 @@ MACHINE_CONFIG_START(f1_state::act_f1) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_act_f1) + GFXDECODE(config, "gfxdecode", m_palette, gfx_act_f1); /* Devices */ APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG, 0); diff --git a/src/mame/drivers/apricotp.cpp b/src/mame/drivers/apricotp.cpp index 77883f9d8ad..674fc70a5b7 100644 --- a/src/mame/drivers/apricotp.cpp +++ b/src/mame/drivers/apricotp.cpp @@ -596,7 +596,7 @@ MACHINE_CONFIG_START(fp_state::fp) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 256-1) MCFG_PALETTE_ADD("palette", 16) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_act_f1) + GFXDECODE(config, "gfxdecode", "palette", gfx_act_f1); MC6845(config, m_crtc, 4000000); m_crtc->set_screen(SCREEN_CRT_TAG); diff --git a/src/mame/drivers/aquarium.cpp b/src/mame/drivers/aquarium.cpp index ea2754444eb..bf714d07714 100644 --- a/src/mame/drivers/aquarium.cpp +++ b/src/mame/drivers/aquarium.cpp @@ -310,7 +310,7 @@ MACHINE_CONFIG_START(aquarium_state::aquarium) MCFG_SCREEN_UPDATE_DRIVER(aquarium_state, screen_update_aquarium) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_aquarium) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_aquarium); PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x1000/2); MCFG_DEVICE_ADD("spritegen", EXCELLENT_SPRITE, 0) diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp index 944b0305ad4..40b621c324f 100644 --- a/src/mame/drivers/arcadecl.cpp +++ b/src/mame/drivers/arcadecl.cpp @@ -331,7 +331,7 @@ MACHINE_CONFIG_START(sparkz_state::sparkz) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_arcadecl) + GFXDECODE(config, m_gfxdecode, "palette", gfx_arcadecl); palette_device &palette(PALETTE(config, "palette")); palette.set_format(palette_device::IRGB_1555, 512); palette.set_membits(8); diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp index c10b1ff3b35..35264d11775 100644 --- a/src/mame/drivers/arkanoid.cpp +++ b/src/mame/drivers/arkanoid.cpp @@ -1368,7 +1368,7 @@ MACHINE_CONFIG_START(arkanoid_state::arkanoid) MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_arkanoid) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_arkanoid) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_arkanoid); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ @@ -1442,7 +1442,7 @@ MACHINE_CONFIG_START(arkanoid_state::hexa) MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hexa) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_hexa); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); /* sound hardware */ @@ -1485,7 +1485,7 @@ MACHINE_CONFIG_START(arkanoid_state::brixian) MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_arkanoid) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_arkanoid); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index 5b74490ba52..eed910b7d63 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -410,7 +410,7 @@ MACHINE_CONFIG_START(atarig1_state::atarig1) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarig1) + GFXDECODE(config, m_gfxdecode, "palette", gfx_atarig1); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 1280); /* initialize the playfield */ diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index e068a84576e..5761fe7fe57 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -525,7 +525,7 @@ MACHINE_CONFIG_START(atarig42_state::atarig42) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarig42) + GFXDECODE(config, m_gfxdecode, "palette", gfx_atarig42); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarig42_state, get_playfield_tile_info, 8,8, atarig42_playfield_scan, 128,64) diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 05cbacb2387..793c2a8ca42 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -815,7 +815,7 @@ MACHINE_CONFIG_START(atarigt_state::atarigt) EEPROM_2816(config, "eeprom").lock_after_write(true); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarigt) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_atarigt); MCFG_PALETTE_ADD("palette", MRAM_ENTRIES) MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarigt_state, get_playfield_tile_info, 8,8, atarigt_playfield_scan, 128,64) diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp index eeff921d54e..e4d1ceba43d 100644 --- a/src/mame/drivers/atarigx2.cpp +++ b/src/mame/drivers/atarigx2.cpp @@ -1504,7 +1504,7 @@ MACHINE_CONFIG_START(atarigx2_state::atarigx2) EEPROM_2816(config, "eeprom").lock_after_write(true); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarigx2) + GFXDECODE(config, m_gfxdecode, "palette", gfx_atarigx2); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarigx2_state, get_playfield_tile_info, 8,8, atarigx2_playfield_scan, 128,64) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index b2fea90b635..1d779105db3 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -752,7 +752,7 @@ MACHINE_CONFIG_START(atarisy1_state::atarisy1) TIMER(config, m_yscroll_reset_timer).configure_generic(FUNC(atarisy1_state::atarisy1_reset_yscroll_callback)); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarisy1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_atarisy1); PALETTE(config, m_palette).set_format(palette_device::IRGB_4444, 1024); diff --git a/src/mame/drivers/att4425.cpp b/src/mame/drivers/att4425.cpp index 7f072b37f98..bb3914fd830 100644 --- a/src/mame/drivers/att4425.cpp +++ b/src/mame/drivers/att4425.cpp @@ -252,7 +252,7 @@ MACHINE_CONFIG_START(att4425_state::att4425) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_SIZE(720, 351) MCFG_SCREEN_VISIBLE_AREA(0, 720-1, 0, 351-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_att4425) + GFXDECODE(config, "gfxdecode", "palette", gfx_att4425); PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT); // ch.3 -- timer? diff --git a/src/mame/drivers/ax20.cpp b/src/mame/drivers/ax20.cpp index c7915de154e..e9516698360 100644 --- a/src/mame/drivers/ax20.cpp +++ b/src/mame/drivers/ax20.cpp @@ -147,7 +147,7 @@ MACHINE_CONFIG_START(ax20_state::ax20) MCFG_SCREEN_SIZE(80*8, 24*12) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*12-1) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ax20) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ax20); PALETTE(config, m_palette, palette_device::MONOCHROME); I8272A(config, m_fdc, 8'000'000, true); diff --git a/src/mame/drivers/b16.cpp b/src/mame/drivers/b16.cpp index b98ce63364b..aaa17334c7e 100644 --- a/src/mame/drivers/b16.cpp +++ b/src/mame/drivers/b16.cpp @@ -290,7 +290,7 @@ MACHINE_CONFIG_START(b16_state::b16) m_dma8237->in_memr_callback().set(FUNC(b16_state::memory_read_byte)); m_dma8237->out_memw_callback().set(FUNC(b16_state::memory_write_byte)); - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_b16) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_b16); MCFG_PALETTE_ADD(m_palette, 8) // MCFG_PALETTE_INIT_STANDARD(black_and_white) // TODO diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp index 10245224097..443da670dd9 100644 --- a/src/mame/drivers/backfire.cpp +++ b/src/mame/drivers/backfire.cpp @@ -377,7 +377,7 @@ MACHINE_CONFIG_START(backfire_state::backfire) /* video hardware */ PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_backfire) + GFXDECODE(config, "gfxdecode", m_palette, gfx_backfire); config.set_default_layout(layout_dualhsxs); MCFG_SCREEN_ADD("lscreen", RASTER) diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp index 544c71dde06..c31031e750c 100644 --- a/src/mame/drivers/badlands.cpp +++ b/src/mame/drivers/badlands.cpp @@ -459,7 +459,7 @@ MACHINE_CONFIG_START(badlands_state::badlands) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_badlands) + GFXDECODE(config, m_gfxdecode, "palette", gfx_badlands); palette_device &palette(PALETTE(config, "palette")); palette.set_format(palette_device::IRGB_1555, 256); palette.set_membits(8); diff --git a/src/mame/drivers/badlandsbl.cpp b/src/mame/drivers/badlandsbl.cpp index 257501e388b..4de71b6a8dc 100644 --- a/src/mame/drivers/badlandsbl.cpp +++ b/src/mame/drivers/badlandsbl.cpp @@ -236,7 +236,7 @@ MACHINE_CONFIG_START(badlandsbl_state::badlandsb) EEPROM_2816(config, "eeprom").lock_after_write(true); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_badlandsb) + GFXDECODE(config, m_gfxdecode, "palette", gfx_badlandsb); palette_device &palette(PALETTE(config, "palette")); palette.set_format(palette_device::IRGB_1555, 256); palette.set_membits(8); diff --git a/src/mame/drivers/banctec.cpp b/src/mame/drivers/banctec.cpp index ca00bb3ec98..7162aac96f7 100644 --- a/src/mame/drivers/banctec.cpp +++ b/src/mame/drivers/banctec.cpp @@ -155,7 +155,7 @@ MACHINE_CONFIG_START(banctec_state::banctec) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 25*8-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_banctec) + GFXDECODE(config, "gfxdecode", m_palette, gfx_banctec); r6545_1_device &crtc(R6545_1(config, "crtc", XTAL(2'000'000))); /* (?) */ crtc.set_screen("screen"); diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index f2d15cb1737..efacf459faf 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -194,7 +194,7 @@ MACHINE_CONFIG_START(batman_state::batman) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_batman) + GFXDECODE(config, "gfxdecode", "palette", gfx_batman); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); ATARI_VAD(config, m_vad, 0, m_screen); diff --git a/src/mame/drivers/battlex.cpp b/src/mame/drivers/battlex.cpp index 5d8377e2d67..4896c37c772 100644 --- a/src/mame/drivers/battlex.cpp +++ b/src/mame/drivers/battlex.cpp @@ -309,7 +309,7 @@ MACHINE_CONFIG_START(battlex_state::battlex) MCFG_SCREEN_UPDATE_DRIVER(battlex_state, screen_update_battlex) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_battlex) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_battlex); MCFG_PALETTE_ADD("palette", 64 + 128) /* sound hardware */ diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp index 32a93e03745..802ab90ed8d 100644 --- a/src/mame/drivers/bcs3.cpp +++ b/src/mame/drivers/bcs3.cpp @@ -400,7 +400,7 @@ MACHINE_CONFIG_START(bcs3_state::bcs3) MCFG_SCREEN_VISIBLE_AREA(0,28*8-1,0,12*10-1) MCFG_SCREEN_UPDATE_DRIVER(bcs3_state, screen_update_bcs3) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bcs3) + GFXDECODE(config, "gfxdecode", "palette", gfx_bcs3); PALETTE(config, "palette", palette_device::MONOCHROME); Z80CTC(config, m_ctc, XTAL(5'000'000) / 2); @@ -427,7 +427,7 @@ MACHINE_CONFIG_START(bcs3_state::bcs3a) MCFG_SCREEN_VISIBLE_AREA(0,29*8-1,0,12*10-1) MCFG_SCREEN_UPDATE_DRIVER(bcs3_state, screen_update_bcs3a) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bcs3) + GFXDECODE(config, "gfxdecode", "palette", gfx_bcs3); PALETTE(config, "palette", palette_device::MONOCHROME); Z80CTC(config, m_ctc, XTAL(7'000'000) / 2); diff --git a/src/mame/drivers/bigbord2.cpp b/src/mame/drivers/bigbord2.cpp index 3e5eb5686d2..c32d45dffe8 100644 --- a/src/mame/drivers/bigbord2.cpp +++ b/src/mame/drivers/bigbord2.cpp @@ -559,7 +559,7 @@ MACHINE_CONFIG_START(bigbord2_state::bigbord2) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(10.69425_MHz_XTAL, 700, 0, 560, 260, 0, 240) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_crt8002) + GFXDECODE(config, "gfxdecode", m_palette, gfx_crt8002); PALETTE(config, m_palette, palette_device::MONOCHROME); CLOCK(config, "ctc_clock", MAIN_CLOCK).signal_handler().set(FUNC(bigbord2_state::clock_w)); diff --git a/src/mame/drivers/bionicc.cpp b/src/mame/drivers/bionicc.cpp index c5afbeab2fd..7047b52daf5 100644 --- a/src/mame/drivers/bionicc.cpp +++ b/src/mame/drivers/bionicc.cpp @@ -418,7 +418,7 @@ MACHINE_CONFIG_START(bionicc_state::bionicc) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bionicc) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_bionicc); MCFG_DEVICE_ADD("spritegen", TIGEROAD_SPRITE, 0) diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp index 8e0ecb3e089..58c2ca104f9 100644 --- a/src/mame/drivers/blackt96.cpp +++ b/src/mame/drivers/blackt96.cpp @@ -489,7 +489,7 @@ MACHINE_CONFIG_START(blackt96_state::blackt96) audiocpu.read_c().set(FUNC(blackt96_state::blackt96_soundio_port_c_r)); audiocpu.write_c().set(FUNC(blackt96_state::blackt96_soundio_port_c_w)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_blackt96) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_blackt96); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/blmbycar.cpp b/src/mame/drivers/blmbycar.cpp index 82c428c8e57..d2d83eaa0f2 100644 --- a/src/mame/drivers/blmbycar.cpp +++ b/src/mame/drivers/blmbycar.cpp @@ -383,7 +383,7 @@ MACHINE_CONFIG_START(blmbycar_state::blmbycar) MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_blmbycar) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_blmbycar); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 0x2000); diff --git a/src/mame/drivers/blueprnt.cpp b/src/mame/drivers/blueprnt.cpp index 466ff49d3a2..b579f2f0c9e 100644 --- a/src/mame/drivers/blueprnt.cpp +++ b/src/mame/drivers/blueprnt.cpp @@ -373,7 +373,7 @@ MACHINE_CONFIG_START(blueprnt_state::blueprnt) MCFG_SCREEN_UPDATE_DRIVER(blueprnt_state, screen_update_blueprnt) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_blueprnt) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_blueprnt); PALETTE(config, m_palette, FUNC(blueprnt_state::blueprnt_palette), 128*4+8); /* sound hardware */ diff --git a/src/mame/drivers/bmjr.cpp b/src/mame/drivers/bmjr.cpp index c10079ee803..3433b79859f 100644 --- a/src/mame/drivers/bmjr.cpp +++ b/src/mame/drivers/bmjr.cpp @@ -354,7 +354,7 @@ MACHINE_CONFIG_START(bmjr_state::bmjr) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", palette_device::BRG_3BIT); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bmjr) + GFXDECODE(config, "gfxdecode", "palette", gfx_bmjr); /* Audio */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp index 3dde3fd2a43..b0fca21dd6d 100644 --- a/src/mame/drivers/bnstars.cpp +++ b/src/mame/drivers/bnstars.cpp @@ -823,7 +823,7 @@ MACHINE_CONFIG_START(bnstars_state::bnstars) config.m_minimum_quantum = attotime::from_hz(60000); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bnstars) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_bnstars); auto &palette(PALETTE(config, "palette")); palette.set_format(palette_device::xBRG_888, 0x8000); diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp index 0241777f905..689c35361e0 100644 --- a/src/mame/drivers/boogwing.cpp +++ b/src/mame/drivers/boogwing.cpp @@ -354,7 +354,7 @@ MACHINE_CONFIG_START(boogwing_state::boogwing) MCFG_SCREEN_RAW_PARAMS(MAIN_XTAL / 4, 442, 0, 320, 274, 8, 248) // same as robocop2(cninja.cpp)? verify this from real pcb. MCFG_SCREEN_UPDATE_DRIVER(boogwing_state, screen_update_boogwing) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_deco_ace, gfx_boogwing) + GFXDECODE(config, "gfxdecode", m_deco_ace, gfx_boogwing); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) MCFG_DEVICE_ADD("spriteram2", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/boxer.cpp b/src/mame/drivers/boxer.cpp index cae7b4900d1..73f44c564aa 100644 --- a/src/mame/drivers/boxer.cpp +++ b/src/mame/drivers/boxer.cpp @@ -507,7 +507,7 @@ MACHINE_CONFIG_START(boxer_state::boxer) MCFG_SCREEN_UPDATE_DRIVER(boxer_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_boxer) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_boxer); PALETTE(config, m_palette, FUNC(boxer_state::boxer_palette), 4); /* sound hardware */ diff --git a/src/mame/drivers/bsktball.cpp b/src/mame/drivers/bsktball.cpp index e20d8bf040f..b15237bf44e 100644 --- a/src/mame/drivers/bsktball.cpp +++ b/src/mame/drivers/bsktball.cpp @@ -263,7 +263,7 @@ MACHINE_CONFIG_START(bsktball_state::bsktball) MCFG_SCREEN_UPDATE_DRIVER(bsktball_state, screen_update_bsktball) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_bsktball) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_bsktball); PALETTE(config, m_palette, FUNC(bsktball_state::bsktball_palette), 2*4 + 4*4*4*4, 4); /* sound hardware */ diff --git a/src/mame/drivers/buster.cpp b/src/mame/drivers/buster.cpp index b2777b70680..89fa36f74c6 100644 --- a/src/mame/drivers/buster.cpp +++ b/src/mame/drivers/buster.cpp @@ -342,7 +342,7 @@ MACHINE_CONFIG_START(buster_state::buster) crtc.set_show_border_area(false); crtc.set_char_width(8); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_buster) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_buster); PALETTE(config, m_palette, palette_device::RGB_3BIT); diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index 8d7410041b0..72aed868eb5 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -563,7 +563,7 @@ MACHINE_CONFIG_START(bw12_state::common) MCFG_SCREEN_SIZE(640, 200) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bw12) + GFXDECODE(config, "gfxdecode", m_palette, gfx_bw12); PALETTE(config, m_palette, palette_device::MONOCHROME); MC6845(config, m_crtc, XTAL(16'000'000)/8); diff --git a/src/mame/drivers/bwing.cpp b/src/mame/drivers/bwing.cpp index 434cb86120e..55017bf66b0 100644 --- a/src/mame/drivers/bwing.cpp +++ b/src/mame/drivers/bwing.cpp @@ -391,7 +391,7 @@ MACHINE_CONFIG_START(bwing_state::bwing) MCFG_SCREEN_UPDATE_DRIVER(bwing_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bwing) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_bwing); MCFG_PALETTE_ADD("palette", 64) diff --git a/src/mame/drivers/c10.cpp b/src/mame/drivers/c10.cpp index c47ca0e0d43..d58145bc62a 100644 --- a/src/mame/drivers/c10.cpp +++ b/src/mame/drivers/c10.cpp @@ -173,7 +173,7 @@ MACHINE_CONFIG_START(c10_state::c10) MCFG_SCREEN_SIZE(640, 250) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_c10) + GFXDECODE(config, "gfxdecode", "palette", gfx_c10); PALETTE(config, "palette", palette_device::MONOCHROME); MACHINE_CONFIG_END diff --git a/src/mame/drivers/c65.cpp b/src/mame/drivers/c65.cpp index 9d92adfcf48..5c72c8d130d 100644 --- a/src/mame/drivers/c65.cpp +++ b/src/mame/drivers/c65.cpp @@ -716,7 +716,7 @@ MACHINE_CONFIG_START(c65_state::c65) MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK*4, 910, 0, 640, 262, 0, 200) // mods needed MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_c65) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_c65); PALETTE(config, m_palette, FUNC(c65_state::c65_palette), 0x100); diff --git a/src/mame/drivers/c900.cpp b/src/mame/drivers/c900.cpp index 3e969f1df97..e234993d1f5 100644 --- a/src/mame/drivers/c900.cpp +++ b/src/mame/drivers/c900.cpp @@ -100,7 +100,7 @@ MACHINE_CONFIG_START(c900_state::c900) MCFG_DEVICE_DATA_MAP(data_map) MCFG_DEVICE_IO_MAP(io_map) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_c900) + GFXDECODE(config, "gfxdecode", "palette", gfx_c900); PALETTE(config, "palette", palette_device::MONOCHROME); Z8036(config, "cio", 6'000'000); diff --git a/src/mame/drivers/cabaret.cpp b/src/mame/drivers/cabaret.cpp index ed7a8357389..b4510bf9fc2 100644 --- a/src/mame/drivers/cabaret.cpp +++ b/src/mame/drivers/cabaret.cpp @@ -397,7 +397,7 @@ MACHINE_CONFIG_START(cabaret_state::cabaret) MCFG_SCREEN_UPDATE_DRIVER(cabaret_state, screen_update_cabaret) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_cabaret) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cabaret); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); /* sound hardware */ diff --git a/src/mame/drivers/canyon.cpp b/src/mame/drivers/canyon.cpp index cbb137f3ec6..340b7c3e99d 100644 --- a/src/mame/drivers/canyon.cpp +++ b/src/mame/drivers/canyon.cpp @@ -262,7 +262,7 @@ MACHINE_CONFIG_START(canyon_state::canyon) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", m6502_device::NMI_LINE)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_canyon) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_canyon); PALETTE(config, m_palette, FUNC(canyon_state::canyon_palette), 4); /* sound hardware */ diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp index ccf36161170..402d3436611 100644 --- a/src/mame/drivers/casloopy.cpp +++ b/src/mame/drivers/casloopy.cpp @@ -539,7 +539,7 @@ MACHINE_CONFIG_START(casloopy_state::casloopy) MCFG_PALETTE_ADD("palette", 512) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty) + GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty); MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "loopy_cart") MCFG_GENERIC_EXTENSIONS("bin,ic1") diff --git a/src/mame/drivers/caswin.cpp b/src/mame/drivers/caswin.cpp index 3482f04c3e3..d9dffa9b6fd 100644 --- a/src/mame/drivers/caswin.cpp +++ b/src/mame/drivers/caswin.cpp @@ -351,7 +351,7 @@ MACHINE_CONFIG_START(caswin_state::vvillage) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vvillage) + GFXDECODE(config, m_gfxdecode, "palette", gfx_vvillage); PALETTE(config, "palette", FUNC(caswin_state::caswin_palette), 0x40); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/cball.cpp b/src/mame/drivers/cball.cpp index 9cd61182816..37c9e8f1426 100644 --- a/src/mame/drivers/cball.cpp +++ b/src/mame/drivers/cball.cpp @@ -279,7 +279,7 @@ MACHINE_CONFIG_START(cball_state::cball) MCFG_SCREEN_UPDATE_DRIVER(cball_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_cball) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cball); PALETTE(config, m_palette, FUNC(cball_state::cball_palette), 6); diff --git a/src/mame/drivers/cbasebal.cpp b/src/mame/drivers/cbasebal.cpp index c508d933452..8c22084cf2f 100644 --- a/src/mame/drivers/cbasebal.cpp +++ b/src/mame/drivers/cbasebal.cpp @@ -282,7 +282,7 @@ MACHINE_CONFIG_START(cbasebal_state::cbasebal) MCFG_SCREEN_UPDATE_DRIVER(cbasebal_state, screen_update_cbasebal) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cbasebal) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cbasebal); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024); diff --git a/src/mame/drivers/cbuster.cpp b/src/mame/drivers/cbuster.cpp index 725689db30d..0213f6ad112 100644 --- a/src/mame/drivers/cbuster.cpp +++ b/src/mame/drivers/cbuster.cpp @@ -317,7 +317,7 @@ MACHINE_CONFIG_START(cbuster_state::twocrude) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(cbuster_state, screen_update_twocrude) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cbuster) + GFXDECODE(config, "gfxdecode", m_palette, gfx_cbuster); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/cdc721.cpp b/src/mame/drivers/cdc721.cpp index d8e67681405..bec2d25e4af 100644 --- a/src/mame/drivers/cdc721.cpp +++ b/src/mame/drivers/cdc721.cpp @@ -327,7 +327,7 @@ MACHINE_CONFIG_START(cdc721_state::cdc721) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", FUNC(cdc721_state::cdc721_palette), 3); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cdc721) + GFXDECODE(config, "gfxdecode", "palette", gfx_cdc721); CRT5037(config, m_crtc, 12.936_MHz_XTAL / 8).set_char_width(8); m_crtc->set_screen("screen"); diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp index 53484f6ca0b..c2c897589e4 100644 --- a/src/mame/drivers/champbas.cpp +++ b/src/mame/drivers/champbas.cpp @@ -556,7 +556,7 @@ MACHINE_CONFIG_START(champbas_state::talbot) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_talbot) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_talbot); PALETTE(config, m_palette, FUNC(champbas_state::champbas_palette), 512, 32); /* sound hardware */ @@ -598,7 +598,7 @@ MACHINE_CONFIG_START(champbas_state::champbas) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_champbas) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_champbas); PALETTE(config, m_palette, FUNC(champbas_state::champbas_palette), 512, 32); /* sound hardware */ @@ -708,7 +708,7 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccr) MCFG_SCREEN_UPDATE_DRIVER(exctsccr_state, screen_update_exctsccr) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_exctsccr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_exctsccr); PALETTE(config, m_palette, FUNC(exctsccr_state::exctsccr_palette), 512, 32); /* sound hardware */ @@ -766,7 +766,7 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccrb) MCFG_SCREEN_UPDATE_DRIVER(exctsccr_state, screen_update_exctsccr) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_exctsccr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_exctsccr); PALETTE(config, m_palette, FUNC(exctsccr_state::exctsccr_palette), 512, 32); /* sound hardware */ diff --git a/src/mame/drivers/chanbara.cpp b/src/mame/drivers/chanbara.cpp index 4c4c8e00776..290badcd9b2 100644 --- a/src/mame/drivers/chanbara.cpp +++ b/src/mame/drivers/chanbara.cpp @@ -411,7 +411,7 @@ MACHINE_CONFIG_START(chanbara_state::chanbara) MCFG_SCREEN_UPDATE_DRIVER(chanbara_state, screen_update_chanbara) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_chanbara) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_chanbara); PALETTE(config, m_palette, FUNC(chanbara_state::chanbara_palette), 256); diff --git a/src/mame/drivers/chsuper.cpp b/src/mame/drivers/chsuper.cpp index 786db5fe8ab..3526ced0f24 100644 --- a/src/mame/drivers/chsuper.cpp +++ b/src/mame/drivers/chsuper.cpp @@ -383,7 +383,7 @@ MACHINE_CONFIG_START(chsuper_state::chsuper) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_chsuper) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_chsuper); MCFG_PALETTE_ADD("palette", 0x100) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); diff --git a/src/mame/drivers/citycon.cpp b/src/mame/drivers/citycon.cpp index 307978e89dc..5f440903871 100644 --- a/src/mame/drivers/citycon.cpp +++ b/src/mame/drivers/citycon.cpp @@ -215,7 +215,7 @@ MACHINE_CONFIG_START(citycon_state::citycon) MCFG_SCREEN_UPDATE_DRIVER(citycon_state, screen_update_citycon) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_citycon) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_citycon); PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RGBx_444, 640+1024); // 640 real palette + 1024 virtual palette /* sound hardware */ diff --git a/src/mame/drivers/clpoker.cpp b/src/mame/drivers/clpoker.cpp index 850152551e5..d80eb9e38eb 100644 --- a/src/mame/drivers/clpoker.cpp +++ b/src/mame/drivers/clpoker.cpp @@ -286,7 +286,7 @@ MACHINE_CONFIG_START(clpoker_state::clpoker) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); // HM86171 ramdac.set_addrmap(0, &clpoker_state::ramdac_map); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_clpoker) + GFXDECODE(config, m_gfxdecode, "palette", gfx_clpoker); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/cmmb.cpp b/src/mame/drivers/cmmb.cpp index ecf1a90ca71..59097e3fae0 100644 --- a/src/mame/drivers/cmmb.cpp +++ b/src/mame/drivers/cmmb.cpp @@ -433,7 +433,7 @@ MACHINE_CONFIG_START(cmmb_state::cmmb) MCFG_SCREEN_UPDATE_DRIVER(cmmb_state, screen_update_cmmb) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cmmb) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cmmb); PALETTE(config, m_palette).set_format(palette_device::RGB_332_inverted, 512); diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp index e1aadd80bfe..754914d6e9f 100644 --- a/src/mame/drivers/cninja.cpp +++ b/src/mame/drivers/cninja.cpp @@ -813,7 +813,7 @@ MACHINE_CONFIG_START(cninja_state::cninja) MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninja) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cninja) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) @@ -901,7 +901,7 @@ MACHINE_CONFIG_START(cninja_state::stoneage) MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninja) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cninja) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_VIDEO_START_OVERRIDE(cninja_state,stoneage) @@ -1000,7 +1000,7 @@ MACHINE_CONFIG_START(cninja_state::cninjabl) MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninjabl) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cninjabl) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninjabl); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) @@ -1073,7 +1073,7 @@ MACHINE_CONFIG_START(cninja_state::edrandy) MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_edrandy) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cninja) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) @@ -1165,7 +1165,7 @@ MACHINE_CONFIG_START(cninja_state::robocop2) MCFG_MACHINE_START_OVERRIDE(cninja_state,robocop2) MCFG_MACHINE_RESET_OVERRIDE(cninja_state,robocop2) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_robocop2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_robocop2); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) @@ -1258,7 +1258,7 @@ MACHINE_CONFIG_START(cninja_state::mutantf) MCFG_MACHINE_RESET_OVERRIDE(cninja_state,robocop2) MCFG_VIDEO_START_OVERRIDE(cninja_state,mutantf) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mutantf) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mutantf); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/coinmstr.cpp b/src/mame/drivers/coinmstr.cpp index 69ad7079b9f..443f1bfdab2 100644 --- a/src/mame/drivers/coinmstr.cpp +++ b/src/mame/drivers/coinmstr.cpp @@ -1281,7 +1281,7 @@ MACHINE_CONFIG_START(coinmstr_state::coinmstr) MCFG_SCREEN_UPDATE_DRIVER(coinmstr_state, screen_update_coinmstr) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_coinmstr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_coinmstr); MCFG_PALETTE_ADD("palette", 46*32*4) h46505_device &crtc(H46505(config, "crtc", 14000000 / 16)); diff --git a/src/mame/drivers/coinmvga.cpp b/src/mame/drivers/coinmvga.cpp index dc340e2f41b..00fcb00a8d7 100644 --- a/src/mame/drivers/coinmvga.cpp +++ b/src/mame/drivers/coinmvga.cpp @@ -655,8 +655,8 @@ MACHINE_CONFIG_START(coinmvga_state::coinmvga) MCFG_SCREEN_UPDATE_DRIVER(coinmvga_state, screen_update_coinmvga) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_coinmvga) - MCFG_DEVICE_ADD("gfxdecode2", GFXDECODE, "palette2", gfx_coinmvga2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_coinmvga); + GFXDECODE(config, "gfxdecode2", m_palette2, gfx_coinmvga2); MCFG_PALETTE_ADD("palette", 256) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); diff --git a/src/mame/drivers/commando.cpp b/src/mame/drivers/commando.cpp index 2400b021dda..442db94c3d1 100644 --- a/src/mame/drivers/commando.cpp +++ b/src/mame/drivers/commando.cpp @@ -274,7 +274,7 @@ MACHINE_CONFIG_START(commando_state::commando) screen.screen_vblank().append(FUNC(commando_state::vblank_irq)); screen.set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_commando) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_commando); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); BUFFERED_SPRITERAM8(config, m_spriteram); diff --git a/src/mame/drivers/compgolf.cpp b/src/mame/drivers/compgolf.cpp index 1fef8268176..bada8ab9c80 100644 --- a/src/mame/drivers/compgolf.cpp +++ b/src/mame/drivers/compgolf.cpp @@ -239,7 +239,7 @@ MACHINE_CONFIG_START(compgolf_state::compgolf) MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) PALETTE(config, m_palette, FUNC(compgolf_state::compgolf_palette), 0x100); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_compgolf) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_compgolf); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/comquest.cpp b/src/mame/drivers/comquest.cpp index f0b194811e0..0afa37d849f 100644 --- a/src/mame/drivers/comquest.cpp +++ b/src/mame/drivers/comquest.cpp @@ -256,7 +256,7 @@ MACHINE_CONFIG_START(comquest_state::comquest) MCFG_SCREEN_UPDATE_DRIVER(comquest_state, screen_update_comquest) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_comquest ) + GFXDECODE(config, "gfxdecode", "palette", gfx_comquest ); PALETTE(config, "palette", palette_device::MONOCHROME); diff --git a/src/mame/drivers/coolridr.cpp b/src/mame/drivers/coolridr.cpp index 8d4e292a40d..aea75c76552 100644 --- a/src/mame/drivers/coolridr.cpp +++ b/src/mame/drivers/coolridr.cpp @@ -3245,7 +3245,7 @@ MACHINE_CONFIG_START(coolridr_state::coolridr) io.an_port_callback<5>().set_ioport("AN5"); io.an_port_callback<6>().set_ioport("AN6"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_coolridr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_coolridr); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/copsnrob.cpp b/src/mame/drivers/copsnrob.cpp index f55533f8aa3..cff3ebf65f7 100644 --- a/src/mame/drivers/copsnrob.cpp +++ b/src/mame/drivers/copsnrob.cpp @@ -263,7 +263,7 @@ MACHINE_CONFIG_START(copsnrob_state::copsnrob) m_screen->set_screen_update(FUNC(copsnrob_state::screen_update_copsnrob)); m_screen->set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_copsnrob) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_copsnrob); PALETTE(config, m_palette, palette_device::MONOCHROME); copsnrob_audio(config); diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp index ee3487f8514..28481c68ba5 100644 --- a/src/mame/drivers/cps1.cpp +++ b/src/mame/drivers/cps1.cpp @@ -3403,7 +3403,7 @@ MACHINE_CONFIG_START(cps_state::cps1_10MHz) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp index 09f2683f708..0dc9143e303 100644 --- a/src/mame/drivers/cps2.cpp +++ b/src/mame/drivers/cps2.cpp @@ -1319,7 +1319,7 @@ MACHINE_CONFIG_START(cps2_state::cps2) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps2_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ diff --git a/src/mame/drivers/cswat.cpp b/src/mame/drivers/cswat.cpp index 2c281e6a6e7..2a9918b6ada 100644 --- a/src/mame/drivers/cswat.cpp +++ b/src/mame/drivers/cswat.cpp @@ -275,7 +275,7 @@ MACHINE_CONFIG_START(cswat_state::cswat) MCFG_SCREEN_UPDATE_DRIVER(cswat_state, screen_update_cswat) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cswat) + GFXDECODE(config, "gfxdecode", "palette", gfx_cswat); MCFG_PALETTE_ADD("palette", 4*256) /* sound hardware */ diff --git a/src/mame/drivers/cultures.cpp b/src/mame/drivers/cultures.cpp index dcf6c5e9dee..1d9f7de846b 100644 --- a/src/mame/drivers/cultures.cpp +++ b/src/mame/drivers/cultures.cpp @@ -423,7 +423,7 @@ MACHINE_CONFIG_START(cultures_state::cultures) MCFG_SCREEN_UPDATE_DRIVER(cultures_state, screen_update_cultures) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cultures) + GFXDECODE(config, m_gfxdecode, "palette", gfx_cultures); MCFG_PALETTE_ADD("palette", 0x3000/2) MCFG_PALETTE_FORMAT(xRGBRRRRGGGGBBBB_bit0) diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp index 6310ef3755d..ebf8d211bfc 100644 --- a/src/mame/drivers/cybstorm.cpp +++ b/src/mame/drivers/cybstorm.cpp @@ -242,7 +242,7 @@ MACHINE_CONFIG_START(cybstorm_state::round2) ADDRESS_MAP_BANK(config, "vadbank").set_map(&cybstorm_state::vadbank_map).set_options(ENDIANNESS_BIG, 16, 32, 0x90000); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cybstorm) + GFXDECODE(config, m_gfxdecode, "palette", gfx_cybstorm); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 32768); MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/d9final.cpp b/src/mame/drivers/d9final.cpp index ff62ed7a6fd..c91d37e472a 100644 --- a/src/mame/drivers/d9final.cpp +++ b/src/mame/drivers/d9final.cpp @@ -320,7 +320,7 @@ MACHINE_CONFIG_START(d9final_state::d9final) MCFG_SCREEN_UPDATE_DRIVER(d9final_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_d9final) + GFXDECODE(config, m_gfxdecode, "palette", gfx_d9final); PALETTE(config, "palette", palette_device::BLACK).set_format(palette_device::xBRG_444, 0x400); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/dai.cpp b/src/mame/drivers/dai.cpp index 70468505a09..e06e90ba308 100644 --- a/src/mame/drivers/dai.cpp +++ b/src/mame/drivers/dai.cpp @@ -214,7 +214,7 @@ MACHINE_CONFIG_START(dai_state::dai) MCFG_SCREEN_UPDATE_DRIVER(dai_state, screen_update_dai) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_dai) + GFXDECODE(config, "gfxdecode", m_palette, gfx_dai); PALETTE(config, m_palette, FUNC(dai_state::dai_palette), ARRAY_LENGTH(s_palette)); diff --git a/src/mame/drivers/darkseal.cpp b/src/mame/drivers/darkseal.cpp index 9cea0a5512f..836a9e017b0 100644 --- a/src/mame/drivers/darkseal.cpp +++ b/src/mame/drivers/darkseal.cpp @@ -221,7 +221,7 @@ MACHINE_CONFIG_START(darkseal_state::darkseal) MCFG_SCREEN_UPDATE_DRIVER(darkseal_state, screen_update) MCFG_SCREEN_PALETTE("colors") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_darkseal) + GFXDECODE(config, "gfxdecode", m_palette, gfx_darkseal); MCFG_PALETTE_ADD(m_palette, 2048) MCFG_DEVICE_ADD(m_spriteram, BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp index 87e2f2597c6..6addb4cf626 100644 --- a/src/mame/drivers/dassault.cpp +++ b/src/mame/drivers/dassault.cpp @@ -550,7 +550,7 @@ MACHINE_CONFIG_START(dassault_state::dassault) MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248) // same as robocop2(cninja.cpp)? verify this from real pcb. MCFG_SCREEN_UPDATE_DRIVER(dassault_state, screen_update_dassault) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dassault) + GFXDECODE(config, "gfxdecode", m_palette, gfx_dassault); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 4096); MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp index 3033a501309..b4169a16577 100644 --- a/src/mame/drivers/dblcrown.cpp +++ b/src/mame/drivers/dblcrown.cpp @@ -618,7 +618,7 @@ MACHINE_CONFIG_START(dblcrown_state::dblcrown) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_dblcrown) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_dblcrown); PALETTE(config, m_palette, FUNC(dblcrown_state::dblcrown_palette), 0x100); diff --git a/src/mame/drivers/dblewing.cpp b/src/mame/drivers/dblewing.cpp index 0998eb13958..dc7ae8b18f6 100644 --- a/src/mame/drivers/dblewing.cpp +++ b/src/mame/drivers/dblewing.cpp @@ -379,7 +379,7 @@ MACHINE_CONFIG_START(dblewing_state::dblewing) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette").set_format(palette_device::xBGR_444, 4096); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dblewing) + GFXDECODE(config, "gfxdecode", "palette", gfx_dblewing); DECO16IC(config, m_deco_tilegen, 0); m_deco_tilegen->set_split(0); diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp index 1326f7e5b6d..b4418cc9fc3 100644 --- a/src/mame/drivers/ddayjlc.cpp +++ b/src/mame/drivers/ddayjlc.cpp @@ -620,7 +620,7 @@ MACHINE_CONFIG_START(ddayjlc_state::ddayjlc) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ddayjlc_state, vblank_irq)) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_ddayjlc) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ddayjlc); PALETTE(config, m_palette, FUNC(ddayjlc_state::ddayjlc_palette), 0x200+4); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp index 83c64367d83..82ffa6910b2 100644 --- a/src/mame/drivers/deco156.cpp +++ b/src/mame/drivers/deco156.cpp @@ -345,7 +345,7 @@ MACHINE_CONFIG_START(deco156_state::hvysmsh) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(deco156_state, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hvysmsh) + GFXDECODE(config, "gfxdecode", m_palette, gfx_hvysmsh); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 1024); DECO16IC(config, m_deco_tilegen, 0); @@ -398,7 +398,7 @@ MACHINE_CONFIG_START(deco156_state::wcvol95) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(deco156_state, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hvysmsh) + GFXDECODE(config, "gfxdecode", m_palette, gfx_hvysmsh); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); DECO16IC(config, m_deco_tilegen, 0); diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp index 5491dca4557..cad7ecbe2a0 100644 --- a/src/mame/drivers/deco_ld.cpp +++ b/src/mame/drivers/deco_ld.cpp @@ -482,7 +482,7 @@ MACHINE_CONFIG_START(deco_ld_state::rblaster) /* video hardware */ MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rblaster) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rblaster); PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 0x800); //ACIA6850(config, m_acia, 0); diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp index 7f243a57b7b..3ef0719f32a 100644 --- a/src/mame/drivers/decocass.cpp +++ b/src/mame/drivers/decocass.cpp @@ -978,7 +978,7 @@ MACHINE_CONFIG_START(decocass_state::decocass) MCFG_SCREEN_UPDATE_DRIVER(decocass_state, screen_update_decocass) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_decocass) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_decocass); PALETTE(config, m_palette, FUNC(decocass_state::decocass_palette), 64, 32); /* sound hardware */ diff --git a/src/mame/drivers/destroyr.cpp b/src/mame/drivers/destroyr.cpp index bd91789eef2..d51dd8c033c 100644 --- a/src/mame/drivers/destroyr.cpp +++ b/src/mame/drivers/destroyr.cpp @@ -492,7 +492,7 @@ MACHINE_CONFIG_START(destroyr_state::destroyr) MCFG_SCREEN_UPDATE_DRIVER(destroyr_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_destroyr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_destroyr); PALETTE(config, m_palette, FUNC(destroyr_state::destroyr_palette), 8); /* sound hardware */ diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp index d1b5a66f099..1d5838668c5 100644 --- a/src/mame/drivers/dfruit.cpp +++ b/src/mame/drivers/dfruit.cpp @@ -391,7 +391,7 @@ MACHINE_CONFIG_START(dfruit_state::dfruit) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, dfruit_state, screen_vblank)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dfruit ) + GFXDECODE(config, "gfxdecode", "palette", gfx_dfruit); MCFG_PALETTE_ADD("palette", 0x100) TC0091LVC(config, m_vdp, 0); diff --git a/src/mame/drivers/dgn_beta.cpp b/src/mame/drivers/dgn_beta.cpp index 1fd84d547f9..fcbdff7c10b 100644 --- a/src/mame/drivers/dgn_beta.cpp +++ b/src/mame/drivers/dgn_beta.cpp @@ -336,7 +336,7 @@ MACHINE_CONFIG_START(dgn_beta_state::dgnbeta) MCFG_SCREEN_UPDATE_DEVICE( "crtc", hd6845_device, screen_update ) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_dgnbeta) + GFXDECODE(config, "gfxdecode", m_palette, gfx_dgnbeta); PALETTE(config, m_palette, FUNC(dgn_beta_state::dgn_beta_palette), ARRAY_LENGTH(dgnbeta_pens)); /* PIA 0 at $FC20-$FC23 I46 */ diff --git a/src/mame/drivers/dietgo.cpp b/src/mame/drivers/dietgo.cpp index 12c462f31dc..5243065a098 100644 --- a/src/mame/drivers/dietgo.cpp +++ b/src/mame/drivers/dietgo.cpp @@ -228,7 +228,7 @@ MACHINE_CONFIG_START(dietgo_state::dietgo) PALETTE(config, "palette").set_format(palette_device::xBGR_888, 1024); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dietgo) + GFXDECODE(config, "gfxdecode", "palette", gfx_dietgo); DECO16IC(config, m_deco_tilegen, 0); m_deco_tilegen->set_split(0); diff --git a/src/mame/drivers/dim68k.cpp b/src/mame/drivers/dim68k.cpp index d7c0eb6fff4..c9d74be39ab 100644 --- a/src/mame/drivers/dim68k.cpp +++ b/src/mame/drivers/dim68k.cpp @@ -324,7 +324,7 @@ MACHINE_CONFIG_START(dim68k_state::dim68k) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 250-1) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dim68k) + GFXDECODE(config, "gfxdecode", m_palette, gfx_dim68k); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/diverboy.cpp b/src/mame/drivers/diverboy.cpp index 4305aaa37e1..2d40f4bb4c9 100644 --- a/src/mame/drivers/diverboy.cpp +++ b/src/mame/drivers/diverboy.cpp @@ -284,7 +284,7 @@ MACHINE_CONFIG_START(diverboy_state::diverboy) MCFG_DEVICE_PROGRAM_MAP(snd_map) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_diverboy) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_diverboy); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp index 2a11612501c..b33825fa0f9 100644 --- a/src/mame/drivers/djboy.cpp +++ b/src/mame/drivers/djboy.cpp @@ -522,7 +522,7 @@ MACHINE_CONFIG_START(djboy_state::djboy) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, djboy_state, screen_vblank_djboy)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_djboy) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_djboy); MCFG_PALETTE_ADD("palette", 0x200) KANEKO_PANDORA(config, m_pandora, 0); diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp index 6decd6ef2c7..7540a61f0b6 100644 --- a/src/mame/drivers/dlair.cpp +++ b/src/mame/drivers/dlair.cpp @@ -785,7 +785,7 @@ MACHINE_CONFIG_START(dlair_state::dleuro) /* video hardware */ MCFG_LASERDISC_SCREEN_ADD_PAL("screen", "ld_22vp932") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_dlair) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_dlair); PALETTE(config, m_palette, FUNC(dlair_state::dleuro_palette), 16); /* sound hardware */ diff --git a/src/mame/drivers/dlair2.cpp b/src/mame/drivers/dlair2.cpp index 2b0c600ed26..2ce7003e0d7 100644 --- a/src/mame/drivers/dlair2.cpp +++ b/src/mame/drivers/dlair2.cpp @@ -200,7 +200,7 @@ MACHINE_CONFIG_START(dlair2_state::dlair2) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) MCFG_SCREEN_PALETTE("palette") -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dlair2) +// GFXDECODE(config, "gfxdecode", "palette", gfx_dlair2); PALETTE(config, "palette", FUNC(dlair2_state::dlair2_palette), 256); diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp index 6ebf6ba0dd5..0932855f1ca 100644 --- a/src/mame/drivers/dmv.cpp +++ b/src/mame/drivers/dmv.cpp @@ -798,7 +798,7 @@ void dmv_state::dmv(machine_config &config) m_screen->set_size(640, 400); m_screen->set_visarea(0, 640-1, 0, 400-1); - GFXDECODE(config, "gfxdecode", "palette", gfx_dmv); + GFXDECODE(config, "gfxdecode", m_palette, gfx_dmv); PALETTE(config, m_palette, palette_device::RGB_3BIT); config.set_default_layout(layout_dmv); diff --git a/src/mame/drivers/dooyong.cpp b/src/mame/drivers/dooyong.cpp index e14fee57396..0a7836e1d07 100644 --- a/src/mame/drivers/dooyong.cpp +++ b/src/mame/drivers/dooyong.cpp @@ -1747,7 +1747,7 @@ MACHINE_CONFIG_START(rshark_state::dooyong_68k) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(m_spriteram, buffered_spriteram16_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rshark) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rshark); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); RSHARK_ROM_TILEMAP(config, m_bg[0], m_gfxdecode, 4, "gfx5", 0x00000, "gfx6", 0x60000); @@ -1798,7 +1798,7 @@ MACHINE_CONFIG_START(popbingo_state::popbingo) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(m_spriteram, buffered_spriteram16_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_popbingo) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_popbingo); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); DOOYONG_ROM_TILEMAP(config, m_bg[0], m_gfxdecode, 1, "gfx2", 0x00000); diff --git a/src/mame/drivers/dragrace.cpp b/src/mame/drivers/dragrace.cpp index c18f42fab60..ac22a6b9920 100644 --- a/src/mame/drivers/dragrace.cpp +++ b/src/mame/drivers/dragrace.cpp @@ -291,7 +291,7 @@ MACHINE_CONFIG_START(dragrace_state::dragrace) MCFG_SCREEN_UPDATE_DRIVER(dragrace_state, screen_update_dragrace) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dragrace) + GFXDECODE(config, m_gfxdecode, "palette", gfx_dragrace); PALETTE(config, "palette", FUNC(dragrace_state::dragrace_palette), 16); /* sound hardware */ diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp index 5401e207ffb..84da2840c07 100644 --- a/src/mame/drivers/dreambal.cpp +++ b/src/mame/drivers/dreambal.cpp @@ -328,7 +328,7 @@ MACHINE_CONFIG_START(dreambal_state::dreambal) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette").set_format(palette_device::xBGR_444, 0x400/2); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dreambal) + GFXDECODE(config, "gfxdecode", "palette", gfx_dreambal); EEPROM_93C46_16BIT(config, "eeprom"); // 93lc46b diff --git a/src/mame/drivers/drw80pkr.cpp b/src/mame/drivers/drw80pkr.cpp index 6396fef640c..5ed391d45cb 100644 --- a/src/mame/drivers/drw80pkr.cpp +++ b/src/mame/drivers/drw80pkr.cpp @@ -476,7 +476,7 @@ MACHINE_CONFIG_START(drw80pkr_state::drw80pkr) MCFG_SCREEN_UPDATE_DRIVER(drw80pkr_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_drw80pkr) + GFXDECODE(config, m_gfxdecode, "palette", gfx_drw80pkr); PALETTE(config, "palette", FUNC(drw80pkr_state::drw80pkr_palette), 16 * 16); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/duet16.cpp b/src/mame/drivers/duet16.cpp index 15635af1ead..65666c6f634 100644 --- a/src/mame/drivers/duet16.cpp +++ b/src/mame/drivers/duet16.cpp @@ -426,7 +426,7 @@ MACHINE_CONFIG_START(duet16_state::duet16) MCFG_PALETTE_ADD("palette", 8) PALETTE(config, m_chrpal, palette_device::BRG_3BIT); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "chrpal", gfx_duet16) + GFXDECODE(config, "gfxdecode", m_chrpal, gfx_duet16); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp index ab06b3d80db..163ae690c7b 100644 --- a/src/mame/drivers/dunhuang.cpp +++ b/src/mame/drivers/dunhuang.cpp @@ -823,7 +823,7 @@ MACHINE_CONFIG_START(dunhuang_state::dunhuang) MCFG_SCREEN_UPDATE_DRIVER(dunhuang_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dunhuang) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_dunhuang); MCFG_PALETTE_ADD("palette", 0x100) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp index f09b7d2fd75..68ad6b8f872 100644 --- a/src/mame/drivers/dvk_kcgd.cpp +++ b/src/mame/drivers/dvk_kcgd.cpp @@ -364,7 +364,7 @@ MACHINE_CONFIG_START(kcgd_state::kcgd) PALETTE(config, m_palette, FUNC(kcgd_state::kcgd_palette), 16); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_kcgd) + GFXDECODE(config, "gfxdecode", m_palette, gfx_kcgd); #if 0 MS7004(config, m_ms7004, 0); m_ms7004->tx_handler().set("i8251kbd", FUNC(i8251_device::write_rxd)); diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index 9de0f5270ef..d6810fd7d4d 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -432,7 +432,7 @@ MACHINE_CONFIG_START(ksm_state::ksm) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ksm) + GFXDECODE(config, "gfxdecode", "palette", gfx_ksm); PALETTE(config, "palette", palette_device::MONOCHROME); PIC8259(config, m_pic8259, 0); diff --git a/src/mame/drivers/dynadice.cpp b/src/mame/drivers/dynadice.cpp index f1a30943fcf..87d8cc3757a 100644 --- a/src/mame/drivers/dynadice.cpp +++ b/src/mame/drivers/dynadice.cpp @@ -283,7 +283,7 @@ MACHINE_CONFIG_START(dynadice_state::dynadice) MCFG_SCREEN_UPDATE_DRIVER(dynadice_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_dynadice) + GFXDECODE(config, m_gfxdecode, "palette", gfx_dynadice); PALETTE(config, "palette", palette_device::BRG_3BIT); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/ec65.cpp b/src/mame/drivers/ec65.cpp index 1efcc82d158..5d34b6ad0d0 100644 --- a/src/mame/drivers/ec65.cpp +++ b/src/mame/drivers/ec65.cpp @@ -185,7 +185,7 @@ MACHINE_CONFIG_START(ec65_state::ec65) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ec65) + GFXDECODE(config, "gfxdecode", m_palette, gfx_ec65); PALETTE(config, "palette", palette_device::MONOCHROME); mc6845_device &crtc(MC6845(config, MC6845_TAG, XTAL(16'000'000) / 8)); @@ -224,7 +224,7 @@ MACHINE_CONFIG_START(ec65k_state::ec65k) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ec65) + GFXDECODE(config, "gfxdecode", "palette", gfx_ec65); PALETTE(config, "palette", palette_device::MONOCHROME); mc6845_device &crtc(MC6845(config, MC6845_TAG, XTAL(16'000'000) / 8)); diff --git a/src/mame/drivers/egghunt.cpp b/src/mame/drivers/egghunt.cpp index 41f67502fcb..3351c67b363 100644 --- a/src/mame/drivers/egghunt.cpp +++ b/src/mame/drivers/egghunt.cpp @@ -449,7 +449,7 @@ MACHINE_CONFIG_START(egghunt_state::egghunt) MCFG_SCREEN_UPDATE_DRIVER(egghunt_state, screen_update_egghunt) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_egghunt) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_egghunt); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x400); diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp index 7c7fad62101..093d47bcb0b 100644 --- a/src/mame/drivers/einstein.cpp +++ b/src/mame/drivers/einstein.cpp @@ -576,7 +576,8 @@ static void einstein_floppies(device_slot_interface &device) device.option_add("35dd", FLOPPY_35_DD); } -MACHINE_CONFIG_START(einstein_state::einstein) +void einstein_state::einstein(machine_config &config) +{ /* basic machine hardware */ Z80(config, m_maincpu, XTAL_X002 / 2); m_maincpu->set_addrmap(AS_PROGRAM, &einstein_state::einstein_mem); @@ -676,9 +677,8 @@ MACHINE_CONFIG_START(einstein_state::einstein) m_pipe->nmi_handler().set_inputline(IC_I001, INPUT_LINE_NMI); // user port - MCFG_EINSTEIN_USERPORT_ADD("user") - MCFG_EINSTEIN_USERPORT_BSTB_HANDLER(WRITELINE(IC_I063, z80pio_device, strobe_b)) -MACHINE_CONFIG_END + EINSTEIN_USERPORT(config, "user").bstb_handler().set(IC_I063, FUNC(z80pio_device::strobe_b)); +} /*************************************************************************** diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 8383a941b6a..f661dd12d49 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -402,7 +402,7 @@ MACHINE_CONFIG_START(eprom_state::eprom) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_eprom) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_eprom); MCFG_PALETTE_ADD("palette", 2048) MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, eprom_state, get_playfield_tile_info, 8,8, SCAN_COLS, 64,64) @@ -446,7 +446,7 @@ MACHINE_CONFIG_START(eprom_state::klaxp) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_eprom) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_eprom); MCFG_PALETTE_ADD("palette", 2048) MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, eprom_state, get_playfield_tile_info, 8,8, SCAN_COLS, 64,64) @@ -495,7 +495,7 @@ MACHINE_CONFIG_START(eprom_state::guts) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_guts) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_guts); MCFG_PALETTE_ADD("palette", 2048) MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, eprom_state, guts_get_playfield_tile_info, 8,8, SCAN_COLS, 64,64) diff --git a/src/mame/drivers/exedexes.cpp b/src/mame/drivers/exedexes.cpp index f7595c62a49..ca1d881d342 100644 --- a/src/mame/drivers/exedexes.cpp +++ b/src/mame/drivers/exedexes.cpp @@ -243,7 +243,7 @@ MACHINE_CONFIG_START(exedexes_state::exedexes) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram8_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_exedexes) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_exedexes); PALETTE(config, m_palette, FUNC(exedexes_state::exedexes_palette), 64*4+64*4+16*16+16*16, 256); diff --git a/src/mame/drivers/exidy.cpp b/src/mame/drivers/exidy.cpp index 7fc7b7b7ace..34409e20ef5 100644 --- a/src/mame/drivers/exidy.cpp +++ b/src/mame/drivers/exidy.cpp @@ -845,7 +845,7 @@ MACHINE_CONFIG_START(exidy_state::base) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exidy_state, exidy_vblank_interrupt) /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_exidy) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_exidy); MCFG_PALETTE_ADD("palette", 8) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/exzisus.cpp b/src/mame/drivers/exzisus.cpp index 37dc657598f..0e12ff6e76c 100644 --- a/src/mame/drivers/exzisus.cpp +++ b/src/mame/drivers/exzisus.cpp @@ -258,7 +258,7 @@ MACHINE_CONFIG_START(exzisus_state::exzisus) MCFG_SCREEN_UPDATE_DRIVER(exzisus_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_exzisus) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_exzisus); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 1024); /* sound hardware */ diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp index 9359eed0511..990199dfa34 100644 --- a/src/mame/drivers/fcrash.cpp +++ b/src/mame/drivers/fcrash.cpp @@ -2322,7 +2322,7 @@ MACHINE_CONFIG_START(cps_state::dinopic) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ @@ -2509,7 +2509,7 @@ MACHINE_CONFIG_START(cps_state::sgyxz) MCFG_SCREEN_UPDATE_DRIVER(cps_state, screen_update_fcrash) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) EEPROM_93C46_8BIT(config, "eeprom"); @@ -2636,7 +2636,7 @@ MACHINE_CONFIG_START(cps_state::punipic) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ @@ -2825,7 +2825,7 @@ MACHINE_CONFIG_START(cps_state::sf2m1) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ @@ -3206,7 +3206,7 @@ MACHINE_CONFIG_START(cps_state::slampic) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ @@ -3305,7 +3305,7 @@ MACHINE_CONFIG_START(cps_state::varthb) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps_state, screen_vblank_cps1)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1); MCFG_PALETTE_ADD("palette", 0xc00) /* sound hardware */ diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index 5aeb95cee7e..e7759684dcb 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -687,7 +687,7 @@ MACHINE_CONFIG_START(firefox_state::firefox) WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_XTAL/8/16/16/16/16)); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_firefox) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_firefox); MCFG_PALETTE_ADD("palette", 512) MCFG_LASERDISC_22VP931_ADD("laserdisc") diff --git a/src/mame/drivers/flower.cpp b/src/mame/drivers/flower.cpp index 8e55c01dc42..c24d3b523d3 100644 --- a/src/mame/drivers/flower.cpp +++ b/src/mame/drivers/flower.cpp @@ -514,7 +514,7 @@ MACHINE_CONFIG_START(flower_state::flower) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/3,384,0,288,264,16,240) // derived from Galaxian HW, 60.606060 MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flower) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_flower); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); GENERIC_LATCH_8(config, m_soundlatch); diff --git a/src/mame/drivers/flyball.cpp b/src/mame/drivers/flyball.cpp index 992fd3f8752..e4ad472dbc7 100644 --- a/src/mame/drivers/flyball.cpp +++ b/src/mame/drivers/flyball.cpp @@ -482,7 +482,7 @@ MACHINE_CONFIG_START(flyball_state::flyball) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_flyball) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_flyball); PALETTE(config, m_palette, FUNC(flyball_state::flyball_palette), 4); /* sound hardware */ diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp index 4533f45a588..074cf9209d8 100644 --- a/src/mame/drivers/fp1100.cpp +++ b/src/mame/drivers/fp1100.cpp @@ -662,7 +662,7 @@ MACHINE_CONFIG_START(fp1100_state::fp1100) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update) MCFG_PALETTE_ADD("palette", 8) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fp1100) + GFXDECODE(config, "gfxdecode", m_palette, gfx_fp1100); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/fp6000.cpp b/src/mame/drivers/fp6000.cpp index a819645df5f..e69773fdc35 100644 --- a/src/mame/drivers/fp6000.cpp +++ b/src/mame/drivers/fp6000.cpp @@ -319,7 +319,7 @@ MACHINE_CONFIG_START(fp6000_state::fp6000) MCFG_PALETTE_ADD("palette", 8) // MCFG_PALETTE_INIT(black_and_white) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fp6000) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_fp6000); MACHINE_CONFIG_END diff --git a/src/mame/drivers/freekick.cpp b/src/mame/drivers/freekick.cpp index 8c20ab4f815..2a2d7d69a08 100644 --- a/src/mame/drivers/freekick.cpp +++ b/src/mame/drivers/freekick.cpp @@ -751,7 +751,7 @@ MACHINE_CONFIG_START(freekick_state::omega) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, freekick_state, vblank_irq)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_freekick) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_freekick); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 0x200); // sound hardware @@ -789,7 +789,7 @@ MACHINE_CONFIG_START(freekick_state::base) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, freekick_state, vblank_irq)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_freekick) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_freekick); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 0x200); /* sound hardware */ diff --git a/src/mame/drivers/funkyjet.cpp b/src/mame/drivers/funkyjet.cpp index 00cda7b6019..58f4a51232c 100644 --- a/src/mame/drivers/funkyjet.cpp +++ b/src/mame/drivers/funkyjet.cpp @@ -330,7 +330,7 @@ MACHINE_CONFIG_START(funkyjet_state::funkyjet) m_deco146->soundlatch_irq_cb().set_inputline(m_audiocpu, 0); m_deco146->set_interface_scramble_interleave(); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_funkyjet) + GFXDECODE(config, "gfxdecode", "palette", gfx_funkyjet); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); DECO16IC(config, m_deco_tilegen, 0); diff --git a/src/mame/drivers/funtech.cpp b/src/mame/drivers/funtech.cpp index 01f1d63ba73..84a204ef5ed 100644 --- a/src/mame/drivers/funtech.cpp +++ b/src/mame/drivers/funtech.cpp @@ -504,7 +504,7 @@ MACHINE_CONFIG_START(fun_tech_corp_state::funtech) MCFG_SCREEN_UPDATE_DRIVER(fun_tech_corp_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_funtech) + GFXDECODE(config, m_gfxdecode, "palette", gfx_funtech); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 0x200); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp index f5424dd9c6a..514e011d34e 100644 --- a/src/mame/drivers/galaxy.cpp +++ b/src/mame/drivers/galaxy.cpp @@ -194,7 +194,7 @@ MACHINE_CONFIG_START(galaxy_state::galaxy) MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 208-1) MCFG_SCREEN_UPDATE_DRIVER(galaxy_state, screen_update_galaxy) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galaxy) + GFXDECODE(config, "gfxdecode", "palette", gfx_galaxy); PALETTE(config, "palette", palette_device::MONOCHROME); /* snapshot */ diff --git a/src/mame/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp index cc7cd4cf938..78db98130ed 100644 --- a/src/mame/drivers/galeb.cpp +++ b/src/mame/drivers/galeb.cpp @@ -178,7 +178,7 @@ MACHINE_CONFIG_START(galeb_state::galeb) MCFG_SCREEN_UPDATE_DRIVER(galeb_state, screen_update_galeb) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galeb ) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_galeb); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp index 45a9ffbc1da..ba24a13e42a 100644 --- a/src/mame/drivers/gamecstl.cpp +++ b/src/mame/drivers/gamecstl.cpp @@ -469,7 +469,7 @@ MACHINE_CONFIG_START(gamecstl_state::gamecstl) MCFG_SCREEN_UPDATE_DRIVER(gamecstl_state, screen_update_gamecstl) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cga) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cga); MCFG_PALETTE_ADD("palette", 16) diff --git a/src/mame/drivers/gatron.cpp b/src/mame/drivers/gatron.cpp index 4df60e2623f..97b5a8cc363 100644 --- a/src/mame/drivers/gatron.cpp +++ b/src/mame/drivers/gatron.cpp @@ -587,7 +587,7 @@ MACHINE_CONFIG_START(gatron_state::gat) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gat) + GFXDECODE(config, m_gfxdecode, "palette", gfx_gat); MCFG_PALETTE_ADD("palette", 8) /* sound hardware */ diff --git a/src/mame/drivers/ginganin.cpp b/src/mame/drivers/ginganin.cpp index e8953a789e4..fdd8138d393 100644 --- a/src/mame/drivers/ginganin.cpp +++ b/src/mame/drivers/ginganin.cpp @@ -269,7 +269,7 @@ MACHINE_CONFIG_START(ginganin_state::ginganin) MCFG_SCREEN_UPDATE_DRIVER(ginganin_state, screen_update_ginganin) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_ginganin) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ginganin); PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 1024); /* sound hardware */ diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp index 7bfc38be868..ee2a2b2a637 100644 --- a/src/mame/drivers/gkigt.cpp +++ b/src/mame/drivers/gkigt.cpp @@ -623,7 +623,7 @@ MACHINE_CONFIG_START(igt_gameking_state::igt_gameking) diag.rxd_handler().set("quart1", FUNC(sc28c94_device::rx_d_w)); diag.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_igt_gameking) + GFXDECODE(config, "gfxdecode", m_palette, gfx_igt_gameking); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/glass.cpp b/src/mame/drivers/glass.cpp index 89244939895..ebc754251c2 100644 --- a/src/mame/drivers/glass.cpp +++ b/src/mame/drivers/glass.cpp @@ -243,7 +243,7 @@ MACHINE_CONFIG_START(glass_state::glass) MCFG_SCREEN_UPDATE_DRIVER(glass_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_glass) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_glass); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); /* sound hardware */ diff --git a/src/mame/drivers/gluck2.cpp b/src/mame/drivers/gluck2.cpp index 66cec436edf..639f0c00609 100644 --- a/src/mame/drivers/gluck2.cpp +++ b/src/mame/drivers/gluck2.cpp @@ -505,7 +505,7 @@ MACHINE_CONFIG_START(gluck2_state::gluck2) MCFG_SCREEN_UPDATE_DRIVER(gluck2_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gluck2) + GFXDECODE(config, m_gfxdecode, "palette", gfx_gluck2); PALETTE(config, "palette", palette_device::RGB_444_PROMS, "proms", 256); mc6845_device &crtc(MC6845(config, "crtc", MASTER_CLOCK/16)); /* guess */ diff --git a/src/mame/drivers/gng.cpp b/src/mame/drivers/gng.cpp index 7103fbbdba0..98be221da28 100644 --- a/src/mame/drivers/gng.cpp +++ b/src/mame/drivers/gng.cpp @@ -408,7 +408,7 @@ MACHINE_CONFIG_START(gng_state::gng) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram8_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gng) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_gng); PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 256); diff --git a/src/mame/drivers/goindol.cpp b/src/mame/drivers/goindol.cpp index 80ad3052be6..89b9c24e2ca 100644 --- a/src/mame/drivers/goindol.cpp +++ b/src/mame/drivers/goindol.cpp @@ -256,7 +256,7 @@ MACHINE_CONFIG_START(goindol_state::goindol) MCFG_SCREEN_UPDATE_DRIVER(goindol_state, screen_update_goindol) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_goindol) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_goindol); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); /* sound hardware */ diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp index 3a659c2f8ec..8b25ace2dd7 100644 --- a/src/mame/drivers/gpworld.cpp +++ b/src/mame/drivers/gpworld.cpp @@ -513,7 +513,7 @@ MACHINE_CONFIG_START(gpworld_state::gpworld) /* video hardware */ MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gpworld) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_gpworld); MCFG_PALETTE_ADD("palette", 1024) /* sound hardware */ diff --git a/src/mame/drivers/gundealr.cpp b/src/mame/drivers/gundealr.cpp index 22b3de1f363..0fb01049bea 100644 --- a/src/mame/drivers/gundealr.cpp +++ b/src/mame/drivers/gundealr.cpp @@ -455,7 +455,7 @@ MACHINE_CONFIG_START(gundealr_state::gundealr) MCFG_SCREEN_UPDATE_DRIVER(gundealr_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gundealr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_gundealr); MCFG_PALETTE_ADD("palette", 512) /* sound hardware */ diff --git a/src/mame/drivers/gunsmoke.cpp b/src/mame/drivers/gunsmoke.cpp index 0c9f31fb998..5e04f4713b8 100644 --- a/src/mame/drivers/gunsmoke.cpp +++ b/src/mame/drivers/gunsmoke.cpp @@ -323,7 +323,7 @@ MACHINE_CONFIG_START(gunsmoke_state::gunsmoke) MCFG_SCREEN_UPDATE_DRIVER(gunsmoke_state, screen_update_gunsmoke) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_gunsmoke) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_gunsmoke); PALETTE(config, m_palette, FUNC(gunsmoke_state::gunsmoke_palette), 32*4 + 16*16 + 16*16, 256); diff --git a/src/mame/drivers/h19.cpp b/src/mame/drivers/h19.cpp index cb3f623aa9b..318014e1755 100644 --- a/src/mame/drivers/h19.cpp +++ b/src/mame/drivers/h19.cpp @@ -535,7 +535,7 @@ MACHINE_CONFIG_START(h19_state::h19) MCFG_SCREEN_SIZE(640, 250) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 250 - 1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_h19) + GFXDECODE(config, "gfxdecode", m_palette, gfx_h19); PALETTE(config, "palette", palette_device::MONOCHROME); MC6845(config, m_crtc, MC6845_CLOCK); diff --git a/src/mame/drivers/hazeltin.cpp b/src/mame/drivers/hazeltin.cpp index 7bfa7b88a54..75c456776cf 100644 --- a/src/mame/drivers/hazeltin.cpp +++ b/src/mame/drivers/hazeltin.cpp @@ -713,7 +713,7 @@ MACHINE_CONFIG_START(hazl1500_state::hazl1500) SCREEN_VTOTAL, 0, SCREEN_VTOTAL); PALETTE(config, "palette", palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hazl1500) + GFXDECODE(config, "gfxdecode", "palette", gfx_hazl1500); com8116_device &baudgen(COM8116(config, BAUDGEN_TAG, XTAL(5'068'800))); baudgen.fr_handler().set(m_uart, FUNC(ay51013_device::write_tcp)); diff --git a/src/mame/drivers/headonb.cpp b/src/mame/drivers/headonb.cpp index c63694bf47b..c3914f3003b 100644 --- a/src/mame/drivers/headonb.cpp +++ b/src/mame/drivers/headonb.cpp @@ -183,7 +183,7 @@ MACHINE_CONFIG_START(headonb_state::headonb) MCFG_SCREEN_UPDATE_DRIVER(headonb_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_headonb) + GFXDECODE(config, m_gfxdecode, "palette", gfx_headonb); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/higemaru.cpp b/src/mame/drivers/higemaru.cpp index 0465404898a..ba32983ef19 100644 --- a/src/mame/drivers/higemaru.cpp +++ b/src/mame/drivers/higemaru.cpp @@ -179,7 +179,7 @@ MACHINE_CONFIG_START(higemaru_state::higemaru) MCFG_SCREEN_UPDATE_DRIVER(higemaru_state, screen_update_higemaru) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_higemaru) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_higemaru); PALETTE(config, m_palette, FUNC(higemaru_state::higemaru_palette), 32*4+16*16, 32); diff --git a/src/mame/drivers/holeland.cpp b/src/mame/drivers/holeland.cpp index 36a44ff3566..8138b434bc7 100644 --- a/src/mame/drivers/holeland.cpp +++ b/src/mame/drivers/holeland.cpp @@ -299,7 +299,7 @@ MACHINE_CONFIG_START(holeland_state::holeland) MCFG_SCREEN_UPDATE_DRIVER(holeland_state, screen_update_holeland) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_holeland) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_holeland); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(holeland_state,holeland) @@ -380,7 +380,7 @@ MACHINE_CONFIG_START(holeland_state::crzrally) MCFG_SCREEN_UPDATE_DRIVER(holeland_state, screen_update_crzrally) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_crzrally) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_crzrally); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(holeland_state,crzrally) diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp index 281b8266ec4..22afc22a2ee 100644 --- a/src/mame/drivers/homelab.cpp +++ b/src/mame/drivers/homelab.cpp @@ -766,7 +766,7 @@ MACHINE_CONFIG_START(homelab_state::homelab) MCFG_SCREEN_UPDATE_DRIVER(homelab_state, screen_update_homelab2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homelab) + GFXDECODE(config, "gfxdecode", "palette", gfx_homelab); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ @@ -798,7 +798,7 @@ MACHINE_CONFIG_START(homelab_state::homelab3) MCFG_SCREEN_UPDATE_DRIVER(homelab_state, screen_update_homelab3) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homelab) + GFXDECODE(config, "gfxdecode", "palette", gfx_homelab); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ @@ -830,7 +830,7 @@ MACHINE_CONFIG_START(homelab_state::brailab4) MCFG_SCREEN_UPDATE_DRIVER(homelab_state, screen_update_homelab3) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homelab) + GFXDECODE(config, "gfxdecode", "palette", gfx_homelab); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/homez80.cpp b/src/mame/drivers/homez80.cpp index b5dfb30b1dd..2bb6b6fd0b1 100644 --- a/src/mame/drivers/homez80.cpp +++ b/src/mame/drivers/homez80.cpp @@ -304,7 +304,7 @@ MACHINE_CONFIG_START(homez80_state::homez80) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_homez80) + GFXDECODE(config, "gfxdecode", "palette", gfx_homez80); MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/hp9k.cpp b/src/mame/drivers/hp9k.cpp index aaa24e2c14b..533bc258fa4 100644 --- a/src/mame/drivers/hp9k.cpp +++ b/src/mame/drivers/hp9k.cpp @@ -409,7 +409,7 @@ MACHINE_CONFIG_START(hp9k_state::hp9k) MCFG_SCREEN_UPDATE_DRIVER(hp9k_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hp9k) + GFXDECODE(config, m_gfxdecode, "palette", gfx_hp9k); PALETTE(config, "palette", palette_device::MONOCHROME); MC6845(config, m_6845, XTAL(16'000'000) / 16); diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp index fbf7f7e10e6..e73246bd343 100644 --- a/src/mame/drivers/huebler.cpp +++ b/src/mame/drivers/huebler.cpp @@ -325,7 +325,7 @@ MACHINE_CONFIG_START(amu880_state::amu880) MCFG_SCREEN_UPDATE_DRIVER(amu880_state, screen_update) MCFG_SCREEN_RAW_PARAMS(9000000, 576, 0*6, 64*6, 320, 0*10, 24*10) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_amu880) + GFXDECODE(config, "gfxdecode", m_palette, gfx_amu880); PALETTE(config, m_palette, palette_device::MONOCHROME); /* devices */ diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp index 65e81988055..aaf21f4bef8 100644 --- a/src/mame/drivers/hx20.cpp +++ b/src/mame/drivers/hx20.cpp @@ -883,9 +883,10 @@ MACHINE_CONFIG_START(hx20_state::hx20) RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr); CASSETTE(config, m_cassette); - MCFG_EPSON_SIO_ADD("sio", "tf20") - MCFG_EPSON_SIO_RX(WRITELINE(*this, hx20_state, sio_rx_w)) - MCFG_EPSON_SIO_PIN(WRITELINE(*this, hx20_state, sio_pin_w)) + + EPSON_SIO(config, m_sio, "tf20"); + m_sio->rx_callback().set(FUNC(hx20_state::sio_rx_w)); + m_sio->pin_callback().set(FUNC(hx20_state::sio_pin_w)); // internal ram RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("32K"); diff --git a/src/mame/drivers/ichiban.cpp b/src/mame/drivers/ichiban.cpp index 5b2229756a1..2eb23e7a64b 100644 --- a/src/mame/drivers/ichiban.cpp +++ b/src/mame/drivers/ichiban.cpp @@ -139,7 +139,7 @@ MACHINE_CONFIG_START(ichibanjyan_state::ichibanjyan) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ichibanjyan) + GFXDECODE(config, "gfxdecode", "palette", gfx_ichibanjyan); PALETTE(config, "palette", palette_device::RGB_444_PROMS, "proms", 512); diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp index 57031d762aa..432e8e12bcd 100644 --- a/src/mame/drivers/igs011.cpp +++ b/src/mame/drivers/igs011.cpp @@ -4232,7 +4232,7 @@ void igs011_state::lhb2(machine_config &config) m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev5_timer_irq_cb), attotime::from_hz(240)); // lev5 frequency drives the music tempo -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011_hi) +// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -4247,7 +4247,7 @@ void igs011_state::nkishusp(machine_config &config) // VSync 60.0052Hz, HSync 15.620kHz -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011_hi) +// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0); } diff --git a/src/mame/drivers/intrscti.cpp b/src/mame/drivers/intrscti.cpp index 3b6afd2a03c..878c48879f6 100644 --- a/src/mame/drivers/intrscti.cpp +++ b/src/mame/drivers/intrscti.cpp @@ -210,7 +210,7 @@ MACHINE_CONFIG_START(intrscti_state::intrscti) MCFG_SCREEN_UPDATE_DRIVER(intrscti_state, screen_update_intrscti) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_intrscti) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_intrscti); MCFG_PALETTE_ADD("palette", 0x100) MACHINE_CONFIG_END diff --git a/src/mame/drivers/intv.cpp b/src/mame/drivers/intv.cpp index eb476d70154..c720e37fa20 100644 --- a/src/mame/drivers/intv.cpp +++ b/src/mame/drivers/intv.cpp @@ -544,7 +544,7 @@ MACHINE_CONFIG_START(intv_state::intvkbd) config.m_minimum_quantum = attotime::from_hz(6000); /* video hardware */ - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_intvkbd) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_intvkbd); /* crt controller */ TMS9927(config, m_crtc, XTAL(7'159'090)/8); diff --git a/src/mame/drivers/ipds.cpp b/src/mame/drivers/ipds.cpp index 7a99b8f3883..3eb42366556 100644 --- a/src/mame/drivers/ipds.cpp +++ b/src/mame/drivers/ipds.cpp @@ -147,7 +147,7 @@ MACHINE_CONFIG_START(ipds_state::ipds) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ipds) + GFXDECODE(config, "gfxdecode", m_palette, gfx_ipds); PALETTE(config, m_palette, palette_device::MONOCHROME); I8275(config, m_crtc, XTAL(19'660'800) / 4); diff --git a/src/mame/drivers/iqblock.cpp b/src/mame/drivers/iqblock.cpp index 247aeb87183..37be1574e3c 100644 --- a/src/mame/drivers/iqblock.cpp +++ b/src/mame/drivers/iqblock.cpp @@ -363,7 +363,7 @@ MACHINE_CONFIG_START(iqblock_state::iqblock) MCFG_SCREEN_UPDATE_DRIVER(iqblock_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_iqblock) + GFXDECODE(config, m_gfxdecode, "palette", gfx_iqblock); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024); /* sound hardware */ diff --git a/src/mame/drivers/irisha.cpp b/src/mame/drivers/irisha.cpp index 44527d8f855..14a579d88ec 100644 --- a/src/mame/drivers/irisha.cpp +++ b/src/mame/drivers/irisha.cpp @@ -379,7 +379,7 @@ MACHINE_CONFIG_START(irisha_state::irisha) MCFG_SCREEN_UPDATE_DRIVER(irisha_state, screen_update_irisha) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_irisha) + GFXDECODE(config, "gfxdecode", "palette", gfx_irisha); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/isbc8010.cpp b/src/mame/drivers/isbc8010.cpp index f0c7ab8f776..abc524030d8 100644 --- a/src/mame/drivers/isbc8010.cpp +++ b/src/mame/drivers/isbc8010.cpp @@ -212,7 +212,7 @@ MACHINE_CONFIG_START(isbc8010_state::isbc8010) // MCFG_SCREEN_UPDATE_DRIVER(sdk80_state, screen_update) // MCFG_SCREEN_PALETTE("palette") -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sdk80) +// GFXDECODE(config, "gfxdecode", "palette", gfx_sdk80); // MCFG_PALETTE_ADD_MONOCHROME("palette") diff --git a/src/mame/drivers/istellar.cpp b/src/mame/drivers/istellar.cpp index 9b64b5a6777..98e304c9a19 100644 --- a/src/mame/drivers/istellar.cpp +++ b/src/mame/drivers/istellar.cpp @@ -306,7 +306,7 @@ MACHINE_CONFIG_START(istellar_state::istellar) // Daphne says "TODO: get the real interstellar resistor values" PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_istellar) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_istellar); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/jalmah.cpp b/src/mame/drivers/jalmah.cpp index 92a2b710603..c501cc106c0 100644 --- a/src/mame/drivers/jalmah.cpp +++ b/src/mame/drivers/jalmah.cpp @@ -1164,7 +1164,7 @@ MACHINE_CONFIG_START(urashima_state::urashima) config.device_remove("scroll2"); config.device_remove("scroll3"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_urashima) + GFXDECODE(config, "gfxdecode", m_palette, gfx_urashima); MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(urashima_state, screen_update_urashima) diff --git a/src/mame/drivers/jonos.cpp b/src/mame/drivers/jonos.cpp index f48a6981af2..a66a3f783f2 100644 --- a/src/mame/drivers/jonos.cpp +++ b/src/mame/drivers/jonos.cpp @@ -189,7 +189,7 @@ MACHINE_CONFIG_START(jonos_state::jonos) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 287) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jonos) + GFXDECODE(config, "gfxdecode", "palette", gfx_jonos); PALETTE(config, "palette", palette_device::MONOCHROME); generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); diff --git a/src/mame/drivers/jr200.cpp b/src/mame/drivers/jr200.cpp index 364b76c4111..9998844d3c6 100644 --- a/src/mame/drivers/jr200.cpp +++ b/src/mame/drivers/jr200.cpp @@ -555,7 +555,7 @@ MACHINE_CONFIG_START(jr200_state::jr200) MCFG_SCREEN_UPDATE_DRIVER(jr200_state, screen_update_jr200) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jr200) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_jr200); PALETTE(config, m_palette, palette_device::BRG_3BIT); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/jtc.cpp b/src/mame/drivers/jtc.cpp index a51be46d499..dac98da8110 100644 --- a/src/mame/drivers/jtc.cpp +++ b/src/mame/drivers/jtc.cpp @@ -872,7 +872,7 @@ MACHINE_CONFIG_START(jtces23_state::jtces23) MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 128-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jtces23) + GFXDECODE(config, "gfxdecode", "palette", gfx_jtces23); PALETTE(config, "palette", palette_device::MONOCHROME); /* internal ram */ @@ -893,7 +893,7 @@ MACHINE_CONFIG_START(jtces40_state::jtces40) MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 192-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jtces40) + GFXDECODE(config, "gfxdecode", "palette", gfx_jtces40); PALETTE(config, "palette", FUNC(jtc_state::es40_palette), 16); /* internal ram */ diff --git a/src/mame/drivers/jubilee.cpp b/src/mame/drivers/jubilee.cpp index e15c173f5ea..bbb516f507c 100644 --- a/src/mame/drivers/jubilee.cpp +++ b/src/mame/drivers/jubilee.cpp @@ -689,7 +689,7 @@ MACHINE_CONFIG_START(jubilee_state::jubileep) MCFG_SCREEN_UPDATE_DRIVER(jubilee_state, screen_update_jubileep) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jubileep) + GFXDECODE(config, m_gfxdecode, "palette", gfx_jubileep); MCFG_PALETTE_ADD("palette",8) mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp index 2672a74cdb5..5ee07a09601 100644 --- a/src/mame/drivers/jupace.cpp +++ b/src/mame/drivers/jupace.cpp @@ -772,7 +772,7 @@ MACHINE_CONFIG_START(ace_state::ace) PALETTE(config, "palette", palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ace) + GFXDECODE(config, "gfxdecode", "palette", gfx_ace); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp index 7da361b6987..f545adb3097 100644 --- a/src/mame/drivers/kaypro.cpp +++ b/src/mame/drivers/kaypro.cpp @@ -215,7 +215,7 @@ MACHINE_CONFIG_START(kaypro_state::kayproii) MCFG_SCREEN_UPDATE_DRIVER(kaypro_state, screen_update_kayproii) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_kayproii) + GFXDECODE(config, "gfxdecode", m_palette, gfx_kayproii); PALETTE(config, m_palette, palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/kingobox.cpp b/src/mame/drivers/kingobox.cpp index 3a16c84541d..73eb076bd69 100644 --- a/src/mame/drivers/kingobox.cpp +++ b/src/mame/drivers/kingobox.cpp @@ -498,7 +498,7 @@ MACHINE_CONFIG_START(kingofb_state::kingofb) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("nmigate", input_merger_device, in_w<0>)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_kingobox) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_kingobox); PALETTE(config, m_palette, FUNC(kingofb_state::kingofb_palette), 256+8*2, 256+8); MCFG_VIDEO_START_OVERRIDE(kingofb_state,kingofb) @@ -554,7 +554,7 @@ MACHINE_CONFIG_START(kingofb_state::ringking) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("nmigate", input_merger_device, in_w<0>)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_rk) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rk); PALETTE(config, m_palette, FUNC(kingofb_state::ringking_palette), 256+8*2, 256+8); MCFG_VIDEO_START_OVERRIDE(kingofb_state,ringking) diff --git a/src/mame/drivers/koftball.cpp b/src/mame/drivers/koftball.cpp index 929b392539e..faf83ce687e 100644 --- a/src/mame/drivers/koftball.cpp +++ b/src/mame/drivers/koftball.cpp @@ -255,7 +255,7 @@ MACHINE_CONFIG_START(koftball_state::koftball) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); ramdac.set_addrmap(0, &koftball_state::ramdac_map); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_koftball) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_koftball); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/drivers/kramermc.cpp b/src/mame/drivers/kramermc.cpp index 5924c4a9ba5..a38a409effd 100644 --- a/src/mame/drivers/kramermc.cpp +++ b/src/mame/drivers/kramermc.cpp @@ -131,7 +131,7 @@ MACHINE_CONFIG_START(kramermc_state::kramermc) MCFG_SCREEN_UPDATE_DRIVER(kramermc_state, screen_update_kramermc) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_kramermc) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_kramermc); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/kyugo.cpp b/src/mame/drivers/kyugo.cpp index 0d0848182b9..8c39ed46430 100644 --- a/src/mame/drivers/kyugo.cpp +++ b/src/mame/drivers/kyugo.cpp @@ -548,7 +548,7 @@ MACHINE_CONFIG_START(kyugo_state::kyugo_base) MCFG_SCREEN_UPDATE_DRIVER(kyugo_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_kyugo) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_kyugo); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); /* sound hardware */ diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp index ce9cd40396b..bd40cefdaca 100644 --- a/src/mame/drivers/lastbank.cpp +++ b/src/mame/drivers/lastbank.cpp @@ -541,7 +541,7 @@ MACHINE_CONFIG_START(lastbank_state::lastbank) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, lastbank_state, screen_vblank)) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lastbank ) + GFXDECODE(config, "gfxdecode", "palette", gfx_lastbank ); MCFG_PALETTE_ADD("palette", 0x100) TC0091LVC(config, m_vdp, 0); diff --git a/src/mame/drivers/lemmings.cpp b/src/mame/drivers/lemmings.cpp index b7d1dac1c17..94c53c01a9e 100644 --- a/src/mame/drivers/lemmings.cpp +++ b/src/mame/drivers/lemmings.cpp @@ -235,7 +235,7 @@ MACHINE_CONFIG_START(lemmings_state::lemmings) MCFG_SCREEN_UPDATE_DRIVER(lemmings_state, screen_update_lemmings) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, lemmings_state, screen_vblank_lemmings)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lemmings) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_lemmings); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 1024); DECO_SPRITE(config, m_sprgen[0], 0); diff --git a/src/mame/drivers/llc.cpp b/src/mame/drivers/llc.cpp index 44f7e645886..92b6bd6ea58 100644 --- a/src/mame/drivers/llc.cpp +++ b/src/mame/drivers/llc.cpp @@ -219,7 +219,7 @@ MACHINE_CONFIG_START(llc_state::llc1) MCFG_SCREEN_UPDATE_DRIVER(llc_state, screen_update_llc1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_llc1) + GFXDECODE(config, "gfxdecode", "palette", gfx_llc1); PALETTE(config, "palette", palette_device::MONOCHROME); config.set_default_layout(layout_llc1); @@ -262,7 +262,7 @@ MACHINE_CONFIG_START(llc_state::llc2) MCFG_SCREEN_UPDATE_DRIVER(llc_state, screen_update_llc2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_llc2) + GFXDECODE(config, "gfxdecode", "palette", gfx_llc2); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/lsasquad.cpp b/src/mame/drivers/lsasquad.cpp index cd170439ef1..8d359da3d8a 100644 --- a/src/mame/drivers/lsasquad.cpp +++ b/src/mame/drivers/lsasquad.cpp @@ -591,7 +591,7 @@ MACHINE_CONFIG_START(lsasquad_state::lsasquad) MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_lsasquad) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lsasquad) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ @@ -654,7 +654,7 @@ MACHINE_CONFIG_START(lsasquad_state::daikaiju) MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_daikaiju) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lsasquad) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ diff --git a/src/mame/drivers/luckgrln.cpp b/src/mame/drivers/luckgrln.cpp index b0f1080b070..c83d07d8138 100644 --- a/src/mame/drivers/luckgrln.cpp +++ b/src/mame/drivers/luckgrln.cpp @@ -882,7 +882,7 @@ MACHINE_CONFIG_START(luckgrln_state::luckgrln) MCFG_SCREEN_UPDATE_DRIVER(luckgrln_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_luckgrln) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_luckgrln); MCFG_PALETTE_ADD("palette", 0x8000) SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/m3.cpp b/src/mame/drivers/m3.cpp index 265b6c67f07..d43f755a91e 100644 --- a/src/mame/drivers/m3.cpp +++ b/src/mame/drivers/m3.cpp @@ -127,7 +127,7 @@ MACHINE_CONFIG_START(m3_state::m3) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_f4disp) + GFXDECODE(config, "gfxdecode", m_palette, gfx_f4disp); PALETTE(config, m_palette, palette_device::MONOCHROME); /* Devices */ diff --git a/src/mame/drivers/m57.cpp b/src/mame/drivers/m57.cpp index d35f8a8eb30..42c2958c921 100644 --- a/src/mame/drivers/m57.cpp +++ b/src/mame/drivers/m57.cpp @@ -247,7 +247,7 @@ MACHINE_CONFIG_START(m57_state::m57) MCFG_SCREEN_UPDATE_DRIVER(m57_state, screen_update_m57) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_m57) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_m57); PALETTE(config, m_palette, FUNC(m57_state::m57_palette), 32*8+32*8, 256+16); /* sound hardware */ diff --git a/src/mame/drivers/m58.cpp b/src/mame/drivers/m58.cpp index 991ecff9372..de533cec2ec 100644 --- a/src/mame/drivers/m58.cpp +++ b/src/mame/drivers/m58.cpp @@ -200,7 +200,7 @@ MACHINE_CONFIG_START(m58_state::yard) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m58_state, irq0_line_hold) /* video hardware */ - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_yard) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_yard); PALETTE(config, m_palette, FUNC(m58_state::m58_palette), 256+256+256, 256+256+16); MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index ecc9a1744f6..5cb0767cc86 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -1971,7 +1971,7 @@ MACHINE_CONFIG_START(m72_state::rtype2) m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rtype2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); MCFG_PALETTE_ADD("palette", 512) MCFG_SCREEN_ADD("screen", RASTER) @@ -2016,7 +2016,7 @@ MACHINE_CONFIG_START(m72_state::cosmccop) // upd71059c isn't needed because the V35 has its own IRQ controller /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rtype2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); MCFG_PALETTE_ADD("palette", 512) MCFG_SCREEN_ADD("screen", RASTER) @@ -2061,7 +2061,7 @@ MACHINE_CONFIG_START(m72_state::m82) m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_majtitle) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_majtitle); MCFG_PALETTE_ADD("palette", 512) MCFG_SCREEN_ADD("screen", RASTER) @@ -2104,7 +2104,7 @@ MACHINE_CONFIG_START(m72_state::poundfor) m_upd4701[1]->set_porty_tag("TRACK1_Y"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rtype2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2); MCFG_PALETTE_ADD("palette", 512) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp index bc0317a1896..172cbb37fd6 100644 --- a/src/mame/drivers/m79152pc.cpp +++ b/src/mame/drivers/m79152pc.cpp @@ -287,7 +287,7 @@ MACHINE_CONFIG_START(m79152pc_state::m79152pc) m_screen->set_screen_update(FUNC(m79152pc_state::screen_update)); m_screen->set_palette("palette"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_m79152pc) + GFXDECODE(config, "gfxdecode", "palette", gfx_m79152pc); PALETTE(config, "palette", palette_device::MONOCHROME); pit8253_device &pit(PIT8253(config, "pit", 0)); // КР580ВИ53 diff --git a/src/mame/drivers/madmotor.cpp b/src/mame/drivers/madmotor.cpp index c46dd579df0..5f53e2f9ff0 100644 --- a/src/mame/drivers/madmotor.cpp +++ b/src/mame/drivers/madmotor.cpp @@ -279,7 +279,7 @@ MACHINE_CONFIG_START(madmotor_state::madmotor) MCFG_SCREEN_UPDATE_DRIVER(madmotor_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_madmotor) + GFXDECODE(config, "gfxdecode", "palette", gfx_madmotor); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); DECO_BAC06(config, m_tilegen[0], 0); diff --git a/src/mame/drivers/magreel.cpp b/src/mame/drivers/magreel.cpp index 3203c1be13e..968d3cce8ca 100644 --- a/src/mame/drivers/magreel.cpp +++ b/src/mame/drivers/magreel.cpp @@ -134,7 +134,7 @@ MACHINE_CONFIG_START(magreel_state::magreel) // MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240) /* generic NTSC video timing at 320x240 */ // MCFG_SCREEN_PALETTE("palette") -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_magreel) +// GFXDECODE(config, "gfxdecode", "palette", gfx_magreel); // MCFG_PALETTE_ADD("palette", 8) // MCFG_PALETTE_INIT_OWNER(magreel_state, magreel) diff --git a/src/mame/drivers/mastboyo.cpp b/src/mame/drivers/mastboyo.cpp index fbb79301379..51209ae443c 100644 --- a/src/mame/drivers/mastboyo.cpp +++ b/src/mame/drivers/mastboyo.cpp @@ -215,7 +215,7 @@ MACHINE_CONFIG_START(mastboyo_state::mastboyo) MCFG_SCREEN_UPDATE_DRIVER(mastboyo_state, screen_update_mastboyo) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mastboyo) + GFXDECODE(config, m_gfxdecode, "palette", gfx_mastboyo); PALETTE(config, "palette", FUNC(mastboyo_state::mastboyo_palette), 256); diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp index ec28a100db7..7f25fc50f78 100644 --- a/src/mame/drivers/mbc200.cpp +++ b/src/mame/drivers/mbc200.cpp @@ -319,7 +319,7 @@ MACHINE_CONFIG_START(mbc200_state::mbc200) MCFG_SCREEN_SIZE(640, 400) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mbc200) + GFXDECODE(config, "gfxdecode", m_palette, gfx_mbc200); PALETTE(config, m_palette, palette_device::MONOCHROME); H46505(config, m_crtc, 8_MHz_XTAL / 4); // HD46505SP diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp index 5da1280767e..c1e7572cfbc 100644 --- a/src/mame/drivers/mediagx.cpp +++ b/src/mame/drivers/mediagx.cpp @@ -908,7 +908,7 @@ MACHINE_CONFIG_START(mediagx_state::mediagx) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) MCFG_SCREEN_UPDATE_DRIVER(mediagx_state, screen_update) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_cga) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cga); MCFG_PALETTE_ADD(m_palette, 256) diff --git a/src/mame/drivers/mgolf.cpp b/src/mame/drivers/mgolf.cpp index 3a496fb7fc6..225880e27a2 100644 --- a/src/mame/drivers/mgolf.cpp +++ b/src/mame/drivers/mgolf.cpp @@ -383,7 +383,7 @@ MACHINE_CONFIG_START(mgolf_state::mgolf) MCFG_SCREEN_UPDATE_DRIVER(mgolf_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_mgolf) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mgolf); PALETTE(config, m_palette, FUNC(mgolf_state::mgolf_palette), 4); /* sound hardware */ diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp index a7575b3d30f..4cf29f9debb 100644 --- a/src/mame/drivers/micral.cpp +++ b/src/mame/drivers/micral.cpp @@ -397,7 +397,7 @@ MACHINE_CONFIG_START(micral_state::micral) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", palette_device::MONOCHROME); - //MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_micral) + //GFXDECODE(config, "gfxdecode", "palette", gfx_micral); CRT5037(config, m_crtc, 4000000 / 8); // xtal freq unknown m_crtc->set_char_width(8); // unknown diff --git a/src/mame/drivers/microtan.cpp b/src/mame/drivers/microtan.cpp index 53785dc7345..ac5d8f43709 100644 --- a/src/mame/drivers/microtan.cpp +++ b/src/mame/drivers/microtan.cpp @@ -225,7 +225,7 @@ MACHINE_CONFIG_START(microtan_state::microtan) MCFG_SCREEN_UPDATE_DRIVER(microtan_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_microtan) + GFXDECODE(config, m_gfxdecode, "palette", gfx_microtan); PALETTE(config, "palette", palette_device::MONOCHROME); diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp index 687782aa24c..bb5d6f1b652 100644 --- a/src/mame/drivers/mikro80.cpp +++ b/src/mame/drivers/mikro80.cpp @@ -185,7 +185,7 @@ MACHINE_CONFIG_START(mikro80_state::mikro80) MCFG_SCREEN_UPDATE_DRIVER(mikro80_state, screen_update_mikro80) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mikro80) + GFXDECODE(config, "gfxdecode", "palette", gfx_mikro80); PALETTE(config, "palette", palette_device::MONOCHROME); SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp index 4f0d6529acd..e814d2a50e3 100644 --- a/src/mame/drivers/miniboy7.cpp +++ b/src/mame/drivers/miniboy7.cpp @@ -536,7 +536,7 @@ MACHINE_CONFIG_START(miniboy7_state::miniboy7) MCFG_SCREEN_VISIBLE_AREA(0*8, 37*8-1, 0*8, 37*8-1) /* Taken from MC6845, registers 01 & 06 */ MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_miniboy7) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_miniboy7); PALETTE(config, m_palette, FUNC(miniboy7_state::miniboy7_palette), 256); diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp index 661b70d0ecb..39b66926497 100644 --- a/src/mame/drivers/mirage.cpp +++ b/src/mame/drivers/mirage.cpp @@ -311,7 +311,7 @@ MACHINE_CONFIG_START(miragemj_state::mirage) MCFG_SCREEN_UPDATE_DRIVER(miragemj_state, screen_update_mirage) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mirage) + GFXDECODE(config, "gfxdecode", "palette", gfx_mirage); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024); DECO16IC(config, m_deco_tilegen, 0); diff --git a/src/mame/drivers/modellot.cpp b/src/mame/drivers/modellot.cpp index c87ed0f9719..075adc6d962 100644 --- a/src/mame/drivers/modellot.cpp +++ b/src/mame/drivers/modellot.cpp @@ -193,7 +193,7 @@ MACHINE_CONFIG_START(modellot_state::modellot) MCFG_SCREEN_UPDATE_DRIVER(modellot_state, screen_update_modellot) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_modellot) + GFXDECODE(config, "gfxdecode", "palette", gfx_modellot); PALETTE(config, "palette", palette_device::MONOCHROME); /* Devices */ diff --git a/src/mame/drivers/mole.cpp b/src/mame/drivers/mole.cpp index bf8ddf93453..5cf939ee286 100644 --- a/src/mame/drivers/mole.cpp +++ b/src/mame/drivers/mole.cpp @@ -339,7 +339,7 @@ MACHINE_CONFIG_START(mole_state::mole) MCFG_SCREEN_UPDATE_DRIVER(mole_state, screen_update_mole) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mole) + GFXDECODE(config, m_gfxdecode, "palette", gfx_mole); PALETTE(config, "palette", palette_device::RBG_3BIT); /* sound hardware */ diff --git a/src/mame/drivers/molecular.cpp b/src/mame/drivers/molecular.cpp index fafed97a8b9..538cb78742b 100644 --- a/src/mame/drivers/molecular.cpp +++ b/src/mame/drivers/molecular.cpp @@ -323,7 +323,7 @@ MACHINE_CONFIG_START(molecula_state::molecula) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_molecula) + GFXDECODE(config, "gfxdecode", "palette", gfx_molecula); PALETTE(config, "palette", FUNC(molecula_state::molecula_palette), 8); diff --git a/src/mame/drivers/mpu4dealem.cpp b/src/mame/drivers/mpu4dealem.cpp index 0b599667a2e..1da3915b423 100644 --- a/src/mame/drivers/mpu4dealem.cpp +++ b/src/mame/drivers/mpu4dealem.cpp @@ -221,9 +221,9 @@ MACHINE_CONFIG_START(mpu4dealem_state::dealem) MCFG_SCREEN_UPDATE_DRIVER(mpu4dealem_state, screen_update_dealem) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dealem) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_dealem); - PALETTE(config, "palette", FUNC(mpu4dealem_state::dealem_palette), 32); + PALETTE(config, m_palette, FUNC(mpu4dealem_state::dealem_palette), 32); hd6845_device &crtc(HD6845(config, "crtc", MPU4_MASTER_CLOCK / 4 / 8)); /* HD68B45 */ crtc.set_screen("screen"); diff --git a/src/mame/drivers/mugsmash.cpp b/src/mame/drivers/mugsmash.cpp index dd6c2626a8c..7c107562ab2 100644 --- a/src/mame/drivers/mugsmash.cpp +++ b/src/mame/drivers/mugsmash.cpp @@ -416,7 +416,7 @@ MACHINE_CONFIG_START(mugsmash_state::mugsmash) MCFG_SCREEN_UPDATE_DRIVER(mugsmash_state, screen_update_mugsmash) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mugsmash) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mugsmash); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x300); diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp index 792e9fee918..b8a1401012d 100644 --- a/src/mame/drivers/multfish.cpp +++ b/src/mame/drivers/multfish.cpp @@ -1071,7 +1071,7 @@ MACHINE_CONFIG_START(igrosoft_gamble_state::igrosoft_gamble) MCFG_SCREEN_UPDATE_DRIVER(igrosoft_gamble_state, screen_update_igrosoft_gamble) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_igrosoft_gamble) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_igrosoft_gamble); MCFG_PALETTE_ADD("palette", 0x1000) diff --git a/src/mame/drivers/multi8.cpp b/src/mame/drivers/multi8.cpp index 14b549613d3..3bd3c597736 100644 --- a/src/mame/drivers/multi8.cpp +++ b/src/mame/drivers/multi8.cpp @@ -581,7 +581,7 @@ MACHINE_CONFIG_START(multi8_state::multi8) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) PALETTE(config, m_palette, palette_device::BRG_3BIT); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_multi8) + GFXDECODE(config, "gfxdecode", m_palette, gfx_multi8); /* Audio */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/mustache.cpp b/src/mame/drivers/mustache.cpp index 8feae0b24ac..c246c5b7760 100644 --- a/src/mame/drivers/mustache.cpp +++ b/src/mame/drivers/mustache.cpp @@ -200,7 +200,7 @@ MACHINE_CONFIG_START(mustache_state::mustache) MCFG_SCREEN_UPDATE_DRIVER(mustache_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mustache) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mustache); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); /* sound hardware */ diff --git a/src/mame/drivers/mwarr.cpp b/src/mame/drivers/mwarr.cpp index c52875f14e0..bf8c3e70423 100644 --- a/src/mame/drivers/mwarr.cpp +++ b/src/mame/drivers/mwarr.cpp @@ -321,7 +321,7 @@ MACHINE_CONFIG_START(mwarr_state::mwarr) MCFG_SCREEN_UPDATE_DRIVER(mwarr_state, screen_update_mwarr) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mwarr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mwarr); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); EDEVICES_VID(config, m_video, 0); diff --git a/src/mame/drivers/mx2178.cpp b/src/mame/drivers/mx2178.cpp index e81d39dc860..96d0874aab8 100644 --- a/src/mame/drivers/mx2178.cpp +++ b/src/mame/drivers/mx2178.cpp @@ -144,7 +144,7 @@ MACHINE_CONFIG_START(mx2178_state::mx2178) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mx2178) + GFXDECODE(config, "gfxdecode", m_palette, gfx_mx2178); PALETTE(config, m_palette, palette_device::MONOCHROME); /* Devices */ diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp index 9478a09fdb8..ed283f71669 100644 --- a/src/mame/drivers/mycom.cpp +++ b/src/mame/drivers/mycom.cpp @@ -537,7 +537,7 @@ MACHINE_CONFIG_START(mycom_state::mycom) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 192-1) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mycom) + GFXDECODE(config, "gfxdecode", m_palette, gfx_mycom); /* Manual states clock is 1.008mhz for 40 cols, and 2.016 mhz for 80 cols. The CRTC is a HD46505S - same as a 6845. The start registers need to be readable. */ diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp index fb82681bd45..f35556c4d8a 100644 --- a/src/mame/drivers/mz2000.cpp +++ b/src/mame/drivers/mz2000.cpp @@ -926,7 +926,7 @@ MACHINE_CONFIG_START(mz2000_state::mz2000) MCFG_SCREEN_UPDATE_DRIVER(mz2000_state, screen_update_mz2000) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mz2000) + GFXDECODE(config, "gfxdecode", m_palette, gfx_mz2000); PALETTE(config, m_palette, palette_device::BRG_3BIT); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/mz3500.cpp b/src/mame/drivers/mz3500.cpp index 35b57574329..e34b883647e 100644 --- a/src/mame/drivers/mz3500.cpp +++ b/src/mame/drivers/mz3500.cpp @@ -851,7 +851,7 @@ MACHINE_CONFIG_START(mz3500_state::mz3500) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mz3500) + GFXDECODE(config, "gfxdecode", m_palette, gfx_mz3500); PALETTE(config, m_palette, palette_device::BRG_3BIT); diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp index fce15000f5b..88d6d01cee5 100644 --- a/src/mame/drivers/namcofl.cpp +++ b/src/mame/drivers/namcofl.cpp @@ -576,7 +576,7 @@ MACHINE_CONFIG_START(namcofl_state::namcofl) MCFG_SCREEN_UPDATE_DRIVER(namcofl_state, screen_update_namcofl) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_c116, gfx_namcofl) + GFXDECODE(config, "gfxdecode", m_c116, gfx_namcofl); NAMCO_C169ROZ(config, m_c169roz, 0); m_c169roz->set_palette(m_c116); diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp index 9724cd04344..eee3168c826 100644 --- a/src/mame/drivers/namcos2.cpp +++ b/src/mame/drivers/namcos2.cpp @@ -1815,7 +1815,7 @@ MACHINE_CONFIG_START(namcos2_state::base_noio) configure_c116_standard(config); - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_namcos2) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos2); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -1895,7 +1895,7 @@ MACHINE_CONFIG_START(namcos2_state::gollygho) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_namcos2) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos2); configure_c123tmap_standard(config); @@ -1947,7 +1947,7 @@ MACHINE_CONFIG_START(namcos2_state::finallap_noio) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_finallap) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_namcos2) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos2); configure_c123tmap_standard(config); @@ -2023,7 +2023,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_c355) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355); NAMCO_C355SPR(config, m_c355spr, 0); m_c355spr->set_screen(m_screen); @@ -2077,7 +2077,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_c355) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355); NAMCO_C355SPR(config, m_c355spr, 0); m_c355spr->set_screen(m_screen); @@ -2131,7 +2131,7 @@ MACHINE_CONFIG_START(namcos2_state::suzuka8h) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_luckywld) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_c355) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355); NAMCO_C355SPR(config, m_c355spr, 0); m_c355spr->set_screen(m_screen); @@ -2206,7 +2206,7 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk) MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_metlhawk) MCFG_SCREEN_PALETTE(m_c116) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_c116, gfx_metlhawk) + GFXDECODE(config, m_gfxdecode, m_c116, gfx_metlhawk); NAMCO_C169ROZ(config, m_c169roz, 0); m_c169roz->set_palette(m_c116); diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp index 21eadb4b361..22a418b8781 100644 --- a/src/mame/drivers/namcos22.cpp +++ b/src/mame/drivers/namcos22.cpp @@ -3924,7 +3924,7 @@ MACHINE_CONFIG_START(namcos22_state::namcos22) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, namcos22_state, screen_vblank)) MCFG_PALETTE_ADD("palette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcos22) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_namcos22); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3970,7 +3970,7 @@ MACHINE_CONFIG_START(namcos22_state::namcos22s) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22s) - MCFG_DEVICE_REPLACE("gfxdecode", GFXDECODE, "palette", gfx_super) + GFXDECODE(config.replace(), m_gfxdecode, m_palette, gfx_super); MACHINE_CONFIG_END MACHINE_CONFIG_START(namcos22_state::airco22b) diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp index a23367e4fe1..22ab6a3e042 100644 --- a/src/mame/drivers/nanos.cpp +++ b/src/mame/drivers/nanos.cpp @@ -482,7 +482,7 @@ MACHINE_CONFIG_START(nanos_state::nanos) MCFG_SCREEN_VISIBLE_AREA(0,80*8-1,0,25*10-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nanos) + GFXDECODE(config, "gfxdecode", "palette", gfx_nanos); PALETTE(config, "palette", palette_device::MONOCHROME); /* devices */ diff --git a/src/mame/drivers/neptunp2.cpp b/src/mame/drivers/neptunp2.cpp index 6baed13488f..1d21db02f06 100644 --- a/src/mame/drivers/neptunp2.cpp +++ b/src/mame/drivers/neptunp2.cpp @@ -116,7 +116,7 @@ MACHINE_CONFIG_START(neptunp2_state::neptunp2) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_neptunp2) + GFXDECODE(config, "gfxdecode", "palette", gfx_neptunp2); MCFG_PALETTE_ADD("palette", 512) /* sound hardware */ diff --git a/src/mame/drivers/nitedrvr.cpp b/src/mame/drivers/nitedrvr.cpp index eae9445e74f..a608fa0b020 100644 --- a/src/mame/drivers/nitedrvr.cpp +++ b/src/mame/drivers/nitedrvr.cpp @@ -158,7 +158,7 @@ MACHINE_CONFIG_START(nitedrvr_state::nitedrvr) MCFG_SCREEN_UPDATE_DRIVER(nitedrvr_state, screen_update_nitedrvr) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nitedrvr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_nitedrvr); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index 4ccdaba7da1..a357205dbdd 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -347,7 +347,7 @@ MACHINE_CONFIG_START(offtwall_state::offtwall) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_offtwall) + GFXDECODE(config, "gfxdecode", "palette", gfx_offtwall); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); ATARI_VAD(config, m_vad, 0, "screen"); diff --git a/src/mame/drivers/ohmygod.cpp b/src/mame/drivers/ohmygod.cpp index bc50df1fd15..b8f0e93349a 100644 --- a/src/mame/drivers/ohmygod.cpp +++ b/src/mame/drivers/ohmygod.cpp @@ -339,7 +339,7 @@ MACHINE_CONFIG_START(ohmygod_state::ohmygod) MCFG_SCREEN_UPDATE_DRIVER(ohmygod_state, screen_update_ohmygod) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ohmygod) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ohmygod); PALETTE(config, m_palette).set_format(palette_device::xGRB_555, 1024); diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp index 7361dce0fd6..bf346b21b97 100644 --- a/src/mame/drivers/okean240.cpp +++ b/src/mame/drivers/okean240.cpp @@ -556,7 +556,7 @@ MACHINE_CONFIG_START(okean240_state::okean240a) okean240t(config); MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(okean240a_io) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_okean240a) + GFXDECODE(config, "gfxdecode", "palette", gfx_okean240a); subdevice<rs232_port_device>("rs232")->set_default_option("keyboard"); m_ppikbd->in_pa_callback().set(FUNC(okean240_state::okean240a_port40_r)); @@ -570,7 +570,7 @@ MACHINE_CONFIG_START(okean240_state::okean240) okean240t(config); MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(okean240_io) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_okean240) + GFXDECODE(config, "gfxdecode", "palette", gfx_okean240); config.device_remove("uart"); config.device_remove("rs232"); subdevice<pit8253_device>("pit")->out_handler<1>().set_nop(); diff --git a/src/mame/drivers/olibochu.cpp b/src/mame/drivers/olibochu.cpp index 5a94aa474e0..533c2e5c1d7 100644 --- a/src/mame/drivers/olibochu.cpp +++ b/src/mame/drivers/olibochu.cpp @@ -481,7 +481,7 @@ MACHINE_CONFIG_START(olibochu_state::olibochu) MCFG_SCREEN_UPDATE_DRIVER(olibochu_state, screen_update_olibochu) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_olibochu) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_olibochu); PALETTE(config, m_palette, FUNC(olibochu_state::olibochu_palette), 512); /* sound hardware */ diff --git a/src/mame/drivers/orbit.cpp b/src/mame/drivers/orbit.cpp index a5bf7ed7f05..656e68918fa 100644 --- a/src/mame/drivers/orbit.cpp +++ b/src/mame/drivers/orbit.cpp @@ -296,7 +296,7 @@ MACHINE_CONFIG_START(orbit_state::orbit) MCFG_SCREEN_UPDATE_DRIVER(orbit_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_orbit) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_orbit); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/paso1600.cpp b/src/mame/drivers/paso1600.cpp index 694e1e8b3c1..6554a47ae23 100644 --- a/src/mame/drivers/paso1600.cpp +++ b/src/mame/drivers/paso1600.cpp @@ -320,7 +320,7 @@ MACHINE_CONFIG_START(paso1600_state::paso1600) MCFG_SCREEN_UPDATE_DRIVER(paso1600_state, screen_update_paso1600) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_paso1600) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_paso1600); MCFG_PALETTE_ADD("palette", 8) // MCFG_PALETTE_INIT(black_and_white) diff --git a/src/mame/drivers/pasopia.cpp b/src/mame/drivers/pasopia.cpp index 31600cc2d50..48d53cb5fd3 100644 --- a/src/mame/drivers/pasopia.cpp +++ b/src/mame/drivers/pasopia.cpp @@ -301,7 +301,7 @@ MACHINE_CONFIG_START(pasopia_state::pasopia) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pasopia) + GFXDECODE(config, "gfxdecode", m_palette, gfx_pasopia); MCFG_PALETTE_ADD("palette", 8) /* Devices */ diff --git a/src/mame/drivers/patapata.cpp b/src/mame/drivers/patapata.cpp index 09230083e13..de68c9d5c9a 100644 --- a/src/mame/drivers/patapata.cpp +++ b/src/mame/drivers/patapata.cpp @@ -292,7 +292,7 @@ MACHINE_CONFIG_START(patapata_state::patapata) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", patapata_state, irq4_line_hold) // 1 + 4 valid? (4 main VBL) TIMER(config, "scantimer").configure_scanline(FUNC(patapata_state::scanline), "screen", 0, 1); - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_patapata) + GFXDECODE(config, m_gfxdecode, "palette", gfx_patapata); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/pc88va.cpp b/src/mame/drivers/pc88va.cpp index af7cd15588b..043dcc2d33a 100644 --- a/src/mame/drivers/pc88va.cpp +++ b/src/mame/drivers/pc88va.cpp @@ -1609,7 +1609,7 @@ MACHINE_CONFIG_START(pc88va_state::pc88va) MCFG_PALETTE_ADD("palette", 32) // MCFG_PALETTE_INIT_OWNER(pc88va_state, pc8801 ) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pc88va) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pc88va); i8255_device &d8255_2(I8255(config, "d8255_2")); d8255_2.in_pa_callback().set("d8255_2s", FUNC(i8255_device::pb_r)); diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp index 12cd4d4a39b..460e32d8589 100644 --- a/src/mame/drivers/pcm.cpp +++ b/src/mame/drivers/pcm.cpp @@ -272,7 +272,7 @@ MACHINE_CONFIG_START(pcm_state::pcm) MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 16*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pcm) + GFXDECODE(config, "gfxdecode", "palette", gfx_pcm); PALETTE(config, "palette", palette_device::MONOCHROME); /* Sound */ diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp index 294784e4624..a977cf6d59b 100644 --- a/src/mame/drivers/pegasus.cpp +++ b/src/mame/drivers/pegasus.cpp @@ -503,7 +503,7 @@ MACHINE_CONFIG_START(pegasus_state::pegasus) MCFG_SCREEN_SIZE(32*8, 16*16) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 16*16-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pegasus) + GFXDECODE(config, "gfxdecode", "palette", gfx_pegasus); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/peoplepc.cpp b/src/mame/drivers/peoplepc.cpp index 4e6e08d460b..4f320b286f6 100644 --- a/src/mame/drivers/peoplepc.cpp +++ b/src/mame/drivers/peoplepc.cpp @@ -273,7 +273,7 @@ MACHINE_CONFIG_START(peoplepc_state::olypeopl) MCFG_SCREEN_RAW_PARAMS(XTAL(22'000'000),640,0,640,475,0,475) MCFG_SCREEN_UPDATE_DEVICE( "h46505", mc6845_device, screen_update ) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty) + GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty); PALETTE(config, m_palette, palette_device::MONOCHROME); h46505_device &crtc(H46505(config, "h46505", XTAL(22'000'000)/8)); diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp index 9d911acd4fb..adf7356087d 100644 --- a/src/mame/drivers/photoply.cpp +++ b/src/mame/drivers/photoply.cpp @@ -309,7 +309,7 @@ MACHINE_CONFIG_START(photoply_state::photoply) pcat_common(config); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "vga", gfx_photoply) + GFXDECODE(config, "gfxdecode", "vga", gfx_photoply); ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); diff --git a/src/mame/drivers/pinball2k.cpp b/src/mame/drivers/pinball2k.cpp index cfda2c12e4b..0488e5687fb 100644 --- a/src/mame/drivers/pinball2k.cpp +++ b/src/mame/drivers/pinball2k.cpp @@ -628,7 +628,7 @@ MACHINE_CONFIG_START(pinball2k_state::mediagx) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) MCFG_SCREEN_UPDATE_DRIVER(pinball2k_state, screen_update_mediagx) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cga) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cga); MCFG_PALETTE_ADD("palette", 256) /* sound hardware */ diff --git a/src/mame/drivers/pinkiri8.cpp b/src/mame/drivers/pinkiri8.cpp index e7c9c751a72..093e4d149ab 100644 --- a/src/mame/drivers/pinkiri8.cpp +++ b/src/mame/drivers/pinkiri8.cpp @@ -1120,7 +1120,7 @@ MACHINE_CONFIG_START(pinkiri8_state::pinkiri8) MCFG_SCREEN_UPDATE_DRIVER(pinkiri8_state, screen_update_pinkiri8) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pinkiri8) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pinkiri8); MCFG_PALETTE_ADD("palette", 0x2000) diff --git a/src/mame/drivers/pk8020.cpp b/src/mame/drivers/pk8020.cpp index b9b263cdfa2..f34e5bb292a 100644 --- a/src/mame/drivers/pk8020.cpp +++ b/src/mame/drivers/pk8020.cpp @@ -206,7 +206,7 @@ MACHINE_CONFIG_START(pk8020_state::pk8020) MCFG_SCREEN_UPDATE_DRIVER(pk8020_state, screen_update_pk8020) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_pk8020) + GFXDECODE(config, "gfxdecode", m_palette, gfx_pk8020); PALETTE(config, m_palette, FUNC(pk8020_state::pk8020_palette), 16); I8255(config, m_ppi8255_1); diff --git a/src/mame/drivers/pktgaldx.cpp b/src/mame/drivers/pktgaldx.cpp index 242f251ce0c..65e659bb4ff 100644 --- a/src/mame/drivers/pktgaldx.cpp +++ b/src/mame/drivers/pktgaldx.cpp @@ -357,7 +357,7 @@ MACHINE_CONFIG_START(pktgaldx_state::pktgaldx) PALETTE(config, "palette").set_format(palette_device::xBGR_888, 4096); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pktgaldx) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pktgaldx); DECO16IC(config, m_deco_tilegen, 0); m_deco_tilegen->set_split(0); @@ -417,7 +417,7 @@ MACHINE_CONFIG_START(pktgaldx_state::pktgaldb) PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 4096); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_bootleg) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_bootleg); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/plan80.cpp b/src/mame/drivers/plan80.cpp index 773d2f2ebe0..7b0dcd634ed 100644 --- a/src/mame/drivers/plan80.cpp +++ b/src/mame/drivers/plan80.cpp @@ -248,7 +248,7 @@ MACHINE_CONFIG_START(plan80_state::plan80) MCFG_SCREEN_VISIBLE_AREA(0, 48*6-1, 0, 32*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_plan80) + GFXDECODE(config, "gfxdecode", "palette", gfx_plan80); PALETTE(config, "palette", palette_device::MONOCHROME); MACHINE_CONFIG_END diff --git a/src/mame/drivers/pokechmp.cpp b/src/mame/drivers/pokechmp.cpp index 9dcdfdc4add..2c2d62c8d2b 100644 --- a/src/mame/drivers/pokechmp.cpp +++ b/src/mame/drivers/pokechmp.cpp @@ -246,7 +246,7 @@ MACHINE_CONFIG_START(pokechmp_state::pokechmp) screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); screen.screen_vblank().append(FUNC(pokechmp_state::sound_irq)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pokechmp) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pokechmp); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x400); /* sound hardware */ diff --git a/src/mame/drivers/poly88.cpp b/src/mame/drivers/poly88.cpp index f41304fbe6d..d082c962649 100644 --- a/src/mame/drivers/poly88.cpp +++ b/src/mame/drivers/poly88.cpp @@ -212,7 +212,7 @@ MACHINE_CONFIG_START(poly88_state::poly88) MCFG_SCREEN_UPDATE_DRIVER(poly88_state, screen_update_poly88) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_poly88) + GFXDECODE(config, "gfxdecode", "palette", gfx_poly88); PALETTE(config, "palette", palette_device::MONOCHROME); diff --git a/src/mame/drivers/poolshrk.cpp b/src/mame/drivers/poolshrk.cpp index ce6ca8118fb..35efc9757e1 100644 --- a/src/mame/drivers/poolshrk.cpp +++ b/src/mame/drivers/poolshrk.cpp @@ -233,7 +233,7 @@ MACHINE_CONFIG_START(poolshrk_state::poolshrk) MCFG_SCREEN_UPDATE_DRIVER(poolshrk_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_poolshrk) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_poolshrk); PALETTE(config, m_palette, FUNC(poolshrk_state::poolshrk_palette), 4); /* sound hardware */ diff --git a/src/mame/drivers/popobear.cpp b/src/mame/drivers/popobear.cpp index 52f28ccca92..9739224ef84 100644 --- a/src/mame/drivers/popobear.cpp +++ b/src/mame/drivers/popobear.cpp @@ -663,7 +663,7 @@ MACHINE_CONFIG_START(popobear_state::popobear) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_popobear) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_popobear); MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(42'000'000)/16) // XTAL CORRECT, DIVISOR GUESSED MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/ppmast93.cpp b/src/mame/drivers/ppmast93.cpp index ed8d38628d9..a6cac4043bf 100644 --- a/src/mame/drivers/ppmast93.cpp +++ b/src/mame/drivers/ppmast93.cpp @@ -394,7 +394,7 @@ MACHINE_CONFIG_START(ppmast93_state::ppmast93) MCFG_SCREEN_UPDATE_DRIVER(ppmast93_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ppmast93) + GFXDECODE(config, m_gfxdecode, "palette", gfx_ppmast93); PALETTE(config, "palette", palette_device::RGB_444_PROMS, "proms", 0x100); diff --git a/src/mame/drivers/progolf.cpp b/src/mame/drivers/progolf.cpp index db0bfad76ed..a3ff28598fa 100644 --- a/src/mame/drivers/progolf.cpp +++ b/src/mame/drivers/progolf.cpp @@ -441,7 +441,7 @@ MACHINE_CONFIG_START(progolf_state::progolf) MCFG_SCREEN_UPDATE_DRIVER(progolf_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_progolf) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_progolf); PALETTE(config, m_palette, FUNC(progolf_state::progolf_palette), 32 * 3); mc6845_device &crtc(MC6845(config, "crtc", 3000000/4)); /* hand tuned to get ~57 fps */ diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp index 5834054a08a..5ffeabee34a 100644 --- a/src/mame/drivers/proteus3.cpp +++ b/src/mame/drivers/proteus3.cpp @@ -393,7 +393,7 @@ MACHINE_CONFIG_START(proteus3_state::proteus3) MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 16*12-1) MCFG_SCREEN_UPDATE_DRIVER(proteus3_state, screen_update_proteus3) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_proteus3) + GFXDECODE(config, "gfxdecode", "palette", gfx_proteus3); PALETTE(config, "palette", palette_device::MONOCHROME); /* Devices */ diff --git a/src/mame/drivers/pturn.cpp b/src/mame/drivers/pturn.cpp index 1f23febb9d2..4bec5d24a90 100644 --- a/src/mame/drivers/pturn.cpp +++ b/src/mame/drivers/pturn.cpp @@ -545,7 +545,7 @@ MACHINE_CONFIG_START(pturn_state::pturn) PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 0x100); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pturn) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pturn); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/pv1000.cpp b/src/mame/drivers/pv1000.cpp index 5b056d8de7c..b7a06a5da1c 100644 --- a/src/mame/drivers/pv1000.cpp +++ b/src/mame/drivers/pv1000.cpp @@ -455,7 +455,7 @@ MACHINE_CONFIG_START(pv1000_state::pv1000) PALETTE(config, m_palette, palette_device::BGR_3BIT); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pv1000) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_pv1000); SPEAKER(config, "mono").front_center(); PV1000(config, m_sound, 17897725).add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp index e98ea110d30..31dcf969779 100644 --- a/src/mame/drivers/px4.cpp +++ b/src/mame/drivers/px4.cpp @@ -1529,9 +1529,9 @@ MACHINE_CONFIG_START(px4_state::px4) TIMER(config, m_ext_cas_timer).configure_generic(FUNC(px4_state::ext_cassette_read)); // sio port - MCFG_EPSON_SIO_ADD("sio", nullptr) - MCFG_EPSON_SIO_RX(WRITELINE(*this, px4_state, sio_rx_w)) - MCFG_EPSON_SIO_PIN(WRITELINE(*this, px4_state, sio_pin_w)) + EPSON_SIO(config, m_sio, nullptr); + m_sio->rx_callback().set(FUNC(px4_state::sio_rx_w)); + m_sio->pin_callback().set(FUNC(px4_state::sio_pin_w)); // rs232 port RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); diff --git a/src/mame/drivers/px8.cpp b/src/mame/drivers/px8.cpp index 865010cdafc..581003b512d 100644 --- a/src/mame/drivers/px8.cpp +++ b/src/mame/drivers/px8.cpp @@ -763,7 +763,7 @@ MACHINE_CONFIG_START(px8_state::px8) MCFG_SCREEN_VISIBLE_AREA(0, 479, 0, 63) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_px8) + GFXDECODE(config, "gfxdecode", "palette", gfx_px8); PALETTE(config, "palette", FUNC(px8_state::px8_palette), 2); /* sound hardware */ diff --git a/src/mame/drivers/quizdna.cpp b/src/mame/drivers/quizdna.cpp index eb46cf5ba49..18ed31d6aae 100644 --- a/src/mame/drivers/quizdna.cpp +++ b/src/mame/drivers/quizdna.cpp @@ -457,7 +457,7 @@ MACHINE_CONFIG_START(quizdna_state::quizdna) MCFG_SCREEN_UPDATE_DRIVER(quizdna_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_quizdna) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_quizdna); MCFG_PALETTE_ADD("palette", 2048) diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp index 92d9e7b1c8e..949d11abe90 100644 --- a/src/mame/drivers/qx10.cpp +++ b/src/mame/drivers/qx10.cpp @@ -735,7 +735,7 @@ MACHINE_CONFIG_START(qx10_state::qx10) m_screen->set_screen_update(FUNC(qx10_state::screen_update)); m_screen->set_size(640, 480); m_screen->set_visarea(0, 640-1, 0, 480-1); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_qx10) + GFXDECODE(config, "gfxdecode", m_palette, gfx_qx10); PALETTE(config, m_palette, FUNC(qx10_state::qx10_palette), 8); /* Devices */ diff --git a/src/mame/drivers/rad_eu3a05.cpp b/src/mame/drivers/rad_eu3a05.cpp index b2f7b73f1b0..a89910c246a 100644 --- a/src/mame/drivers/rad_eu3a05.cpp +++ b/src/mame/drivers/rad_eu3a05.cpp @@ -1166,7 +1166,7 @@ MACHINE_CONFIG_START(radica_eu3a05_state::radicasi) MCFG_PALETTE_ADD("palette", 256) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_radicasi_fake) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_radicasi_fake); radica6502_gpio_device &gpio(RADICA6502_GPIO(config, "gpio", 0)); gpio.read_0_callback().set_ioport("IN0"); diff --git a/src/mame/drivers/rad_eu3a14.cpp b/src/mame/drivers/rad_eu3a14.cpp index f844eb12698..fed73d6c6fa 100644 --- a/src/mame/drivers/rad_eu3a14.cpp +++ b/src/mame/drivers/rad_eu3a14.cpp @@ -1374,7 +1374,7 @@ MACHINE_CONFIG_START(radica_eu3a14_state::radica_eu3a14) ADDRESS_MAP_BANK(config, "bank").set_map(&radica_eu3a14_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x8000); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_helper) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_helper); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp index 446c094f2fb..f51d0f6248a 100644 --- a/src/mame/drivers/rainbow.cpp +++ b/src/mame/drivers/rainbow.cpp @@ -3219,7 +3219,7 @@ MACHINE_CONFIG_START(rainbow_state::rainbow) MCFG_SCREEN_UPDATE_DRIVER(rainbow_state, screen_update_rainbow) MCFG_SCREEN_PALETTE("vt100_video:palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "vt100_video:palette", gfx_rainbow) + GFXDECODE(config, "gfxdecode", "vt100_video:palette", gfx_rainbow); RAINBOW_VIDEO(config, m_crtc, 24.0734_MHz_XTAL); m_crtc->set_screen("screen"); diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp index be3258d26c3..87f7f01474a 100644 --- a/src/mame/drivers/rampart.cpp +++ b/src/mame/drivers/rampart.cpp @@ -351,7 +351,7 @@ MACHINE_CONFIG_START(rampart_state::rampart) WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rampart) + GFXDECODE(config, m_gfxdecode, "palette", gfx_rampart); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 512).set_membits(8); ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, rampart_state::s_mob_config); diff --git a/src/mame/drivers/rcorsair.cpp b/src/mame/drivers/rcorsair.cpp index 6eb45d37e5d..dd4bf635ba6 100644 --- a/src/mame/drivers/rcorsair.cpp +++ b/src/mame/drivers/rcorsair.cpp @@ -177,7 +177,7 @@ MACHINE_CONFIG_START(rcorsair_state::rcorsair) MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rcorsair) + GFXDECODE(config, "gfxdecode", "palette", gfx_rcorsair); MCFG_PALETTE_ADD("palette", 0x100) MACHINE_CONFIG_END diff --git a/src/mame/drivers/rd100.cpp b/src/mame/drivers/rd100.cpp index 881f999e2c1..eaf58c8fe2b 100644 --- a/src/mame/drivers/rd100.cpp +++ b/src/mame/drivers/rd100.cpp @@ -120,7 +120,7 @@ MACHINE_CONFIG_START(rd100_state::rd100) MCFG_SCREEN_SIZE(64*6, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1) PALETTE(config, "palette", palette_device::MONOCHROME); - //MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rd100) + //GFXDECODE(config, "gfxdecode", "palette", gfx_rd100); MACHINE_CONFIG_END ROM_START( rd100 ) diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp index 8b84b2f0999..add178d614c 100644 --- a/src/mame/drivers/relief.cpp +++ b/src/mame/drivers/relief.cpp @@ -266,7 +266,7 @@ MACHINE_CONFIG_START(relief_state::relief) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_relief) + GFXDECODE(config, m_gfxdecode, "palette", gfx_relief); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); ATARI_VAD(config, m_vad, 0, m_screen); diff --git a/src/mame/drivers/rgum.cpp b/src/mame/drivers/rgum.cpp index 70a10ed5f30..610be95ca91 100644 --- a/src/mame/drivers/rgum.cpp +++ b/src/mame/drivers/rgum.cpp @@ -270,7 +270,7 @@ MACHINE_CONFIG_START(rgum_state::rgum) ppi.in_pb_callback().set_ioport("IN1"); ppi.in_pc_callback().set_ioport("IN2"); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rgum) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_rgum); MCFG_PALETTE_ADD("palette", 0x100) SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp index 00bafa5cc90..1a0bacf9abd 100644 --- a/src/mame/drivers/rohga.cpp +++ b/src/mame/drivers/rohga.cpp @@ -894,7 +894,7 @@ MACHINE_CONFIG_START(rohga_state::rohga) MCFG_SCREEN_UPDATE_DRIVER(rohga_state, screen_update_rohga) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rohga) + GFXDECODE(config, "gfxdecode", m_palette, gfx_rohga); MCFG_PALETTE_ADD("palette", 2048) DECOCOMN(config, m_decocomn, 0); @@ -986,7 +986,7 @@ MACHINE_CONFIG_START(rohga_state::wizdfire) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(rohga_state, screen_update_wizdfire) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wizdfire) + GFXDECODE(config, "gfxdecode", m_palette, gfx_wizdfire); MCFG_PALETTE_ADD("palette", 2048) DECOCOMN(config, m_decocomn, 0); @@ -1083,7 +1083,7 @@ MACHINE_CONFIG_START(rohga_state::nitrobal) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) MCFG_SCREEN_UPDATE_DRIVER(rohga_state, screen_update_nitrobal) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wizdfire) + GFXDECODE(config, "gfxdecode", m_palette, gfx_wizdfire); MCFG_PALETTE_ADD("palette", 2048) DECOCOMN(config, m_decocomn, 0); @@ -1181,7 +1181,7 @@ MACHINE_CONFIG_START(rohga_state::schmeisr) MCFG_SCREEN_UPDATE_DRIVER(rohga_state, screen_update_rohga) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_schmeisr) + GFXDECODE(config, "gfxdecode", m_palette, gfx_schmeisr); MCFG_PALETTE_ADD("palette", 2048) DECOCOMN(config, m_decocomn, 0); diff --git a/src/mame/drivers/rx78.cpp b/src/mame/drivers/rx78.cpp index 7b2bc35d161..40b4c53314b 100644 --- a/src/mame/drivers/rx78.cpp +++ b/src/mame/drivers/rx78.cpp @@ -490,7 +490,7 @@ MACHINE_CONFIG_START(rx78_state::rx78) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16+1) //+1 for the background color - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rx78) + GFXDECODE(config, "gfxdecode", m_palette, gfx_rx78); MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "rx78_cart") MCFG_GENERIC_EXTENSIONS("bin,rom") diff --git a/src/mame/drivers/sauro.cpp b/src/mame/drivers/sauro.cpp index 1a7f7215a59..17ce062c4e8 100644 --- a/src/mame/drivers/sauro.cpp +++ b/src/mame/drivers/sauro.cpp @@ -487,7 +487,7 @@ MACHINE_CONFIG_START(sauro_state::trckydoc) m_mainlatch->q_out_cb<2>().set(FUNC(sauro_state::coin1_w)); m_mainlatch->q_out_cb<3>().set(FUNC(sauro_state::coin2_w)); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_trckydoc) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_trckydoc); MCFG_VIDEO_START_OVERRIDE(sauro_state,trckydoc) MCFG_SCREEN_MODIFY("screen") @@ -514,7 +514,7 @@ MACHINE_CONFIG_START(sauro_state::sauro) MCFG_DEVICE_PROGRAM_MAP(sauro_sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(sauro_state, irq0_line_hold, 8 * 60) // ? - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sauro) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sauro); MCFG_VIDEO_START_OVERRIDE(sauro_state, sauro) MCFG_SCREEN_MODIFY("screen") diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp index 9bfaeffec49..de61657e15e 100644 --- a/src/mame/drivers/sbrkout.cpp +++ b/src/mame/drivers/sbrkout.cpp @@ -576,7 +576,7 @@ MACHINE_CONFIG_START(sbrkout_state::sbrkout) WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sbrkout) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sbrkout); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(MAIN_CLOCK/2, 384, 0, 256, 262, 0, 224); diff --git a/src/mame/drivers/sbugger.cpp b/src/mame/drivers/sbugger.cpp index 353193fc1bb..6451a7a3952 100644 --- a/src/mame/drivers/sbugger.cpp +++ b/src/mame/drivers/sbugger.cpp @@ -226,7 +226,7 @@ MACHINE_CONFIG_START(sbugger_state::sbugger) i8156.in_pc_callback().set_ioport("DSW2"); i8156.out_to_callback().set_inputline(m_maincpu, I8085_RST75_LINE); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sbugger) + GFXDECODE(config, m_gfxdecode, "palette", gfx_sbugger); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/scopus.cpp b/src/mame/drivers/scopus.cpp index 5c5e6397f2e..17ea902edb0 100644 --- a/src/mame/drivers/scopus.cpp +++ b/src/mame/drivers/scopus.cpp @@ -212,7 +212,7 @@ MACHINE_CONFIG_START(sagitta180_state::sagitta180) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(80*5, 25*8) MCFG_SCREEN_VISIBLE_AREA(0, 80*5-1, 0, 25*8-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sagitta180 ) + GFXDECODE(config, "gfxdecode", m_palette, gfx_sagitta180); I8275(config, m_crtc, 12480000 / 8); /* guessed xtal */ m_crtc->set_character_width(8); diff --git a/src/mame/drivers/segald.cpp b/src/mame/drivers/segald.cpp index 6b178a960b8..7c9b582db12 100644 --- a/src/mame/drivers/segald.cpp +++ b/src/mame/drivers/segald.cpp @@ -393,7 +393,7 @@ MACHINE_CONFIG_START(segald_state::astron) /* video hardware */ MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segald) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_segald); MCFG_PALETTE_ADD("palette", 256) /* sound hardare */ diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index 4211e50d669..cae112405ba 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -3928,7 +3928,7 @@ MACHINE_CONFIG_START(segas16b_state::lockonph) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // video hardware - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lockonph) + GFXDECODE(config, m_gfxdecode, "palette", gfx_lockonph); MCFG_PALETTE_ADD("palette", 0x2000*4) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/seibucats.cpp b/src/mame/drivers/seibucats.cpp index c6d5d7c8364..b2fa430f0ea 100644 --- a/src/mame/drivers/seibucats.cpp +++ b/src/mame/drivers/seibucats.cpp @@ -314,7 +314,7 @@ MACHINE_CONFIG_START(seibucats_state::seibucats) MCFG_SCREEN_UPDATE_DRIVER(seibuspi_state, screen_update_sys386f) MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, SPI_HTOTAL, SPI_HBEND, SPI_HBSTART, SPI_VTOTAL, SPI_VBEND, SPI_VBSTART) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_seibucats) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_seibucats); MCFG_DEVICE_ADD(m_palette, PALETTE, palette_device::BLACK, 8192); // MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) diff --git a/src/mame/drivers/sfbonus.cpp b/src/mame/drivers/sfbonus.cpp index f7c17308650..a5deb953ef8 100644 --- a/src/mame/drivers/sfbonus.cpp +++ b/src/mame/drivers/sfbonus.cpp @@ -1386,7 +1386,7 @@ MACHINE_CONFIG_START(sfbonus_state::sfbonus) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sfbonus) + GFXDECODE(config, "gfxdecode", "palette", gfx_sfbonus); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/shisen.cpp b/src/mame/drivers/shisen.cpp index 3e6fecca5a9..3723a682912 100644 --- a/src/mame/drivers/shisen.cpp +++ b/src/mame/drivers/shisen.cpp @@ -237,7 +237,7 @@ MACHINE_CONFIG_START(shisen_state::shisen) MCFG_SCREEN_UPDATE_DRIVER(shisen_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_shisen) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_shisen); MCFG_PALETTE_ADD("palette", 256) /* sound hardware */ diff --git a/src/mame/drivers/shootout.cpp b/src/mame/drivers/shootout.cpp index 7e762fed197..dae50734ea4 100644 --- a/src/mame/drivers/shootout.cpp +++ b/src/mame/drivers/shootout.cpp @@ -294,7 +294,7 @@ MACHINE_CONFIG_START(shootout_state::shootout) MCFG_SCREEN_UPDATE_DRIVER(shootout_state, screen_update_shootout) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_shootout) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_shootout); PALETTE(config, m_palette, FUNC(shootout_state::shootout_palette), 256); /* sound hardware */ @@ -323,7 +323,7 @@ MACHINE_CONFIG_START(shootout_state::shootouj) MCFG_SCREEN_UPDATE_DRIVER(shootout_state, screen_update_shootouj) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_shootout) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_shootout); PALETTE(config, m_palette, FUNC(shootout_state::shootout_palette), 256); /* sound hardware */ diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp index ab5126a7880..459a67d7551 100644 --- a/src/mame/drivers/shuuz.cpp +++ b/src/mame/drivers/shuuz.cpp @@ -244,7 +244,7 @@ MACHINE_CONFIG_START(shuuz_state::shuuz) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_shuuz) + GFXDECODE(config, m_gfxdecode, "palette", gfx_shuuz); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 1024); ATARI_VAD(config, m_vad, 0, m_screen); diff --git a/src/mame/drivers/silvmil.cpp b/src/mame/drivers/silvmil.cpp index 730a13026d0..576a483555f 100644 --- a/src/mame/drivers/silvmil.cpp +++ b/src/mame/drivers/silvmil.cpp @@ -428,7 +428,7 @@ MACHINE_CONFIG_START(silvmil_state::silvmil) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x300); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_silvmil) + GFXDECODE(config, m_gfxdecode, "palette", gfx_silvmil); DECO_SPRITE(config, m_sprgen, 0); m_sprgen->set_gfx_region(0); diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp index ab25c3fcab1..04c1613a538 100644 --- a/src/mame/drivers/simpl156.cpp +++ b/src/mame/drivers/simpl156.cpp @@ -423,7 +423,7 @@ MACHINE_CONFIG_START(simpl156_state::chainrec) m_palette->set_format(palette_device::xBGR_555, 4096); m_palette->set_membits(16); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_simpl156) + GFXDECODE(config, "gfxdecode", m_palette, gfx_simpl156); DECO16IC(config, m_deco_tilegen, 0); m_deco_tilegen->set_split(0); diff --git a/src/mame/drivers/skimaxx.cpp b/src/mame/drivers/skimaxx.cpp index 42f0dba9a9b..ffeeafa3866 100644 --- a/src/mame/drivers/skimaxx.cpp +++ b/src/mame/drivers/skimaxx.cpp @@ -531,7 +531,7 @@ MACHINE_CONFIG_START(skimaxx_state::skimaxx) MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_ind16) MCFG_SCREEN_PALETTE("palette") -// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_skimaxx) +// GFXDECODE(config, "gfxdecode", "palette", gfx_skimaxx); PALETTE(config, "palette", palette_device::RGB_555); diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp index ba3ac589ea2..22c179b0ad8 100644 --- a/src/mame/drivers/skullxbo.cpp +++ b/src/mame/drivers/skullxbo.cpp @@ -239,7 +239,7 @@ MACHINE_CONFIG_START(skullxbo_state::skullxbo) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_skullxbo) + GFXDECODE(config, m_gfxdecode, "palette", gfx_skullxbo); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, skullxbo_state, get_playfield_tile_info, 16,8, SCAN_COLS, 64,64) diff --git a/src/mame/drivers/skydiver.cpp b/src/mame/drivers/skydiver.cpp index 3838ca1096a..88e0e1bc391 100644 --- a/src/mame/drivers/skydiver.cpp +++ b/src/mame/drivers/skydiver.cpp @@ -377,7 +377,7 @@ MACHINE_CONFIG_START(skydiver_state::skydiver) MCFG_SCREEN_UPDATE_DRIVER(skydiver_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_skydiver) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_skydiver); PALETTE(config, m_palette, FUNC(skydiver_state::skydiver_palette), ARRAY_LENGTH(colortable_source)); /* sound hardware */ diff --git a/src/mame/drivers/skyraid.cpp b/src/mame/drivers/skyraid.cpp index 8d5940354dc..fddeeac6964 100644 --- a/src/mame/drivers/skyraid.cpp +++ b/src/mame/drivers/skyraid.cpp @@ -240,7 +240,7 @@ MACHINE_CONFIG_START(skyraid_state::skyraid) MCFG_SCREEN_UPDATE_DRIVER(skyraid_state, screen_update_skyraid) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_skyraid) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_skyraid); PALETTE(config, m_palette, FUNC(skyraid_state::skyraid_palette), 20); diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp index 6fbf58d46ee..2e015beae0e 100644 --- a/src/mame/drivers/slapfght.cpp +++ b/src/mame/drivers/slapfght.cpp @@ -921,7 +921,7 @@ MACHINE_CONFIG_START(slapfght_state::perfrman) m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_perfrman) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_perfrman); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(slapfght_state, perfrman) @@ -973,7 +973,7 @@ MACHINE_CONFIG_START(slapfght_state::tigerh) m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_slapfght) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_slapfght); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(slapfght_state, slapfight) @@ -1046,7 +1046,7 @@ MACHINE_CONFIG_START(slapfght_state::slapfigh) m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_slapfght) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_slapfght); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(slapfght_state, slapfight) diff --git a/src/mame/drivers/slotcarn.cpp b/src/mame/drivers/slotcarn.cpp index 6297b40a6d9..7b8b171df1d 100644 --- a/src/mame/drivers/slotcarn.cpp +++ b/src/mame/drivers/slotcarn.cpp @@ -576,7 +576,7 @@ MACHINE_CONFIG_START(slotcarn_state::slotcarn) crtc.out_hsync_callback().set(FUNC(slotcarn_state::hsync_changed)); crtc.out_vsync_callback().set_inputline(m_maincpu, 0); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_slotcarn) + GFXDECODE(config, "gfxdecode", "palette", gfx_slotcarn); MCFG_PALETTE_ADD("palette", 0x400) /* sound hardware */ diff --git a/src/mame/drivers/sm1800.cpp b/src/mame/drivers/sm1800.cpp index c47d720bb7f..90a03fab9c3 100644 --- a/src/mame/drivers/sm1800.cpp +++ b/src/mame/drivers/sm1800.cpp @@ -177,7 +177,7 @@ MACHINE_CONFIG_START(sm1800_state::sm1800) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) PALETTE(config, m_palette, FUNC(sm1800_state::sm1800_palette), 3); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_sm1800) + GFXDECODE(config, "gfxdecode", m_palette, gfx_sm1800); /* Devices */ I8255(config, m_ppi); diff --git a/src/mame/drivers/sm7238.cpp b/src/mame/drivers/sm7238.cpp index ab77077b35f..356964f7c9f 100644 --- a/src/mame/drivers/sm7238.cpp +++ b/src/mame/drivers/sm7238.cpp @@ -377,7 +377,7 @@ MACHINE_CONFIG_START(sm7238_state::sm7238) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", FUNC(sm7238_state::sm7238_palette), 3); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sm7238) + GFXDECODE(config, "gfxdecode", "palette", gfx_sm7238); PIC8259(config, m_pic8259, 0); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); diff --git a/src/mame/drivers/snookr10.cpp b/src/mame/drivers/snookr10.cpp index dcd1516d651..d6e0a69a1b3 100644 --- a/src/mame/drivers/snookr10.cpp +++ b/src/mame/drivers/snookr10.cpp @@ -1059,7 +1059,7 @@ MACHINE_CONFIG_START(snookr10_state::snookr10) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_snookr10) + GFXDECODE(config, m_gfxdecode, "palette", gfx_snookr10); PALETTE(config, "palette", FUNC(snookr10_state::snookr10_palette), 256); /* sound hardware */ diff --git a/src/mame/drivers/sonson.cpp b/src/mame/drivers/sonson.cpp index b7127053fdc..c12d682afbe 100644 --- a/src/mame/drivers/sonson.cpp +++ b/src/mame/drivers/sonson.cpp @@ -250,7 +250,7 @@ MACHINE_CONFIG_START(sonson_state::sonson) MCFG_SCREEN_UPDATE_DRIVER(sonson_state, screen_update_sonson) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_sonson) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sonson); PALETTE(config, m_palette, FUNC(sonson_state::sonson_palette), 64*4 + 32*8, 32); diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp index ba853f407f4..8e5040dfb6d 100644 --- a/src/mame/drivers/sorcerer.cpp +++ b/src/mame/drivers/sorcerer.cpp @@ -421,7 +421,7 @@ MACHINE_CONFIG_START(sorcerer_state::sorcerer) MCFG_SCREEN_UPDATE_DRIVER(sorcerer_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sorcerer) + GFXDECODE(config, "gfxdecode", "palette", gfx_sorcerer); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/spartanxtec.cpp b/src/mame/drivers/spartanxtec.cpp index ba840dfc246..eb4ec8c4d01 100644 --- a/src/mame/drivers/spartanxtec.cpp +++ b/src/mame/drivers/spartanxtec.cpp @@ -384,7 +384,7 @@ MACHINE_CONFIG_START(spartanxtec_state::spartanxtec) PALETTE(config, m_palette, FUNC(spartanxtec_state::spartanxtec_palette), 0x200); - MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_news) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_news); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/speglsht.cpp b/src/mame/drivers/speglsht.cpp index e0fb3cafb41..7ea1f01ca27 100644 --- a/src/mame/drivers/speglsht.cpp +++ b/src/mame/drivers/speglsht.cpp @@ -437,7 +437,7 @@ MACHINE_CONFIG_START(speglsht_state::speglsht) MCFG_SCREEN_VISIBLE_AREA(0, 319, 8, 239-8) MCFG_SCREEN_UPDATE_DRIVER(speglsht_state, screen_update_speglsht) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_speglsht) + GFXDECODE(config, "gfxdecode", m_palette, gfx_speglsht); MCFG_PALETTE_ADD("palette", 16*16*4+1) MCFG_VIDEO_START_OVERRIDE(speglsht_state,speglsht) diff --git a/src/mame/drivers/sprint2.cpp b/src/mame/drivers/sprint2.cpp index 3f0d733e6df..8f1208f4485 100644 --- a/src/mame/drivers/sprint2.cpp +++ b/src/mame/drivers/sprint2.cpp @@ -505,7 +505,7 @@ MACHINE_CONFIG_START(sprint2_state::sprint2) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sprint2_state, screen_vblank_sprint2)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_sprint2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sprint2); PALETTE(config, m_palette, FUNC(sprint2_state::sprint2_palette), 12, 4); /* sound hardware */ diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp index e87350c727c..1eed0cae555 100644 --- a/src/mame/drivers/sprint4.cpp +++ b/src/mame/drivers/sprint4.cpp @@ -394,7 +394,7 @@ MACHINE_CONFIG_START(sprint4_state::sprint4) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sprint4_state, screen_vblank)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_sprint4) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sprint4); PALETTE(config, m_palette, FUNC(sprint4_state::sprint4_palette), 10, 6); /* sound hardware */ diff --git a/src/mame/drivers/sprint8.cpp b/src/mame/drivers/sprint8.cpp index 5408ab3526b..4fc944fead1 100644 --- a/src/mame/drivers/sprint8.cpp +++ b/src/mame/drivers/sprint8.cpp @@ -473,7 +473,7 @@ MACHINE_CONFIG_START(sprint8_state::sprint8) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sprint8_state, screen_vblank)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_sprint8) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_sprint8); PALETTE(config, m_palette, FUNC(sprint8_state::sprint8_palette), 36, 18); sprint8_audio(config); diff --git a/src/mame/drivers/spyhuntertec.cpp b/src/mame/drivers/spyhuntertec.cpp index 029ae54f680..1af79bc0779 100644 --- a/src/mame/drivers/spyhuntertec.cpp +++ b/src/mame/drivers/spyhuntertec.cpp @@ -691,7 +691,7 @@ MACHINE_CONFIG_START(spyhuntertec_state::spyhuntertec) MCFG_SCREEN_UPDATE_DRIVER(spyhuntertec_state, screen_update_spyhuntertec) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_spyhuntertec) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_spyhuntertec); MCFG_PALETTE_ADD("palette", 64+4) // MCFG_PALETTE_INIT_OWNER(spyhuntertec_state,spyhunt) diff --git a/src/mame/drivers/srumbler.cpp b/src/mame/drivers/srumbler.cpp index dc2e2ac91b7..3858df5bdc1 100644 --- a/src/mame/drivers/srumbler.cpp +++ b/src/mame/drivers/srumbler.cpp @@ -269,7 +269,7 @@ MACHINE_CONFIG_START(srumbler_state::srumbler) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram8_device, vblank_copy_rising)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_srumbler) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_srumbler); PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 512); diff --git a/src/mame/drivers/sshot.cpp b/src/mame/drivers/sshot.cpp index 207fcd43a67..dd503760c74 100644 --- a/src/mame/drivers/sshot.cpp +++ b/src/mame/drivers/sshot.cpp @@ -359,7 +359,7 @@ MACHINE_CONFIG_START(supershot_state::supershot) MCFG_SCREEN_UPDATE_DRIVER(supershot_state, screen_update_supershot) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_supershot) + GFXDECODE(config, m_gfxdecode, "palette", gfx_supershot); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp index c54b83ef210..7e4e8ee593f 100644 --- a/src/mame/drivers/starshp1.cpp +++ b/src/mame/drivers/starshp1.cpp @@ -321,7 +321,7 @@ MACHINE_CONFIG_START(starshp1_state::starshp1) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, starshp1_state, screen_vblank_starshp1)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_starshp1) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_starshp1); PALETTE(config, m_palette, FUNC(starshp1_state::starshp1_palette), 19, 8); /* sound hardware */ diff --git a/src/mame/drivers/stlforce.cpp b/src/mame/drivers/stlforce.cpp index 6de179c48d5..cd2964bb589 100644 --- a/src/mame/drivers/stlforce.cpp +++ b/src/mame/drivers/stlforce.cpp @@ -214,7 +214,7 @@ MACHINE_CONFIG_START(stlforce_state::stlforce) MCFG_SCREEN_UPDATE_DRIVER(stlforce_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_stlforce) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_stlforce); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); EDEVICES_SFORCE_VID(config, m_video, 0); diff --git a/src/mame/drivers/subs.cpp b/src/mame/drivers/subs.cpp index aeecb9e28c0..486f52a89cd 100644 --- a/src/mame/drivers/subs.cpp +++ b/src/mame/drivers/subs.cpp @@ -182,7 +182,7 @@ MACHINE_CONFIG_START(subs_state::subs) /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_subs) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_subs); PALETTE(config, m_palette, FUNC(subs_state::subs_palette), 4); diff --git a/src/mame/drivers/subsino2.cpp b/src/mame/drivers/subsino2.cpp index fa07dd47b63..d9075218f87 100644 --- a/src/mame/drivers/subsino2.cpp +++ b/src/mame/drivers/subsino2.cpp @@ -2401,7 +2401,7 @@ MACHINE_CONFIG_START(subsino2_state::bishjan) MCFG_SCREEN_UPDATE_DRIVER(subsino2_state, screen_update_subsino2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ss9601) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); MCFG_PALETTE_ADD( "palette", 256 ) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC @@ -2453,7 +2453,7 @@ MACHINE_CONFIG_START(subsino2_state::mtrain) MCFG_SCREEN_UPDATE_DRIVER(subsino2_state, screen_update_subsino2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ss9601) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); MCFG_PALETTE_ADD( "palette", 256 ) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC @@ -2488,7 +2488,7 @@ MACHINE_CONFIG_START(subsino2_state::saklove) MCFG_SCREEN_UPDATE_DRIVER(subsino2_state, screen_update_subsino2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ss9601) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); MCFG_PALETTE_ADD( "palette", 256 ) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC @@ -2527,7 +2527,7 @@ MACHINE_CONFIG_START(subsino2_state::xplan) MCFG_SCREEN_UPDATE_DRIVER(subsino2_state, screen_update_subsino2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ss9601) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); MCFG_PALETTE_ADD( "palette", 256 ) ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC diff --git a/src/mame/drivers/supbtime.cpp b/src/mame/drivers/supbtime.cpp index 4e63f2bf75b..62aa156af3d 100644 --- a/src/mame/drivers/supbtime.cpp +++ b/src/mame/drivers/supbtime.cpp @@ -352,7 +352,7 @@ MACHINE_CONFIG_START(supbtime_state::supbtime) MCFG_SCREEN_UPDATE_DRIVER(supbtime_state, screen_update_supbtime) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_supbtime) + GFXDECODE(config, "gfxdecode", "palette", gfx_supbtime); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); DECO16IC(config, m_deco_tilegen, 0); diff --git a/src/mame/drivers/supduck.cpp b/src/mame/drivers/supduck.cpp index c34cb79c02d..1492dedf3d7 100644 --- a/src/mame/drivers/supduck.cpp +++ b/src/mame/drivers/supduck.cpp @@ -464,7 +464,7 @@ MACHINE_CONFIG_START(supduck_state::supduck) MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_supduck) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_supduck); MCFG_DEVICE_ADD("spritegen", TIGEROAD_SPRITE, 0) diff --git a/src/mame/drivers/supracan.cpp b/src/mame/drivers/supracan.cpp index 35574781d2a..9e2b7f0a267 100644 --- a/src/mame/drivers/supracan.cpp +++ b/src/mame/drivers/supracan.cpp @@ -1903,7 +1903,7 @@ MACHINE_CONFIG_START(supracan_state::supracan) PALETTE(config, "palette", FUNC(supracan_state::supracan_palette)).set_format(palette_device::xBGR_555, 32768); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_supracan) + GFXDECODE(config, m_gfxdecode, "palette", gfx_supracan); MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "supracan_cart") MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) diff --git a/src/mame/drivers/suprnova.cpp b/src/mame/drivers/suprnova.cpp index 186b6141cc7..5125b31e40a 100644 --- a/src/mame/drivers/suprnova.cpp +++ b/src/mame/drivers/suprnova.cpp @@ -815,9 +815,9 @@ MACHINE_CONFIG_START(skns_state::skns) MCFG_SCREEN_UPDATE_DRIVER(skns_state, screen_update) MCFG_PALETTE_ADD("palette", 32768) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", skns_bg) + GFXDECODE(config, m_gfxdecode, m_palette, skns_bg); - MCFG_DEVICE_ADD("spritegen", SKNS_SPRITE, 0) + SKNS_SPRITE(config, m_spritegen, 0); /* sound hardware */ diff --git a/src/mame/drivers/sys9002.cpp b/src/mame/drivers/sys9002.cpp index 7820b4fc476..4e1413fd225 100644 --- a/src/mame/drivers/sys9002.cpp +++ b/src/mame/drivers/sys9002.cpp @@ -134,7 +134,7 @@ MACHINE_CONFIG_START(sys9002_state::sys9002) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - //MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mx2178) + //GFXDECODE(config, "gfxdecode", m_palette, gfx_mx2178); PALETTE(config, m_palette, palette_device::MONOCHROME); /* Devices */ diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 461d5dc4cd2..8b158e190cb 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -1795,7 +1795,7 @@ MACHINE_CONFIG_START(taitosj_state::nomcu) MCFG_SCREEN_UPDATE_DRIVER(taitosj_state, screen_update_taitosj) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_taitosj) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_taitosj); MCFG_PALETTE_ADD("palette", 64) diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index 64d5983bb4e..b5e398bd311 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -665,7 +665,7 @@ MACHINE_CONFIG_START(tandy1000_state::tandy1000_common) /* video hardware */ MCFG_DEVICE_ADD("pcvideo_t1000", PCVIDEO_T1000, 0) MCFG_VIDEO_SET_SCREEN("pcvideo_t1000:screen") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "pcvideo_t1000:palette", gfx_t1000) + GFXDECODE(config, "gfxdecode", "pcvideo_t1000:palette", gfx_t1000); /* sound hardware */ MCFG_DEVICE_ADD("sn76496", NCR8496, XTAL(14'318'181)/4) diff --git a/src/mame/drivers/tank8.cpp b/src/mame/drivers/tank8.cpp index f49ed135a26..ba993fccfe0 100644 --- a/src/mame/drivers/tank8.cpp +++ b/src/mame/drivers/tank8.cpp @@ -346,7 +346,7 @@ MACHINE_CONFIG_START(tank8_state::tank8) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tank8_state, screen_vblank)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_tank8) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tank8); PALETTE(config, m_palette, FUNC(tank8_state::tank8_palette), 20, 10); /* sound hardware */ diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp index ec53c4c2994..62a2090ac11 100644 --- a/src/mame/drivers/tetrisp2.cpp +++ b/src/mame/drivers/tetrisp2.cpp @@ -1712,7 +1712,7 @@ MACHINE_CONFIG_START(tetrisp2_state::tetrisp2) MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_tetrisp2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,tetrisp2) @@ -1747,7 +1747,7 @@ MACHINE_CONFIG_START(tetrisp2_state::nndmseal) MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_tetrisp2) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,nndmseal) // bg layer offset @@ -1780,7 +1780,7 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn) MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_rockntread) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,rockntread) @@ -1815,7 +1815,7 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn2) MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_rockntread) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,rockntread) @@ -1847,10 +1847,10 @@ MACHINE_CONFIG_START(tetrisp2_state::rocknms) /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) - MCFG_DEVICE_ADD("sub_gfxdecode", GFXDECODE, "sub_palette", gfx_rocknms_sub) + GFXDECODE(config, m_sub_gfxdecode, m_sub_palette, gfx_rocknms_sub); MCFG_PALETTE_ADD("sub_palette", 0x8000) config.set_default_layout(layout_rocknms); @@ -1926,16 +1926,16 @@ MACHINE_CONFIG_START(stepstag_state::stepstag) rscreen.set_palette("rpalette"); MCFG_VIDEO_START_OVERRIDE(stepstag_state, stepstag ) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_l", GFXDECODE, "lpalette", gfx_vj_lscreen) + GFXDECODE(config, m_vj_gfxdecode_l, m_vj_palette_l, gfx_vj_lscreen); MCFG_PALETTE_ADD("lpalette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_m", GFXDECODE, "mpalette", gfx_vj_mscreen) + GFXDECODE(config, m_vj_gfxdecode_m, m_vj_palette_m, gfx_vj_mscreen); MCFG_PALETTE_ADD("mpalette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_r", GFXDECODE, "rpalette", gfx_vj_rscreen) + GFXDECODE(config, m_vj_gfxdecode_r, m_vj_palette_r, gfx_vj_rscreen); MCFG_PALETTE_ADD("rpalette", 0x8000) config.set_default_layout(layout_stepstag); @@ -1999,16 +1999,16 @@ MACHINE_CONFIG_START(stepstag_state::vjdash) // 4 Screens MCFG_SCREEN_PALETTE("rpalette") MCFG_VIDEO_START_OVERRIDE(stepstag_state, stepstag ) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tetrisp2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2); MCFG_PALETTE_ADD("palette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_l", GFXDECODE, "lpalette", gfx_vj_lscreen) + GFXDECODE(config, m_vj_gfxdecode_l, m_vj_palette_l, gfx_vj_lscreen); MCFG_PALETTE_ADD("lpalette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_m", GFXDECODE, "mpalette", gfx_vj_mscreen) + GFXDECODE(config, m_vj_gfxdecode_m, m_vj_palette_m, gfx_vj_mscreen); MCFG_PALETTE_ADD("mpalette", 0x8000) - MCFG_DEVICE_ADD("gfxdecode_r", GFXDECODE, "rpalette", gfx_vj_rscreen) + GFXDECODE(config, m_vj_gfxdecode_r, m_vj_palette_r, gfx_vj_rscreen); MCFG_PALETTE_ADD("rpalette", 0x8000) config.set_default_layout(layout_vjdash); diff --git a/src/mame/drivers/thoop2.cpp b/src/mame/drivers/thoop2.cpp index 8e1c0552dea..626b61066ed 100644 --- a/src/mame/drivers/thoop2.cpp +++ b/src/mame/drivers/thoop2.cpp @@ -292,7 +292,7 @@ MACHINE_CONFIG_START(thoop2_state::thoop2) MCFG_SCREEN_UPDATE_DRIVER(thoop2_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_thoop2) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_thoop2); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); /* sound hardware */ diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 4e845b54185..102c9292f17 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -258,7 +258,7 @@ MACHINE_CONFIG_START(thunderj_state::thunderj) config.m_perfect_cpu_quantum = subtag("maincpu"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_thunderj) + GFXDECODE(config, "gfxdecode", "palette", gfx_thunderj); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); ATARI_VAD(config, m_vad, 0, m_screen); diff --git a/src/mame/drivers/tim100.cpp b/src/mame/drivers/tim100.cpp index 495518871b6..260e4d7b669 100644 --- a/src/mame/drivers/tim100.cpp +++ b/src/mame/drivers/tim100.cpp @@ -175,7 +175,7 @@ MACHINE_CONFIG_START(tim100_state::tim100) MCFG_SCREEN_SIZE(600, 352) MCFG_SCREEN_VISIBLE_AREA(0, 40*12-1, 0, 16*16-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tim100 ) + GFXDECODE(config, "gfxdecode", m_palette, gfx_tim100); I8276(config, m_crtc, XTAL(4'915'200)); m_crtc->set_character_width(12); diff --git a/src/mame/drivers/tk80bs.cpp b/src/mame/drivers/tk80bs.cpp index a1a71076978..7109956a936 100644 --- a/src/mame/drivers/tk80bs.cpp +++ b/src/mame/drivers/tk80bs.cpp @@ -187,7 +187,7 @@ MACHINE_CONFIG_START(tk80bs_state::tk80bs) MCFG_SCREEN_PALETTE(m_palette) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tk80bs) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tk80bs); /* Devices */ I8255(config, m_ppi); diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index 6387823d0c6..dfffdf747a0 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -225,7 +225,7 @@ MACHINE_CONFIG_START(toobin_state::toobin) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 640, 0, 512, 416, 0, 384) MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_toobin) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_toobin); MCFG_PALETTE_ADD("palette", 1024) /* sound hardware */ diff --git a/src/mame/drivers/trvmadns.cpp b/src/mame/drivers/trvmadns.cpp index 6be42577be8..779828acbb0 100644 --- a/src/mame/drivers/trvmadns.cpp +++ b/src/mame/drivers/trvmadns.cpp @@ -403,7 +403,7 @@ MACHINE_CONFIG_START(trvmadns_state::trvmadns) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_trvmadns) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_trvmadns); MCFG_PALETTE_ADD("palette", 16) diff --git a/src/mame/drivers/tryout.cpp b/src/mame/drivers/tryout.cpp index 1839f9dfb1b..ac8f10ded2e 100644 --- a/src/mame/drivers/tryout.cpp +++ b/src/mame/drivers/tryout.cpp @@ -209,7 +209,7 @@ MACHINE_CONFIG_START(tryout_state::tryout) MCFG_SCREEN_UPDATE_DRIVER(tryout_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_tryout) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tryout); PALETTE(config, m_palette, FUNC(tryout_state::tryout_palette), 0x20); /* sound hardware */ diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index bdbae8cbf5e..13a3dd1d30b 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -749,7 +749,7 @@ MACHINE_CONFIG_START(tsamurai_state::tsamurai) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tsamurai_state, vblank_irq)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tsamurai) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(tsamurai_state,tsamurai) @@ -796,7 +796,7 @@ MACHINE_CONFIG_START(tsamurai_state::vsgongf) MCFG_SCREEN_PALETTE(m_palette) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tsamurai_state, vblank_irq)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tsamurai) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(tsamurai_state,vsgongf) @@ -851,7 +851,7 @@ MACHINE_CONFIG_START(tsamurai_state::m660) screen.screen_vblank().set(FUNC(tsamurai_state::vblank_irq)); screen.screen_vblank().append_inputline(m_audio3, INPUT_LINE_NMI); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tsamurai) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); MCFG_VIDEO_START_OVERRIDE(tsamurai_state,m660) diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp index 2072512814e..0f5f81d7cfe 100644 --- a/src/mame/drivers/tumbleb.cpp +++ b/src/mame/drivers/tumbleb.cpp @@ -2089,7 +2089,7 @@ MACHINE_CONFIG_START(tumbleb_state::tumblepb) m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_tumbleb) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tumbleb); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); MCFG_VIDEO_START_OVERRIDE(tumbleb_state,tumblepb) @@ -2131,7 +2131,7 @@ MACHINE_CONFIG_START(tumbleb_state::tumbleb2) m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_tumbleb) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tumbleb); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); MCFG_VIDEO_START_OVERRIDE(tumbleb_state,tumblepb) @@ -2179,7 +2179,7 @@ MACHINE_CONFIG_START(tumbleb_state::jumpkids) m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_tumbleb) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_tumbleb); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); MCFG_VIDEO_START_OVERRIDE(tumbleb_state,tumblepb) @@ -2218,7 +2218,7 @@ MACHINE_CONFIG_START(tumbleb_state::fncywld) m_sprgen->set_transpen(15); m_sprgen->set_gfxdecode_tag(m_gfxdecode); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_fncywld) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_fncywld); PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 0x800); MCFG_VIDEO_START_OVERRIDE(tumbleb_state,fncywld) diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp index e3a6499bf28..b63be326769 100644 --- a/src/mame/drivers/ultratnk.cpp +++ b/src/mame/drivers/ultratnk.cpp @@ -312,7 +312,7 @@ MACHINE_CONFIG_START(ultratnk_state::ultratnk) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ultratnk_state, screen_vblank)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_ultratnk) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ultratnk); PALETTE(config, m_palette, FUNC(ultratnk_state::ultratnk_palette), 10, 4); /* sound hardware */ diff --git a/src/mame/drivers/unior.cpp b/src/mame/drivers/unior.cpp index d6b5b472837..5945d6c8990 100644 --- a/src/mame/drivers/unior.cpp +++ b/src/mame/drivers/unior.cpp @@ -389,7 +389,7 @@ MACHINE_CONFIG_START(unior_state::unior) MCFG_SCREEN_SIZE(640, 200) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_unior) + GFXDECODE(config, "gfxdecode", m_palette, gfx_unior); PALETTE(config, m_palette, FUNC(unior_state::unior_palette), 3); /* sound hardware */ diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp index e10b0446844..f57ffcbf960 100644 --- a/src/mame/drivers/ut88.cpp +++ b/src/mame/drivers/ut88.cpp @@ -205,7 +205,7 @@ MACHINE_CONFIG_START(ut88_state::ut88) MCFG_SCREEN_PALETTE(m_palette) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ut88) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ut88); /* audio hardware */ SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/drivers/v6809.cpp b/src/mame/drivers/v6809.cpp index aacae4f6a1c..bbbc680028c 100644 --- a/src/mame/drivers/v6809.cpp +++ b/src/mame/drivers/v6809.cpp @@ -296,7 +296,7 @@ MACHINE_CONFIG_START(v6809_state::v6809) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", sy6545_1_device, screen_update) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_v6809) + GFXDECODE(config, "gfxdecode", m_palette, gfx_v6809); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp index c1ad77f601c..a2f29a0299e 100644 --- a/src/mame/drivers/vaportra.cpp +++ b/src/mame/drivers/vaportra.cpp @@ -229,7 +229,7 @@ MACHINE_CONFIG_START(vaportra_state::vaportra) MCFG_SCREEN_UPDATE_DRIVER(vaportra_state, screen_update) MCFG_SCREEN_PALETTE("colors") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_vaportra) + GFXDECODE(config, "gfxdecode", m_palette, gfx_vaportra); MCFG_PALETTE_ADD(m_palette, 1280) DECO16IC(config, m_deco_tilegen[0], 0); diff --git a/src/mame/drivers/vball.cpp b/src/mame/drivers/vball.cpp index 8ffcac894b1..8a42f9cbe13 100644 --- a/src/mame/drivers/vball.cpp +++ b/src/mame/drivers/vball.cpp @@ -413,7 +413,7 @@ MACHINE_CONFIG_START(vball_state::vball) MCFG_SCREEN_UPDATE_DRIVER(vball_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vb) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_vb); MCFG_PALETTE_ADD("palette", 256) diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp index 5acba4d8cbe..22608192b48 100644 --- a/src/mame/drivers/vg5k.cpp +++ b/src/mame/drivers/vg5k.cpp @@ -388,7 +388,7 @@ MACHINE_CONFIG_START(vg5k_state::vg5k) MCFG_SCREEN_SIZE(336, 300) MCFG_SCREEN_VISIBLE_AREA(00, 336-1, 00, 270-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vg5k) + GFXDECODE(config, "gfxdecode", "palette", gfx_vg5k); MCFG_PALETTE_ADD("palette", 8) /* sound hardware */ diff --git a/src/mame/drivers/videopin.cpp b/src/mame/drivers/videopin.cpp index 6655bf110ef..996c813535e 100644 --- a/src/mame/drivers/videopin.cpp +++ b/src/mame/drivers/videopin.cpp @@ -375,7 +375,7 @@ MACHINE_CONFIG_START(videopin_state::videopin) m_screen->set_screen_update(FUNC(videopin_state::screen_update)); m_screen->set_palette(m_palette); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_videopin) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_videopin); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp index 8c8ba0775cf..d4182042281 100644 --- a/src/mame/drivers/vindictr.cpp +++ b/src/mame/drivers/vindictr.cpp @@ -193,7 +193,7 @@ MACHINE_CONFIG_START(vindictr_state::vindictr) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vindictr) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_vindictr); MCFG_PALETTE_ADD("palette", 2048*8) MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, vindictr_state, get_playfield_tile_info, 8,8, SCAN_COLS, 64,64) diff --git a/src/mame/drivers/vpoker.cpp b/src/mame/drivers/vpoker.cpp index 5f5e6cc83ec..56da887afc3 100644 --- a/src/mame/drivers/vpoker.cpp +++ b/src/mame/drivers/vpoker.cpp @@ -651,7 +651,7 @@ MACHINE_CONFIG_START(vpoker_state::vpoker) MCFG_SCREEN_UPDATE_DRIVER(vpoker_state, screen_update_vpoker) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vpoker) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_vpoker); PALETTE(config, m_palette, palette_device::GBR_3BIT); diff --git a/src/mame/drivers/vroulet.cpp b/src/mame/drivers/vroulet.cpp index 900de567c43..02ad28d4a92 100644 --- a/src/mame/drivers/vroulet.cpp +++ b/src/mame/drivers/vroulet.cpp @@ -307,7 +307,7 @@ MACHINE_CONFIG_START(vroulet_state::vroulet) MCFG_SCREEN_UPDATE_DRIVER(vroulet_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vroulet) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_vroulet); MCFG_PALETTE_ADD("palette", 128*4) // sound hardware diff --git a/src/mame/drivers/vt100.cpp b/src/mame/drivers/vt100.cpp index 11ee97e72ff..6b23e1d5787 100644 --- a/src/mame/drivers/vt100.cpp +++ b/src/mame/drivers/vt100.cpp @@ -325,7 +325,7 @@ MACHINE_CONFIG_START(vt100_state::vt100) MCFG_SCREEN_UPDATE_DRIVER(vt100_state, screen_update_vt100) MCFG_SCREEN_PALETTE("vt100_video:palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "vt100_video:palette", gfx_vt100) + GFXDECODE(config, "gfxdecode", "vt100_video:palette", gfx_vt100); // MCFG_PALETTE_ADD_MONOCHROME("palette") config.set_default_layout(layout_vt100); diff --git a/src/mame/drivers/vta2000.cpp b/src/mame/drivers/vta2000.cpp index 1dc60d4816e..628868c0fa8 100644 --- a/src/mame/drivers/vta2000.cpp +++ b/src/mame/drivers/vta2000.cpp @@ -222,7 +222,7 @@ MACHINE_CONFIG_START(vta2000_state::vta2000) MCFG_SCREEN_PALETTE("palette") PALETTE(config, "palette", FUNC(vta2000_state::vta2000_palette), 3); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vta2000) + GFXDECODE(config, "gfxdecode", "palette", gfx_vta2000); SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.5); diff --git a/src/mame/drivers/vulgus.cpp b/src/mame/drivers/vulgus.cpp index eca7adde124..16c285d4e22 100644 --- a/src/mame/drivers/vulgus.cpp +++ b/src/mame/drivers/vulgus.cpp @@ -236,7 +236,7 @@ MACHINE_CONFIG_START(vulgus_state::vulgus) MCFG_SCREEN_UPDATE_DRIVER(vulgus_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_vulgus) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_vulgus); PALETTE(config, m_palette, FUNC(vulgus_state::vulgus_palette), 64*4+16*16+4*32*8, 256); diff --git a/src/mame/drivers/wms.cpp b/src/mame/drivers/wms.cpp index 6cd6df6855a..c14ae209c31 100644 --- a/src/mame/drivers/wms.cpp +++ b/src/mame/drivers/wms.cpp @@ -197,7 +197,7 @@ MACHINE_CONFIG_START(wms_state::wms) MCFG_SCREEN_UPDATE_DRIVER(wms_state, screen_update_wms) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wms) + GFXDECODE(config, "gfxdecode", "palette", gfx_wms); MCFG_PALETTE_ADD("palette", 0x100) MACHINE_CONFIG_END diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp index da7cb3e1449..f35dea54029 100644 --- a/src/mame/drivers/wolfpack.cpp +++ b/src/mame/drivers/wolfpack.cpp @@ -323,7 +323,7 @@ MACHINE_CONFIG_START(wolfpack_state::wolfpack) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, wolfpack_state, screen_vblank)) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_wolfpack) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_wolfpack); PALETTE(config, m_palette, FUNC(wolfpack_state::wolfpack_palette), 12, 8); /* sound hardware */ diff --git a/src/mame/drivers/wrally.cpp b/src/mame/drivers/wrally.cpp index e186e6a9936..956fc6e36b5 100644 --- a/src/mame/drivers/wrally.cpp +++ b/src/mame/drivers/wrally.cpp @@ -282,7 +282,7 @@ MACHINE_CONFIG_START(wrally_state::wrally) MCFG_SCREEN_UPDATE_DRIVER(wrally_state, screen_update) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_wrally) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_wrally); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024*8); GAELCO_WRALLY_SPRITES(config, m_sprites, 0); diff --git a/src/mame/drivers/wswan.cpp b/src/mame/drivers/wswan.cpp index bc539ea0e28..0077257b28b 100644 --- a/src/mame/drivers/wswan.cpp +++ b/src/mame/drivers/wswan.cpp @@ -143,7 +143,7 @@ MACHINE_CONFIG_START(wswan_state::wswan) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wswan) + GFXDECODE(config, "gfxdecode", "palette", gfx_wswan); PALETTE(config, "palette", FUNC(wswan_state::wswan_palette), 16); /* sound hardware */ diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp index 20a95a9e1d4..f0ce88ec8d0 100644 --- a/src/mame/drivers/xerox820.cpp +++ b/src/mame/drivers/xerox820.cpp @@ -613,7 +613,7 @@ MACHINE_CONFIG_START(xerox820_state::xerox820) MCFG_SCREEN_UPDATE_DRIVER(xerox820_state, screen_update) MCFG_SCREEN_RAW_PARAMS(10.69425_MHz_XTAL, 700, 0, 560, 260, 0, 240) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_xerox820) + GFXDECODE(config, "gfxdecode", m_palette, gfx_xerox820); PALETTE(config, m_palette, palette_device::MONOCHROME); /* devices */ @@ -689,7 +689,7 @@ MACHINE_CONFIG_START(xerox820ii_state::xerox820ii) MCFG_SCREEN_UPDATE_DRIVER(xerox820ii_state, screen_update) MCFG_SCREEN_RAW_PARAMS(10.69425_MHz_XTAL, 700, 0, 560, 260, 0, 240) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_xerox820ii) + GFXDECODE(config, "gfxdecode", m_palette, gfx_xerox820ii); PALETTE(config, m_palette, palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/z1013.cpp b/src/mame/drivers/z1013.cpp index b6e438fbd34..89136e53288 100644 --- a/src/mame/drivers/z1013.cpp +++ b/src/mame/drivers/z1013.cpp @@ -386,7 +386,7 @@ MACHINE_CONFIG_START(z1013_state::z1013) MCFG_SCREEN_UPDATE_DRIVER(z1013_state, screen_update_z1013) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_z1013) + GFXDECODE(config, "gfxdecode", "palette", gfx_z1013); PALETTE(config, "palette", palette_device::MONOCHROME); /* sound hardware */ diff --git a/src/mame/drivers/z9001.cpp b/src/mame/drivers/z9001.cpp index e533cf0372d..9d329a141ce 100644 --- a/src/mame/drivers/z9001.cpp +++ b/src/mame/drivers/z9001.cpp @@ -222,7 +222,7 @@ MACHINE_CONFIG_START(z9001_state::z9001) MCFG_SCREEN_UPDATE_DRIVER(z9001_state, screen_update_z9001) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_z9001) + GFXDECODE(config, "gfxdecode", "palette", gfx_z9001); MCFG_PALETTE_ADD("palette", 16) /* Sound */ diff --git a/src/mame/etc/korgm1.cpp b/src/mame/etc/korgm1.cpp index fcc047054dd..ddfb1cd8490 100644 --- a/src/mame/etc/korgm1.cpp +++ b/src/mame/etc/korgm1.cpp @@ -185,7 +185,7 @@ MACHINE_CONFIG_START(korgm1_state::korgm1) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_korgm1) + GFXDECODE(config, "gfxdecode", "palette", gfx_korgm1); MCFG_PALETTE_ADD("palette", 8) diff --git a/src/mame/video/abc80.cpp b/src/mame/video/abc80.cpp index bc6768223da..4f3b46c40f9 100644 --- a/src/mame/video/abc80.cpp +++ b/src/mame/video/abc80.cpp @@ -198,6 +198,6 @@ MACHINE_CONFIG_START(abc80_state::abc80_video) MCFG_SCREEN_RAW_PARAMS(XTAL(11'980'800)/2, ABC80_HTOTAL, ABC80_HBEND, ABC80_HBSTART, ABC80_VTOTAL, ABC80_VBEND, ABC80_VBSTART) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_abc80) + GFXDECODE(config, "gfxdecode", m_palette, gfx_abc80); PALETTE(config, m_palette, palette_device::MONOCHROME); MACHINE_CONFIG_END diff --git a/src/mame/video/airraid_dev.cpp b/src/mame/video/airraid_dev.cpp index e68717671be..e0687ffad6b 100644 --- a/src/mame/video/airraid_dev.cpp +++ b/src/mame/video/airraid_dev.cpp @@ -69,7 +69,7 @@ MACHINE_CONFIG_START(airraid_video_device::device_add_mconfig) MCFG_SCREEN_UPDATE_DRIVER(airraid_video_device, screen_update_airraid) MCFG_SCREEN_PALETTE("^palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "^palette", gfx_cshooter) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_cshooter); MACHINE_CONFIG_END diff --git a/src/mame/video/cgc7900.cpp b/src/mame/video/cgc7900.cpp index 41e56d568ca..0db24b9c12f 100644 --- a/src/mame/video/cgc7900.cpp +++ b/src/mame/video/cgc7900.cpp @@ -236,7 +236,7 @@ MACHINE_CONFIG_START(cgc7900_state::cgc7900_video) MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cgc7900_state, irq<0xc>)) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_cgc7900) + GFXDECODE(config, "gfxdecode", m_palette, gfx_cgc7900); PALETTE(config, m_palette, FUNC(cgc7900_state::cgc7900_palette), 8); TIMER(config, "blink").configure_periodic(FUNC(cgc7900_state::blink_tick), attotime::from_hz(XTAL(28'480'000)/7500000)); diff --git a/src/mame/video/leland.cpp b/src/mame/video/leland.cpp index 6d5b817d4c6..4ad9620e0c0 100644 --- a/src/mame/video/leland.cpp +++ b/src/mame/video/leland.cpp @@ -512,7 +512,7 @@ static GFXDECODE_START( gfx_ataxx ) GFXDECODE_END MACHINE_CONFIG_START(leland_state::leland_video) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_leland) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_leland); PALETTE(config, m_palette).set_format(palette_device::BGR_233, 1024); MCFG_SCREEN_ADD("screen", RASTER) @@ -524,9 +524,10 @@ MACHINE_CONFIG_START(leland_state::leland_video) MCFG_SCREEN_PALETTE(m_palette) MACHINE_CONFIG_END -MACHINE_CONFIG_START(ataxx_state::ataxx_video) +void ataxx_state::ataxx_video(machine_config &config) +{ leland_video(config); - MCFG_DEVICE_REPLACE("gfxdecode", GFXDECODE, "palette", gfx_ataxx) + GFXDECODE(config.replace(), m_gfxdecode, m_palette, gfx_ataxx); m_palette->set_format(palette_device::xRGB_444, 1024); -MACHINE_CONFIG_END +} diff --git a/src/mame/video/madalien.cpp b/src/mame/video/madalien.cpp index fa699674374..62dd7d21dd0 100644 --- a/src/mame/video/madalien.cpp +++ b/src/mame/video/madalien.cpp @@ -370,7 +370,7 @@ MACHINE_CONFIG_START(madalien_state::madalien_video) MCFG_SCREEN_UPDATE_DRIVER(madalien_state, screen_update_madalien) MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_madalien) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_madalien); PALETTE(config, m_palette, FUNC(madalien_state::madalien_palette), 0x30, 0x20); MCFG_VIDEO_START_OVERRIDE(madalien_state,madalien) diff --git a/src/mame/video/mystston.cpp b/src/mame/video/mystston.cpp index 564b9ca6ce0..db8335090e8 100644 --- a/src/mame/video/mystston.cpp +++ b/src/mame/video/mystston.cpp @@ -314,7 +314,7 @@ MACHINE_CONFIG_START(mystston_state::mystston_video) MCFG_VIDEO_START_OVERRIDE(mystston_state,mystston) MCFG_VIDEO_RESET_OVERRIDE(mystston_state,mystston) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mystston) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_mystston); MCFG_PALETTE_ADD("palette", 0x40) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/video/newbrain.cpp b/src/mame/video/newbrain.cpp index c829acc2e90..06ff23234e6 100644 --- a/src/mame/video/newbrain.cpp +++ b/src/mame/video/newbrain.cpp @@ -195,5 +195,5 @@ MACHINE_CONFIG_START(newbrain_state::newbrain_video) PALETTE(config, m_palette, palette_device::MONOCHROME); - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_newbrain) + GFXDECODE(config, "gfxdecode", m_palette, gfx_newbrain); MACHINE_CONFIG_END diff --git a/src/mame/video/stfight_dev.cpp b/src/mame/video/stfight_dev.cpp index d558473f77f..0e85fb3af6f 100644 --- a/src/mame/video/stfight_dev.cpp +++ b/src/mame/video/stfight_dev.cpp @@ -119,7 +119,7 @@ MACHINE_CONFIG_START(stfight_video_device::device_add_mconfig) MCFG_SCREEN_UPDATE_DRIVER(stfight_video_device, screen_update_stfight) MCFG_SCREEN_PALETTE("^palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "^palette", gfx_stfight) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_stfight); MACHINE_CONFIG_END /* |