summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp2
-rw-r--r--src/devices/bus/coco/coco_fdc.cpp3
-rw-r--r--src/devices/bus/cpc/smartwatch.cpp7
-rw-r--r--src/devices/bus/isa/mach32.cpp20
-rw-r--r--src/devices/bus/isa/xtide.cpp2
-rw-r--r--src/devices/bus/sega8/rom.cpp7
-rw-r--r--src/devices/machine/ds1315.h18
-rw-r--r--src/devices/machine/ds1386.h25
-rw-r--r--src/devices/machine/ds2404.h32
-rw-r--r--src/devices/machine/ds75160a.h6
-rw-r--r--src/devices/machine/ds75161a.h95
-rw-r--r--src/devices/machine/eeprom.cpp10
-rw-r--r--src/devices/machine/eeprom.h44
-rw-r--r--src/devices/machine/eeprompar.cpp6
-rw-r--r--src/devices/machine/eeprompar.h43
-rw-r--r--src/devices/machine/eepromser.cpp10
-rw-r--r--src/devices/machine/eepromser.h15
-rw-r--r--src/devices/machine/latch8.h6
-rw-r--r--src/devices/sound/pokey.h4
-rw-r--r--src/devices/video/pc_vga.cpp2
-rw-r--r--src/emu/tilemap.h39
-rw-r--r--src/mame/audio/atarijsa.cpp9
-rw-r--r--src/mame/drivers/20pacgal.cpp2
-rw-r--r--src/mame/drivers/39in1.cpp2
-rw-r--r--src/mame/drivers/8080bw.cpp2
-rw-r--r--src/mame/drivers/albazg.cpp2
-rw-r--r--src/mame/drivers/apple2e.cpp3
-rw-r--r--src/mame/drivers/arcadecl.cpp3
-rw-r--r--src/mame/drivers/aristmk5.cpp4
-rw-r--r--src/mame/drivers/aristmk6.cpp3
-rw-r--r--src/mame/drivers/artmagic.cpp4
-rw-r--r--src/mame/drivers/asterix.cpp2
-rw-r--r--src/mame/drivers/astrcorp.cpp6
-rw-r--r--src/mame/drivers/atarig1.cpp3
-rw-r--r--src/mame/drivers/atarig42.cpp3
-rw-r--r--src/mame/drivers/atarigt.cpp3
-rw-r--r--src/mame/drivers/atarigx2.cpp3
-rw-r--r--src/mame/drivers/atarisy1.cpp6
-rw-r--r--src/mame/drivers/atarisy2.cpp4
-rw-r--r--src/mame/drivers/atetris.cpp129
-rw-r--r--src/mame/drivers/backfire.cpp2
-rw-r--r--src/mame/drivers/badlands.cpp6
-rw-r--r--src/mame/drivers/badlandsbl.cpp3
-rw-r--r--src/mame/drivers/batman.cpp3
-rw-r--r--src/mame/drivers/beathead.cpp3
-rw-r--r--src/mame/drivers/blstroid.cpp3
-rw-r--r--src/mame/drivers/bpmmicro.cpp13
-rw-r--r--src/mame/drivers/cave.cpp32
-rw-r--r--src/mame/drivers/cbasebal.cpp2
-rw-r--r--src/mame/drivers/cbm2.cpp120
-rw-r--r--src/mame/drivers/centiped.cpp2
-rw-r--r--src/mame/drivers/cps1.cpp16
-rw-r--r--src/mame/drivers/cps2.cpp2
-rw-r--r--src/mame/drivers/cyberbal.cpp150
-rw-r--r--src/mame/drivers/cybstorm.cpp3
-rw-r--r--src/mame/drivers/dcheese.cpp2
-rw-r--r--src/mame/drivers/deco156.cpp4
-rw-r--r--src/mame/drivers/deco32.cpp10
-rw-r--r--src/mame/drivers/deco_mlc.cpp4
-rw-r--r--src/mame/drivers/dkong.cpp26
-rw-r--r--src/mame/drivers/dreambal.cpp2
-rw-r--r--src/mame/drivers/dynamoah.cpp2
-rw-r--r--src/mame/drivers/eolith.cpp6
-rw-r--r--src/mame/drivers/eolith16.cpp2
-rw-r--r--src/mame/drivers/eprom.cpp9
-rw-r--r--src/mame/drivers/esd16.cpp2
-rw-r--r--src/mame/drivers/f-32.cpp12
-rw-r--r--src/mame/drivers/fcrash.cpp8
-rw-r--r--src/mame/drivers/feversoc.cpp2
-rw-r--r--src/mame/drivers/fireball.cpp2
-rw-r--r--src/mame/drivers/fortecar.cpp3
-rw-r--r--src/mame/drivers/fromanc2.cpp6
-rw-r--r--src/mame/drivers/gaelco2.cpp6
-rw-r--r--src/mame/drivers/gaelco3d.cpp2
-rw-r--r--src/mame/drivers/galastrm.cpp2
-rw-r--r--src/mame/drivers/galgames.cpp11
-rw-r--r--src/mame/drivers/galpani2.cpp2
-rw-r--r--src/mame/drivers/galpani3.cpp2
-rw-r--r--src/mame/drivers/gauntlet.cpp6
-rw-r--r--src/mame/drivers/gcpinbal.cpp2
-rw-r--r--src/mame/drivers/gijoe.cpp2
-rw-r--r--src/mame/drivers/groundfx.cpp2
-rw-r--r--src/mame/drivers/gticlub.cpp4
-rw-r--r--src/mame/drivers/gunbustr.cpp2
-rw-r--r--src/mame/drivers/harddriv.cpp7
-rw-r--r--src/mame/drivers/hornet.cpp11
-rw-r--r--src/mame/drivers/indigo.cpp2
-rw-r--r--src/mame/drivers/inufuku.cpp2
-rw-r--r--src/mame/drivers/invqix.cpp3
-rw-r--r--src/mame/drivers/jackpool.cpp2
-rw-r--r--src/mame/drivers/jaguar.cpp2
-rw-r--r--src/mame/drivers/jchan.cpp2
-rw-r--r--src/mame/drivers/jclub2.cpp6
-rw-r--r--src/mame/drivers/joystand.cpp2
-rw-r--r--src/mame/drivers/kaneko16.cpp16
-rw-r--r--src/mame/drivers/kickgoal.cpp6
-rw-r--r--src/mame/drivers/klax.cpp3
-rw-r--r--src/mame/drivers/konamigq.cpp4
-rw-r--r--src/mame/drivers/konamigv.cpp2
-rw-r--r--src/mame/drivers/konamigx.cpp2
-rw-r--r--src/mame/drivers/konendev.cpp2
-rw-r--r--src/mame/drivers/leland.cpp4
-rw-r--r--src/mame/drivers/lethal.cpp2
-rw-r--r--src/mame/drivers/limenko.cpp4
-rw-r--r--src/mame/drivers/lordgun.cpp4
-rw-r--r--src/mame/drivers/mastboy.cpp2
-rw-r--r--src/mame/drivers/metro.cpp6
-rw-r--r--src/mame/drivers/mhavoc.cpp2
-rw-r--r--src/mame/drivers/microterm.cpp6
-rw-r--r--src/mame/drivers/midas.cpp4
-rw-r--r--src/mame/drivers/mirage.cpp2
-rw-r--r--src/mame/drivers/mitchell.cpp8
-rw-r--r--src/mame/drivers/model2.cpp6
-rw-r--r--src/mame/drivers/model3.cpp2
-rw-r--r--src/mame/drivers/moo.cpp4
-rw-r--r--src/mame/drivers/mystwarr.cpp2
-rw-r--r--src/mame/drivers/namcona1.cpp107
-rw-r--r--src/mame/drivers/namconb1.cpp2
-rw-r--r--src/mame/drivers/namcos22.cpp4
-rw-r--r--src/mame/drivers/naomi.cpp5
-rw-r--r--src/mame/drivers/offtwall.cpp3
-rw-r--r--src/mame/drivers/othunder.cpp2
-rw-r--r--src/mame/drivers/overdriv.cpp3
-rw-r--r--src/mame/drivers/pasha2.cpp2
-rw-r--r--src/mame/drivers/photoply.cpp6
-rw-r--r--src/mame/drivers/pirates.cpp2
-rw-r--r--src/mame/drivers/playmark.cpp6
-rw-r--r--src/mame/drivers/plygonet.cpp2
-rw-r--r--src/mame/drivers/pntnpuzl.cpp2
-rw-r--r--src/mame/drivers/policetr.cpp2
-rw-r--r--src/mame/drivers/popeye.cpp2
-rw-r--r--src/mame/drivers/powerbal.cpp3
-rw-r--r--src/mame/drivers/psikyo4.cpp4
-rw-r--r--src/mame/drivers/psikyosh.cpp3
-rw-r--r--src/mame/drivers/pve500.cpp2
-rw-r--r--src/mame/drivers/pzletime.cpp2
-rw-r--r--src/mame/drivers/quizpun2.cpp2
-rw-r--r--src/mame/drivers/r2dx_v33.cpp4
-rw-r--r--src/mame/drivers/rabbit.cpp2
-rw-r--r--src/mame/drivers/rainbow.cpp2
-rw-r--r--src/mame/drivers/rampart.cpp3
-rw-r--r--src/mame/drivers/rbmk.cpp3
-rw-r--r--src/mame/drivers/relief.cpp3
-rw-r--r--src/mame/drivers/rltennis.cpp2
-rw-r--r--src/mame/drivers/rmnimbus.cpp2
-rw-r--r--src/mame/drivers/rungun.cpp2
-rw-r--r--src/mame/drivers/segas32.cpp4
-rw-r--r--src/mame/drivers/segasp.cpp4
-rw-r--r--src/mame/drivers/seibucats.cpp2
-rw-r--r--src/mame/drivers/seibuspi.cpp14
-rw-r--r--src/mame/drivers/seta2.cpp4
-rw-r--r--src/mame/drivers/shuuz.cpp3
-rw-r--r--src/mame/drivers/sigmab98.cpp4
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/simpsons.cpp2
-rw-r--r--src/mame/drivers/skullxbo.cpp3
-rw-r--r--src/mame/drivers/splash.cpp2
-rw-r--r--src/mame/drivers/spool99.cpp2
-rw-r--r--src/mame/drivers/ssv.cpp2
-rw-r--r--src/mame/drivers/stlforce.cpp2
-rw-r--r--src/mame/drivers/stv.cpp10
-rw-r--r--src/mame/drivers/superchs.cpp2
-rw-r--r--src/mame/drivers/taito_b.cpp6
-rw-r--r--src/mame/drivers/taito_f3.cpp118
-rw-r--r--src/mame/drivers/taito_z.cpp3
-rw-r--r--src/mame/drivers/taitojc.cpp2
-rw-r--r--src/mame/drivers/tasman.cpp2
-rw-r--r--src/mame/drivers/tecmosys.cpp2
-rw-r--r--src/mame/drivers/thunderj.cpp3
-rw-r--r--src/mame/drivers/timetrv.cpp2
-rw-r--r--src/mame/drivers/tmmjprd.cpp2
-rw-r--r--src/mame/drivers/tmnt.cpp12
-rw-r--r--src/mame/drivers/toaplan2.cpp4
-rw-r--r--src/mame/drivers/toobin.cpp3
-rw-r--r--src/mame/drivers/tti.cpp3
-rw-r--r--src/mame/drivers/ultrsprt.cpp2
-rw-r--r--src/mame/drivers/undrfire.cpp4
-rw-r--r--src/mame/drivers/unico.cpp2
-rw-r--r--src/mame/drivers/v102.cpp2
-rw-r--r--src/mame/drivers/vamphalf.cpp8
-rw-r--r--src/mame/drivers/vendetta.cpp2
-rw-r--r--src/mame/drivers/vindictr.cpp5
-rw-r--r--src/mame/drivers/wheelfir.cpp2
-rw-r--r--src/mame/drivers/xexex.cpp2
-rw-r--r--src/mame/drivers/xmen.cpp4
-rw-r--r--src/mame/drivers/xorworld.cpp2
-rw-r--r--src/mame/drivers/xybots.cpp7
-rw-r--r--src/mame/drivers/zr107.cpp4
-rw-r--r--src/mame/includes/atetris.h5
-rw-r--r--src/mame/includes/cyberbal.h17
-rw-r--r--src/mame/includes/namcona1.h20
-rw-r--r--src/mame/includes/taito_f3.h4
-rw-r--r--src/mame/machine/atarigen.cpp16
-rw-r--r--src/mame/machine/atarigen.h25
-rw-r--r--src/mame/machine/iteagle_fpga.cpp9
-rw-r--r--src/mame/machine/model1io.cpp2
-rw-r--r--src/mame/machine/model1io2.cpp2
-rw-r--r--src/mame/video/atarimo.h4
-rw-r--r--src/mame/video/cyberbal.cpp24
199 files changed, 829 insertions, 984 deletions
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 0316d5c6dcf..41de6c6b3e7 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -156,7 +156,7 @@ MACHINE_CONFIG_START(epson_lx810l_device::device_add_mconfig)
MCFG_E05A30_CENTRONICS_SELECT_CALLBACK(WRITELINE(*this, epson_lx810l_device, e05a30_centronics_select))
/* 256-bit eeprom */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C06_16BIT)
+ EEPROM_93C06_16BIT(config, "eeprom");
STEPPER(config, "pf_stepper", (uint8_t)4);
STEPPER(config, "cr_stepper", (uint8_t)2);
diff --git a/src/devices/bus/coco/coco_fdc.cpp b/src/devices/bus/coco/coco_fdc.cpp
index e1fe7a93d2a..fc5247ab269 100644
--- a/src/devices/bus/coco/coco_fdc.cpp
+++ b/src/devices/bus/coco/coco_fdc.cpp
@@ -141,7 +141,8 @@ MACHINE_CONFIG_START(coco_fdc_device_base::device_add_mconfig)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_DEVICE_ADD(DISTO_TAG, MSM6242, 32.768_kHz_XTAL)
- MCFG_DS1315_ADD(CLOUD9_TAG)
+
+ DS1315(config, CLOUD9_TAG, 0);
MACHINE_CONFIG_END
diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp
index ec839b6a12b..eef1fb4a14a 100644
--- a/src/devices/bus/cpc/smartwatch.cpp
+++ b/src/devices/bus/cpc/smartwatch.cpp
@@ -19,10 +19,11 @@
DEFINE_DEVICE_TYPE(CPC_SMARTWATCH, cpc_smartwatch_device, "cpc_smartwatch", "Dobbertin Smartwatch")
-MACHINE_CONFIG_START(cpc_smartwatch_device::device_add_mconfig)
- MCFG_DS1315_ADD("rtc")
+void cpc_smartwatch_device::device_add_mconfig(machine_config &config)
+{
+ DS1315(config, m_rtc, 0);
// no pass-through (?)
-MACHINE_CONFIG_END
+}
ROM_START( cpc_smartwatch )
diff --git a/src/devices/bus/isa/mach32.cpp b/src/devices/bus/isa/mach32.cpp
index 8525daf745b..2f686745a5d 100644
--- a/src/devices/bus/isa/mach32.cpp
+++ b/src/devices/bus/isa/mach32.cpp
@@ -47,11 +47,11 @@ mach32_device::mach32_device(const machine_config &mconfig, device_type type, co
{
}
-MACHINE_CONFIG_START(mach32_device::device_add_mconfig)
- MCFG_DEVICE_ADD("8514a", ATIMACH32_8514A, 0)
- downcast<ibm8514a_device*>(device)->set_vga(DEVICE_SELF);
- MCFG_DEVICE_ADD("ati_eeprom", EEPROM_SERIAL_93C56_16BIT)
-MACHINE_CONFIG_END
+void mach32_device::device_add_mconfig(machine_config &config)
+{
+ ATIMACH32_8514A(config, "8514a", 0).set_vga(DEVICE_SELF);
+ EEPROM_93C56_16BIT(config, "ati_eeprom");
+}
void mach32_8514a_device::device_start()
{
@@ -333,11 +333,11 @@ mach64_device::mach64_device(const machine_config &mconfig, device_type type, co
{
}
-MACHINE_CONFIG_START(mach64_device::device_add_mconfig)
- MCFG_DEVICE_ADD("8514a", ATIMACH64_8514A, 0)
- downcast<ibm8514a_device*>(device)->set_vga(DEVICE_SELF);
- MCFG_DEVICE_ADD("ati_eeprom", EEPROM_SERIAL_93C56_16BIT)
-MACHINE_CONFIG_END
+void mach64_device::device_add_mconfig(machine_config &config)
+{
+ ATIMACH64_8514A(config, "8514a", 0).set_vga(DEVICE_SELF);
+ EEPROM_93C56_16BIT(config, "ati_eeprom");
+}
void mach64_8514a_device::device_start()
{
diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp
index 756ebd188f9..1388a7d174b 100644
--- a/src/devices/bus/isa/xtide.cpp
+++ b/src/devices/bus/isa/xtide.cpp
@@ -267,7 +267,7 @@ void xtide_device::device_add_mconfig(machine_config &config)
ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, false);
m_ata->irq_handler().set(FUNC(xtide_device::ide_interrupt));
- EEPROM_PARALLEL_2864(config, m_eeprom);
+ EEPROM_2864(config, m_eeprom);
}
//-------------------------------------------------
diff --git a/src/devices/bus/sega8/rom.cpp b/src/devices/bus/sega8/rom.cpp
index 19981c55b56..72017b5c795 100644
--- a/src/devices/bus/sega8/rom.cpp
+++ b/src/devices/bus/sega8/rom.cpp
@@ -714,9 +714,10 @@ WRITE8_MEMBER(sega8_eeprom_device::write_mapper)
}
}
-MACHINE_CONFIG_START(sega8_eeprom_device::device_add_mconfig)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
-MACHINE_CONFIG_END
+void sega8_eeprom_device::device_add_mconfig(machine_config &config)
+{
+ EEPROM_93C46_16BIT(config, "eeprom");
+}
/*-------------------------------------------------
diff --git a/src/devices/machine/ds1315.h b/src/devices/machine/ds1315.h
index 21a7f37c14f..a5b70c38c76 100644
--- a/src/devices/machine/ds1315.h
+++ b/src/devices/machine/ds1315.h
@@ -15,26 +15,14 @@
#pragma once
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_DS1315_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, DS1315, 0)
-
-#define MCFG_DS1315_BACKING_HANDLER(_devcb) \
- downcast<ds1315_device &>(*device).set_backing_handler(DEVCB_##_devcb);
-
-/***************************************************************************
- MACROS
-***************************************************************************/
-
class ds1315_device : public device_t
{
public:
ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~ds1315_device() {}
+ auto read_backing() { return m_backing_read.bind(); }
+
// this handler automates the bits 0/2 stuff
DECLARE_READ8_MEMBER(read);
@@ -46,8 +34,6 @@ public:
bool chip_enable();
void chip_reset();
- template <class Object> devcb_base &set_backing_handler(Object &&cb) { return m_backing_read.set_callback(std::forward<Object>(cb)); }
-
protected:
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h
index 5188cf949b9..eed7463b3ac 100644
--- a/src/devices/machine/ds1386.h
+++ b/src/devices/machine/ds1386.h
@@ -56,24 +56,14 @@
#pragma once
-
-// handlers
-
-#define MCFG_DS1386_INTA_HANDLER(_devcb) \
- downcast<ds1386_device &>(*device).set_inta_cb(DEVCB_##_devcb);
-
-#define MCFG_DS1386_INTB_HANDLER(_devcb) \
- downcast<ds1386_device &>(*device).set_intb_cb(DEVCB_##_devcb);
-
-#define MCFG_DS1386_SQW_HANDLER(_devcb) \
- downcast<ds1386_device &>(*device).set_sqw_cb(DEVCB_##_devcb);
-
-// devices
-
class ds1386_device : public device_t,
public device_nvram_interface
{
public:
+ auto inta() { return m_inta_cb.bind(); }
+ auto intb() { return m_intb_cb.bind(); }
+ auto sqw() { return m_sqw_cb.bind(); }
+
DECLARE_WRITE8_MEMBER( data_w );
DECLARE_READ8_MEMBER( data_r );
@@ -81,10 +71,6 @@ public:
DECLARE_WRITE_LINE_MEMBER( oe_w );
DECLARE_WRITE_LINE_MEMBER( we_w );
- template <class Object> devcb_base &set_inta_cb(Object &&cb) { return m_inta_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_intb_cb(Object &&cb) { return m_intb_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_sqw_cb(Object &&cb) { return m_sqw_cb.set_callback(std::forward<Object>(cb)); }
-
protected:
enum
{
@@ -185,18 +171,15 @@ protected:
class ds1386_8k_device : public ds1386_device
{
public:
- // construction/destruction
ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class ds1386_32k_device : public ds1386_device
{
public:
- // construction/destruction
ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
-// device type definition
DECLARE_DEVICE_TYPE(DS1386_8K, ds1386_8k_device)
DECLARE_DEVICE_TYPE(DS1386_32K, ds1386_32k_device)
diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h
index 9eefcae0e94..3b7442512a4 100644
--- a/src/devices/machine/ds2404.h
+++ b/src/devices/machine/ds2404.h
@@ -13,30 +13,6 @@
#pragma once
-
-
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_DS2404_REF_YEAR(_ref_year) \
- downcast<ds2404_device &>(*device).set_ref_year(_ref_year);
-
-#define MCFG_DS2404_REF_MONTH(_ref_month) \
- downcast<ds2404_device &>(*device).set_ref_month(_ref_month);
-
-#define MCFG_DS2404_REF_DAY(_ref_day) \
- downcast<ds2404_device &>(*device).set_ref_day(_ref_day);
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-
-// ======================> ds2404_device
-
class ds2404_device : public device_t, public device_nvram_interface
{
public:
@@ -44,9 +20,9 @@ public:
ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
- void set_ref_year(uint32_t year) { m_ref_year = year; }
- void set_ref_month(uint8_t month) { m_ref_month = month; }
- void set_ref_day(uint8_t day) { m_ref_day = day; }
+ void ref_year(uint32_t year) { m_ref_year = year; }
+ void ref_month(uint8_t month) { m_ref_month = month; }
+ void ref_day(uint8_t day) { m_ref_day = day; }
/* 1-wire interface reset */
DECLARE_WRITE8_MEMBER(ds2404_1w_reset_w);
@@ -112,8 +88,6 @@ private:
int m_state_ptr;
};
-
-// device type definition
DECLARE_DEVICE_TYPE(DS2404, ds2404_device)
#endif // MAME_MACHINE_DS2404_H
diff --git a/src/devices/machine/ds75160a.h b/src/devices/machine/ds75160a.h
index 85ee2727809..2f2a2147a5e 100644
--- a/src/devices/machine/ds75160a.h
+++ b/src/devices/machine/ds75160a.h
@@ -49,10 +49,8 @@ public:
// construction/destruction
ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Read, class Write> void set_callbacks(Read &&rd, Write &&wr) {
- m_read.set_callback(std::forward<Read>(rd));
- m_write.set_callback(std::forward<Write>(wr));
- }
+ auto read_callback() { return m_read.bind(); }
+ auto write_callback() { return m_write.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/machine/ds75161a.h b/src/devices/machine/ds75161a.h
index 58d257a27ae..8ea0a0b9632 100644
--- a/src/devices/machine/ds75161a.h
+++ b/src/devices/machine/ds75161a.h
@@ -24,89 +24,28 @@
#pragma once
-
-
-
-///*************************************************************************
-// INTERFACE CONFIGURATION MACROS
-///*************************************************************************
-
-#define MCFG_DS75161A_IN_REN_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_ren_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_IFC_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_ifc_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_NDAC_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_ndac_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_NRFD_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_nrfd_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_DAV_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_dav_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_EOI_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_eoi_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_ATN_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_atn_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_IN_SRQ_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_in_srq_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_REN_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_ren_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_IFC_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_ifc_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_NDAC_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_ndac_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_NRFD_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_nrfd_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_DAV_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_dav_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_EOI_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_eoi_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_ATN_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_atn_callback(DEVCB_##_devcb);
-
-#define MCFG_DS75161A_OUT_SRQ_CB(_devcb) \
- downcast<ds75161a_device &>(*device).set_out_srq_callback(DEVCB_##_devcb);
-
-///*************************************************************************
-// TYPE DEFINITIONS
-///*************************************************************************
-
-// ======================> ds75161a_device
-
class ds75161a_device : public device_t
{
public:
// construction/destruction
ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_in_ren_callback(Object &&cb) { return m_in_ren_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_ifc_callback(Object &&cb) { return m_in_ifc_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_ndac_callback(Object &&cb) { return m_in_ndac_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_nrfd_callback(Object &&cb) { return m_in_nrfd_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_dav_callback(Object &&cb) { return m_in_dav_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_eoi_callback(Object &&cb) { return m_in_eoi_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_atn_callback(Object &&cb) { return m_in_atn_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_srq_callback(Object &&cb) { return m_in_srq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_ren_callback(Object &&cb) { return m_out_ren_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_ifc_callback(Object &&cb) { return m_out_ifc_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_ndac_callback(Object &&cb) { return m_out_ndac_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_nrfd_callback(Object &&cb) { return m_out_nrfd_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_dav_callback(Object &&cb) { return m_out_dav_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_eoi_callback(Object &&cb) { return m_out_eoi_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_atn_callback(Object &&cb) { return m_out_atn_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_srq_callback(Object &&cb) { return m_out_srq_cb.set_callback(std::forward<Object>(cb)); }
+ auto in_ren() { return m_in_ren_cb.bind(); }
+ auto in_ifc() { return m_in_ifc_cb.bind(); }
+ auto in_ndac() { return m_in_ndac_cb.bind(); }
+ auto in_nrfd() { return m_in_nrfd_cb.bind(); }
+ auto in_dav() { return m_in_dav_cb.bind(); }
+ auto in_eoi() { return m_in_eoi_cb.bind(); }
+ auto in_atn() { return m_in_atn_cb.bind(); }
+ auto in_srq() { return m_in_srq_cb.bind(); }
+ auto out_ren() { return m_out_ren_cb.bind(); }
+ auto out_ifc() { return m_out_ifc_cb.bind(); }
+ auto out_ndac() { return m_out_ndac_cb.bind(); }
+ auto out_nrfd() { return m_out_nrfd_cb.bind(); }
+ auto out_dav() { return m_out_dav_cb.bind(); }
+ auto out_eoi() { return m_out_eoi_cb.bind(); }
+ auto out_atn() { return m_out_atn_cb.bind(); }
+ auto out_srq() { return m_out_srq_cb.bind(); }
DECLARE_WRITE_LINE_MEMBER( te_w );
DECLARE_WRITE_LINE_MEMBER( dc_w );
@@ -167,8 +106,6 @@ private:
int m_dc;
};
-
-// device type definition
DECLARE_DEVICE_TYPE(DS75161A, ds75161a_device)
#endif // MAME_MACHINE_DS75161A_H
diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp
index 86e6c749ff1..0c81a6701e0 100644
--- a/src/devices/machine/eeprom.cpp
+++ b/src/devices/machine/eeprom.cpp
@@ -49,7 +49,7 @@ eeprom_base_device::eeprom_base_device(const machine_config &mconfig, device_typ
// to set the default data
//-------------------------------------------------
-void eeprom_base_device::set_size(int cells, int cellbits)
+eeprom_base_device& eeprom_base_device::size(int cells, int cellbits)
{
m_cells = cells;
m_data_bits = cellbits;
@@ -62,6 +62,8 @@ void eeprom_base_device::set_size(int cells, int cellbits)
cells >>= 1;
m_address_bits++;
}
+
+ return *this;
}
@@ -70,18 +72,20 @@ void eeprom_base_device::set_size(int cells, int cellbits)
// to set the default data
//-------------------------------------------------
-void eeprom_base_device::set_default_data(const uint8_t *data, uint32_t size)
+eeprom_base_device& eeprom_base_device::default_data(const uint8_t *data, uint32_t size)
{
assert(m_data_bits == 8);
m_default_data = data;
m_default_data_size = size;
+ return *this;
}
-void eeprom_base_device::set_default_data(const uint16_t *data, uint32_t size)
+eeprom_base_device& eeprom_base_device::default_data(const uint16_t *data, uint32_t size)
{
assert(m_data_bits == 16);
m_default_data = data;
m_default_data_size = size / 2;
+ return *this;
}
diff --git a/src/devices/machine/eeprom.h b/src/devices/machine/eeprom.h
index 0cf280d6441..eb0a64b9234 100644
--- a/src/devices/machine/eeprom.h
+++ b/src/devices/machine/eeprom.h
@@ -13,36 +13,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_EEPROM_SIZE(_cells, _cellbits) \
- downcast<eeprom_base_device &>(*device).set_size(_cells, _cellbits);
-#define MCFG_EEPROM_DATA(_data, _size) \
- downcast<eeprom_base_device &>(*device).set_default_data(_data, _size);
-#define MCFG_EEPROM_DEFAULT_VALUE(_value) \
- downcast<eeprom_base_device &>(*device).set_default_value(_value);
-
-#define MCFG_EEPROM_WRITE_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::WRITE_TIME, _value);
-#define MCFG_EEPROM_WRITE_ALL_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::WRITE_ALL_TIME, _value);
-#define MCFG_EEPROM_ERASE_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::ERASE_TIME, _value);
-#define MCFG_EEPROM_ERASE_ALL_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::ERASE_ALL_TIME, _value);
-
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-// ======================> eeprom_base_device
-
class eeprom_base_device : public device_t,
public device_nvram_interface
{
@@ -58,11 +28,15 @@ public:
};
// inline configuration helpers
- void set_size(int cells, int cellbits);
- void set_default_data(const uint8_t *data, uint32_t size);
- void set_default_data(const uint16_t *data, uint32_t size);
- void set_default_value(uint32_t value) { m_default_value = value; m_default_value_set = true; }
- void set_timing(timing_type type, const attotime &duration) { m_operation_time[type] = duration; }
+ eeprom_base_device& size(int cells, int cellbits);
+ eeprom_base_device& default_data(const uint8_t *data, uint32_t size);
+ eeprom_base_device& default_data(const uint16_t *data, uint32_t size);
+ eeprom_base_device& default_value(uint32_t value) { m_default_value = value; m_default_value_set = true; return *this; }
+ eeprom_base_device& timing(timing_type type, const attotime &duration) { m_operation_time[type] = duration; return *this; }
+ eeprom_base_device& write_time(const attotime &duration) { m_operation_time[eeprom_base_device::WRITE_TIME] = duration; return *this; }
+ eeprom_base_device& write_all_time(const attotime &duration) { m_operation_time[eeprom_base_device::WRITE_ALL_TIME] = duration; return *this; }
+ eeprom_base_device& erase_time(const attotime &duration) { m_operation_time[eeprom_base_device::ERASE_TIME] = duration; return *this; }
+ eeprom_base_device& erase_all_time(const attotime &duration) { m_operation_time[eeprom_base_device::ERASE_ALL_TIME] = duration; return *this; }
// read/write/erase data
uint32_t read(offs_t address);
diff --git a/src/devices/machine/eeprompar.cpp b/src/devices/machine/eeprompar.cpp
index 3be7298afc7..f0b4f595a25 100644
--- a/src/devices/machine/eeprompar.cpp
+++ b/src/devices/machine/eeprompar.cpp
@@ -204,11 +204,11 @@ WRITE32_MEMBER(eeprom_parallel_28xx_device::unlock_write32) { oe_w(1); }
// macro for defining a new device class
#define DEFINE_PARALLEL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells) \
eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) \
- : eeprom_parallel_##_baseclass##_device(mconfig, EEPROM_PARALLEL_##_uppercase, tag, owner) \
+ : eeprom_parallel_##_baseclass##_device(mconfig, EEPROM_##_uppercase, tag, owner) \
{ \
- set_size(_cells, _bits); \
+ size(_cells, _bits); \
} \
-DEFINE_DEVICE_TYPE(EEPROM_PARALLEL_##_uppercase, eeprom_parallel_##_lowercase##_device, #_lowercase, "Parallel EEPROM " #_uppercase " (" #_cells "x" #_bits ")")
+DEFINE_DEVICE_TYPE(EEPROM_##_uppercase, eeprom_parallel_##_lowercase##_device, #_lowercase, "Parallel EEPROM " #_uppercase " (" #_cells "x" #_bits ")")
// standard 28XX class of 8-bit EEPROMs
DEFINE_PARALLEL_EEPROM_DEVICE(28xx, 2804, 2804, 8, 512)
diff --git a/src/devices/machine/eeprompar.h b/src/devices/machine/eeprompar.h
index 75651850d22..efee449e1b8 100644
--- a/src/devices/machine/eeprompar.h
+++ b/src/devices/machine/eeprompar.h
@@ -15,41 +15,6 @@
#include "eeprom.h"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-// standard 28XX class of 8-bit parallel EEPROMs
-#define MCFG_EEPROM_2804_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_2804, 0)
-#define MCFG_EEPROM_2816_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_2816, 0)
-#define MCFG_EEPROM_2864_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_2864, 0)
-#define MCFG_EEPROM_28256_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28256, 0)
-#define MCFG_EEPROM_28512_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28512, 0)
-#define MCFG_EEPROM_28010_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28010, 0)
-#define MCFG_EEPROM_28020_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28020, 0)
-#define MCFG_EEPROM_28040_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28040, 0)
-
-// true when external circuit is used to lock EEPROM after every write
-#define MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(_lock) \
- downcast<eeprom_parallel_28xx_device &>(*device).set_lock_after_write(_lock);
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-
-// ======================> eeprom_parallel_base_device
-
class eeprom_parallel_base_device : public eeprom_base_device
{
protected:
@@ -61,15 +26,11 @@ protected:
virtual void device_reset() override;
};
-
-
-// ======================> eeprom_parallel_28xx_device
-
class eeprom_parallel_28xx_device : public eeprom_parallel_base_device
{
public:
// configuration helpers
- void set_lock_after_write(bool lock) { m_lock_after_write = lock; }
+ void lock_after_write(bool lock) { m_lock_after_write = lock; }
// read/write data lines
DECLARE_WRITE8_MEMBER(write);
@@ -110,7 +71,7 @@ class eeprom_parallel_##_lowercase##_device : public eeprom_parallel_##_baseclas
public: \
eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \
}; \
-DECLARE_DEVICE_TYPE(EEPROM_PARALLEL_##_uppercase, eeprom_parallel_##_lowercase##_device)
+DECLARE_DEVICE_TYPE(EEPROM_##_uppercase, eeprom_parallel_##_lowercase##_device)
// standard 28XX class of 8-bit EEPROMs
DECLARE_PARALLEL_EEPROM_DEVICE(28xx, 2804, 2804)
diff --git a/src/devices/machine/eepromser.cpp b/src/devices/machine/eepromser.cpp
index 2058a22963c..74acf0a17dc 100644
--- a/src/devices/machine/eepromser.cpp
+++ b/src/devices/machine/eepromser.cpp
@@ -1099,18 +1099,18 @@ WRITE_LINE_MEMBER(eeprom_serial_x24c44_device::di_write) { base_di_write(state);
// macro for defining a new device class
#define DEFINE_SERIAL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells, _addrbits) \
eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, eeprom_serial_streaming enable_streaming) \
- : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_SERIAL_##_uppercase##_##_bits##BIT, tag, owner, enable_streaming) \
+ : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_##_uppercase##_##_bits##BIT, tag, owner, enable_streaming) \
{ \
- set_size(_cells, _bits); \
+ size(_cells, _bits); \
set_address_bits(_addrbits); \
} \
eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) \
- : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_SERIAL_##_uppercase##_##_bits##BIT, tag, owner, eeprom_serial_streaming::DISABLE) \
+ : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_##_uppercase##_##_bits##BIT, tag, owner, eeprom_serial_streaming::DISABLE) \
{ \
- set_size(_cells, _bits); \
+ size(_cells, _bits); \
set_address_bits(_addrbits); \
} \
-DEFINE_DEVICE_TYPE(EEPROM_SERIAL_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device, #_lowercase "_" #_bits, "Serial EEPROM " #_uppercase " (" #_cells "x" #_bits ")")
+DEFINE_DEVICE_TYPE(EEPROM_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device, #_lowercase "_" #_bits, "Serial EEPROM " #_uppercase " (" #_cells "x" #_bits ")")
// standard 93CX6 class of 16-bit EEPROMs
DEFINE_SERIAL_EEPROM_DEVICE(93cxx, 93c06, 93C06, 16, 16, 6)
diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h
index c4a83365e26..4ff8634ce02 100644
--- a/src/devices/machine/eepromser.h
+++ b/src/devices/machine/eepromser.h
@@ -15,19 +15,6 @@
#include "eeprom.h"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_EEPROM_SERIAL_DO_CALLBACK(_devcb) \
- downcast<eeprom_serial_base_device &>(*device).set_do_callback(DEVCB_##_devcb);
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
enum class eeprom_serial_streaming : bool
{
DISABLE = false,
@@ -233,7 +220,7 @@ public: \
eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, eeprom_serial_streaming enable_streaming = eeprom_serial_streaming::DISABLE); \
eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); \
}; \
-DECLARE_DEVICE_TYPE(EEPROM_SERIAL_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device)
+DECLARE_DEVICE_TYPE(EEPROM_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device)
// standard 93CX6 class of 16-bit EEPROMs
DECLARE_SERIAL_EEPROM_DEVICE(93cxx, 93c06, 93C06, 16)
diff --git a/src/devices/machine/latch8.h b/src/devices/machine/latch8.h
index 44644c5952c..ee00fbdc38d 100644
--- a/src/devices/machine/latch8.h
+++ b/src/devices/machine/latch8.h
@@ -26,8 +26,7 @@
class latch8_device : public device_t
{
public:
- latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
+ latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
/* write & read full byte */
@@ -79,8 +78,9 @@ public:
void set_nosync(uint32_t nosync) { m_nosync = nosync; }
template <unsigned N, class Object> devcb_base &set_write_cb(Object &&cb) { return m_write_cb[N].set_callback(std::forward<Object>(cb)); }
-
template <unsigned N, class Object> devcb_base &set_read_cb(Object &&cb) { return m_read_cb[N].set_callback(std::forward<Object>(cb)); }
+ template <unsigned N> auto write_cb() { return m_write_cb[N].bind(); }
+ template <unsigned N> auto read_cb() { return m_read_cb[N].bind(); }
protected:
// device-level overrides
diff --git a/src/devices/sound/pokey.h b/src/devices/sound/pokey.h
index 10faf22c8da..edcf760f756 100644
--- a/src/devices/sound/pokey.h
+++ b/src/devices/sound/pokey.h
@@ -214,6 +214,10 @@ public:
template <class Object> devcb_base &set_allpot_r_callback(Object &&cb) { return m_allpot_r_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_serin_r_callback(Object &&cb) { return m_serin_r_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_serout_w_callback(Object &&cb) { return m_serout_w_cb.set_callback(std::forward<Object>(cb)); }
+ template <unsigned N> auto pot_r() { return m_pot_r_cb[N].bind(); }
+ auto allpot_r() { return m_allpot_r_cb.bind(); }
+ auto serin_r() { return m_serin_r_cb.bind(); }
+ auto serout_w() { return m_serout_w_cb.bind(); }
template <typename Object> void set_keyboard_callback(Object &&cb) { m_keyboard_r = std::forward<Object>(cb); }
template <typename Object> void set_interrupt_callback(Object &&cb) { m_irq_f = std::forward<Object>(cb); }
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index 78575c56e7d..1040c0da789 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -2222,7 +2222,7 @@ WRITE8_MEMBER(vga_device::mem_linear_w)
MACHINE_CONFIG_START(ati_vga_device::device_add_mconfig)
MCFG_MACH8_ADD_OWNER("8514a")
- MCFG_DEVICE_ADD("ati_eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "ati_eeprom");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(s3_vga_device::device_add_mconfig)
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index 119319d32af..7acd649e2e0 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -370,7 +370,7 @@ enum tilemap_standard_mapper
#define MCFG_TILEMAP_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, TILEMAP)
#define MCFG_TILEMAP_GFXDECODE(_gfxtag) \
- downcast<tilemap_device &>(*device).set_gfxdecode_tag(_gfxtag);
+ downcast<tilemap_device &>(*device).set_gfxdecode(_gfxtag);
#define MCFG_TILEMAP_BYTES_PER_ENTRY(_bpe) \
downcast<tilemap_device &>(*device).set_bytes_per_entry(_bpe);
#define MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \
@@ -717,13 +717,44 @@ class tilemap_device : public device_t,
public tilemap_t
{
public:
- // construction/destruction
+ template <typename T>
+ tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes
+ , u16 tilewidth, u16 tileheight, tilemap_standard_mapper mapper, u32 columns, u32 rows, pen_t transpen)
+ : tilemap_device(mconfig, tag, owner, (u32)0)
+ {
+ set_gfxdecode(std::forward<T>(gfxtag));
+ set_bytes_per_entry(entrybytes);
+ set_layout(mapper, columns, rows);
+ set_tile_size(tilewidth, tileheight);
+ set_configured_transparent_pen(transpen);
+ }
+
+ template <typename T>
+ tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes
+ , u16 tilewidth, u16 tileheight, tilemap_standard_mapper mapper, u32 columns, u32 rows)
+ : tilemap_device(mconfig, tag, owner, (u32)0)
+ {
+ set_gfxdecode(std::forward<T>(gfxtag));
+ set_bytes_per_entry(entrybytes);
+ set_layout(mapper, columns, rows);
+ set_tile_size(tilewidth, tileheight);
+ }
+
tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
- // configuration
- void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); }
+ template <typename T> void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
void set_bytes_per_entry(int bpe) { m_bytes_per_entry = bpe; }
+
void set_info_callback(tilemap_get_info_delegate tile_get_info) { m_get_info = tile_get_info; }
+ template <class FunctionClass> void set_info_callback(const char *devname, void (FunctionClass::*callback)(tilemap_t &, tile_data &, tilemap_memory_index), const char *name)
+ {
+ set_info_callback(tilemap_get_info_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_info_callback(void (FunctionClass::*callback)(tilemap_t &, tile_data &, tilemap_memory_index), const char *name)
+ {
+ set_info_callback(tilemap_get_info_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
+
void set_layout(tilemap_standard_mapper mapper, u32 columns, u32 rows) {
m_standard_mapper = mapper;
m_num_columns = columns;
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 0e58d0db7cc..d40cf12332f 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -704,7 +704,8 @@ MACHINE_CONFIG_START(atari_jsa_i_device::device_add_mconfig)
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, JSA_MASTER_CLOCK/4/16/16/14)
// sound hardware
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "cpu", WRITELINE(*this, atari_jsa_base_device, main_int_write_line))
+ ATARI_SOUND_COMM(config, "soundcomm", "cpu")
+ .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line));
MCFG_DEVICE_ADD("ym2151", YM2151, JSA_MASTER_CLOCK)
MCFG_YM2151_IRQ_HANDLER(WRITELINE("soundcomm", atari_sound_comm_device, ym2151_irq_gen))
@@ -834,7 +835,8 @@ MACHINE_CONFIG_START(atari_jsa_ii_device::device_add_mconfig)
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, JSA_MASTER_CLOCK/4/16/16/14)
// sound hardware
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "cpu", WRITELINE(*this, atari_jsa_base_device, main_int_write_line))
+ ATARI_SOUND_COMM(config, "soundcomm", "cpu")
+ .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line));
MCFG_DEVICE_ADD("ym2151", YM2151, JSA_MASTER_CLOCK)
MCFG_YM2151_IRQ_HANDLER(WRITELINE("soundcomm", atari_sound_comm_device, ym2151_irq_gen))
@@ -916,7 +918,8 @@ MACHINE_CONFIG_START(atari_jsa_iii_device::device_add_mconfig)
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, JSA_MASTER_CLOCK/4/16/16/14)
// sound hardware
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "cpu", WRITELINE(*this, atari_jsa_base_device, main_int_write_line))
+ ATARI_SOUND_COMM(config, "soundcomm", "cpu")
+ .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line));
MCFG_DEVICE_ADD("ym2151", YM2151, JSA_MASTER_CLOCK)
MCFG_YM2151_IRQ_HANDLER(WRITELINE("soundcomm", atari_sound_comm_device, ym2151_irq_gen))
diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp
index 802435b8be4..fa4f81ff81b 100644
--- a/src/mame/drivers/20pacgal.cpp
+++ b/src/mame/drivers/20pacgal.cpp
@@ -404,7 +404,7 @@ MACHINE_CONFIG_START(_20pacgal_state::_20pacgal)
MCFG_DEVICE_PROGRAM_MAP(_20pacgal_map)
MCFG_DEVICE_IO_MAP(_20pacgal_io_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/39in1.cpp b/src/mame/drivers/39in1.cpp
index 9ad3688eefa..56fc7fd143b 100644
--- a/src/mame/drivers/39in1.cpp
+++ b/src/mame/drivers/39in1.cpp
@@ -277,7 +277,7 @@ MACHINE_CONFIG_START(_39in1_state::_39in1)
MCFG_DEVICE_ADD("maincpu", PXA255, 200000000)
MCFG_DEVICE_PROGRAM_MAP(_39in1_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_16BIT)
+ EEPROM_93C66_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("pxa_periphs", PXA255_PERIPHERALS, 200000000, "maincpu")
MCFG_PXA255_GPIO0_SET_CALLBACK(WRITE32(*this, _39in1_state, eeprom_set_w))
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index c8e1adc1d26..1327878733c 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -3524,7 +3524,7 @@ MACHINE_CONFIG_START(_8080bw_state::invmulti)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(invmulti_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state, mw8080bw)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/albazg.cpp b/src/mame/drivers/albazg.cpp
index 37a75ccf01f..99211bc5d87 100644
--- a/src/mame/drivers/albazg.cpp
+++ b/src/mame/drivers/albazg.cpp
@@ -367,7 +367,7 @@ MACHINE_CONFIG_START(albazg_state::yumefuda)
MCFG_DEVICE_IO_MAP(port_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", albazg_state, irq0_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 8) // timing is unknown
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 47df7c50b2e..1ac7da5dcf4 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -3994,8 +3994,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2e)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* DS1315 for no-slot clock */
- MCFG_DS1315_ADD("nsc")
- MCFG_DS1315_BACKING_HANDLER(READ8(*this, apple2e_state, nsc_backing_r))
+ DS1315(config, m_ds1315, 0).read_backing().set(FUNC(apple2e_state::nsc_backing_r));
/* RAM */
RAM(config, m_ram).set_default_size("64K").set_default_value(0);
diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp
index 38e49cd625b..6a444c6711b 100644
--- a/src/mame/drivers/arcadecl.cpp
+++ b/src/mame/drivers/arcadecl.cpp
@@ -325,8 +325,7 @@ MACHINE_CONFIG_START(sparkz_state::sparkz)
MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp
index 03f7d6bdf2e..432e4035bb3 100644
--- a/src/mame/drivers/aristmk5.cpp
+++ b/src/mame/drivers/aristmk5.cpp
@@ -2054,8 +2054,8 @@ MACHINE_CONFIG_START(aristmk5_state::aristmk5)
MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_DEVICE_ADD("eeprom0", EEPROM_SERIAL_93C56_16BIT)
- MCFG_DEVICE_ADD("eeprom1", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom0");
+ EEPROM_93C56_16BIT(config, "eeprom1");
MCFG_NVRAM_ADD_NO_FILL("nvram")
diff --git a/src/mame/drivers/aristmk6.cpp b/src/mame/drivers/aristmk6.cpp
index 303c87813fe..9af3ce62959 100644
--- a/src/mame/drivers/aristmk6.cpp
+++ b/src/mame/drivers/aristmk6.cpp
@@ -353,8 +353,7 @@ MACHINE_CONFIG_START(aristmk6_state::aristmk6)
MCFG_DEVICE_ADD( "uart0", NS16550, 8_MHz_XTAL )
MCFG_DEVICE_ADD( "uart1", NS16550, 8_MHz_XTAL )
- MCFG_DEVICE_ADD("eeprom0", EEPROM_SERIAL_93C56_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0xFF)
+ EEPROM_93C56_16BIT(config, m_eeprom0).default_value(0xff);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp
index 8a686bd980e..ebcbe513bd7 100644
--- a/src/mame/drivers/artmagic.cpp
+++ b/src/mame/drivers/artmagic.cpp
@@ -823,8 +823,8 @@ MACHINE_CONFIG_START(artmagic_state::artmagic)
MCFG_TMS340X0_FROM_SHIFTREG_CB(artmagic_state, from_shiftreg) /* read from shiftreg function */
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(1)) // FIXME: false-readback polling should make this unnecessary
+
+ EEPROM_2816(config, "eeprom").write_time(attotime::from_usec(1)); // FIXME: false-readback polling should make this unnecessary
/* video hardware */
MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
diff --git a/src/mame/drivers/asterix.cpp b/src/mame/drivers/asterix.cpp
index 0d5b845667b..b43a526d2a2 100644
--- a/src/mame/drivers/asterix.cpp
+++ b/src/mame/drivers/asterix.cpp
@@ -270,7 +270,7 @@ MACHINE_CONFIG_START(asterix_state::asterix)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(32'000'000)/4) // 8MHz Z80E ??
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/astrcorp.cpp b/src/mame/drivers/astrcorp.cpp
index 81c6bd5bd36..72a398ec767 100644
--- a/src/mame/drivers/astrcorp.cpp
+++ b/src/mame/drivers/astrcorp.cpp
@@ -531,8 +531,8 @@ MACHINE_CONFIG_START(astrocorp_state::showhand)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", astrocorp_state, irq4_line_hold)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(showhand_default_eeprom, sizeof(showhand_default_eeprom))
+
+ EEPROM_93C46_16BIT(config, "eeprom").default_data(showhand_default_eeprom, sizeof(showhand_default_eeprom));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -584,7 +584,7 @@ MACHINE_CONFIG_START(astrocorp_state::skilldrp)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", astrocorp_state, skilldrp_scanline, "screen", 0, 1)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW )
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW )
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index 787d6f79701..57893e61545 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -404,8 +404,7 @@ MACHINE_CONFIG_START(atarig1_state::atarig1)
MCFG_MACHINE_START_OVERRIDE(atarig1_state,atarig1)
MCFG_MACHINE_RESET_OVERRIDE(atarig1_state,atarig1)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp
index da7617ef0cb..740bf904e30 100644
--- a/src/mame/drivers/atarig42.cpp
+++ b/src/mame/drivers/atarig42.cpp
@@ -519,8 +519,7 @@ MACHINE_CONFIG_START(atarig42_state::atarig42)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp
index 21696f40a7e..c5cba11ebf4 100644
--- a/src/mame/drivers/atarigt.cpp
+++ b/src/mame/drivers/atarigt.cpp
@@ -800,8 +800,7 @@ MACHINE_CONFIG_START(atarigt_state::atarigt)
MCFG_MACHINE_RESET_OVERRIDE(atarigt_state,atarigt)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarigt)
diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp
index cbbe656e632..024ae7d833d 100644
--- a/src/mame/drivers/atarigx2.cpp
+++ b/src/mame/drivers/atarigx2.cpp
@@ -1500,8 +1500,7 @@ MACHINE_CONFIG_START(atarigx2_state::atarigx2)
m_adc->in_callback<6>().set_ioport("A2D6");
m_adc->in_callback<7>().set_ioport("A2D7");
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarigx2)
diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp
index a47aca6214a..11d68ff2fcd 100644
--- a/src/mame/drivers/atarisy1.cpp
+++ b/src/mame/drivers/atarisy1.cpp
@@ -736,8 +736,7 @@ MACHINE_CONFIG_START(atarisy1_state::atarisy1)
MCFG_MACHINE_START_OVERRIDE(atarisy1_state,atarisy1)
MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
LS259(config, m_outlatch); // 15H (TTL) or 14F (LSI)
m_outlatch->q_out_cb<0>().set("ymsnd", FUNC(ym2151_device::reset_w));
@@ -776,7 +775,8 @@ MACHINE_CONFIG_START(atarisy1_state::atarisy1)
MCFG_VIDEO_START_OVERRIDE(atarisy1_state,atarisy1)
/* sound hardware */
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "audiocpu", INPUTLINE("maincpu", M68K_IRQ_6))
+ ATARI_SOUND_COMM(config, "soundcomm", "audiocpu")
+ .int_callback().set_inputline("maincpu", M68K_IRQ_6);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp
index ff2e60b1c02..61d06c0e105 100644
--- a/src/mame/drivers/atarisy2.cpp
+++ b/src/mame/drivers/atarisy2.cpp
@@ -1206,7 +1206,7 @@ MACHINE_CONFIG_START(atarisy2_state::atarisy2)
// IN6 = J102 pin 2 (unused)
// IN7 = J102 pin 3 (unused)
- MCFG_EEPROM_2804_ADD("eeprom")
+ EEPROM_2804(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -1233,7 +1233,7 @@ MACHINE_CONFIG_START(atarisy2_state::atarisy2)
MCFG_VIDEO_START_OVERRIDE(atarisy2_state,atarisy2)
/* sound hardware */
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "audiocpu", NOOP)
+ ATARI_SOUND_COMM(config, "soundcomm", "audiocpu").int_callback().set_nop();
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("ymsnd", YM2151, SOUND_CLOCK/4)
diff --git a/src/mame/drivers/atetris.cpp b/src/mame/drivers/atetris.cpp
index daad366a61c..3640ee05bdf 100644
--- a/src/mame/drivers/atetris.cpp
+++ b/src/mame/drivers/atetris.cpp
@@ -118,8 +118,8 @@ void atetris_state::machine_start()
void atetris_state::machine_reset()
{
/* reset the slapstic */
- m_slapstic_device->slapstic_reset();
- m_current_bank = m_slapstic_device->slapstic_bank() & 1;
+ m_slapstic->slapstic_reset();
+ m_current_bank = m_slapstic->slapstic_bank() & 1;
reset_bank();
/* start interrupts going (32V clocked by 16V) */
@@ -137,7 +137,7 @@ void atetris_state::machine_reset()
READ8_MEMBER(atetris_state::slapstic_r)
{
int result = m_slapstic_base[0x2000 + offset];
- int new_bank = m_slapstic_device->slapstic_tweak(space, offset) & 1;
+ int new_bank = m_slapstic->slapstic_tweak(space, offset) & 1;
/* update for the new bank */
if (new_bank != m_current_bank)
@@ -341,103 +341,88 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(atetris_state::atetris)
-
+void atetris_state::atetris_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502,MASTER_CLOCK/8)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
-
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 101, false)
+ M6502(config, m_maincpu, MASTER_CLOCK/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &atetris_state::main_map);
- MCFG_DEVICE_ADD("eeprom", EEPROM_PARALLEL_2804, 0)
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ SLAPSTIC(config, m_slapstic, 101, false);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atetris)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_atetris);
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_FORMAT(RRRGGGBB)
+ PALETTE(config, "palette", 256).set_format(PALETTE_FORMAT_RRRGGGBB);
- MCFG_SCREEN_ADD("screen", RASTER)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(atetris_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
+ m_screen->set_raw(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(atetris_state::screen_update));
+ m_screen->set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();
+}
- MCFG_DEVICE_ADD("pokey1", POKEY, MASTER_CLOCK/8)
- MCFG_POKEY_ALLPOT_R_CB(IOPORT("IN0"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DEVICE_ADD("pokey2", POKEY, MASTER_CLOCK/8)
- MCFG_POKEY_ALLPOT_R_CB(IOPORT("IN1"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(atetris_state::atetrisb2)
- atetris(config);
-
- /* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(BOOTLEG_CLOCK/8)
- MCFG_DEVICE_PROGRAM_MAP(atetrisb2_map)
+void atetris_state::atetris(machine_config &config)
+{
+ atetris_base(config);
- MCFG_DEVICE_REMOVE("pokey1")
- MCFG_DEVICE_REMOVE("pokey2")
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
- MCFG_DEVICE_ADD("sn1", SN76489A, BOOTLEG_CLOCK/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ pokey_device &pokey1(POKEY(config, "pokey1", MASTER_CLOCK/8));
+ pokey1.allpot_r().set_ioport("IN0");
+ pokey1.add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_DEVICE_ADD("sn2", SN76489A, BOOTLEG_CLOCK/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ pokey_device &pokey2(POKEY(config, "pokey2", MASTER_CLOCK/8));
+ pokey2.allpot_r().set_ioport("IN1");
+ pokey2.add_route(ALL_OUTPUTS, "mono", 0.50);
+}
- MCFG_DEVICE_ADD("sn3", SN76489, BOOTLEG_CLOCK/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+void atetris_state::atetrisb2(machine_config &config)
+{
+ atetris_base(config);
-MACHINE_CONFIG_START(atetris_mcu_state::atetrisb3)
- atetris(config);
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(atetrisb3_map)
+ /* basic machine hardware */
+ m_maincpu->set_clock(BOOTLEG_CLOCK/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &atetris_state::atetrisb2_map);
- MCFG_DEVICE_REPLACE("eeprom", EEPROM_PARALLEL_2816, 0)
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ SN76489A(config, "sn1", BOOTLEG_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 0.50);
+ SN76489A(config, "sn2", BOOTLEG_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 0.50);
+ SN76489(config, "sn3", BOOTLEG_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
- MCFG_DEVICE_REMOVE("pokey1")
- MCFG_DEVICE_REMOVE("pokey2")
- MCFG_DEVICE_ADD("mcu", I8749, 10_MHz_XTAL)
- MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, atetris_mcu_state, mcu_bus_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8("soundlatch1", generic_latch_8_device, acknowledge_w))
- MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, atetris_mcu_state, mcu_p2_w))
+void atetris_mcu_state::atetrisb3(machine_config &config)
+{
+ atetris_base(config);
- MCFG_GENERIC_LATCH_8_ADD("soundlatch1")
- MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("mcu", MCS48_INPUT_IRQ))
- MCFG_GENERIC_LATCH_SEPARATE_ACKNOWLEDGE(true)
+ m_maincpu->set_addrmap(AS_PROGRAM, &atetris_mcu_state::atetrisb3_map);
- MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
- MCFG_DEVICE_ADD("sn1", SN76489A, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ I8749(config, m_mcu, 10_MHz_XTAL);
+ m_mcu->bus_in_cb().set(FUNC(atetris_mcu_state::mcu_bus_r));
+ m_mcu->bus_out_cb().set(m_soundlatch[0], FUNC(generic_latch_8_device::acknowledge_w));
+ m_mcu->p2_out_cb().set(FUNC(atetris_mcu_state::mcu_p2_w));
- MCFG_DEVICE_ADD("sn2", SN76489A, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ GENERIC_LATCH_8(config, m_soundlatch[0]);
+ m_soundlatch[0]->data_pending_callback().set_inputline(m_mcu, MCS48_INPUT_IRQ);
+ m_soundlatch[0]->set_separate_acknowledge(true);
- MCFG_DEVICE_ADD("sn3", SN76489A, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ GENERIC_LATCH_8(config, m_soundlatch[1]);
- MCFG_DEVICE_ADD("sn4", SN76489A, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ for (int i = 0; i < 4; i++)
+ {
+ SN76489A(config, m_sn[i], 4000000).add_route(ALL_OUTPUTS, "mono", 0.50);
+ }
+}
@@ -589,7 +574,7 @@ void atetris_state::init_atetris()
{
uint8_t *rgn = memregion("maincpu")->base();
- m_slapstic_device->slapstic_init();
+ m_slapstic->slapstic_init();
m_slapstic_source = &rgn[0x10000];
m_slapstic_base = &rgn[0x04000];
}
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index 218236e7494..df90cc54542 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -426,7 +426,7 @@ MACHINE_CONFIG_START(backfire_state::backfire)
MCFG_DEVICE_ADD("maincpu", ARM, 28000000/4) /* Unconfirmed */
MCFG_DEVICE_PROGRAM_MAP(backfire_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
ADC0808(config, m_adc, 1000000); // unknown clock
m_adc->in_callback<0>().set_ioport("PADDLE0");
diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp
index d50894949f1..2b3a80fd2cb 100644
--- a/src/mame/drivers/badlands.cpp
+++ b/src/mame/drivers/badlands.cpp
@@ -454,8 +454,7 @@ MACHINE_CONFIG_START(badlands_state::badlands)
MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands)
MCFG_MACHINE_RESET_OVERRIDE(badlands_state,badlands)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
@@ -480,7 +479,8 @@ MACHINE_CONFIG_START(badlands_state::badlands)
MCFG_VIDEO_START_OVERRIDE(badlands_state,badlands)
/* sound hardware */
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "audiocpu", INPUTLINE("maincpu", M68K_IRQ_2))
+ ATARI_SOUND_COMM(config, "soundcomm", "audiocpu")
+ .int_callback().set_inputline("maincpu", M68K_IRQ_2);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("ymsnd", YM2151, ATARI_CLOCK_14MHz/4)
diff --git a/src/mame/drivers/badlandsbl.cpp b/src/mame/drivers/badlandsbl.cpp
index 477da52a411..c82eb0a28cd 100644
--- a/src/mame/drivers/badlandsbl.cpp
+++ b/src/mame/drivers/badlandsbl.cpp
@@ -232,8 +232,7 @@ MACHINE_CONFIG_START(badlandsbl_state::badlandsb)
MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_badlandsb)
diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp
index 41196856dc9..784462e4b4f 100644
--- a/src/mame/drivers/batman.cpp
+++ b/src/mame/drivers/batman.cpp
@@ -189,8 +189,7 @@ MACHINE_CONFIG_START(batman_state::batman)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp
index a19f842a5f7..7b8b8b86db0 100644
--- a/src/mame/drivers/beathead.cpp
+++ b/src/mame/drivers/beathead.cpp
@@ -342,8 +342,7 @@ MACHINE_CONFIG_START(beathead_state::beathead)
MCFG_DEVICE_ADD("maincpu", ASAP, ATARI_CLOCK_14MHz)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp
index 805258be642..3871338fe03 100644
--- a/src/mame/drivers/blstroid.cpp
+++ b/src/mame/drivers/blstroid.cpp
@@ -180,8 +180,7 @@ MACHINE_CONFIG_START(blstroid_state::blstroid)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/bpmmicro.cpp b/src/mame/drivers/bpmmicro.cpp
index 51c75ab1302..9fca813f82f 100644
--- a/src/mame/drivers/bpmmicro.cpp
+++ b/src/mame/drivers/bpmmicro.cpp
@@ -362,14 +362,15 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
-MACHINE_CONFIG_START(bpmmicro_state::bpmmicro)
+void bpmmicro_state::bpmmicro(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I80286, XTAL(32'000'000)/4) /* divider is guessed, cpu is an AMD N80L286-16/S part */
- MCFG_DEVICE_PROGRAM_MAP(i286_mem)
- MCFG_DEVICE_IO_MAP(i286_io)
+ I80286(config, m_maincpu, XTAL(32'000'000)/4); /* divider is guessed, cpu is an AMD N80L286-16/S part */
+ m_maincpu->set_addrmap(AS_PROGRAM, &bpmmicro_state::i286_mem);
+ m_maincpu->set_addrmap(AS_IO, &bpmmicro_state::i286_io);
- MCFG_DEVICE_ADD("eeprom_u38", EEPROM_SERIAL_93C46_16BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_16BIT(config, "eeprom_u38");
+}
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index 31ba73bfd19..b2cf78c0d05 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -2103,7 +2103,7 @@ MACHINE_CONFIG_START(cave_state::dfeveron)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2143,7 +2143,7 @@ MACHINE_CONFIG_START(cave_state::ddonpach)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2182,7 +2182,7 @@ MACHINE_CONFIG_START(cave_state::donpachi)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2228,7 +2228,7 @@ MACHINE_CONFIG_START(cave_state::esprade)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2307,7 +2307,7 @@ MACHINE_CONFIG_START(cave_state::guwange)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2349,7 +2349,7 @@ MACHINE_CONFIG_START(cave_state::hotdogst)
MCFG_DEVICE_IO_MAP(hotdogst_sound_portmap)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2398,7 +2398,7 @@ MACHINE_CONFIG_START(cave_state::korokoro)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2450,7 +2450,7 @@ MACHINE_CONFIG_START(cave_state::mazinger)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2506,7 +2506,7 @@ MACHINE_CONFIG_START(cave_state::metmqstr)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2562,7 +2562,7 @@ MACHINE_CONFIG_START(cave_state::pacslot)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C46_16BIT(config, "eeprom", eeprom_serial_streaming::ENABLE);
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2619,7 +2619,7 @@ MACHINE_CONFIG_START(cave_state::ppsatan)
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1)) /* a guess, and certainly wrong */
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_lev2", cave_state, timer_lev2_cb, attotime::from_hz(60))
@@ -2683,7 +2683,7 @@ MACHINE_CONFIG_START(cave_state::pwrinst2)
MCFG_DEVICE_IO_MAP(pwrinst2_sound_portmap)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2758,7 +2758,7 @@ MACHINE_CONFIG_START(cave_state::sailormn)
// MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_RESET_OVERRIDE(cave_state,sailormn)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2816,7 +2816,7 @@ MACHINE_CONFIG_START(cave_state::tekkencw)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C46_16BIT(config, "eeprom", eeprom_serial_streaming::ENABLE);
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2870,7 +2870,7 @@ MACHINE_CONFIG_START(cave_state::tjumpman)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C46_16BIT(config, "eeprom", eeprom_serial_streaming::ENABLE);
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2911,7 +2911,7 @@ MACHINE_CONFIG_START(cave_state::uopoko)
MCFG_DEVICE_PROGRAM_MAP(uopoko_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
diff --git a/src/mame/drivers/cbasebal.cpp b/src/mame/drivers/cbasebal.cpp
index 57770eb3973..2a0cfa56650 100644
--- a/src/mame/drivers/cbasebal.cpp
+++ b/src/mame/drivers/cbasebal.cpp
@@ -270,7 +270,7 @@ MACHINE_CONFIG_START(cbasebal_state::cbasebal)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cbasebal_state, irq0_line_hold) /* ??? */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index a269635cb87..d79d7bffc87 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -2313,25 +2313,27 @@ MACHINE_CONFIG_START(p500_state::p500_ntsc)
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(USER_PORT_TAG, cbm2_user_port_device, d2_w))
MCFG_MOS6526_PC_CALLBACK(WRITELINE(USER_PORT_TAG, cbm2_user_port_device, pc_w))
- MCFG_DS75160A_ADD(DS75160A_TAG, READ8(IEEE488_TAG, ieee488_device, dio_r), WRITE8(IEEE488_TAG, ieee488_device, host_dio_w))
-
- MCFG_DEVICE_ADD(DS75161A_TAG, DS75161A, 0)
- MCFG_DS75161A_IN_REN_CB(READLINE(IEEE488_TAG, ieee488_device, ren_r))
- MCFG_DS75161A_IN_IFC_CB(READLINE(IEEE488_TAG, ieee488_device, ifc_r))
- MCFG_DS75161A_IN_NDAC_CB(READLINE(IEEE488_TAG, ieee488_device, ndac_r))
- MCFG_DS75161A_IN_NRFD_CB(READLINE(IEEE488_TAG, ieee488_device, nrfd_r))
- MCFG_DS75161A_IN_DAV_CB(READLINE(IEEE488_TAG, ieee488_device, dav_r))
- MCFG_DS75161A_IN_EOI_CB(READLINE(IEEE488_TAG, ieee488_device, eoi_r))
- MCFG_DS75161A_IN_ATN_CB(READLINE(IEEE488_TAG, ieee488_device, atn_r))
- MCFG_DS75161A_IN_SRQ_CB(READLINE(IEEE488_TAG, ieee488_device, srq_r))
- MCFG_DS75161A_OUT_REN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ren_w))
- MCFG_DS75161A_OUT_IFC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ifc_w))
- MCFG_DS75161A_OUT_NDAC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ndac_w))
- MCFG_DS75161A_OUT_NRFD_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_nrfd_w))
- MCFG_DS75161A_OUT_DAV_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_dav_w))
- MCFG_DS75161A_OUT_EOI_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_eoi_w))
- MCFG_DS75161A_OUT_ATN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_atn_w))
- MCFG_DS75161A_OUT_SRQ_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_srq_w))
+ DS75160A(config, m_ieee1, 0);
+ m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
+ m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w));
+
+ DS75161A(config, m_ieee2, 0);
+ m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r));
+ m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r));
+ m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r));
+ m_ieee2->in_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::nrfd_r));
+ m_ieee2->in_dav().set(IEEE488_TAG, FUNC(ieee488_device::dav_r));
+ m_ieee2->in_eoi().set(IEEE488_TAG, FUNC(ieee488_device::eoi_r));
+ m_ieee2->in_atn().set(IEEE488_TAG, FUNC(ieee488_device::atn_r));
+ m_ieee2->in_srq().set(IEEE488_TAG, FUNC(ieee488_device::srq_r));
+ m_ieee2->out_ren().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
+ m_ieee2->out_ifc().set(IEEE488_TAG, FUNC(ieee488_device::host_ifc_w));
+ m_ieee2->out_ndac().set(IEEE488_TAG, FUNC(ieee488_device::host_ndac_w));
+ m_ieee2->out_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::host_nrfd_w));
+ m_ieee2->out_dav().set(IEEE488_TAG, FUNC(ieee488_device::host_dav_w));
+ m_ieee2->out_eoi().set(IEEE488_TAG, FUNC(ieee488_device::host_eoi_w));
+ m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
+ m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
MCFG_CBM_IEEE488_ADD("c8050")
MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(MOS6525_1_TAG, tpi6525_device, i1_w))
@@ -2441,25 +2443,27 @@ MACHINE_CONFIG_START(p500_state::p500_pal)
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(USER_PORT_TAG, cbm2_user_port_device, d2_w))
MCFG_MOS6526_PC_CALLBACK(WRITELINE(USER_PORT_TAG, cbm2_user_port_device, pc_w))
- MCFG_DS75160A_ADD(DS75160A_TAG, READ8(IEEE488_TAG, ieee488_device, dio_r), WRITE8(IEEE488_TAG, ieee488_device, host_dio_w))
-
- MCFG_DEVICE_ADD(DS75161A_TAG, DS75161A, 0)
- MCFG_DS75161A_IN_REN_CB(READLINE(IEEE488_TAG, ieee488_device, ren_r))
- MCFG_DS75161A_IN_IFC_CB(READLINE(IEEE488_TAG, ieee488_device, ifc_r))
- MCFG_DS75161A_IN_NDAC_CB(READLINE(IEEE488_TAG, ieee488_device, ndac_r))
- MCFG_DS75161A_IN_NRFD_CB(READLINE(IEEE488_TAG, ieee488_device, nrfd_r))
- MCFG_DS75161A_IN_DAV_CB(READLINE(IEEE488_TAG, ieee488_device, dav_r))
- MCFG_DS75161A_IN_EOI_CB(READLINE(IEEE488_TAG, ieee488_device, eoi_r))
- MCFG_DS75161A_IN_ATN_CB(READLINE(IEEE488_TAG, ieee488_device, atn_r))
- MCFG_DS75161A_IN_SRQ_CB(READLINE(IEEE488_TAG, ieee488_device, srq_r))
- MCFG_DS75161A_OUT_REN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ren_w))
- MCFG_DS75161A_OUT_IFC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ifc_w))
- MCFG_DS75161A_OUT_NDAC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ndac_w))
- MCFG_DS75161A_OUT_NRFD_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_nrfd_w))
- MCFG_DS75161A_OUT_DAV_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_dav_w))
- MCFG_DS75161A_OUT_EOI_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_eoi_w))
- MCFG_DS75161A_OUT_ATN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_atn_w))
- MCFG_DS75161A_OUT_SRQ_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_srq_w))
+ DS75160A(config, m_ieee1, 0);
+ m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
+ m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w));
+
+ DS75161A(config, m_ieee2, 0);
+ m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r));
+ m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r));
+ m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r));
+ m_ieee2->in_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::nrfd_r));
+ m_ieee2->in_dav().set(IEEE488_TAG, FUNC(ieee488_device::dav_r));
+ m_ieee2->in_eoi().set(IEEE488_TAG, FUNC(ieee488_device::eoi_r));
+ m_ieee2->in_atn().set(IEEE488_TAG, FUNC(ieee488_device::atn_r));
+ m_ieee2->in_srq().set(IEEE488_TAG, FUNC(ieee488_device::srq_r));
+ m_ieee2->out_ren().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
+ m_ieee2->out_ifc().set(IEEE488_TAG, FUNC(ieee488_device::host_ifc_w));
+ m_ieee2->out_ndac().set(IEEE488_TAG, FUNC(ieee488_device::host_ndac_w));
+ m_ieee2->out_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::host_nrfd_w));
+ m_ieee2->out_dav().set(IEEE488_TAG, FUNC(ieee488_device::host_dav_w));
+ m_ieee2->out_eoi().set(IEEE488_TAG, FUNC(ieee488_device::host_eoi_w));
+ m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
+ m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
MCFG_CBM_IEEE488_ADD("c8050")
MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(MOS6525_1_TAG, tpi6525_device, i1_w))
@@ -2567,25 +2571,27 @@ MACHINE_CONFIG_START(cbm2_state::cbm2lp_ntsc)
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(USER_PORT_TAG, cbm2_user_port_device, d2_w))
MCFG_MOS6526_PC_CALLBACK(WRITELINE(USER_PORT_TAG, cbm2_user_port_device, pc_w))
- MCFG_DS75160A_ADD(DS75160A_TAG, READ8(IEEE488_TAG, ieee488_device, dio_r), WRITE8(IEEE488_TAG, ieee488_device, host_dio_w))
-
- MCFG_DEVICE_ADD(DS75161A_TAG, DS75161A, 0)
- MCFG_DS75161A_IN_REN_CB(READLINE(IEEE488_TAG, ieee488_device, ren_r))
- MCFG_DS75161A_IN_IFC_CB(READLINE(IEEE488_TAG, ieee488_device, ifc_r))
- MCFG_DS75161A_IN_NDAC_CB(READLINE(IEEE488_TAG, ieee488_device, ndac_r))
- MCFG_DS75161A_IN_NRFD_CB(READLINE(IEEE488_TAG, ieee488_device, nrfd_r))
- MCFG_DS75161A_IN_DAV_CB(READLINE(IEEE488_TAG, ieee488_device, dav_r))
- MCFG_DS75161A_IN_EOI_CB(READLINE(IEEE488_TAG, ieee488_device, eoi_r))
- MCFG_DS75161A_IN_ATN_CB(READLINE(IEEE488_TAG, ieee488_device, atn_r))
- MCFG_DS75161A_IN_SRQ_CB(READLINE(IEEE488_TAG, ieee488_device, srq_r))
- MCFG_DS75161A_OUT_REN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ren_w))
- MCFG_DS75161A_OUT_IFC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ifc_w))
- MCFG_DS75161A_OUT_NDAC_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_ndac_w))
- MCFG_DS75161A_OUT_NRFD_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_nrfd_w))
- MCFG_DS75161A_OUT_DAV_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_dav_w))
- MCFG_DS75161A_OUT_EOI_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_eoi_w))
- MCFG_DS75161A_OUT_ATN_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_atn_w))
- MCFG_DS75161A_OUT_SRQ_CB(WRITELINE(IEEE488_TAG, ieee488_device, host_srq_w))
+ DS75160A(config, m_ieee1, 0);
+ m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
+ m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w));
+
+ DS75161A(config, m_ieee2, 0);
+ m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r));
+ m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r));
+ m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r));
+ m_ieee2->in_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::nrfd_r));
+ m_ieee2->in_dav().set(IEEE488_TAG, FUNC(ieee488_device::dav_r));
+ m_ieee2->in_eoi().set(IEEE488_TAG, FUNC(ieee488_device::eoi_r));
+ m_ieee2->in_atn().set(IEEE488_TAG, FUNC(ieee488_device::atn_r));
+ m_ieee2->in_srq().set(IEEE488_TAG, FUNC(ieee488_device::srq_r));
+ m_ieee2->out_ren().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
+ m_ieee2->out_ifc().set(IEEE488_TAG, FUNC(ieee488_device::host_ifc_w));
+ m_ieee2->out_ndac().set(IEEE488_TAG, FUNC(ieee488_device::host_ndac_w));
+ m_ieee2->out_nrfd().set(IEEE488_TAG, FUNC(ieee488_device::host_nrfd_w));
+ m_ieee2->out_dav().set(IEEE488_TAG, FUNC(ieee488_device::host_dav_w));
+ m_ieee2->out_eoi().set(IEEE488_TAG, FUNC(ieee488_device::host_eoi_w));
+ m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
+ m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
MCFG_CBM_IEEE488_ADD("c8050")
MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(MOS6525_1_TAG, tpi6525_device, i1_w))
diff --git a/src/mame/drivers/centiped.cpp b/src/mame/drivers/centiped.cpp
index 4061bfe3379..161d67fa83f 100644
--- a/src/mame/drivers/centiped.cpp
+++ b/src/mame/drivers/centiped.cpp
@@ -1898,7 +1898,7 @@ MACHINE_CONFIG_START(centiped_state::multiped)
MCFG_DEVICE_PROGRAM_MAP(multiped_map)
MCFG_DEVICE_REMOVE("earom")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index b3ff0541096..1da56494129 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -3440,12 +3440,13 @@ MACHINE_CONFIG_START(cps_state::cps1_12MHz)
MCFG_DEVICE_CLOCK( XTAL(12'000'000) ) /* verified on pcb */
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(cps_state::pang3)
+void cps_state::pang3(machine_config &config)
+{
cps1_12MHz(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_16BIT(config, "eeprom");
+}
MACHINE_CONFIG_START(cps_state::ganbare)
cps1_10MHz(config);
@@ -3473,7 +3474,7 @@ MACHINE_CONFIG_START(cps_state::qsound)
MCFG_MACHINE_START_OVERRIDE(cps_state, qsound)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* sound hardware */
MCFG_DEVICE_REMOVE("mono")
@@ -3490,12 +3491,13 @@ MACHINE_CONFIG_START(cps_state::qsound)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(cps_state::wofhfh)
+void cps_state::wofhfh(machine_config &config)
+{
cps1_12MHz(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_8BIT(config, "eeprom");
+}
MACHINE_CONFIG_START(cps_state::sf2m3)
cps1_12MHz(config);
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index ad887e5fce1..a3dcc202f16 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -1316,7 +1316,7 @@ MACHINE_CONFIG_START(cps2_state::cps2)
MCFG_MACHINE_START_OVERRIDE(cps2_state, cps2)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 5d7b4bdf589..6944d51d177 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -27,6 +27,7 @@
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
#include "sound/volt_reg.h"
+#include "diexec.h"
#include "speaker.h"
#include "rendlay.h"
@@ -133,8 +134,8 @@ void cyberbal_state::main_map(address_map &map)
map(0xfe1000, 0xfe1fff).portr("IN1");
map(0xfe8000, 0xfe8fff).ram().w("rpalette", FUNC(palette_device::write16)).share("rpalette");
map(0xfec000, 0xfecfff).ram().w("lpalette", FUNC(palette_device::write16)).share("lpalette");
- map(0xff0000, 0xff1fff).ram().w(m_playfield2_tilemap, FUNC(tilemap_device::write16)).share("playfield2");
- map(0xff2000, 0xff2fff).ram().w(m_alpha2_tilemap, FUNC(tilemap_device::write16)).share("alpha2");
+ map(0xff0000, 0xff1fff).ram().w(m_playfield2, FUNC(tilemap_device::write16)).share("playfield2");
+ map(0xff2000, 0xff2fff).ram().w(m_alpha2, FUNC(tilemap_device::write16)).share("alpha2");
map(0xff3000, 0xff37ff).ram().share("mob2");
map(0xff3800, 0xff3fff).ram().share("ff3800");
map(0xff4000, 0xff5fff).ram().w("playfield", FUNC(tilemap_device::write16)).share("playfield");
@@ -161,8 +162,8 @@ void cyberbal_state::extra_map(address_map &map)
map(0xfe1000, 0xfe1fff).portr("IN1");
map(0xfe8000, 0xfe8fff).ram().w("rpalette", FUNC(palette_device::write16)).share("rpalette");
map(0xfec000, 0xfecfff).ram().w("lpalette", FUNC(palette_device::write16)).share("lpalette");
- map(0xff0000, 0xff1fff).ram().w(m_playfield2_tilemap, FUNC(tilemap_device::write16)).share("playfield2");
- map(0xff2000, 0xff2fff).ram().w(m_alpha2_tilemap, FUNC(tilemap_device::write16)).share("alpha2");
+ map(0xff0000, 0xff1fff).ram().w(m_playfield2, FUNC(tilemap_device::write16)).share("playfield2");
+ map(0xff2000, 0xff2fff).ram().w(m_alpha2, FUNC(tilemap_device::write16)).share("alpha2");
map(0xff3000, 0xff37ff).ram().share("mob2");
map(0xff3800, 0xff3fff).ram().share("ff3800");
map(0xff4000, 0xff5fff).ram().w("playfield", FUNC(tilemap_device::write16)).share("playfield");
@@ -392,92 +393,101 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(cyberbal_state::cyberbal)
+MACHINE_CONFIG_START(cyberbal_state::cyberbal_base)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal_state::main_map);
- MCFG_DEVICE_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, ATARI_CLOCK_14MHz/4/4/16/16/14)
+ M6502(config, m_audiocpu, ATARI_CLOCK_14MHz/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cyberbal_state::sound_map);
+ m_audiocpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(ATARI_CLOCK_14MHz/4/4/16/16/14));
- MCFG_DEVICE_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(extra_map)
+ M68000(config, m_extracpu, ATARI_CLOCK_14MHz/2);
+ m_extracpu->set_addrmap(AS_PROGRAM, &cyberbal_state::extra_map);
MCFG_DEVICE_ADD("dac", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(sound_68k_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(cyberbal_state, sound_68k_irq_gen, 10000)
- MCFG_QUANTUM_TIME(attotime::from_hz(600))
-
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ config.m_minimum_quantum = attotime::from_hz(600);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "lpalette", gfx_interleaved)
-
- MCFG_PALETTE_ADD("lpalette", 2048)
- MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB)
- MCFG_PALETTE_ADD("rpalette", 2048)
- MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB)
-
- MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, cyberbal_state, get_playfield_tile_info, 16,8, SCAN_ROWS, 64,64)
- MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("alpha", "gfxdecode", 2, cyberbal_state, get_alpha_tile_info, 16,8, SCAN_ROWS, 64,32, 0)
- MCFG_ATARI_MOTION_OBJECTS_ADD("mob", "lscreen", cyberbal_state::s_mob_config)
- MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("gfxdecode")
-
- MCFG_TILEMAP_ADD_STANDARD("playfield2", "gfxdecode", 2, cyberbal_state, get_playfield2_tile_info, 16,8, SCAN_ROWS, 64,64)
- MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("alpha2", "gfxdecode", 2, cyberbal_state, get_alpha2_tile_info, 16,8, SCAN_ROWS, 64,32, 0)
- MCFG_ATARI_MOTION_OBJECTS_ADD("mob2", "rscreen", cyberbal_state::s_mob_config)
- MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("gfxdecode")
-
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ GFXDECODE(config, m_gfxdecode, "lpalette", gfx_interleaved);
+
+ PALETTE(config, "lpalette", 2048).set_format(PALETTE_FORMAT_IRRRRRGGGGGBBBBB);
+ PALETTE(config, "rpalette", 2048).set_format(PALETTE_FORMAT_IRRRRRGGGGGBBBBB);
+
+ TILEMAP(config, m_playfield, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,64)
+ .set_info_callback(FUNC(cyberbal_state::get_playfield_tile_info));
+ TILEMAP(config, m_alpha, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0)
+ .set_info_callback(FUNC(cyberbal_state::get_alpha_tile_info));
+ ATARI_MOTION_OBJECTS(config, m_mob, 0).set_screen("lscreen");
+ m_mob->set_config(cyberbal_state::s_mob_config);
+ m_mob->set_gfxdecode("gfxdecode");
+
+ TILEMAP(config, m_playfield2, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,64)
+ .set_info_callback(FUNC(cyberbal_state::get_playfield2_tile_info));
+ TILEMAP(config, m_alpha2, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0)
+ .set_info_callback(FUNC(cyberbal_state::get_alpha2_tile_info));
+ ATARI_MOTION_OBJECTS(config, m_mob2, 0).set_screen("rscreen");
+ m_mob2->set_config(cyberbal_state::s_mob_config);
+ m_mob2->set_gfxdecode("gfxdecode");
+
+ SCREEN(config, m_lscreen, SCREEN_TYPE_RASTER);
+ m_lscreen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(cyberbal_state, screen_update_cyberbal_left)
- MCFG_SCREEN_PALETTE("lpalette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cyberbal_state, video_int_write_line)) /* or is it "right?" */
+ m_lscreen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240);
+ m_lscreen->set_screen_update(FUNC(cyberbal_state::screen_update_cyberbal_left));
+ m_lscreen->set_palette("lpalette");
+ m_lscreen->screen_vblank().set(FUNC(cyberbal_state::video_int_write_line)); /* or is it "right?" har, har! */
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ SCREEN(config, m_rscreen, SCREEN_TYPE_RASTER);
+ m_rscreen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(cyberbal_state, screen_update_cyberbal_right)
- MCFG_SCREEN_PALETTE("rpalette")
+ m_rscreen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240);
+ m_rscreen->set_screen_update(FUNC(cyberbal_state::screen_update_cyberbal_right));
+ m_rscreen->set_palette("rpalette");
/* sound hardware */
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "audiocpu", INPUTLINE("maincpu", M68K_IRQ_1))
+ ATARI_SOUND_COMM(config, m_soundcomm, "audiocpu")
+ .int_callback().set_inputline("maincpu", M68K_IRQ_1);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymsnd", YM2151, ATARI_CLOCK_14MHz/4)
- MCFG_YM2151_IRQ_HANDLER(WRITELINE("soundcomm", atari_sound_comm_device, ym2151_irq_gen))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.60)
-
- MCFG_DEVICE_ADD("rdac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // AM6012.6j
- MCFG_DEVICE_ADD("ldac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // AM6012.6j
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_SOUND_ROUTE(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ YM2151(config, m_ymsnd, ATARI_CLOCK_14MHz/4);
+ m_ymsnd->irq_handler().set("soundcomm", FUNC(atari_sound_comm_device::ym2151_irq_gen));
+ m_ymsnd->add_route(0, "lspeaker", 0.60);
+ m_ymsnd->add_route(1, "rspeaker", 0.60);
+
+ AM6012(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // AM6012.6j
+ AM6012(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // AM6012.6j
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
+ vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
MACHINE_CONFIG_END
+void cyberbal_state::cyberbal(machine_config &config)
+{
+ cyberbal_base(config);
-MACHINE_CONFIG_START(cyberbal_state::cyberbalt)
- cyberbal(config);
- MCFG_DEVICE_REMOVE("eeprom")
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
+}
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 116, true)
-MACHINE_CONFIG_END
+void cyberbal_state::cyberbalt(machine_config &config)
+{
+ cyberbal_base(config);
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
+ SLAPSTIC(config, "slapstic", 116, true);
+}
MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
@@ -485,8 +495,7 @@ MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(cyberbal2p_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
@@ -495,10 +504,13 @@ MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
MCFG_PALETTE_ADD("palette", 2048)
MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB)
- MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, cyberbal2p_state, get_playfield_tile_info, 16,8, SCAN_ROWS, 64,64)
- MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("alpha", "gfxdecode", 2, cyberbal2p_state, get_alpha_tile_info, 16,8, SCAN_ROWS, 64,32, 0)
- MCFG_ATARI_MOTION_OBJECTS_ADD("mob", "screen", cyberbal2p_state::s_mob_config)
- MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("gfxdecode")
+ TILEMAP(config, m_playfield, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,64)
+ .set_info_callback(FUNC(cyberbal2p_state::get_playfield_tile_info));
+ TILEMAP(config, m_alpha, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0)
+ .set_info_callback(FUNC(cyberbal2p_state::get_alpha_tile_info));
+ ATARI_MOTION_OBJECTS(config, m_mob, 0).set_screen("screen");
+ m_mob->set_config(cyberbal2p_state::s_mob_config);
+ m_mob->set_gfxdecode("gfxdecode");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp
index 9541786e529..9e3b7b2b903 100644
--- a/src/mame/drivers/cybstorm.cpp
+++ b/src/mame/drivers/cybstorm.cpp
@@ -227,8 +227,7 @@ MACHINE_CONFIG_START(cybstorm_state::round2)
MCFG_DEVICE_ADD("maincpu", M68EC020, ATARI_CLOCK_14MHz)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/dcheese.cpp b/src/mame/drivers/dcheese.cpp
index 702698379cc..b9a2487b3f7 100644
--- a/src/mame/drivers/dcheese.cpp
+++ b/src/mame/drivers/dcheese.cpp
@@ -384,7 +384,7 @@ MACHINE_CONFIG_START(dcheese_state::dcheese)
MCFG_DEVICE_PROGRAM_MAP(sound_cpu_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(dcheese_state, irq1_line_hold, 480) /* accurate for fredmem */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index 8235b22c3d0..7a5de2512b5 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -338,7 +338,7 @@ MACHINE_CONFIG_START(deco156_state::hvysmsh)
MCFG_DEVICE_PROGRAM_MAP(hvysmsh_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", deco156_state, deco32_vbl_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(58)
@@ -392,7 +392,7 @@ MACHINE_CONFIG_START(deco156_state::wcvol95)
MCFG_DEVICE_PROGRAM_MAP(wcvol95_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", deco156_state, deco32_vbl_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(58)
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index ba3914169eb..ef427c25260 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -1963,7 +1963,7 @@ MACHINE_CONFIG_START(fghthist_state::fghthist)
audiocpu.add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused
audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248)
@@ -2095,7 +2095,7 @@ MACHINE_CONFIG_START(dragngun_state::dragngun)
MCFG_DECO_IRQ_RASTER2_IRQ_CB(WRITELINE("irq_merger", input_merger_any_high_device, in_w<0>))
MCFG_DECO_IRQ_VBLANK_IRQ_CB(WRITELINE("irq_merger", input_merger_any_high_device, in_w<1>))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2229,7 +2229,7 @@ MACHINE_CONFIG_START(dragngun_state::lockload)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* to improve main<->audio comms */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2315,7 +2315,7 @@ MACHINE_CONFIG_START(nslasher_state::tattass)
MCFG_DEVICE_PROGRAM_MAP(tattass_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", deco32_state, irq0_line_assert)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C76_8BIT)
+ EEPROM_93C76_8BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248)
@@ -2394,7 +2394,7 @@ MACHINE_CONFIG_START(nslasher_state::nslasher)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* to improve main<->audio comms */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(28'322'000) / 4, 442, 0, 320, 274, 8, 248)
diff --git a/src/mame/drivers/deco_mlc.cpp b/src/mame/drivers/deco_mlc.cpp
index a8aec9602c7..ac76f7d9094 100644
--- a/src/mame/drivers/deco_mlc.cpp
+++ b/src/mame/drivers/deco_mlc.cpp
@@ -513,7 +513,7 @@ MACHINE_CONFIG_START(deco_mlc_state::avengrgs)
MCFG_DEVICE_ADD(m_maincpu, SH2, 42000000/2) /* 21 MHz clock confirmed on real board */
MCFG_DEVICE_PROGRAM_MAP(avengrgs_map)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C46_16BIT) /* Actually 93c45 */
+ EEPROM_93C46_16BIT(config, m_eeprom); /* Actually 93c45 */
MCFG_TIMER_DRIVER_ADD(m_raster_irq_timer, deco_mlc_state, interrupt_gen)
@@ -546,7 +546,7 @@ MACHINE_CONFIG_START(deco_mlc_state::mlc)
MCFG_DEVICE_ADD(m_maincpu, ARM,42000000/6) /* 42 MHz -> 7MHz clock confirmed on real board */
MCFG_DEVICE_PROGRAM_MAP(decomlc_map)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C46_16BIT) /* Actually 93c45 */
+ EEPROM_93C46_16BIT(config, m_eeprom); /* Actually 93c45 */
MCFG_TIMER_DRIVER_ADD(m_raster_irq_timer, deco_mlc_state, interrupt_gen)
diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp
index c8e760fb189..f97d0483899 100644
--- a/src/mame/drivers/dkong.cpp
+++ b/src/mame/drivers/dkong.cpp
@@ -1764,29 +1764,33 @@ MACHINE_CONFIG_START(dkong_state::dkong2b)
MCFG_WATCHDOG_ADD("watchdog")
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(dkong_state::dk_braze)
+void dkong_state::dk_braze(machine_config &config)
+{
dkong2b(config);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_8BIT(config, "eeprom");
+}
-MACHINE_CONFIG_START(dkong_state::dkj_braze)
+void dkong_state::dkj_braze(machine_config &config)
+{
dkongjr(config);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_8BIT(config, "eeprom");
+}
-MACHINE_CONFIG_START(dkong_state::ddk_braze)
+void dkong_state::ddk_braze(machine_config &config)
+{
dkj_braze(config);
MCFG_MACHINE_RESET_OVERRIDE(dkong_state,ddk)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(dkong_state::dk3_braze)
+void dkong_state::dk3_braze(machine_config &config)
+{
dkong3(config);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
-MACHINE_CONFIG_END
+ EEPROM_93C46_8BIT(config, "eeprom");
+}
MACHINE_CONFIG_START(dkong_state::dkong3)
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 58ad56e82c8..924510beee4 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -331,7 +331,7 @@ MACHINE_CONFIG_START(dreambal_state::dreambal)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dreambal)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT) // 93lc46b
+ EEPROM_93C46_16BIT(config, "eeprom"); // 93lc46b
DECO104PROT(config, m_deco104, 0);
m_deco104->port_a_cb().set_ioport("INPUTS");
diff --git a/src/mame/drivers/dynamoah.cpp b/src/mame/drivers/dynamoah.cpp
index a3046fba105..432e4aff599 100644
--- a/src/mame/drivers/dynamoah.cpp
+++ b/src/mame/drivers/dynamoah.cpp
@@ -87,7 +87,7 @@ void dynamoah_state::dynamoah(machine_config &config)
maincpu.port_out_cb<1>().append(FUNC(dynamoah_state::p1_w)).mask(0x1f);
maincpu.port_out_cb<3>().set(FUNC(dynamoah_state::p3_w));
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom");
+ EEPROM_93C46_16BIT(config, "eeprom");
}
static INPUT_PORTS_START(dynamoah)
diff --git a/src/mame/drivers/eolith.cpp b/src/mame/drivers/eolith.cpp
index 931c2056844..91a603af74f 100644
--- a/src/mame/drivers/eolith.cpp
+++ b/src/mame/drivers/eolith.cpp
@@ -551,9 +551,9 @@ MACHINE_CONFIG_START(eolith_state::eolith45)
MCFG_MACHINE_RESET_OVERRIDE(eolith_state,eolith)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_8BIT)
- MCFG_EEPROM_ERASE_TIME(attotime::from_usec(250))
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(250))
+ EEPROM_93C66_8BIT(config, "eeprom")
+ .erase_time(attotime::from_usec(250))
+ .write_time(attotime::from_usec(250));
// for testing sound sync
// MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mame/drivers/eolith16.cpp b/src/mame/drivers/eolith16.cpp
index 3c024fc014d..0f96db14d53 100644
--- a/src/mame/drivers/eolith16.cpp
+++ b/src/mame/drivers/eolith16.cpp
@@ -164,7 +164,7 @@ MACHINE_CONFIG_START(eolith16_state::eolith16)
MCFG_DEVICE_PROGRAM_MAP(eolith16_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", eolith16_state, eolith_speedup, "screen", 0, 1)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_8BIT)
+ EEPROM_93C66_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp
index fee4ddc90c5..969d14c8f2e 100644
--- a/src/mame/drivers/eprom.cpp
+++ b/src/mame/drivers/eprom.cpp
@@ -397,8 +397,7 @@ MACHINE_CONFIG_START(eprom_state::eprom)
m_adc->in_callback<2>().set_ioport("ADC2");
m_adc->in_callback<3>().set_ioport("ADC3");
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
@@ -440,8 +439,7 @@ MACHINE_CONFIG_START(eprom_state::klaxp)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
@@ -488,8 +486,7 @@ MACHINE_CONFIG_START(eprom_state::guts)
m_adc->in_callback<2>().set_ioport("ADC2");
m_adc->in_callback<3>().set_ioport("ADC3");
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index bb36f857c24..9d6edcb8d34 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -706,7 +706,7 @@ MACHINE_CONFIG_START(esd16_state::hedpanio)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(hedpanic_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MACHINE_CONFIG_END
/* The ESD 08-26-1999 PCBs take that further and modify the sprite offsets */
diff --git a/src/mame/drivers/f-32.cpp b/src/mame/drivers/f-32.cpp
index d8d328b591e..979a48f7b19 100644
--- a/src/mame/drivers/f-32.cpp
+++ b/src/mame/drivers/f-32.cpp
@@ -175,9 +175,9 @@ MACHINE_CONFIG_START(mosaicf2_state::mosaicf2)
MCFG_DEVICE_IO_MAP(mosaicf2_io)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mosaicf2_state, irq0_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_ERASE_TIME(attotime::from_usec(1))
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(1))
+ EEPROM_93C46_16BIT(config, "eeprom")
+ .erase_time(attotime::from_usec(1))
+ .write_time(attotime::from_usec(1));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -254,9 +254,9 @@ MACHINE_CONFIG_START(mosaicf2_state::royalpk2)
MCFG_DEVICE_IO_MAP(royalpk2_io)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mosaicf2_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_ERASE_TIME(attotime::from_usec(1))
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(1))
+ EEPROM_93C46_16BIT(config, "eeprom")
+ .erase_time(attotime::from_usec(1))
+ .write_time(attotime::from_usec(1));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index a235c88e07c..97d98393e6b 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -2167,7 +2167,7 @@ MACHINE_CONFIG_START(cps_state::dinopic)
MCFG_MACHINE_START_OVERRIDE(cps_state, dinopic)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2337,7 +2337,7 @@ MACHINE_CONFIG_START(cps_state::sgyxz)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cps1)
MCFG_PALETTE_ADD("palette", 0xc00)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2449,7 +2449,7 @@ MACHINE_CONFIG_START(cps_state::punipic)
MCFG_MACHINE_START_OVERRIDE(cps_state, punipic)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -3019,7 +3019,7 @@ MACHINE_CONFIG_START(cps_state::slampic)
MCFG_MACHINE_START_OVERRIDE(cps_state, slampic)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/feversoc.cpp b/src/mame/drivers/feversoc.cpp
index 59627ff3afd..2191159a966 100644
--- a/src/mame/drivers/feversoc.cpp
+++ b/src/mame/drivers/feversoc.cpp
@@ -311,7 +311,7 @@ MACHINE_CONFIG_START(feversoc_state::feversoc)
MCFG_DEVICE_ADD("oki", OKIM6295, MASTER_CLOCK/16, okim6295_device::PIN7_LOW) //pin 7 & frequency not verified (clock should be 28,6363 / n)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.6)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom");
MCFG_JRC6355E_ADD("rtc", XTAL(32'768))
diff --git a/src/mame/drivers/fireball.cpp b/src/mame/drivers/fireball.cpp
index 32acd4d2e01..24e9f7e7d72 100644
--- a/src/mame/drivers/fireball.cpp
+++ b/src/mame/drivers/fireball.cpp
@@ -503,7 +503,7 @@ MACHINE_CONFIG_START(fireball_state::fireball)
MCFG_MCS51_PORT_P3_OUT_CB(WRITE8(*this, fireball_state, p3_w))
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_0", fireball_state, int_0, attotime::from_hz(555)) //9ms from scope reading 111Hz take care of this in the handler
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_X24C44_16BIT)
+ EEPROM_X24C44_16BIT(config, "eeprom");
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/fortecar.cpp b/src/mame/drivers/fortecar.cpp
index 1cd84c14245..062d9c18398 100644
--- a/src/mame/drivers/fortecar.cpp
+++ b/src/mame/drivers/fortecar.cpp
@@ -701,8 +701,7 @@ MACHINE_CONFIG_START(fortecar_state::fortecar)
MCFG_SCREEN_UPDATE_DRIVER(fortecar_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C56_16BIT(config, "eeprom").default_value(0);
MCFG_DEVICE_ADD("fcppi0", I8255A, 0)
/* Init with 0x9a... A, B and high C as input
diff --git a/src/mame/drivers/fromanc2.cpp b/src/mame/drivers/fromanc2.cpp
index 13b2e4f8e80..8cc1008c5ee 100644
--- a/src/mame/drivers/fromanc2.cpp
+++ b/src/mame/drivers/fromanc2.cpp
@@ -518,7 +518,7 @@ MACHINE_CONFIG_START(fromanc2_state::fromanc2)
MCFG_MACHINE_START_OVERRIDE(fromanc2_state,fromanc2)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "lpalette", gfx_fromanc2)
@@ -578,7 +578,7 @@ MACHINE_CONFIG_START(fromanc2_state::fromancr)
MCFG_MACHINE_START_OVERRIDE(fromanc2_state,fromanc2)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "lpalette", gfx_fromancr)
@@ -634,7 +634,7 @@ MACHINE_CONFIG_START(fromanc2_state::fromanc4)
MCFG_MACHINE_START_OVERRIDE(fromanc2_state,fromanc4)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("uart", NS16550, 2000000) // actual type is TL16C550CFN; clock unknown
MCFG_INS8250_OUT_INT_CB(INPUTLINE("maincpu", M68K_IRQ_2))
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index c4aa69b9b8c..9023804abdb 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -710,7 +710,7 @@ MACHINE_CONFIG_START(bang_state::bang)
MCFG_DEVICE_PROGRAM_MAP(bang_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bang_state, bang_irq, "screen", 0, 1)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_16BIT)
+ EEPROM_93C66_16BIT(config, "eeprom");
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1560,7 +1560,7 @@ MACHINE_CONFIG_START(gaelco2_state::snowboar)
MCFG_DEVICE_PROGRAM_MAP(snowboar_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_16BIT)
+ EEPROM_93C66_16BIT(config, "eeprom");
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
@@ -1603,7 +1603,7 @@ MACHINE_CONFIG_START(gaelco2_state::maniacsqs)
MCFG_DEVICE_PROGRAM_MAP(snowboar_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_16BIT)
+ EEPROM_93C66_16BIT(config, "eeprom");
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w));
diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp
index 61a28c5c54e..67b676f657a 100644
--- a/src/mame/drivers/gaelco3d.cpp
+++ b/src/mame/drivers/gaelco3d.cpp
@@ -939,7 +939,7 @@ MACHINE_CONFIG_START(gaelco3d_state::gaelco3d)
MCFG_DEVICE_PROGRAM_MAP(adsp_program_map)
MCFG_DEVICE_DATA_MAP(adsp_data_map)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C66_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C66_16BIT(config, m_eeprom, eeprom_serial_streaming::ENABLE);
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index ee7a9f682f3..1dd4d969252 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -206,7 +206,7 @@ MACHINE_CONFIG_START(galastrm_state::galastrm)
MCFG_DEVICE_PROGRAM_MAP(galastrm_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", galastrm_state, galastrm_interrupt) /* VBL */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock
adc.eoc_ff_callback().set_inputline("maincpu", 6);
diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp
index 065f6706fdd..a831ffb081c 100644
--- a/src/mame/drivers/galgames.cpp
+++ b/src/mame/drivers/galgames.cpp
@@ -158,9 +158,10 @@ protected:
DEFINE_DEVICE_TYPE(GALGAMES_BIOS_CART, galgames_bios_cart_device, "galgames_bios_cart", "Galaxy Games BIOS Cartridge")
-MACHINE_CONFIG_START(galgames_bios_cart_device::device_add_mconfig)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C76_8BIT)
-MACHINE_CONFIG_END
+void galgames_bios_cart_device::device_add_mconfig(machine_config &config)
+{
+ EEPROM_93C76_8BIT(config, "eeprom");
+}
#define MCFG_GALGAMES_BIOS_CART_ADD(_tag, _cart) \
MCFG_DEVICE_ADD(_tag, GALGAMES_BIOS_CART, 0) \
@@ -189,7 +190,7 @@ MACHINE_CONFIG_START(galgames_starpak2_cart_device::device_add_mconfig)
MCFG_PIC16C5x_READ_B_CB( READ8( *this, galgames_cart_device, int_pic_data_r))
MCFG_PIC16C5x_WRITE_B_CB(WRITE8(*this, galgames_cart_device, int_pic_data_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C76_8BIT)
+ EEPROM_93C76_8BIT(config, "eeprom");
MACHINE_CONFIG_END
#define MCFG_GALGAMES_STARPAK2_CART_ADD(_tag, _cart) \
@@ -221,7 +222,7 @@ MACHINE_CONFIG_START(galgames_starpak3_cart_device::device_add_mconfig)
MCFG_PIC16C5x_READ_B_CB( READ8( *this, galgames_cart_device, int_pic_data_r))
MCFG_PIC16C5x_WRITE_B_CB(WRITE8(*this, galgames_cart_device, int_pic_data_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C76_8BIT)
+ EEPROM_93C76_8BIT(config, "eeprom");
MACHINE_CONFIG_END
#define MCFG_GALGAMES_STARPAK3_CART_ADD(_tag, _cart) \
diff --git a/src/mame/drivers/galpani2.cpp b/src/mame/drivers/galpani2.cpp
index b5524cff1e5..a7e135cc1d5 100644
--- a/src/mame/drivers/galpani2.cpp
+++ b/src/mame/drivers/galpani2.cpp
@@ -634,7 +634,7 @@ MACHINE_CONFIG_START(galpani2_state::galpani2)
MCFG_DEVICE_PROGRAM_MAP(galpani2_mem2)
MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", galpani2_state, galpani2_interrupt2, "screen", 0, 1)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp
index a5dbe5e8289..d37c32598af 100644
--- a/src/mame/drivers/galpani3.cpp
+++ b/src/mame/drivers/galpani3.cpp
@@ -463,7 +463,7 @@ MACHINE_CONFIG_START(galpani3_state::galpani3)
//MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 64*8-1)
MCFG_SCREEN_UPDATE_DRIVER(galpani3_state, screen_update_galpani3)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp
index a23bf45ef7d..5b07a3cb922 100644
--- a/src/mame/drivers/gauntlet.cpp
+++ b/src/mame/drivers/gauntlet.cpp
@@ -496,8 +496,7 @@ MACHINE_CONFIG_START(gauntlet_state::gauntlet_base)
MCFG_DEVICE_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
@@ -522,7 +521,8 @@ MACHINE_CONFIG_START(gauntlet_state::gauntlet_base)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, gauntlet_state, video_int_write_line))
/* sound hardware */
- MCFG_ATARI_SOUND_COMM_ADD("soundcomm", "audiocpu", INPUTLINE("maincpu", M68K_IRQ_6))
+ ATARI_SOUND_COMM(config, "soundcomm", "audiocpu")
+ .int_callback().set_inputline("maincpu", M68K_IRQ_6);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/gcpinbal.cpp b/src/mame/drivers/gcpinbal.cpp
index 065dfe1543f..c866984fa59 100644
--- a/src/mame/drivers/gcpinbal.cpp
+++ b/src/mame/drivers/gcpinbal.cpp
@@ -369,7 +369,7 @@ MACHINE_CONFIG_START(gcpinbal_state::gcpinbal)
MCFG_DEVICE_PROGRAM_MAP(gcpinbal_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gcpinbal_state, gcpinbal_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("watchdog", MB3773, 0)
diff --git a/src/mame/drivers/gijoe.cpp b/src/mame/drivers/gijoe.cpp
index abefb68e384..8438d5c839b 100644
--- a/src/mame/drivers/gijoe.cpp
+++ b/src/mame/drivers/gijoe.cpp
@@ -301,7 +301,7 @@ MACHINE_CONFIG_START(gijoe_state::gijoe)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(32'000'000)/4) /* Amuse & confirmed. Z80E at 8MHz */
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp
index a31365ff99f..7972bfbf788 100644
--- a/src/mame/drivers/groundfx.cpp
+++ b/src/mame/drivers/groundfx.cpp
@@ -242,7 +242,7 @@ MACHINE_CONFIG_START(groundfx_state::groundfx)
MCFG_DEVICE_PROGRAM_MAP(groundfx_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", groundfx_state, interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock
adc.eoc_ff_callback().set_inputline("maincpu", 5);
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index 3d3802a6dd8..23d689a92ea 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -968,7 +968,7 @@ MACHINE_CONFIG_START(gticlub_state::gticlub)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom");
MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub)
MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,gticlub)
@@ -1076,7 +1076,7 @@ MACHINE_CONFIG_START(gticlub_state::hangplt)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom");
MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub)
MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,hangplt)
diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp
index 9db657775f0..f1beed7a5d4 100644
--- a/src/mame/drivers/gunbustr.cpp
+++ b/src/mame/drivers/gunbustr.cpp
@@ -235,7 +235,7 @@ MACHINE_CONFIG_START(gunbustr_state::gunbustr)
MCFG_DEVICE_PROGRAM_MAP(gunbustr_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gunbustr_state, gunbustr_interrupt) /* VBL */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0));
tc0510nio.read_0_callback().set_ioport("EXTRA");
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index 977fcbc266e..024a6c59118 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -1489,7 +1489,8 @@ MACHINE_CONFIG_START(harddriv_state::driver_nomsp)
MCFG_QUANTUM_TIME(attotime::from_hz(30000))
MCFG_DEVICE_ADD("200e", M48T02, 0)
- MCFG_EEPROM_2816_ADD("210e") // MK48Z02
+
+ EEPROM_2816(config, "210e"); // MK48Z02
MCFG_DEVICE_ADD("duartn68681", MC68681, XTAL(3'686'400))
MCFG_MC68681_IRQ_CALLBACK(WRITELINE(*this, harddriv_state, harddriv_duart_irq_handler))
@@ -1651,8 +1652,8 @@ MACHINE_CONFIG_START(harddriv_state::dsk)
MCFG_DSP32C_OUTPUT_CALLBACK(WRITE32(*this, harddriv_state,hddsk_update_pif))
MCFG_DEVICE_PROGRAM_MAP(dsk_dsp32_map)
- MCFG_EEPROM_2816_ADD("dsk_10c") // MK48Z02
- MCFG_EEPROM_2816_ADD("dsk_30c") // MK48Z02
+ EEPROM_2816(config, "dsk_10c"); // MK48Z02
+ EEPROM_2816(config, "dsk_30c"); // MK48Z02
/* ASIC65 */
MCFG_ASIC65_ADD("asic65", ASIC65_STANDARD)
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index b51945dcf0d..33e5ba1befb 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -1082,7 +1082,7 @@ MACHINE_CONFIG_START(hornet_state::hornet)
MCFG_WATCHDOG_ADD("watchdog")
// PCB description at top doesn't mention any EEPROM on the base board...
-// MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+// EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("voodoo0", VOODOO_1, STD_VOODOO_1_CLOCK)
MCFG_VOODOO_FBMEM(2)
@@ -1210,12 +1210,13 @@ MACHINE_CONFIG_START(hornet_state::hornet_2board_v2)
MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, hornet_state,voodoo_vblank_1))
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(hornet_state::sscope2)
+void hornet_state::sscope2(machine_config &config)
+{
hornet_2board_v2(config);
- MCFG_DEVICE_ADD("lan_serial_id", DS2401)
- MCFG_DEVICE_ADD("lan_eeprom", EEPROM_SERIAL_93C46_16BIT)
-MACHINE_CONFIG_END
+ DS2401(config, "lan_serial_id");
+ EEPROM_93C46_16BIT(config, "lan_eeprom");
+}
/*****************************************************************************/
diff --git a/src/mame/drivers/indigo.cpp b/src/mame/drivers/indigo.cpp
index 4281179f99b..e856147d46c 100644
--- a/src/mame/drivers/indigo.cpp
+++ b/src/mame/drivers/indigo.cpp
@@ -613,7 +613,7 @@ MACHINE_CONFIG_START(indigo_state::indigo3k)
MCFG_LEGACY_SCSI_PORT("scsi")
MCFG_WD33C93_IRQ_CB(WRITELINE(*this, indigo_state, scsi_irq)) /* command completion IRQ */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(indigo_state::indigo4k)
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index 8611fd52628..28425002790 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -346,7 +346,7 @@ MACHINE_CONFIG_START(inufuku_state::inufuku)
/* IRQs are triggered by the YM2610 */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/invqix.cpp b/src/mame/drivers/invqix.cpp
index 02b865e8a79..c3476c39b4f 100644
--- a/src/mame/drivers/invqix.cpp
+++ b/src/mame/drivers/invqix.cpp
@@ -357,8 +357,7 @@ MACHINE_CONFIG_START(invqix_state::invqix)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
MACHINE_CONFIG_END
ROM_START( invqix )
diff --git a/src/mame/drivers/jackpool.cpp b/src/mame/drivers/jackpool.cpp
index e97ebc18b91..6a745594303 100644
--- a/src/mame/drivers/jackpool.cpp
+++ b/src/mame/drivers/jackpool.cpp
@@ -266,7 +266,7 @@ MACHINE_CONFIG_START(jackpool_state::jackpool)
latch3.q_out_cb<1>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write));
latch3.q_out_cb<2>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write));
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("uart", NS16550, 1843200) // exact type and clock unknown
diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp
index 99f643a799b..d6506e366fc 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -1944,7 +1944,7 @@ MACHINE_CONFIG_START(jaguar_state::jaguar)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","jaguar")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(jaguar_state::jaguarcd)
diff --git a/src/mame/drivers/jchan.cpp b/src/mame/drivers/jchan.cpp
index cb32e894893..dc089330f62 100644
--- a/src/mame/drivers/jchan.cpp
+++ b/src/mame/drivers/jchan.cpp
@@ -637,7 +637,7 @@ MACHINE_CONFIG_START(jchan_state::jchan)
MCFG_DEVICE_ADD("toybox", KANEKO_TOYBOX, "eeprom", "DSW1", "mcuram", "mcudata")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index 0ce848b2cb2..6d0391eea04 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -1142,7 +1142,7 @@ MACHINE_CONFIG_START(jclub2o_state::jclub2o)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", jclub2o_state, irq0_line_hold)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_S29290_16BIT)
+ EEPROM_S29290_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
@@ -1176,7 +1176,7 @@ MACHINE_CONFIG_START(jclub2_state::jclub2)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", common_state, scanline_irq, "screen", 0, 1)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT) // 93C46 ( 8 bits)
+ EEPROM_93C46_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
@@ -1211,7 +1211,7 @@ MACHINE_CONFIG_START(darkhors_state::darkhors)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", common_state, scanline_irq, "screen", 0, 1)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
diff --git a/src/mame/drivers/joystand.cpp b/src/mame/drivers/joystand.cpp
index 5a600622a73..80879683cec 100644
--- a/src/mame/drivers/joystand.cpp
+++ b/src/mame/drivers/joystand.cpp
@@ -635,7 +635,7 @@ MACHINE_CONFIG_START(joystand_state::joystand)
MCFG_TMS_29F040_ADD("cart.u12")
// devices
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("rtc", MSM6242, XTAL(32'768))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index 396ee105c1e..b706ffaedab 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -1841,7 +1841,7 @@ MACHINE_CONFIG_START(kaneko16_state::bakubrkr)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,gtmr)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, m_eeprom);
WATCHDOG_TIMER(config, m_watchdog);
@@ -2050,7 +2050,7 @@ MACHINE_CONFIG_START(kaneko16_gtmr_state::gtmr)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_gtmr_state,gtmr)
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom);
+ EEPROM_93C46_16BIT(config, m_eeprom);
WATCHDOG_TIMER(config, m_watchdog);
@@ -2159,7 +2159,7 @@ MACHINE_CONFIG_START(kaneko16_state::mgcrystl)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,mgcrystl)
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom);
+ EEPROM_93C46_16BIT(config, m_eeprom);
WATCHDOG_TIMER(config, m_watchdog);
@@ -2278,8 +2278,7 @@ MACHINE_CONFIG_START(kaneko16_shogwarr_state::shogwarr)
MCFG_MACHINE_RESET_OVERRIDE(kaneko16_shogwarr_state,mgcrystl)
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom);
- m_eeprom->set_default_data(shogwarr_default_eeprom, 128);
+ EEPROM_93C46_16BIT(config, m_eeprom).default_data(shogwarr_default_eeprom, 128);
WATCHDOG_TIMER(config, m_watchdog);
@@ -2346,12 +2345,13 @@ void kaneko16_shogwarr_state::brapboys_oki2_map(address_map &map)
map(0x20000, 0x3ffff).bankr("okibank2");
}
-MACHINE_CONFIG_START(kaneko16_shogwarr_state::brapboys)
+void kaneko16_shogwarr_state::brapboys(machine_config &config)
+{
shogwarr(config);
m_oki[1]->set_addrmap(0, &kaneko16_shogwarr_state::brapboys_oki2_map);
m_kaneko_hit->set_type(2);
- m_eeprom->set_default_data(brapboys_default_eeprom, 128);
-MACHINE_CONFIG_END
+ m_eeprom->default_data(brapboys_default_eeprom, 128);
+}
/***************************************************************************
diff --git a/src/mame/drivers/kickgoal.cpp b/src/mame/drivers/kickgoal.cpp
index 4f0fd31529b..70b4c5bca19 100644
--- a/src/mame/drivers/kickgoal.cpp
+++ b/src/mame/drivers/kickgoal.cpp
@@ -645,8 +645,7 @@ MACHINE_CONFIG_START(kickgoal_state::kickgoal)
MCFG_DEVICE_DISABLE() /* Disabled since the internal rom isn't dumped */
/* Program and Data Maps are internal to the MCU */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(kickgoal_default_eeprom_type1, 128)
+ EEPROM_93C46_16BIT(config, "eeprom").default_data(kickgoal_default_eeprom_type1, 128);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -684,8 +683,7 @@ MACHINE_CONFIG_START(kickgoal_state::actionhw)
MCFG_DEVICE_DISABLE() /* Disabled since the internal rom isn't dumped */
/* Program and Data Maps are internal to the MCU */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(kickgoal_default_eeprom_type1, 128)
+ EEPROM_93C46_16BIT(config, "eeprom").default_data(kickgoal_default_eeprom_type1, 128);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/klax.cpp b/src/mame/drivers/klax.cpp
index 1cc01ddb2a4..fa504b03876 100644
--- a/src/mame/drivers/klax.cpp
+++ b/src/mame/drivers/klax.cpp
@@ -199,8 +199,7 @@ MACHINE_CONFIG_START(klax_state::klax)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(klax_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/konamigq.cpp b/src/mame/drivers/konamigq.cpp
index 807ff4b0b1e..f590cf520c9 100644
--- a/src/mame/drivers/konamigq.cpp
+++ b/src/mame/drivers/konamigq.cpp
@@ -350,8 +350,8 @@ MACHINE_CONFIG_START(konamigq_state::konamigq)
MCFG_MACHINE_RESET_OVERRIDE(konamigq_state, konamigq)
MCFG_DEVICE_ADD("mb89371", MB89371, 0)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(konamigq_def_eeprom, 128)
+
+ EEPROM_93C46_16BIT(config, "eeprom").default_data(konamigq_def_eeprom, 128);
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_0)
diff --git a/src/mame/drivers/konamigv.cpp b/src/mame/drivers/konamigv.cpp
index a0be81f1f04..6ee5ded6032 100644
--- a/src/mame/drivers/konamigv.cpp
+++ b/src/mame/drivers/konamigv.cpp
@@ -364,7 +364,7 @@ MACHINE_CONFIG_START(konamigv_state::konamigv)
MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psxdma_device::write_delegate(&konamigv_state::scsi_dma_write, this ) )
MCFG_DEVICE_ADD("mb89371", MB89371, 0)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "cdrom", SCSICD, SCSI_ID_4)
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index dd0d64da26d..b050d8bb613 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -1633,7 +1633,7 @@ MACHINE_CONFIG_START(konamigx_state::konamigx)
MCFG_MACHINE_START_OVERRIDE(konamigx_state,konamigx)
MCFG_MACHINE_RESET_OVERRIDE(konamigx_state,konamigx)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/konendev.cpp b/src/mame/drivers/konendev.cpp
index c7778e1a663..76f296e0a11 100644
--- a/src/mame/drivers/konendev.cpp
+++ b/src/mame/drivers/konendev.cpp
@@ -327,7 +327,7 @@ MACHINE_CONFIG_START(konendev_state::konendev)
MCFG_NVRAM_ADD_0FILL("nvram0")
MCFG_NVRAM_ADD_0FILL("nvram1")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_16BIT)
+ EEPROM_93C56_16BIT(config, "eeprom");
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp
index ec4ee28d01e..7a23e78e4b6 100644
--- a/src/mame/drivers/leland.cpp
+++ b/src/mame/drivers/leland.cpp
@@ -990,7 +990,7 @@ MACHINE_CONFIG_START(leland_state::leland)
MCFG_DEVICE_PROGRAM_MAP(slave_small_map_program)
MCFG_DEVICE_IO_MAP(slave_map_io)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, m_eeprom);
MCFG_NVRAM_ADD_0FILL("battery")
/* video hardware */
@@ -1061,7 +1061,7 @@ MACHINE_CONFIG_START(ataxx_state::ataxx)
MCFG_DEVICE_PROGRAM_MAP(slave_map_program)
MCFG_DEVICE_IO_MAP(slave_map_io_2)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C56_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C56_16BIT(config, m_eeprom, eeprom_serial_streaming::ENABLE);
MCFG_NVRAM_ADD_0FILL("battery")
diff --git a/src/mame/drivers/lethal.cpp b/src/mame/drivers/lethal.cpp
index 4640b3d577b..4fef5090a29 100644
--- a/src/mame/drivers/lethal.cpp
+++ b/src/mame/drivers/lethal.cpp
@@ -501,7 +501,7 @@ MACHINE_CONFIG_START(lethal_state::lethalen)
ADDRESS_MAP_BANK(config, "bank4000").set_map(&lethal_state::bank4000_map).set_options(ENDIANNESS_BIG, 8, 16, 0x4000);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp
index 1a1661d8e81..675301cda37 100644
--- a/src/mame/drivers/limenko.cpp
+++ b/src/mame/drivers/limenko.cpp
@@ -711,7 +711,7 @@ MACHINE_CONFIG_START(limenko_state::limenko)
MCFG_DEVICE_IO_MAP(limenko_io_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", limenko_state, irq0_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -756,7 +756,7 @@ MACHINE_CONFIG_START(limenko_state::spotty)
MCFG_MCS51_PORT_P3_IN_CB(READ8(*this, limenko_state, spotty_sound_cmd_r))
MCFG_MCS51_PORT_P3_OUT_CB(WRITE8(*this, limenko_state, spotty_sound_cmd_w)) //not sure about anything...
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/lordgun.cpp b/src/mame/drivers/lordgun.cpp
index dd646a77d8f..e85126c0dca 100644
--- a/src/mame/drivers/lordgun.cpp
+++ b/src/mame/drivers/lordgun.cpp
@@ -662,7 +662,7 @@ MACHINE_CONFIG_START(lordgun_state::lordgun)
MCFG_I8255_IN_PORTC_CB(IOPORT("COIN"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, lordgun_state, fake_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -714,7 +714,7 @@ MACHINE_CONFIG_START(lordgun_state::aliencha)
MCFG_I8255_IN_PORTC_CB(IOPORT("COIN"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(*this, lordgun_state, fake_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp
index 17bc8e9f872..816492a6d9f 100644
--- a/src/mame/drivers/mastboy.cpp
+++ b/src/mame/drivers/mastboy.cpp
@@ -813,7 +813,7 @@ MACHINE_CONFIG_START(mastboy_state::mastboy)
MCFG_DEVICE_PROGRAM_MAP(mastboy_map)
MCFG_DEVICE_IO_MAP(mastboy_io_map)
- MCFG_EEPROM_2816_ADD("earom")
+ EEPROM_2816(config, "earom");
LS259(config, m_outlatch); // IC17
m_outlatch->q_out_cb<0>().set(FUNC(mastboy_state::irq0_ack_w));
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index b604a922d67..db553296ae9 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -3446,7 +3446,7 @@ MACHINE_CONFIG_START(metro_state::dokyusp)
MCFG_DEVICE_PROGRAM_MAP(dokyusp_map)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(metro_state,metro_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -3474,7 +3474,7 @@ MACHINE_CONFIG_START(metro_state::gakusai)
MCFG_DEVICE_PROGRAM_MAP(gakusai_map)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(metro_state,metro_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -3503,7 +3503,7 @@ MACHINE_CONFIG_START(metro_state::gakusai2)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(metro_state,metro_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp
index 3c012bcf564..d6e952a1619 100644
--- a/src/mame/drivers/mhavoc.cpp
+++ b/src/mame/drivers/mhavoc.cpp
@@ -525,7 +525,7 @@ MACHINE_CONFIG_START(mhavoc_state::mhavoc)
MCFG_DEVICE_ADD("gamma", M6502, MHAVOC_CLOCK_1_25M) /* 1.25 MHz */
MCFG_DEVICE_PROGRAM_MAP(gamma_map)
- MCFG_EEPROM_2804_ADD("eeprom")
+ EEPROM_2804(config, "eeprom");
MCFG_TIMER_DRIVER_ADD_PERIODIC("5k_timer", mhavoc_state, mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K))
diff --git a/src/mame/drivers/microterm.cpp b/src/mame/drivers/microterm.cpp
index d8e00c718d5..beb1785ff17 100644
--- a/src/mame/drivers/microterm.cpp
+++ b/src/mame/drivers/microterm.cpp
@@ -107,7 +107,7 @@ MACHINE_CONFIG_START(microterm_state::mt420)
MC2661(config, "aci", XTAL(3'686'400)); // SCN2641
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom").do_callback().set("duart", FUNC(scn2681_device::ip6_w));
+ EEPROM_93C46_16BIT(config, "eeprom").do_callback().set("duart", FUNC(scn2681_device::ip6_w));
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(9'877'680), 612, 0, 480, 269, 0, 250)
@@ -136,9 +136,9 @@ MACHINE_CONFIG_START(microterm_state::mt5510)
duart.outport_cb().append("eeprom1", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(3);
duart.outport_cb().append("eeprom2", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(3);
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom1").do_callback().set("duart", FUNC(scn2681_device::ip6_w));
+ EEPROM_93C46_16BIT(config, "eeprom1").do_callback().set("duart", FUNC(scn2681_device::ip6_w));
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom2").do_callback().set("duart", FUNC(scn2681_device::ip5_w));
+ EEPROM_93C46_16BIT(config, "eeprom2").do_callback().set("duart", FUNC(scn2681_device::ip5_w));
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(45'830'400) / 2, 1120, 0, 960, 341, 0, 300) // wild guess at resolution
diff --git a/src/mame/drivers/midas.cpp b/src/mame/drivers/midas.cpp
index 3ac21029920..02c607cee10 100644
--- a/src/mame/drivers/midas.cpp
+++ b/src/mame/drivers/midas.cpp
@@ -639,7 +639,7 @@ MACHINE_CONFIG_START(midas_state::livequiz)
MCFG_DEVICE_PROGRAM_MAP(livequiz_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", midas_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -668,7 +668,7 @@ MACHINE_CONFIG_START(midas_state::hammer)
MCFG_DEVICE_PROGRAM_MAP(hammer_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", midas_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TICKET_DISPENSER_ADD("prize1", attotime::from_msec(1000*5), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW )
MCFG_TICKET_DISPENSER_ADD("prize2", attotime::from_msec(1000*5), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW )
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 363c5ba2f33..46f77095dfa 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -298,7 +298,7 @@ MACHINE_CONFIG_START(miragemj_state::mirage)
MCFG_DEVICE_PROGRAM_MAP(mirage_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", miragemj_state, irq6_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT) // 93C45
+ EEPROM_93C46_16BIT(config, "eeprom"); // 93C45
/* video hardware */
MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index 827a9013c2d..a868a9e5c99 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -1172,7 +1172,7 @@ MACHINE_CONFIG_START(mitchell_state::mgakuen)
MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell)
MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1213,7 +1213,7 @@ MACHINE_CONFIG_START(mitchell_state::pang)
MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell)
MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1368,7 +1368,7 @@ MACHINE_CONFIG_START(mitchell_state::marukin)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1423,7 +1423,7 @@ MACHINE_CONFIG_START(mitchell_state::pkladiesbl)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index de38ea467a5..3f330f4192a 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -2653,7 +2653,7 @@ MACHINE_CONFIG_START(model2a_state::model2a)
MCFG_MACHINE_START_OVERRIDE(model2_tgp_state,model2_tgp)
MCFG_MACHINE_RESET_OVERRIDE(model2a_state,model2a)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_NVRAM_ADD_1FILL("backup1")
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
@@ -2778,7 +2778,7 @@ MACHINE_CONFIG_START(model2b_state::model2b)
MCFG_MACHINE_START_OVERRIDE(model2b_state,model2b)
MCFG_MACHINE_RESET_OVERRIDE(model2b_state,model2b)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_NVRAM_ADD_1FILL("backup1")
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
@@ -2901,7 +2901,7 @@ MACHINE_CONFIG_START(model2c_state::model2c)
MCFG_MACHINE_START_OVERRIDE(model2c_state,model2c)
MCFG_MACHINE_RESET_OVERRIDE(model2c_state,model2c)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_NVRAM_ADD_1FILL("backup1")
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp
index 7af0b626045..8e31ee66491 100644
--- a/src/mame/drivers/model3.cpp
+++ b/src/mame/drivers/model3.cpp
@@ -5501,7 +5501,7 @@ void model3_state::add_base_devices(machine_config &config)
M68000(config, m_audiocpu, 12000000);
m_audiocpu->set_addrmap(AS_PROGRAM, &model3_state::model3_snd);
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom);
+ EEPROM_93C46_16BIT(config, m_eeprom);
NVRAM(config, "backup", nvram_device::DEFAULT_ALL_1);
RTC72421(config, m_rtc, XTAL(32'768)); // internal oscillator
diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp
index 0f3fda2896a..6e18fbe8f27 100644
--- a/src/mame/drivers/moo.cpp
+++ b/src/mame/drivers/moo.cpp
@@ -507,7 +507,7 @@ MACHINE_CONFIG_START(moo_state::moo)
MCFG_MACHINE_START_OVERRIDE(moo_state,moo)
MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_DEVICE_ADD("k053252", K053252, XTAL(32'000'000)/4) // 8MHz
MCFG_K053252_OFFSETS(40, 16)
@@ -567,7 +567,7 @@ MACHINE_CONFIG_START(moo_state::moobl)
MCFG_MACHINE_START_OVERRIDE(moo_state,moo)
MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp
index ef14d0efdd9..d1b78246187 100644
--- a/src/mame/drivers/mystwarr.cpp
+++ b/src/mame/drivers/mystwarr.cpp
@@ -952,7 +952,7 @@ MACHINE_CONFIG_START(mystwarr_state::mystwarr)
MCFG_QUANTUM_TIME(attotime::from_hz(1920))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_DEVICE_ADD("k053252", K053252, 6000000) // 6 MHz?
MCFG_K053252_OFFSETS(24, 16)
diff --git a/src/mame/drivers/namcona1.cpp b/src/mame/drivers/namcona1.cpp
index 043732a1d09..a093999e048 100644
--- a/src/mame/drivers/namcona1.cpp
+++ b/src/mame/drivers/namcona1.cpp
@@ -730,6 +730,8 @@ void namcona1_state::machine_start()
save_item(NAME(m_mcu_port5));
save_item(NAME(m_mcu_port6));
save_item(NAME(m_mcu_port8));
+
+ m_scan_timer = timer_alloc(TIMER_SCANLINE);
}
// the MCU boots the 68000
@@ -739,6 +741,8 @@ void namcona1_state::machine_reset()
m_mcu_port4 = 0;
m_mcu_port5 = 1;
+
+ m_scan_timer->adjust(m_screen->scan_period(), 0, m_screen->scan_period());
}
// each bit of player 3's inputs is split across one of the 8 analog input ports
@@ -931,9 +935,8 @@ GFXDECODE_END
// IRQ 1 =>
// IRQ 2 =>
-TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::interrupt)
+void namcona1_state::scanline_interrupt(int scanline)
{
- int scanline = param;
int enabled = m_mEnableInterrupts ? ~m_vreg[0x1a/2] : 0;
// adc (timing guessed, when does this trigger?)
@@ -960,35 +963,41 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::interrupt)
}
}
-/* cropped at sides */
-MACHINE_CONFIG_START(namcona1_state::namcona1)
-
- /* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(namcona1_main_map)
-
- MCFG_DEVICE_ADD("mcu", NAMCO_C69, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(namcona1_mcu_map)
- MCFG_DEVICE_IO_MAP( namcona1_mcu_io_map)
+void namcona1_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ if (id == TIMER_SCANLINE)
+ {
+ scanline_interrupt(m_screen->vpos());
+ }
+}
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_main", namcona1_state, interrupt, "screen", 0, 1)
+void namcona1_state::c69(machine_config &config)
+{
+ NAMCO_C69(config, m_mcu, MASTER_CLOCK/4);
+ m_mcu->set_addrmap(AS_PROGRAM, &namcona1_state::namcona1_mcu_map);
+ m_mcu->set_addrmap(AS_IO, &namcona1_state::namcona1_mcu_io_map);
+}
- MCFG_EEPROM_2816_ADD("eeprom")
+/* cropped at sides */
+void namcona1_state::namcona_base(machine_config &config)
+{
+ /* basic machine hardware */
+ M68000(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcona1_state::namcona1_main_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(40*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(8, 38*8-1-8, 4*8, 32*8-1)
- MCFG_SCREEN_VISIBLE_AREA(0, 38*8-1, 4*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(namcona1_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(40*8, 32*8);
+// m_screen->set_visarea(8, 38*8-1-8, 4*8, 32*8-1);
+ m_screen->set_visarea(0, 38*8-1, 4*8, 32*8-1);
+ m_screen->set_screen_update(FUNC(namcona1_state::screen_update));
+ m_screen->set_palette("palette");
- MCFG_PALETTE_ADD("palette", 0x2000)
- MCFG_PALETTE_ENABLE_SHADOWS()
+ PALETTE(config, m_palette, 0x2000).enable_shadows();
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcona1)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_namcona1);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -999,31 +1008,43 @@ MACHINE_CONFIG_START(namcona1_state::namcona1)
m_c140->set_addrmap(0, &namcona1_state::namcona1_c140_map);
m_c140->add_route(0, "rspeaker", 1.00);
m_c140->add_route(1, "lspeaker", 1.00);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcona2_state::namcona2)
- namcona1(config);
+void namcona1_state::namcona1(machine_config &config)
+{
+ namcona_base(config);
+ c69(config);
+ EEPROM_2816(config, "eeprom");
+}
- /* basic machine hardware */
-// MCFG_DEVICE_MODIFY("maincpu")
-// MCFG_DEVICE_PROGRAM_MAP(namcona2_main_map)
+void namcona2_state::c70(machine_config &config)
+{
+ NAMCO_C70(config, m_mcu, MASTER_CLOCK/4);
+ m_mcu->set_addrmap(AS_PROGRAM, &namcona1_state::namcona1_mcu_map);
+ m_mcu->set_addrmap(AS_IO, &namcona1_state::namcona1_mcu_io_map);
+}
- MCFG_DEVICE_REPLACE("mcu", NAMCO_C70, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(namcona1_mcu_map)
- MCFG_DEVICE_IO_MAP( namcona1_mcu_io_map)
-MACHINE_CONFIG_END
+void namcona2_state::namcona2(machine_config &config)
+{
+ namcona_base(config);
+ c70(config);
+ EEPROM_2816(config, "eeprom");
+
+// m_maincpu->set_addrmap(AS_PROGRAM, &namcona2_state::namcona2_main_map);
+}
-MACHINE_CONFIG_START(xday2_namcona2_state::xday2)
- namcona2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(xday2_main_map)
+void xday2_namcona2_state::xday2(machine_config &config)
+{
+ namcona_base(config);
+ c70(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &xday2_namcona2_state::xday2_main_map);
- MCFG_DEVICE_REMOVE("eeprom")
- MCFG_EEPROM_2864_ADD("eeprom")
+ EEPROM_2864(config, "eeprom");
// TODO: unknown sub type
- MCFG_DEVICE_ADD("rtc", MSM6242, XTAL(32'768))
-MACHINE_CONFIG_END
+ MSM6242(config,"rtc", XTAL(32'768));
+}
/* NA-1 Hardware */
void namcona1_state::init_bkrtmaq() { m_gametype = NAMCO_BKRTMAQ; }
diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp
index bbf3ab6c264..077b2be5e2f 100644
--- a/src/mame/drivers/namconb1.cpp
+++ b/src/mame/drivers/namconb1.cpp
@@ -1076,7 +1076,7 @@ MACHINE_CONFIG_START(namconb1_state::namconb1)
MCFG_DEVICE_PROGRAM_MAP(namcoc75_am)
MCFG_DEVICE_IO_MAP(namcoc75_io)
- MCFG_EEPROM_2816_ADD("eeprom")
+ EEPROM_2816(config, "eeprom");
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", namconb1_state, scantimer, "screen", 0, 1)
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index e1da5b35f88..f093f33c549 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3789,7 +3789,7 @@ MACHINE_CONFIG_START(namcos22_state::namcos22)
MCFG_DEVICE_PROGRAM_MAP( iomcu_s22_program)
MCFG_DEVICE_IO_MAP( iomcu_s22_io)
- MCFG_EEPROM_2864_ADD("eeprom")
+ EEPROM_2864(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -3857,7 +3857,7 @@ MACHINE_CONFIG_START(namcos22_state::namcos22s)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
// MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_EEPROM_2864_ADD("eeprom")
+ EEPROM_2864(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 247a02715e2..5fa939828b7 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2942,8 +2942,7 @@ MACHINE_CONFIG_START(naomi_state::naomi_base)
MCFG_DEVICE_PROGRAM_MAP(naomi_map)
MCFG_DEVICE_IO_MAP(naomi_port)
- MCFG_DEVICE_ADD("main_eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C46_16BIT(config, "main_eeprom").default_value(0);
// high probable this MCU uses one of "fast Z80" cores, like ASCII R800, Kawasaki KC80 or similar, where clocks per instructions is much different from regular Z80.
// was made few attempts to measure CPU core clock using different methods (in term of "regular Z80" clock and cycles):
@@ -2953,7 +2952,7 @@ MACHINE_CONFIG_START(naomi_state::naomi_base)
// for now we use higher clock, otherwise earlier NAOMI BIOS revisions will not boot (see MT#06552).
MCFG_MIE_ADD("mie", 16000000, "maple_dc", 0, nullptr, nullptr, nullptr, ":MIE.3", nullptr, ":MIE.5", nullptr, nullptr)
MCFG_SEGA_837_13551_DEVICE_ADD("837_13551", "mie", ":TILT", ":P1", ":P2", ":A0", ":A1", ":A2", ":A3", ":A4", ":A5", ":A6", ":A7", ":OUTPUT")
- MCFG_DEVICE_ADD("mie_eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "mie_eeprom");
MCFG_X76F100_ADD("naomibd_eeprom")
MCFG_M3COMM_ADD("comm_board")
diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp
index a24796a8cfb..42dc51800a2 100644
--- a/src/mame/drivers/offtwall.cpp
+++ b/src/mame/drivers/offtwall.cpp
@@ -341,8 +341,7 @@ MACHINE_CONFIG_START(offtwall_state::offtwall)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp
index f7232c6c7c2..412f2cd8223 100644
--- a/src/mame/drivers/othunder.cpp
+++ b/src/mame/drivers/othunder.cpp
@@ -613,7 +613,7 @@ MACHINE_CONFIG_START(othunder_state::othunder)
MCFG_DEVICE_ADD("audiocpu", Z80, 16_MHz_XTAL/2/2)
MCFG_DEVICE_PROGRAM_MAP(z80_sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
adc0808_device &adc(ADC0808(config, "adc", 16_MHz_XTAL/2/2/8));
adc.eoc_callback().set(FUNC(othunder_state::adc_eoc_w));
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index c9094d69ff9..8657115fdf7 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -345,8 +345,7 @@ MACHINE_CONFIG_START(overdriv_state::overdriv)
MCFG_QUANTUM_TIME(attotime::from_hz(12000))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_16BIT)
- MCFG_EEPROM_DATA(overdriv_default_eeprom, 128)
+ EEPROM_ER5911_16BIT(config, "eeprom").default_data(overdriv_default_eeprom, 128);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/pasha2.cpp b/src/mame/drivers/pasha2.cpp
index d258c446ea6..664e65ccaef 100644
--- a/src/mame/drivers/pasha2.cpp
+++ b/src/mame/drivers/pasha2.cpp
@@ -409,7 +409,7 @@ MACHINE_CONFIG_START(pasha2_state::pasha2)
MCFG_DEVICE_ADD("audiocpu", AT89C52, 12000000) /* clock from docs */
/* TODO : ports are unimplemented; P0,P1,P2,P3 and Serial Port Used */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp
index eab794054d8..9d911acd4fb 100644
--- a/src/mame/drivers/photoply.cpp
+++ b/src/mame/drivers/photoply.cpp
@@ -327,9 +327,9 @@ MACHINE_CONFIG_START(photoply_state::photoply)
MCFG_DEVICE_ADD("vga", CIRRUS_GD5446, 0)
MCFG_VIDEO_SET_SCREEN("screen")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(1))
- MCFG_EEPROM_ERASE_ALL_TIME(attotime::from_usec(10))
+ EEPROM_93C46_16BIT(config, "eeprom")
+ .write_time(attotime::from_usec(1))
+ .erase_all_time(attotime::from_usec(10));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pirates.cpp b/src/mame/drivers/pirates.cpp
index 54d4074c4b0..31bcbfcc393 100644
--- a/src/mame/drivers/pirates.cpp
+++ b/src/mame/drivers/pirates.cpp
@@ -257,7 +257,7 @@ MACHINE_CONFIG_START(pirates_state::pirates)
MCFG_DEVICE_PROGRAM_MAP(pirates_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pirates_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pirates)
diff --git a/src/mame/drivers/playmark.cpp b/src/mame/drivers/playmark.cpp
index c00865ac865..b61af5390ea 100644
--- a/src/mame/drivers/playmark.cpp
+++ b/src/mame/drivers/playmark.cpp
@@ -1136,8 +1136,7 @@ MACHINE_CONFIG_START(playmark_state::wbeachvl)
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(*this, playmark_state, playmark_snd_control_w))
// MCFG_PIC16C5x_WRITE_C_CB(WRITE8(*this, playmark_state, hrdtimes_snd_control_w)) // probably closer to this, but this only supports 2 sample bank bits
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
MCFG_MACHINE_START_OVERRIDE(playmark_state,playmark)
MCFG_MACHINE_RESET_OVERRIDE(playmark_state,playmark)
@@ -1260,8 +1259,7 @@ MACHINE_CONFIG_START(playmark_state::hotmind)
MCFG_PIC16C5x_READ_C_CB(READ8(*this, playmark_state, playmark_snd_flag_r))
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(*this, playmark_state, hrdtimes_snd_control_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
MCFG_MACHINE_START_OVERRIDE(playmark_state,playmark)
MCFG_MACHINE_RESET_OVERRIDE(playmark_state,playmark)
diff --git a/src/mame/drivers/plygonet.cpp b/src/mame/drivers/plygonet.cpp
index 8a083e38eb0..223f9a387bb 100644
--- a/src/mame/drivers/plygonet.cpp
+++ b/src/mame/drivers/plygonet.cpp
@@ -567,7 +567,7 @@ MACHINE_CONFIG_START(polygonet_state::plygonet)
MCFG_QUANTUM_PERFECT_CPU("maincpu") /* TODO: TEMPORARY! UNTIL A MORE LOCALIZED SYNC CAN BE MADE */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/pntnpuzl.cpp b/src/mame/drivers/pntnpuzl.cpp
index 6b349b46325..120e642ceb1 100644
--- a/src/mame/drivers/pntnpuzl.cpp
+++ b/src/mame/drivers/pntnpuzl.cpp
@@ -357,7 +357,7 @@ MACHINE_CONFIG_START(pntnpuzl_state::pntnpuzl)
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000))
MCFG_DEVICE_PROGRAM_MAP(pntnpuzl_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
VIA6522(config, m_via, 12_MHz_XTAL / 10);
m_via->readpa_handler().set_ioport("IN2");
diff --git a/src/mame/drivers/policetr.cpp b/src/mame/drivers/policetr.cpp
index fcb336a38a2..67a7cccfe47 100644
--- a/src/mame/drivers/policetr.cpp
+++ b/src/mame/drivers/policetr.cpp
@@ -410,7 +410,7 @@ void policetr_state::policetr(machine_config &config)
m_maincpu->set_endianness(ENDIANNESS_BIG);
m_maincpu->set_addrmap(AS_PROGRAM, &policetr_state::mem);
- EEPROM_SERIAL_93C66_16BIT(config, m_eeprom);
+ EEPROM_93C66_16BIT(config, m_eeprom);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp
index 7f8362c992e..fb8b4158e36 100644
--- a/src/mame/drivers/popeye.cpp
+++ b/src/mame/drivers/popeye.cpp
@@ -310,7 +310,7 @@ public:
virtual void config(machine_config &config) override
{
T::config(config);
- EEPROM_SERIAL_93C46_8BIT(config, "eeprom");
+ EEPROM_93C46_8BIT(config, "eeprom");
}
protected:
diff --git a/src/mame/drivers/powerbal.cpp b/src/mame/drivers/powerbal.cpp
index 7d7868d15be..6af4771b3a0 100644
--- a/src/mame/drivers/powerbal.cpp
+++ b/src/mame/drivers/powerbal.cpp
@@ -665,8 +665,7 @@ MACHINE_CONFIG_START(powerbal_state::magicstk)
MCFG_DEVICE_PROGRAM_MAP(magicstk_main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", powerbal_state, irq2_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C46_16BIT(config, "eeprom").default_value(0);
MCFG_MACHINE_START_OVERRIDE(powerbal_state,powerbal)
MCFG_MACHINE_RESET_OVERRIDE(powerbal_state,powerbal)
diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp
index 6b2978ef199..5cc4dc7dd81 100644
--- a/src/mame/drivers/psikyo4.cpp
+++ b/src/mame/drivers/psikyo4.cpp
@@ -658,9 +658,7 @@ MACHINE_CONFIG_START(psikyo4_state::ps4big)
MCFG_DEVICE_PROGRAM_MAP(ps4_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", psikyo4_state, psikyosh_interrupt)
-
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_8BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C56_8BIT(config, "eeprom").default_value(0);
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "lpalette", gfx_ps4)
diff --git a/src/mame/drivers/psikyosh.cpp b/src/mame/drivers/psikyosh.cpp
index d0e491edde9..b358c0ae0a1 100644
--- a/src/mame/drivers/psikyosh.cpp
+++ b/src/mame/drivers/psikyosh.cpp
@@ -786,8 +786,7 @@ MACHINE_CONFIG_START(psikyosh_state::psikyo3v1)
MCFG_WATCHDOG_ADD("watchdog")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C56_8BIT)
- MCFG_EEPROM_DEFAULT_VALUE(0)
+ EEPROM_93C56_8BIT(config, "eeprom").default_value(0);
/* video hardware */
MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM32) /* If using alpha */
diff --git a/src/mame/drivers/pve500.cpp b/src/mame/drivers/pve500.cpp
index 4478849bf3f..8bd673128cb 100644
--- a/src/mame/drivers/pve500.cpp
+++ b/src/mame/drivers/pve500.cpp
@@ -408,7 +408,7 @@ MACHINE_CONFIG_START(pve500_state::pve500)
/* Serial EEPROM (128 bytes, 8-bit data organization) */
/* The EEPROM stores the setup data */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_MSM16911_8BIT)
+ EEPROM_MSM16911_8BIT(config, "eeprom");
/* FIX-ME: These are actually RS422 ports (except EDL IN/OUT which is indeed an RS232 port)*/
MCFG_DEVICE_ADD("recorder", RS232_PORT, default_rs232_devices, nullptr)
diff --git a/src/mame/drivers/pzletime.cpp b/src/mame/drivers/pzletime.cpp
index 880bf328feb..35ada89f340 100644
--- a/src/mame/drivers/pzletime.cpp
+++ b/src/mame/drivers/pzletime.cpp
@@ -357,7 +357,7 @@ MACHINE_CONFIG_START(pzletime_state::pzletime)
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
MCFG_PALETTE_INIT_OWNER(pzletime_state, pzletime)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* sound hardware */
diff --git a/src/mame/drivers/quizpun2.cpp b/src/mame/drivers/quizpun2.cpp
index 4e7dff56402..3ccd16c1343 100644
--- a/src/mame/drivers/quizpun2.cpp
+++ b/src/mame/drivers/quizpun2.cpp
@@ -598,7 +598,7 @@ MACHINE_CONFIG_START(quizpun2_state::quizpun2)
MCFG_COP400_WRITE_SO_CB(WRITELINE("eeprom", eeprom_serial_93cxx_device, di_write))
MCFG_COP400_WRITE_SK_CB(WRITELINE("eeprom", eeprom_serial_93cxx_device, clk_write))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/r2dx_v33.cpp b/src/mame/drivers/r2dx_v33.cpp
index 08b149fed56..fd71408d937 100644
--- a/src/mame/drivers/r2dx_v33.cpp
+++ b/src/mame/drivers/r2dx_v33.cpp
@@ -792,7 +792,7 @@ MACHINE_CONFIG_START(r2dx_v33_state::rdx_v33)
MCFG_MACHINE_RESET_OVERRIDE(r2dx_v33_state,r2dx_v33)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
@@ -873,7 +873,7 @@ MACHINE_CONFIG_START(r2dx_v33_state::zerotm2k)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(zerotm2k_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MACHINE_CONFIG_END
void r2dx_v33_state::init_rdx_v33()
diff --git a/src/mame/drivers/rabbit.cpp b/src/mame/drivers/rabbit.cpp
index 0e14872956c..2b14095c96b 100644
--- a/src/mame/drivers/rabbit.cpp
+++ b/src/mame/drivers/rabbit.cpp
@@ -906,7 +906,7 @@ MACHINE_CONFIG_START(rabbit_state::rabbit)
MCFG_DEVICE_PROGRAM_MAP(rabbit_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", rabbit_state, vblank_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rabbit)
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index bfad477aca4..05c95badf11 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -3304,7 +3304,7 @@ MACHINE_CONFIG_START(rainbow_state::rainbow)
MCFG_HARDDISK_ADD("harddisk4")
MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_DS1315_ADD("rtc") // DS1315 (ClikClok for DEC-100 B) * OPTIONAL *
+ DS1315(config, m_rtc, 0); // DS1315 (ClikClok for DEC-100 B) * OPTIONAL *
COM8116_003(config, m_dbrg, 24.0734_MHz_XTAL / 4); // 6.01835 MHz (nominally 6 MHz)
m_dbrg->fr_handler().set(FUNC(rainbow_state::dbrg_fr_w));
diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp
index ffeb0a6ec8f..396afcc951f 100644
--- a/src/mame/drivers/rampart.cpp
+++ b/src/mame/drivers/rampart.cpp
@@ -345,8 +345,7 @@ MACHINE_CONFIG_START(rampart_state::rampart)
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 118, true)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
diff --git a/src/mame/drivers/rbmk.cpp b/src/mame/drivers/rbmk.cpp
index 68cf8b6f803..0d803d2c4bc 100644
--- a/src/mame/drivers/rbmk.cpp
+++ b/src/mame/drivers/rbmk.cpp
@@ -588,8 +588,7 @@ MACHINE_CONFIG_START(rbmk_state::rbmk)
MCFG_PALETTE_ADD("palette", 0x800)
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
-
+ EEPROM_93C46_16BIT(config, "eeprom");
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp
index 01b1cd7e67a..d671d581be0 100644
--- a/src/mame/drivers/relief.cpp
+++ b/src/mame/drivers/relief.cpp
@@ -275,8 +275,7 @@ MACHINE_CONFIG_START(relief_state::relief)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/rltennis.cpp b/src/mame/drivers/rltennis.cpp
index f1da035c15a..88980fa6275 100644
--- a/src/mame/drivers/rltennis.cpp
+++ b/src/mame/drivers/rltennis.cpp
@@ -196,7 +196,7 @@ MACHINE_CONFIG_START(rltennis_state::rltennis)
MCFG_PALETTE_ADD("palette", 256)
- MCFG_EEPROM_2864_ADD("eeprom")
+ EEPROM_2864(config, "eeprom");
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
MCFG_RAMDAC_SPLIT_READ(1)
diff --git a/src/mame/drivers/rmnimbus.cpp b/src/mame/drivers/rmnimbus.cpp
index b28c37109a2..c7888ca9722 100644
--- a/src/mame/drivers/rmnimbus.cpp
+++ b/src/mame/drivers/rmnimbus.cpp
@@ -183,7 +183,7 @@ void rmnimbus_state::nimbus(machine_config &config)
rs232b.ri_handler().set(Z80SIO_TAG, FUNC(z80dart_device::rib_w));
rs232b.cts_handler().set(Z80SIO_TAG, FUNC(z80dart_device::ctsb_w));
- EEPROM_SERIAL_93C06_16BIT(config, m_eeprom);
+ EEPROM_93C06_16BIT(config, m_eeprom);
VIA6522(config, m_via, 1000000);
m_via->writepa_handler().set("cent_data_out", FUNC(output_latch_device::bus_w));
diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp
index c44b1890d48..493344aefcb 100644
--- a/src/mame/drivers/rungun.cpp
+++ b/src/mame/drivers/rungun.cpp
@@ -411,7 +411,7 @@ MACHINE_CONFIG_START(rungun_state::rng)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rungun)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp
index 6d23cb523c9..f613b4e9f5c 100644
--- a/src/mame/drivers/segas32.cpp
+++ b/src/mame/drivers/segas32.cpp
@@ -2227,7 +2227,7 @@ MACHINE_CONFIG_START(segas32_state::device_add_mconfig)
io_chip.out_cnt1_callback().set(FUNC(segas32_state::display_enable_0_w));
io_chip.out_cnt2_callback().set_inputline(m_soundcpu, INPUT_LINE_RESET).invert();
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom");
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("v60_irq0", segas32_state, signal_v60_irq_callback)
MCFG_TIMER_DRIVER_ADD("v60_irq1", segas32_state, signal_v60_irq_callback)
@@ -2550,7 +2550,7 @@ MACHINE_CONFIG_START(sega_multi32_state::device_add_mconfig)
io_chip_1.out_ph_callback().append("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(6);
io_chip_1.out_cnt1_callback().set(FUNC(segas32_state::display_enable_1_w));
- EEPROM_SERIAL_93C46_16BIT(config, "eeprom");
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TIMER_DRIVER_ADD("v60_irq0", segas32_state, signal_v60_irq_callback)
MCFG_TIMER_DRIVER_ADD("v60_irq1", segas32_state, signal_v60_irq_callback)
diff --git a/src/mame/drivers/segasp.cpp b/src/mame/drivers/segasp.cpp
index 51edcb4fe0d..e59d70942b4 100644
--- a/src/mame/drivers/segasp.cpp
+++ b/src/mame/drivers/segasp.cpp
@@ -304,8 +304,8 @@ MACHINE_CONFIG_START(segasp_state::segasp)
MCFG_DEVICE_PROGRAM_MAP(segasp_map)
MCFG_DEVICE_IO_MAP(onchip_port)
- MCFG_DEVICE_ADD("main_eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_DEVICE_ADD("sp_eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "main_eeprom");
+ EEPROM_93C46_16BIT(config, "sp_eeprom");
// todo, not exactly NaomiM4 (see notes at top of driver) use custom board type here instead
MCFG_X76F100_ADD("naomibd_eeprom") // actually not present
diff --git a/src/mame/drivers/seibucats.cpp b/src/mame/drivers/seibucats.cpp
index 25c998fc9c0..7e29e907ea1 100644
--- a/src/mame/drivers/seibucats.cpp
+++ b/src/mame/drivers/seibucats.cpp
@@ -303,7 +303,7 @@ MACHINE_CONFIG_START(seibucats_state::seibucats)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(seibuspi_state, spi_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
//MCFG_JRC6355E_ADD("rtc", XTAL(32'768))
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index bde81d03ae4..5d7e02879d6 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -1875,10 +1875,10 @@ MACHINE_CONFIG_START(seibuspi_state::spi)
MCFG_MACHINE_RESET_OVERRIDE(seibuspi_state, spi)
- MCFG_DEVICE_ADD("ds2404", DS2404, 32.768_kHz_XTAL)
- MCFG_DS2404_REF_YEAR(1995)
- MCFG_DS2404_REF_MONTH(1)
- MCFG_DS2404_REF_DAY(1)
+ ds2404_device &rtc(DS2404(config, "ds2404", 32.768_kHz_XTAL));
+ rtc.ref_year(1995);
+ rtc.ref_month(1);
+ rtc.ref_day(1);
MCFG_INTEL_E28F008SA_ADD("soundflash1") // Sharp LH28F008 on newer mainboard revision
MCFG_INTEL_E28F008SA_ADD("soundflash2") // "
@@ -1976,7 +1976,7 @@ MACHINE_CONFIG_START(seibuspi_state::sxx2f)
MCFG_DEVICE_REMOVE("ds2404")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
// Z80 is Z84C0006PCS instead of Z84C0008PEC
// clock is unknown, possibly slower than 7.159MHz
@@ -2010,7 +2010,7 @@ MACHINE_CONFIG_START(seibuspi_state::sys386i)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(seibuspi_state,spi_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2066,7 +2066,7 @@ MACHINE_CONFIG_START(seibuspi_state::sys386f)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(seibuspi_state,spi_irq_callback)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index eea00517916..51e0ccb96ee 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2617,7 +2617,7 @@ MACHINE_CONFIG_START(seta2_state::gundamex)
MCFG_TMP68301_IN_PARALLEL_CB(READ16(*this, seta2_state, gundamex_eeprom_r))
MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, seta2_state, gundamex_eeprom_w))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
// video hardware
MCFG_SCREEN_MODIFY("screen")
@@ -2753,7 +2753,7 @@ MACHINE_CONFIG_START(seta2_state::telpacfl)
MCFG_DEVICE_MODIFY("tmp68301")
MCFG_TMP68301_IN_PARALLEL_CB(IOPORT("KNOB"))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT) // not hooked up, seems unused
+ EEPROM_93C46_16BIT(config, "eeprom"); // not hooked up, seems unused
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_HOPPER_ADD("dispenser", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp
index 108fdff5e82..19c1e1a9acf 100644
--- a/src/mame/drivers/shuuz.cpp
+++ b/src/mame/drivers/shuuz.cpp
@@ -238,8 +238,7 @@ MACHINE_CONFIG_START(shuuz_state::shuuz)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index 09978546c14..5660792b6f1 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2850,7 +2850,7 @@ MACHINE_CONFIG_START(sigmab98_state::sigmab98)
MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sigmab98)
MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
@@ -3005,7 +3005,7 @@ MACHINE_CONFIG_START(sigmab98_state::sammymdl)
MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sammymdl )
MCFG_NVRAM_ADD_0FILL("nvram") // battery backed RAM
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index 8b1de28b022..ca533ef0d32 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -408,7 +408,7 @@ MACHINE_CONFIG_START(simpl156_state::chainrec)
MCFG_DEVICE_PROGRAM_MAP(chainrec_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", simpl156_state, simpl156_vbl_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT) // 93C45
+ EEPROM_93C46_16BIT(config, "eeprom"); // 93C45
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp
index 74f110e2b10..54ee4ba8505 100644
--- a/src/mame/drivers/simpsons.cpp
+++ b/src/mame/drivers/simpsons.cpp
@@ -336,7 +336,7 @@ MACHINE_CONFIG_START(simpsons_state::simpsons)
ADDRESS_MAP_BANK(config, "bank0000").set_map(&simpsons_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000);
ADDRESS_MAP_BANK(config, "bank2000").set_map(&simpsons_state::bank2000_map).set_options(ENDIANNESS_BIG, 8, 14, 0x2000);
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp
index e651bf15a41..37bcb7aa9b4 100644
--- a/src/mame/drivers/skullxbo.cpp
+++ b/src/mame/drivers/skullxbo.cpp
@@ -233,8 +233,7 @@ MACHINE_CONFIG_START(skullxbo_state::skullxbo)
MCFG_TIMER_DRIVER_ADD("scan_timer", skullxbo_state, scanline_timer)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/splash.cpp b/src/mame/drivers/splash.cpp
index 7504b20bf27..ee4ee49bd2f 100644
--- a/src/mame/drivers/splash.cpp
+++ b/src/mame/drivers/splash.cpp
@@ -652,7 +652,7 @@ MACHINE_CONFIG_START(funystrp_state::funystrp)
MCFG_DEVICE_PROGRAM_MAP(funystrp_sound_map)
MCFG_DEVICE_IO_MAP(funystrp_sound_io_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/spool99.cpp b/src/mame/drivers/spool99.cpp
index 00226e2535c..7def914dbef 100644
--- a/src/mame/drivers/spool99.cpp
+++ b/src/mame/drivers/spool99.cpp
@@ -384,7 +384,7 @@ MACHINE_CONFIG_START(spool99_state::spool99)
MCFG_PALETTE_ADD("palette", 0x200)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index 6eb9c62fd66..64dd8929298 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -2606,7 +2606,7 @@ MACHINE_CONFIG_START(ssv_state::gdfs)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(gdfs_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
ADC0809(config, m_adc, 1000000); // unknown clock
m_adc->in_callback<0>().set_ioport("GUNX1");
diff --git a/src/mame/drivers/stlforce.cpp b/src/mame/drivers/stlforce.cpp
index e316e7c1b14..db02de52c1e 100644
--- a/src/mame/drivers/stlforce.cpp
+++ b/src/mame/drivers/stlforce.cpp
@@ -200,7 +200,7 @@ MACHINE_CONFIG_START(stlforce_state::stlforce)
MCFG_DEVICE_PROGRAM_MAP(stlforce_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", stlforce_state, irq4_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 54cee57ec33..74be7f00983 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -982,13 +982,13 @@ WRITE32_MEMBER(stv_state::decathlt_prot_srcaddr_w)
else if ((offs & 0x7fffff) == 0x7FFFF4)
{
m_5838crypt->data_w(space, offset, data, mem_mask);
- }
+ }
}
void stv_state::init_decathlt()
{
m_maincpu->space(AS_PROGRAM).install_write_handler(0x2000000, 0x37fffff, write32_delegate(FUNC(stv_state::decathlt_prot_srcaddr_w), this)); // set compressed data source address, write data
-
+
// really needs installing over the whole range, with fallbacks to read rom if device is disabled or isn't accessed on given address
m_maincpu->space(AS_PROGRAM).install_read_handler(0x27ffff8, 0x27ffffb, read32_delegate(FUNC(stv_state::decathlt_prot_r), this)); // read decompressed data
m_maincpu->space(AS_PROGRAM).install_read_handler(0x2fffff8, 0x2fffffb, read32_delegate(FUNC(stv_state::decathlt_prot_r), this)); // ^
@@ -998,9 +998,9 @@ void stv_state::init_decathlt()
m_protbank->configure_entry(1, memregion("cart")->base() + 0x0800000);
m_protbank->configure_entry(2, memregion("cart")->base() + 0x1000000);
//m_protbank->configure_entry(3, memregion("cart")->base() + 0x1800000);
-
+
m_protbank->set_entry(0);
-
+
m_newprotection_element = false;
init_stv();
@@ -1160,7 +1160,7 @@ MACHINE_CONFIG_START(stv_state::stv)
MCFG_MACHINE_START_OVERRIDE(stv_state,stv)
MCFG_MACHINE_RESET_OVERRIDE(stv_state,stv)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT) /* Actually AK93C45F */
+ EEPROM_93C46_16BIT(config, "eeprom"); /* Actually AK93C45F */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp
index 97e421658bb..fb8b3229fda 100644
--- a/src/mame/drivers/superchs.cpp
+++ b/src/mame/drivers/superchs.cpp
@@ -236,7 +236,7 @@ MACHINE_CONFIG_START(superchs_state::superchs)
MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* Need to interleave CPU 1 & 3 */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock
adc.eoc_ff_callback().set_inputline("maincpu", 3);
diff --git a/src/mame/drivers/taito_b.cpp b/src/mame/drivers/taito_b.cpp
index d6a56729cac..7b957615713 100644
--- a/src/mame/drivers/taito_b.cpp
+++ b/src/mame/drivers/taito_b.cpp
@@ -2193,7 +2193,7 @@ MACHINE_CONFIG_START(taitob_state::pbobble)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
TC0640FIO(config, m_tc0640fio, 0);
m_tc0640fio->read_0_callback().set_ioport("SERVICE");
@@ -2257,7 +2257,7 @@ MACHINE_CONFIG_START(taitob_state::spacedx)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
TC0640FIO(config, m_tc0640fio, 0);
m_tc0640fio->read_0_callback().set_ioport("SERVICE");
@@ -2379,7 +2379,7 @@ MACHINE_CONFIG_START(taitob_state::qzshowby)
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
TC0640FIO(config, m_tc0640fio, 0);
m_tc0640fio->read_0_callback().set_ioport("SERVICE");
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 46fdb820873..85142f48d8e 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -35,7 +35,6 @@
#include "includes/taito_f3.h"
#include "cpu/m68000/m68000.h"
-#include "machine/eepromser.h"
#include "sound/es5506.h"
#include "sound/okim6295.h"
#include "speaker.h"
@@ -457,72 +456,68 @@ void taito_f3_state::machine_reset()
m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
-MACHINE_CONFIG_START(taito_f3_state::f3)
-
+void taito_f3_state::f3(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68EC020, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(f3_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
+ M68EC020(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &taito_f3_state::f3_map);
+ m_maincpu->set_vblank_int("screen", FUNC(taito_f3_state::f3_interrupt2));
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, m_eeprom);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58.97)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(624) /* 58.97 Hz, 624us vblank time */)
- MCFG_SCREEN_SIZE(40*8+48*2, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 24, 24+232-1)
- MCFG_SCREEN_UPDATE_DRIVER(taito_f3_state, screen_update_f3)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taito_f3_state, screen_vblank_f3))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(58.97);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(624)); /* 58.97 Hz, 624us vblank time */
+ m_screen->set_size(40*8+48*2, 32*8);
+ m_screen->set_visarea(46, 40*8-1 + 46, 24, 24+232-1);
+ m_screen->set_screen_update(FUNC(taito_f3_state::screen_update_f3));
+ m_screen->screen_vblank().set(FUNC(taito_f3_state::screen_vblank_f3));
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_taito_f3)
- MCFG_PALETTE_ADD("palette", 0x2000)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_taito_f3);
+ PALETTE(config, m_palette, 0x2000);
/* sound hardware */
- MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0)
-MACHINE_CONFIG_END
+ TAITO_EN(config, m_taito_en, 0);
+}
/* These games reprogram the video output registers to display different scanlines,
we can't change our screen display at runtime, so we do it here instead. None
of the games change the registers during the game (to do so would probably require
monitor recalibration.)
*/
-MACHINE_CONFIG_START(taito_f3_state::f3_224a)
+void taito_f3_state::f3_224a(machine_config &config)
+{
f3(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 31, 31+224-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(46, 40*8-1 + 46, 31, 31+224-1);
+}
-MACHINE_CONFIG_START(taito_f3_state::f3_224b)
+void taito_f3_state::f3_224b(machine_config &config)
+{
f3(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 32, 32+224-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(46, 40*8-1 + 46, 32, 32+224-1);
+}
-MACHINE_CONFIG_START(taito_f3_state::f3_224c)
+void taito_f3_state::f3_224c(machine_config &config)
+{
f3(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 24, 24+224-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(46, 40*8-1 + 46, 24, 24+224-1);
+}
/* recalh and gseeker need a default EEPROM to work */
-MACHINE_CONFIG_START(taito_f3_state::f3_eeprom)
+void taito_f3_state::f3_eeprom(machine_config &config)
+{
f3(config);
+ m_eeprom->default_data(recalh_eeprom, 128); //TODO: convert this into ROM
+}
- MCFG_DEVICE_REMOVE("eeprom")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(recalh_eeprom, 128) //TODO: convert this into ROM
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(taito_f3_state::f3_224b_eeprom)
+void taito_f3_state::f3_224b_eeprom(machine_config &config)
+{
f3_224b(config);
-
- MCFG_DEVICE_REMOVE("eeprom")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(recalh_eeprom, 128) //TODO: convert this into ROM
-MACHINE_CONFIG_END
+ m_eeprom->default_data(recalh_eeprom, 128); //TODO: convert this into ROM
+}
static const gfx_layout bubsympb_sprite_layout =
{
@@ -554,34 +549,35 @@ static GFXDECODE_START( gfx_bubsympb )
GFXDECODE_ENTRY( nullptr, 0x000000, pivotlayout, 0, 64 ) /* Dynamically modified */
GFXDECODE_END
-MACHINE_CONFIG_START(taito_f3_state::bubsympb)
+void taito_f3_state::bubsympb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68EC020, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(bubsympb_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taito_f3_state, f3_interrupt2)
+ M68EC020(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &taito_f3_state::bubsympb_map);
+ m_maincpu->set_vblank_int("screen", FUNC(taito_f3_state::f3_interrupt2));
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, m_eeprom);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58.97)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(624) /* 58.97 Hz, 624us vblank time */)
- MCFG_SCREEN_SIZE(40*8+48*2, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 31, 31+224-1)
- MCFG_SCREEN_UPDATE_DRIVER(taito_f3_state, screen_update_f3)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, taito_f3_state, screen_vblank_f3))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(58.97);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(624)); /* 58.97 Hz, 624us vblank time */
+ m_screen->set_size(40*8+48*2, 32*8);
+ m_screen->set_visarea(46, 40*8-1 + 46, 31, 31+224-1);
+ m_screen->set_screen_update(FUNC(taito_f3_state::screen_update_f3));
+ m_screen->screen_vblank().set(FUNC(taito_f3_state::screen_vblank_f3));
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bubsympb)
- MCFG_PALETTE_ADD("palette", 8192)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_bubsympb);
+ PALETTE(config, m_palette, 0x2000);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000 , okim6295_device::PIN7_HIGH) // not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); // not verified
+ m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/******************************************************************************/
diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp
index 9e850cf8f28..fedcbba4d64 100644
--- a/src/mame/drivers/taito_z.cpp
+++ b/src/mame/drivers/taito_z.cpp
@@ -3733,8 +3733,7 @@ MACHINE_CONFIG_START(taitoz_state::spacegun)
MCFG_MACHINE_START_OVERRIDE(taitoz_state,bshark)
MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
- MCFG_EEPROM_DATA(spacegun_default_eeprom, 128)
+ EEPROM_93C46_16BIT(config, "eeprom").default_data(spacegun_default_eeprom, 128);
adc0809_device &adc(ADC0809(config, "adc", 500000)); // clock unknown
adc.eoc_ff_callback().set_inputline("sub", 5);
diff --git a/src/mame/drivers/taitojc.cpp b/src/mame/drivers/taitojc.cpp
index 73f29e6c121..5197bc9ef31 100644
--- a/src/mame/drivers/taitojc.cpp
+++ b/src/mame/drivers/taitojc.cpp
@@ -1095,7 +1095,7 @@ MACHINE_CONFIG_START(taitojc_state::taitojc)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
TC0640FIO(config, m_tc0640fio, 0);
m_tc0640fio->read_0_callback().set_ioport("SERVICE");
diff --git a/src/mame/drivers/tasman.cpp b/src/mame/drivers/tasman.cpp
index df0b0e2f689..d05d8fc44f7 100644
--- a/src/mame/drivers/tasman.cpp
+++ b/src/mame/drivers/tasman.cpp
@@ -660,7 +660,7 @@ MACHINE_CONFIG_START(kongambl_state::kongambl)
MCFG_K053252_INT2_ACK_CB(WRITELINE(*this, kongambl_state, hblank_irq_ack_w))
MCFG_VIDEO_SET_SCREEN("screen")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(25000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223) // fake, they'll be changed by CCU anyway, TBD
diff --git a/src/mame/drivers/tecmosys.cpp b/src/mame/drivers/tecmosys.cpp
index f64d5b73168..3d18f17a53d 100644
--- a/src/mame/drivers/tecmosys.cpp
+++ b/src/mame/drivers/tecmosys.cpp
@@ -468,7 +468,7 @@ MACHINE_CONFIG_START(tecmosys_state::tecmosys)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tecmosys)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C46_16BIT(config, "eeprom", eeprom_serial_streaming::ENABLE);
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp
index 2d8d231716f..b328ae34754 100644
--- a/src/mame/drivers/thunderj.cpp
+++ b/src/mame/drivers/thunderj.cpp
@@ -249,8 +249,7 @@ MACHINE_CONFIG_START(thunderj_state::thunderj)
MCFG_DEVICE_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(extra_map)
- MCFG_EEPROM_2816_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2816(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/timetrv.cpp b/src/mame/drivers/timetrv.cpp
index a77bf2b0793..34f5efea15b 100644
--- a/src/mame/drivers/timetrv.cpp
+++ b/src/mame/drivers/timetrv.cpp
@@ -149,7 +149,7 @@ MACHINE_CONFIG_START(timetrv_state::timetrv)
MCFG_DEVICE_IO_MAP(timetrv_io)
// interrupts are generated by internally-driven timers
- MCFG_EEPROM_2816_ADD("eeprom")
+ EEPROM_2816(config, "eeprom");
MCFG_DEVICE_ADD("ppi1", I8255, 0)
MCFG_I8255_IN_PORTA_CB(READ8(*this, timetrv_state, test1_r)) //inputs
diff --git a/src/mame/drivers/tmmjprd.cpp b/src/mame/drivers/tmmjprd.cpp
index 3c7124b731a..d46e4fbe90f 100644
--- a/src/mame/drivers/tmmjprd.cpp
+++ b/src/mame/drivers/tmmjprd.cpp
@@ -744,7 +744,7 @@ MACHINE_CONFIG_START(tmmjprd_state::tmpdoki)
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", tmmjprd_state, scanline, "lscreen", 0, 1)
- MCFG_DEVICE_ADD(m_eeprom, EEPROM_SERIAL_93C46_16BIT, eeprom_serial_streaming::ENABLE)
+ EEPROM_93C46_16BIT(config, m_eeprom, eeprom_serial_streaming::ENABLE);
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_tmmjprd)
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index 2ba01d4ba28..7cf0e02771b 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -2224,7 +2224,7 @@ MACHINE_CONFIG_START(tmnt_state::blswhstl)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,common)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -2370,7 +2370,7 @@ MACHINE_CONFIG_START(tmnt_state::prmrsocr)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,prmrsocr)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -2440,7 +2440,7 @@ MACHINE_CONFIG_START(tmnt_state::tmnt2)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,common)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -2500,7 +2500,7 @@ MACHINE_CONFIG_START(tmnt_state::ssriders)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,common)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -2556,7 +2556,7 @@ MACHINE_CONFIG_START(tmnt_state::sunsetbl)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,common)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2607,7 +2607,7 @@ MACHINE_CONFIG_START(tmnt_state::thndrx2)
MCFG_MACHINE_START_OVERRIDE(tmnt_state,common)
MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index f3bcc76e8ba..8bb69223a7d 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -3636,7 +3636,7 @@ MACHINE_CONFIG_START(toaplan2_state::fixeight)
audiocpu.p0_in_cb().set_ioport("EEPROM");
audiocpu.p0_out_cb().set_ioport("EEPROM");
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom);
+ EEPROM_93C46_16BIT(config, m_eeprom);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -4149,7 +4149,7 @@ MACHINE_CONFIG_START(toaplan2_state::bbakraid)
MCFG_MACHINE_RESET_OVERRIDE(toaplan2_state,toaplan2)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C66_8BIT)
+ EEPROM_93C66_8BIT(config, "eeprom");
ADDRESS_MAP_BANK(config, m_dma_space, 0);
m_dma_space->set_addrmap(0, &toaplan2_state::batrider_dma_mem);
diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp
index 167da4736be..a14f7e4a0d1 100644
--- a/src/mame/drivers/toobin.cpp
+++ b/src/mame/drivers/toobin.cpp
@@ -209,8 +209,7 @@ MACHINE_CONFIG_START(toobin_state::toobin)
MCFG_DEVICE_ADD("maincpu", M68010, MASTER_CLOCK/4)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
diff --git a/src/mame/drivers/tti.cpp b/src/mame/drivers/tti.cpp
index 1ded05ab12d..b0cdd64be79 100644
--- a/src/mame/drivers/tti.cpp
+++ b/src/mame/drivers/tti.cpp
@@ -73,8 +73,7 @@ MACHINE_CONFIG_START(tti_state::tti)
MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(WRITELINE("mfp", mc68901_device, write_rx))
- MCFG_DEVICE_ADD("novram", EEPROM_SERIAL_X24C44_16BIT)
- MCFG_EEPROM_SERIAL_DO_CALLBACK(WRITELINE("mfp", mc68901_device, i0_w))
+ EEPROM_X24C44_16BIT(config, "novram").do_callback().set("mfp", FUNC(mc68901_device::i0_w));
ls259_device &bitlatch(LS259(config, "bitlatch")); // U17
bitlatch.q_out_cb<0>().set("novram", FUNC(eeprom_serial_x24c44_device::di_write));
diff --git a/src/mame/drivers/ultrsprt.cpp b/src/mame/drivers/ultrsprt.cpp
index 1f63af875ca..5f2b09f50f4 100644
--- a/src/mame/drivers/ultrsprt.cpp
+++ b/src/mame/drivers/ultrsprt.cpp
@@ -245,7 +245,7 @@ MACHINE_CONFIG_START(ultrsprt_state::ultrsprt)
MCFG_DEVICE_ADD("audiocpu", M68000, 8000000) // Unconfirmed
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("upd1", UPD4701A, 0)
MCFG_UPD4701_PORTX("P1X")
diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp
index b3694ee459f..673823c25fb 100644
--- a/src/mame/drivers/undrfire.cpp
+++ b/src/mame/drivers/undrfire.cpp
@@ -571,7 +571,7 @@ MACHINE_CONFIG_START(undrfire_state::undrfire)
MCFG_DEVICE_PROGRAM_MAP(undrfire_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", undrfire_state, undrfire_interrupt)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0));
tc0510nio.read_0_callback().set_ioport("INPUTS0");
@@ -630,7 +630,7 @@ MACHINE_CONFIG_START(undrfire_state::cbombers)
MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock
adc.eoc_ff_callback().set_inputline("maincpu", 5);
diff --git a/src/mame/drivers/unico.cpp b/src/mame/drivers/unico.cpp
index 046c3360327..501962cf5c4 100644
--- a/src/mame/drivers/unico.cpp
+++ b/src/mame/drivers/unico.cpp
@@ -660,7 +660,7 @@ MACHINE_CONFIG_START(zeropnt2_state::zeropnt2)
MCFG_DEVICE_PROGRAM_MAP(zeropnt2_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", unico_state, irq2_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_8BIT)
+ EEPROM_93C46_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/v102.cpp b/src/mame/drivers/v102.cpp
index 8e86e3fd662..de8d3508eeb 100644
--- a/src/mame/drivers/v102.cpp
+++ b/src/mame/drivers/v102.cpp
@@ -91,7 +91,7 @@ MACHINE_CONFIG_START(v102_state::v102)
//MCFG_DEVICE_ADD("vpac", CRT9007, CRTC_CLOCK)
//MCFG_CRT9007_CHARACTER_WIDTH(6 or 10)
- MCFG_EEPROM_2804_ADD("eeprom")
+ EEPROM_2804(config, "eeprom");
MCFG_DEVICE_ADD("mpsc", UPD7201_NEW, XTAL(18'575'000) / 5) // divider not verified
MCFG_Z80SIO_OUT_INT_CB(WRITELINE("mainirq", input_merger_device, in_w<0>))
diff --git a/src/mame/drivers/vamphalf.cpp b/src/mame/drivers/vamphalf.cpp
index 145483ad75b..b6327eeee98 100644
--- a/src/mame/drivers/vamphalf.cpp
+++ b/src/mame/drivers/vamphalf.cpp
@@ -1110,10 +1110,10 @@ MACHINE_CONFIG_START(vamphalf_state::common)
MCFG_DEVICE_PROGRAM_MAP(common_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
// various games require fast timing to save settings, probably because our Hyperstone core timings are incorrect
- MCFG_EEPROM_ERASE_TIME(attotime::from_usec(1))
- MCFG_EEPROM_WRITE_TIME(attotime::from_usec(1))
+ EEPROM_93C46_16BIT(config, "eeprom")
+ .erase_time(attotime::from_usec(1))
+ .write_time(attotime::from_usec(1));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1300,7 +1300,7 @@ MACHINE_CONFIG_START(vamphalf_state::aoh)
MCFG_DEVICE_IO_MAP(aoh_io)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", vamphalf_state, irq1_line_hold)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index 746c1856fdd..25b99533779 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -442,7 +442,7 @@ MACHINE_CONFIG_START(vendetta_state::vendetta)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
/* interrupts are triggered by the main CPU */
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp
index cdfdd1c85b0..cf8e550b45b 100644
--- a/src/mame/drivers/vindictr.cpp
+++ b/src/mame/drivers/vindictr.cpp
@@ -188,10 +188,9 @@ MACHINE_CONFIG_START(vindictr_state::vindictr)
MCFG_DEVICE_ADD("maincpu", M68010, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vindictr)
diff --git a/src/mame/drivers/wheelfir.cpp b/src/mame/drivers/wheelfir.cpp
index 902439f8b6b..190e8ad59f7 100644
--- a/src/mame/drivers/wheelfir.cpp
+++ b/src/mame/drivers/wheelfir.cpp
@@ -761,7 +761,7 @@ MACHINE_CONFIG_START(wheelfir_state::wheelfir)
MCFG_PALETTE_ADD("palette", NUM_COLORS)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_GENERIC_LATCH_16_ADD("soundlatch")
diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp
index 0c9d63533ff..45db683606c 100644
--- a/src/mame/drivers/xexex.cpp
+++ b/src/mame/drivers/xexex.cpp
@@ -482,7 +482,7 @@ MACHINE_CONFIG_START(xexex_state::xexex)
MCFG_QUANTUM_TIME(attotime::from_hz(1920))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index c36b927e333..d11a02fbc78 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -308,7 +308,7 @@ MACHINE_CONFIG_START(xmen_state::xmen)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/2) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
@@ -361,7 +361,7 @@ MACHINE_CONFIG_START(xmen_state::xmen6p)
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/2)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_ER5911_8BIT)
+ EEPROM_ER5911_8BIT(config, "eeprom");
MCFG_WATCHDOG_ADD("watchdog")
diff --git a/src/mame/drivers/xorworld.cpp b/src/mame/drivers/xorworld.cpp
index 8296111aa99..c707d30200f 100644
--- a/src/mame/drivers/xorworld.cpp
+++ b/src/mame/drivers/xorworld.cpp
@@ -164,7 +164,7 @@ MACHINE_CONFIG_START(xorworld_state::xorworld)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); // CS (active low)
diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp
index 0398aaaba5d..e2776e33491 100644
--- a/src/mame/drivers/xybots.cpp
+++ b/src/mame/drivers/xybots.cpp
@@ -180,12 +180,11 @@ MACHINE_CONFIG_START(xybots_state::xybots)
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, true)
+ SLAPSTIC(config, "slapstic", 107, true);
- MCFG_EEPROM_2804_ADD("eeprom")
- MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
+ EEPROM_2804(config, "eeprom").lock_after_write(true);
- MCFG_WATCHDOG_ADD("watchdog")
+ WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_xybots)
diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp
index 5fe08734b60..2d1187effdf 100644
--- a/src/mame/drivers/zr107.cpp
+++ b/src/mame/drivers/zr107.cpp
@@ -784,7 +784,7 @@ MACHINE_CONFIG_START(zr107_state::zr107)
MCFG_QUANTUM_TIME(attotime::from_hz(750000))// Very high sync needed to prevent lockups - why?
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("k056230", K056230, 0)
MCFG_K056230_CPU("maincpu")
@@ -855,7 +855,7 @@ MACHINE_CONFIG_START(zr107_state::jetwave)
MCFG_QUANTUM_TIME(attotime::from_hz(2000000)) // Very high sync needed to prevent lockups - why?
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
+ EEPROM_93C46_16BIT(config, "eeprom");
MCFG_DEVICE_ADD("k056230", K056230, 0)
MCFG_K056230_CPU("maincpu")
diff --git a/src/mame/includes/atetris.h b/src/mame/includes/atetris.h
index 7fdd8fd4bd7..0f23296f613 100644
--- a/src/mame/includes/atetris.h
+++ b/src/mame/includes/atetris.h
@@ -20,10 +20,11 @@ public:
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_slapstic_device(*this, "slapstic"),
+ m_slapstic(*this, "slapstic"),
m_videoram(*this, "videoram")
{ }
+ void atetris_base(machine_config &config);
void atetris(machine_config &config);
void atetrisb2(machine_config &config);
@@ -37,7 +38,7 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
- optional_device<atari_slapstic_device> m_slapstic_device;
+ optional_device<atari_slapstic_device> m_slapstic;
required_shared_ptr<uint8_t> m_videoram;
diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h
index 5dd31f9c7df..103772c5a14 100644
--- a/src/mame/includes/cyberbal.h
+++ b/src/mame/includes/cyberbal.h
@@ -24,8 +24,8 @@ class cyberbal_base_state : public atarigen_state
protected:
cyberbal_base_state(const machine_config &mconfig, device_type type, const char *tag) :
atarigen_state(mconfig, type, tag),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
+ m_playfield(*this, "playfield"),
+ m_alpha(*this, "alpha"),
m_mob(*this, "mob")
{ }
@@ -39,8 +39,8 @@ protected:
static const atari_motion_objects_config s_mob_config;
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
+ required_device<tilemap_device> m_playfield;
+ required_device<tilemap_device> m_alpha;
required_device<atari_motion_objects_device> m_mob;
uint16_t m_current_slip[2];
@@ -91,8 +91,8 @@ public:
m_ldac(*this, "ldac"),
m_soundcomm(*this, "soundcomm"),
m_ymsnd(*this, "ymsnd"),
- m_playfield2_tilemap(*this, "playfield2"),
- m_alpha2_tilemap(*this, "alpha2"),
+ m_playfield2(*this, "playfield2"),
+ m_alpha2(*this, "alpha2"),
m_mob2(*this, "mob2"),
m_lscreen(*this, "lscreen"),
m_rscreen(*this, "rscreen")
@@ -100,6 +100,7 @@ public:
void init_cyberbalt();
void cyberbal(machine_config &config);
+ void cyberbal_base(machine_config &config);
void cyberbalt(machine_config &config);
protected:
@@ -143,8 +144,8 @@ private:
required_device<dac_word_interface> m_ldac;
required_device<atari_sound_comm_device> m_soundcomm;
required_device<ym2151_device> m_ymsnd;
- required_device<tilemap_device> m_playfield2_tilemap;
- required_device<tilemap_device> m_alpha2_tilemap;
+ required_device<tilemap_device> m_playfield2;
+ required_device<tilemap_device> m_alpha2;
required_device<atari_motion_objects_device> m_mob2;
required_device<screen_device> m_lscreen;
required_device<screen_device> m_rscreen;
diff --git a/src/mame/includes/namcona1.h b/src/mame/includes/namcona1.h
index 697fa5accbf..b9e8392e034 100644
--- a/src/mame/includes/namcona1.h
+++ b/src/mame/includes/namcona1.h
@@ -35,9 +35,12 @@ public:
m_scroll(*this, "scroll"),
m_spriteram(*this, "spriteram"),
m_prgrom(*this, "maincpu"),
- m_maskrom(*this, "maskrom")
+ m_maskrom(*this, "maskrom"),
+ m_scan_timer(nullptr)
{ }
+ void namcona_base(machine_config &config);
+ void c69(machine_config &config);
void namcona1(machine_config &config);
void init_bkrtmaq();
@@ -49,6 +52,9 @@ public:
void init_emeraldj();
void init_swcourtb();
+ void namcona1_mcu_io_map(address_map &map);
+ void namcona1_mcu_map(address_map &map);
+
protected:
DECLARE_READ16_MEMBER(custom_key_r);
DECLARE_WRITE16_MEMBER(custom_key_w);
@@ -76,13 +82,12 @@ protected:
DECLARE_READ16_MEMBER(snd_r);
DECLARE_WRITE16_MEMBER(snd_w);
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
+ void scanline_interrupt(int scanline);
void namcona1_main_map(address_map &map);
- void namcona1_mcu_io_map(address_map &map);
- void namcona1_mcu_map(address_map &map);
void namcona1_c140_map(address_map &map);
virtual void machine_start() override;
@@ -105,6 +110,11 @@ protected:
NAMCO_SWCOURTB
};
+ enum
+ {
+ TIMER_SCANLINE
+ };
+
int m_gametype;
required_device<cpu_device> m_maincpu;
@@ -128,6 +138,7 @@ protected:
required_region_ptr<uint16_t> m_prgrom;
required_region_ptr<uint16_t> m_maskrom;
+ emu_timer * m_scan_timer;
// this has to be uint8_t to be in the right byte order for the tilemap system
std::vector<uint8_t> m_shaperam;
@@ -172,6 +183,7 @@ public:
: namcona1_state(mconfig, type, tag)
{}
+ void c70(machine_config &config);
void namcona2(machine_config &config);
void init_knckhead();
diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h
index d72543ecff8..148137d3f22 100644
--- a/src/mame/includes/taito_f3.h
+++ b/src/mame/includes/taito_f3.h
@@ -1,6 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:Bryan McPhail
+
#include "audio/taito_en.h"
+#include "machine/eepromser.h"
#include "machine/watchdog.h"
#include "sound/okim6295.h"
#include "emupal.h"
@@ -61,6 +63,7 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
+ m_eeprom(*this, "eeprom"),
m_f3_ram(*this,"f3_ram"),
m_paletteram32(*this, "paletteram"),
m_input(*this, "IN.%u", 0),
@@ -133,6 +136,7 @@ protected:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
+ optional_device<eeprom_serial_base_device> m_eeprom;
optional_shared_ptr<uint32_t> m_f3_ram;
optional_shared_ptr<uint32_t> m_paletteram32;
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index 6f875a7e47a..d050b486cfc 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -56,9 +56,8 @@ DEFINE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device, "atarscom", "Atari
atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock),
- m_sound_cpu_tag(nullptr),
m_main_int_cb(*this),
- m_sound_cpu(nullptr),
+ m_sound_cpu(*this, finder_base::DUMMY_TAG),
m_main_to_sound_ready(false),
m_sound_to_main_ready(false),
m_main_to_sound_data(0),
@@ -75,13 +74,6 @@ atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig,
void atari_sound_comm_device::device_start()
{
- // find the sound CPU
- if (m_sound_cpu_tag == nullptr)
- throw emu_fatalerror("No sound CPU specified!");
- m_sound_cpu = siblingdevice<m6502_device>(m_sound_cpu_tag);
- if (m_sound_cpu == nullptr)
- throw emu_fatalerror("Sound CPU '%s' not found!", m_sound_cpu_tag);
-
// resolve callbacks
m_main_int_cb.resolve_safe();
@@ -142,11 +134,15 @@ void atari_sound_comm_device::device_timer(emu_timer &timer, device_timer_id id,
INTERRUPT_GEN_MEMBER(atari_sound_comm_device::sound_irq_gen)
{
+ sound_irq();
+}
+
+void atari_sound_comm_device::sound_irq()
+{
m_timed_int = 1;
update_sound_irq();
}
-
//-------------------------------------------------
// sound_irq_ack_r: Resets the IRQ signal to the
// 6502 sound processor. Both reads and writes
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index f7a17481c2a..e60c624d323 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -29,17 +29,6 @@
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ATARI_SOUND_COMM_ADD(_tag, _soundcpu, _intcb) \
- MCFG_DEVICE_ADD(_tag, ATARI_SOUND_COMM, 0) \
- downcast<atari_sound_comm_device &>(*device).set_sound_cpu(_soundcpu); \
- downcast<atari_sound_comm_device &>(*device).set_main_int_cb(DEVCB_##_intcb);
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -59,11 +48,17 @@ class atari_sound_comm_device : public device_t
{
public:
// construction/destruction
+ template <typename T>
+ atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag)
+ : atari_sound_comm_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ m_sound_cpu.set_tag(std::forward<T>(cputag));
+ }
+
atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- void set_sound_cpu(const char *cputag) { m_sound_cpu_tag = cputag; }
- template <class Object> devcb_base &set_main_int_cb(Object &&cb) { return m_main_int_cb.set_callback(std::forward<Object>(cb)); }
+ auto int_callback() { return m_main_int_cb.bind(); }
// getters
DECLARE_READ_LINE_MEMBER(main_to_sound_ready) { return m_main_to_sound_ready ? ASSERT_LINE : CLEAR_LINE; }
@@ -81,6 +76,7 @@ public:
DECLARE_WRITE8_MEMBER(sound_irq_ack_w);
DECLARE_READ8_MEMBER(sound_irq_ack_r);
INTERRUPT_GEN_MEMBER(sound_irq_gen);
+ void sound_irq();
// additional helpers
DECLARE_WRITE_LINE_MEMBER(ym2151_irq_gen);
@@ -107,11 +103,10 @@ private:
};
// configuration state
- const char * m_sound_cpu_tag;
devcb_write_line m_main_int_cb;
// internal state
- m6502_device * m_sound_cpu;
+ required_device<m6502_device> m_sound_cpu;
bool m_main_to_sound_ready;
bool m_sound_to_main_ready;
uint8_t m_main_to_sound_data;
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index 748f939d77e..d59bd508738 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -670,9 +670,10 @@ void iteagle_eeprom_device::eeprom_map(address_map &map)
map(0x0000, 0x000F).rw(FUNC(iteagle_eeprom_device::eeprom_r), FUNC(iteagle_eeprom_device::eeprom_w));
}
-MACHINE_CONFIG_START(iteagle_eeprom_device::device_add_mconfig)
- MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
-MACHINE_CONFIG_END
+void iteagle_eeprom_device::device_add_mconfig(machine_config &config)
+{
+ EEPROM_93C46_16BIT(config, "eeprom");
+}
iteagle_eeprom_device::iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pci_device(mconfig, ITEAGLE_EEPROM, tag, owner, clock)
@@ -714,7 +715,7 @@ void iteagle_eeprom_device::device_start()
}
m_iteagle_default_eeprom[0x3f] = checkSum;
- m_eeprom->set_default_data(m_iteagle_default_eeprom.data(), 0x80);
+ m_eeprom->default_data(m_iteagle_default_eeprom.data(), 0x80);
pci_device::device_start();
skip_map_regs(1);
diff --git a/src/mame/machine/model1io.cpp b/src/mame/machine/model1io.cpp
index 8fef843c855..ae48abdebd5 100644
--- a/src/mame/machine/model1io.cpp
+++ b/src/mame/machine/model1io.cpp
@@ -133,7 +133,7 @@ void model1io_device::device_add_mconfig(machine_config &config)
z80_device &iocpu(Z80(config, "iocpu", 32_MHz_XTAL/8));
iocpu.set_addrmap(AS_PROGRAM, &model1io_device::mem_map);
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom); // 93C45
+ EEPROM_93C46_16BIT(config, m_eeprom); // 93C45
sega_315_5338a_device &io(SEGA_315_5338A(config, "io", 32_MHz_XTAL));
io.read_callback().set(FUNC(model1io_device::io_r));
diff --git a/src/mame/machine/model1io2.cpp b/src/mame/machine/model1io2.cpp
index bc298ca0fa5..f1bac5e80bb 100644
--- a/src/mame/machine/model1io2.cpp
+++ b/src/mame/machine/model1io2.cpp
@@ -177,7 +177,7 @@ MACHINE_CONFIG_START( model1io2_device::device_add_mconfig )
io.out_pf_callback().set(FUNC(model1io2_device::io_pf_w));
io.out_pg_callback().set(FUNC(model1io2_device::io_pg_w));
- EEPROM_SERIAL_93C46_16BIT(config, m_eeprom); // 93C45
+ EEPROM_93C46_16BIT(config, m_eeprom); // 93C45
MB3773(config, m_watchdog, 0);
diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h
index 01863bd1b4b..e14001a0075 100644
--- a/src/mame/video/atarimo.h
+++ b/src/mame/video/atarimo.h
@@ -24,7 +24,7 @@
downcast<atari_motion_objects_device &>(*device).set_config(_config);
#define MCFG_ATARI_MOTION_OBJECTS_GFXDECODE(_gfxtag) \
- downcast<atari_motion_objects_device &>(*device).set_gfxdecode_tag(_gfxtag);
+ downcast<atari_motion_objects_device &>(*device).set_gfxdecode(_gfxtag);
//**************************************************************************
@@ -86,7 +86,7 @@ public:
atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); }
+ template <typename T> void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
void set_config(const atari_motion_objects_config &config) { static_cast<atari_motion_objects_config &>(*this) = config; }
// getters
diff --git a/src/mame/video/cyberbal.cpp b/src/mame/video/cyberbal.cpp
index 0f470c6b7ff..742d133dac0 100644
--- a/src/mame/video/cyberbal.cpp
+++ b/src/mame/video/cyberbal.cpp
@@ -23,7 +23,7 @@
TILE_GET_INFO_MEMBER(cyberbal_base_state::get_alpha_tile_info)
{
- uint16_t data = m_alpha_tilemap->basemem_read(tile_index);
+ uint16_t data = m_alpha->basemem_read(tile_index);
int code = data & 0xfff;
int color = (data >> 12) & 0x07;
SET_TILE_INFO_MEMBER(2, code, color, (data >> 15) & 1);
@@ -32,7 +32,7 @@ TILE_GET_INFO_MEMBER(cyberbal_base_state::get_alpha_tile_info)
TILE_GET_INFO_MEMBER(cyberbal_state::get_alpha2_tile_info)
{
- uint16_t data = m_alpha2_tilemap->basemem_read(tile_index);
+ uint16_t data = m_alpha2->basemem_read(tile_index);
int code = data & 0xfff;
int color = (data >> 12) & 0x07;
SET_TILE_INFO_MEMBER(2, code, color, (data >> 15) & 1);
@@ -41,7 +41,7 @@ TILE_GET_INFO_MEMBER(cyberbal_state::get_alpha2_tile_info)
TILE_GET_INFO_MEMBER(cyberbal_base_state::get_playfield_tile_info)
{
- uint16_t data = m_playfield_tilemap->basemem_read(tile_index);
+ uint16_t data = m_playfield->basemem_read(tile_index);
int code = data & 0x1fff;
int color = (data >> 11) & 0x0f;
SET_TILE_INFO_MEMBER(0, code, color, (data >> 15) & 1);
@@ -50,7 +50,7 @@ TILE_GET_INFO_MEMBER(cyberbal_base_state::get_playfield_tile_info)
TILE_GET_INFO_MEMBER(cyberbal_state::get_playfield2_tile_info)
{
- uint16_t data = m_playfield2_tilemap->basemem_read(tile_index);
+ uint16_t data = m_playfield2->basemem_read(tile_index);
int code = data & 0x1fff;
int color = (data >> 11) & 0x0f;
SET_TILE_INFO_MEMBER(0, code, color, (data >> 15) & 1);
@@ -115,8 +115,8 @@ void cyberbal_base_state::video_start()
void cyberbal_state::video_start()
{
palette_device *rpalette = subdevice<palette_device>("rpalette");
- m_playfield2_tilemap->set_palette(*rpalette);
- m_alpha2_tilemap->set_palette(*rpalette);
+ m_playfield2->set_palette(*rpalette);
+ m_alpha2->set_palette(*rpalette);
cyberbal_base_state::video_start();
@@ -205,13 +205,13 @@ void cyberbal_base_state::scanline_update_one(screen_device &screen, int scanlin
void cyberbal_state::scanline_update(screen_device &screen, int scanline)
{
- scanline_update_one(*m_lscreen, scanline, 0, *m_playfield_tilemap, *m_alpha_tilemap);
- scanline_update_one(*m_rscreen, scanline, 1, *m_playfield2_tilemap, *m_alpha2_tilemap);
+ scanline_update_one(*m_lscreen, scanline, 0, *m_playfield, *m_alpha);
+ scanline_update_one(*m_rscreen, scanline, 1, *m_playfield2, *m_alpha2);
}
void cyberbal2p_state::scanline_update(screen_device &screen, int scanline)
{
- scanline_update_one(*m_screen, scanline, 0, *m_playfield_tilemap, *m_alpha_tilemap);
+ scanline_update_one(*m_screen, scanline, 0, *m_playfield, *m_alpha);
}
@@ -254,15 +254,15 @@ uint32_t cyberbal_base_state::update_one_screen(screen_device &screen, bitmap_in
uint32_t cyberbal_state::screen_update_cyberbal_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- return update_one_screen(screen, bitmap, cliprect, *m_mob, *m_playfield_tilemap, *m_alpha_tilemap);
+ return update_one_screen(screen, bitmap, cliprect, *m_mob, *m_playfield, *m_alpha);
}
uint32_t cyberbal_state::screen_update_cyberbal_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- return update_one_screen(screen, bitmap, cliprect, *m_mob2, *m_playfield2_tilemap, *m_alpha2_tilemap);
+ return update_one_screen(screen, bitmap, cliprect, *m_mob2, *m_playfield2, *m_alpha2);
}
uint32_t cyberbal2p_state::screen_update_cyberbal2p(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- return update_one_screen(screen, bitmap, cliprect, *m_mob, *m_playfield_tilemap, *m_alpha_tilemap);
+ return update_one_screen(screen, bitmap, cliprect, *m_mob, *m_playfield, *m_alpha);
}