summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-05-02 12:10:55 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-05-02 12:10:55 +0000
commit0ac942c9b80ead41b72e4e1dda77e775b6ffc7fa (patch)
tree97d15907bfe8909184259cc3ce3613967dd2709c /src/mess/machine
parent2d68fa308fec368614a89f276964356e06b4db81 (diff)
Cleanup of image device interfaces (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/atarifdc.c8
-rw-r--r--src/mess/machine/beta.c6
-rw-r--r--src/mess/machine/c65.c1
-rw-r--r--src/mess/machine/coco.c1
-rw-r--r--src/mess/machine/concept_exp.c6
-rw-r--r--src/mess/machine/genpc.c1
-rw-r--r--src/mess/machine/microdrv.c12
-rw-r--r--src/mess/machine/microdrv.h19
-rw-r--r--src/mess/machine/pce_cd.c9
-rw-r--r--src/mess/machine/psxcd.c8
-rw-r--r--src/mess/machine/rx01.c8
-rw-r--r--src/mess/machine/ti99/990_hd.c14
12 files changed, 11 insertions, 82 deletions
diff --git a/src/mess/machine/atarifdc.c b/src/mess/machine/atarifdc.c
index 9b07cd20e5e..8aa73fce4b8 100644
--- a/src/mess/machine/atarifdc.c
+++ b/src/mess/machine/atarifdc.c
@@ -730,15 +730,9 @@ WRITE_LINE_MEMBER(atari_fdc_device::pia_cb2_w)
static const floppy_interface atari_floppy_interface =
{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
FLOPPY_STANDARD_5_25_DSHD,
LEGACY_FLOPPY_OPTIONS_NAME(atari_only),
- "floppy_5_25",
- NULL
+ "floppy_5_25"
};
static MACHINE_CONFIG_FRAGMENT( atari_fdc )
diff --git a/src/mess/machine/beta.c b/src/mess/machine/beta.c
index 7f2beec1194..3ade699e28b 100644
--- a/src/mess/machine/beta.c
+++ b/src/mess/machine/beta.c
@@ -194,14 +194,8 @@ WRITE8_MEMBER(beta_disk_device::data_w)
static const floppy_interface beta_floppy_interface =
{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
FLOPPY_STANDARD_5_25_DSDD,
LEGACY_FLOPPY_OPTIONS_NAME(trd),
- NULL,
NULL
};
diff --git a/src/mess/machine/c65.c b/src/mess/machine/c65.c
index f0e8a8520d0..67f28a77806 100644
--- a/src/mess/machine/c65.c
+++ b/src/mess/machine/c65.c
@@ -381,7 +381,6 @@ const cassette_interface cbm_cassette_interface =
cbm_cassette_formats,
NULL,
(cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED),
- NULL,
NULL
};
#endif
diff --git a/src/mess/machine/coco.c b/src/mess/machine/coco.c
index a20827733ff..2a9ec8143b5 100644
--- a/src/mess/machine/coco.c
+++ b/src/mess/machine/coco.c
@@ -1208,7 +1208,6 @@ const cassette_interface coco_state::coco_cassette_interface =
coco_cassette_formats,
NULL,
(cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED),
- NULL,
NULL
};
diff --git a/src/mess/machine/concept_exp.c b/src/mess/machine/concept_exp.c
index b861bc3ccd0..c9fe0088fd7 100644
--- a/src/mess/machine/concept_exp.c
+++ b/src/mess/machine/concept_exp.c
@@ -316,14 +316,8 @@ LEGACY_FLOPPY_OPTIONS_END
static const floppy_interface concept_floppy_interface =
{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
FLOPPY_STANDARD_5_25_DSHD,
LEGACY_FLOPPY_OPTIONS_NAME(concept),
- NULL,
NULL
};
diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c
index 1c06ff586f2..aacc89b7686 100644
--- a/src/mess/machine/genpc.c
+++ b/src/mess/machine/genpc.c
@@ -605,7 +605,6 @@ static const cassette_interface ibm5150_cassette_interface =
cassette_default_formats,
NULL,
(cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED),
- NULL,
NULL
};
diff --git a/src/mess/machine/microdrv.c b/src/mess/machine/microdrv.c
index 8bd568609f9..88e70249ffc 100644
--- a/src/mess/machine/microdrv.c
+++ b/src/mess/machine/microdrv.c
@@ -64,18 +64,6 @@ microdrive_image_device::~microdrive_image_device()
void microdrive_image_device::device_config_complete()
{
- // inherit a copy of the static data
- const microdrive_interface *intf = reinterpret_cast<const microdrive_interface *>(static_config());
- if (intf != NULL)
- *static_cast<microdrive_interface *>(this) = *intf;
-
- // or initialize to defaults if none provided
- else
- {
- memset(&m_interface, 0, sizeof(m_interface));
- memset(&m_device_displayinfo, 0, sizeof(m_device_displayinfo));
- }
-
// set brief and instance name
update_names();
}
diff --git a/src/mess/machine/microdrv.h b/src/mess/machine/microdrv.h
index 7696f57c5ad..f42179e9dbd 100644
--- a/src/mess/machine/microdrv.h
+++ b/src/mess/machine/microdrv.h
@@ -21,13 +21,8 @@
#define MDV_2 "mdv2"
-#define MCFG_MICRODRIVE_ADD(_tag, _config) \
- MCFG_DEVICE_ADD(_tag, MICRODRIVE, 0) \
- MCFG_DEVICE_CONFIG(_config)
-
-#define MICRODRIVE_CONFIG(_name) \
- const microdrive_interface (_name) =
-
+#define MCFG_MICRODRIVE_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, MICRODRIVE, 0)
#define MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(_write) \
devcb = &microdrive_image_device::set_comms_out_wr_callback(*device, DEVCB2_##_write);
@@ -38,18 +33,9 @@
TYPE DEFINITIONS
***************************************************************************/
-// ======================> microdrive_interface
-
-struct microdrive_interface
-{
- const char * m_interface;
- device_image_display_info_func m_device_displayinfo;
-};
-
// ======================> microdrive_image_device
class microdrive_image_device : public device_t,
- public microdrive_interface,
public device_image_interface
{
public:
@@ -62,7 +48,6 @@ public:
// image-level overrides
virtual bool call_load();
virtual void call_unload();
- virtual void call_display_info() { if (m_device_displayinfo) m_device_displayinfo(*this); }
virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
virtual iodevice_t image_type() const { return IO_CASSETTE; }
diff --git a/src/mess/machine/pce_cd.c b/src/mess/machine/pce_cd.c
index f9bd8bf5d28..301d2bfaeee 100644
--- a/src/mess/machine/pce_cd.c
+++ b/src/mess/machine/pce_cd.c
@@ -229,17 +229,12 @@ void pce_cd_device::late_setup()
m_msm->change_clock_w((PCE_CD_CLOCK / 6) / m_adpcm_clock_divider);
}
-struct cdrom_interface pce_cdrom =
-{
- "pce_cdrom",
- NULL
-};
-
// TODO: left and right speaker tags should be passed from the parent config, instead of using the hard-coded ones below!?!
static MACHINE_CONFIG_FRAGMENT( pce_cd )
MCFG_NVRAM_ADD_0FILL("bram")
- MCFG_CDROM_ADD("cdrom", pce_cdrom)
+ MCFG_CDROM_ADD("cdrom")
+ MCFG_CDROM_INTERFACE("pce_cdrom")
MCFG_SOUND_ADD( "msm5205", MSM5205, PCE_CD_CLOCK / 6 )
MCFG_MSM5205_VCLK_CB(WRITELINE(pce_cd_device, msm5205_int)) /* interrupt function */
diff --git a/src/mess/machine/psxcd.c b/src/mess/machine/psxcd.c
index 25ab627cc37..d29e9dc309f 100644
--- a/src/mess/machine/psxcd.c
+++ b/src/mess/machine/psxcd.c
@@ -83,17 +83,11 @@ enum submode_flags
const device_type PSXCD = &device_creator<psxcd_device>;
-static struct cdrom_interface psx_cdrom =
-{
- "psx_cdrom",
- NULL
-};
-
psxcd_device::psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
cdrom_image_device(mconfig, PSXCD, "PSX Cdrom", tag, owner, clock, "psx_cd", __FILE__),
m_irq_handler(*this)
{
- static_set_static_config(*this, &psx_cdrom);
+ static_set_interface(*this, "psx_cdrom");
}
diff --git a/src/mess/machine/rx01.c b/src/mess/machine/rx01.c
index da72c8f09cb..91d01694d27 100644
--- a/src/mess/machine/rx01.c
+++ b/src/mess/machine/rx01.c
@@ -26,15 +26,9 @@ LEGACY_FLOPPY_OPTIONS_END
static const floppy_interface rx01_floppy_interface =
{
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
FLOPPY_STANDARD_8_SSSD,
LEGACY_FLOPPY_OPTIONS_NAME(rx01),
- "floppy_8",
- NULL
+ "floppy_8"
};
diff --git a/src/mess/machine/ti99/990_hd.c b/src/mess/machine/ti99/990_hd.c
index 86e319bf66d..b8dcf64e3d0 100644
--- a/src/mess/machine/ti99/990_hd.c
+++ b/src/mess/machine/ti99/990_hd.c
@@ -957,23 +957,17 @@ WRITE16_MEMBER(ti990_hdc_device::write)
}
-static const struct harddisk_interface ti990_harddisk_config =
-{
- NULL,
- NULL
-};
-
static MACHINE_CONFIG_FRAGMENT( ti990_hdc )
- MCFG_HARDDISK_CONFIG_ADD( "harddisk1", ti990_harddisk_config )
+ MCFG_HARDDISK_ADD( "harddisk1" )
MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_CONFIG_ADD( "harddisk2", ti990_harddisk_config )
+ MCFG_HARDDISK_ADD( "harddisk2" )
MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_CONFIG_ADD( "harddisk3", ti990_harddisk_config )
+ MCFG_HARDDISK_ADD( "harddisk3" )
MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_CONFIG_ADD( "harddisk4", ti990_harddisk_config )
+ MCFG_HARDDISK_ADD( "harddisk4" )
MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
MACHINE_CONFIG_END