summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess
diff options
context:
space:
mode:
author Fabio Priuli <etabeta78@users.noreply.github.com>2014-05-16 16:40:38 +0000
committer Fabio Priuli <etabeta78@users.noreply.github.com>2014-05-16 16:40:38 +0000
commit1def3c2c9eb2f7638e3fbd10707f545bdc88dbff (patch)
treea5dc1fe092363a1be32842a8061ed714ace81943 /src/mess
parentd1a012603cfcdd6f72a94f81e27bf97b1acc8bbd (diff)
converted micropolis and wd17xx to use inline configs. nw.
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/apf.c4
-rw-r--r--src/mess/drivers/bbc.c20
-rw-r--r--src/mess/drivers/cgenie.c6
-rw-r--r--src/mess/drivers/dgn_beta.c3
-rw-r--r--src/mess/drivers/dragon.c4
-rw-r--r--src/mess/drivers/fm7.c35
-rw-r--r--src/mess/drivers/hec2hrp.c4
-rw-r--r--src/mess/drivers/jupiter.c9
-rw-r--r--src/mess/drivers/mbc200.c5
-rw-r--r--src/mess/drivers/mbc55x.c4
-rw-r--r--src/mess/drivers/ms0515.c3
-rw-r--r--src/mess/drivers/myb3k.c6
-rw-r--r--src/mess/drivers/mz2000.c5
-rw-r--r--src/mess/drivers/mz2500.c5
-rw-r--r--src/mess/drivers/nascom1.c7
-rw-r--r--src/mess/drivers/osbexec.c3
-rw-r--r--src/mess/drivers/osborne1.c4
-rw-r--r--src/mess/drivers/pk8020.c3
-rw-r--r--src/mess/drivers/ql.c17
-rw-r--r--src/mess/drivers/rainbow.c3
-rw-r--r--src/mess/drivers/rm380z.c4
-rw-r--r--src/mess/drivers/smc777.c7
-rw-r--r--src/mess/drivers/sorcerer.c6
-rw-r--r--src/mess/drivers/svi318.c6
-rw-r--r--src/mess/drivers/swtpc09.c18
-rw-r--r--src/mess/drivers/thomson.c5
-rw-r--r--src/mess/drivers/trs80.c6
-rw-r--r--src/mess/drivers/unixpc.c4
-rw-r--r--src/mess/drivers/vector06.c6
-rw-r--r--src/mess/drivers/x1.c6
-rw-r--r--src/mess/drivers/x1twin.c3
-rw-r--r--src/mess/drivers/z100.c4
-rw-r--r--src/mess/drivers/z80ne.c4
-rw-r--r--src/mess/machine/beta.c14
-rw-r--r--src/mess/machine/concept_exp.c4
-rw-r--r--src/mess/machine/micropolis.c57
-rw-r--r--src/mess/machine/micropolis.h42
37 files changed, 188 insertions, 158 deletions
diff --git a/src/mess/drivers/apf.c b/src/mess/drivers/apf.c
index 4e7a801e0ec..3f5096d48d2 100644
--- a/src/mess/drivers/apf.c
+++ b/src/mess/drivers/apf.c
@@ -597,7 +597,9 @@ static MACHINE_CONFIG_DERIVED( apfimag, apfm1000 )
MCFG_CASSETTE_FORMATS(apf_cassette_formats)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_FD1771_ADD("fdc", default_wd17xx_interface )
+ MCFG_DEVICE_ADD("fdc", FD1771, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(apfimag_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c
index 16cd0c47c7c..53953dd2cbf 100644
--- a/src/mess/drivers/bbc.c
+++ b/src/mess/drivers/bbc.c
@@ -762,12 +762,15 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca )
MCFG_DEVICE_ADD("i8271", I8271, 0)
MCFG_I8271_IRQ_CALLBACK(WRITELINE(bbc_state, bbc_i8271_interrupt))
MCFG_I8271_FLOPPIES(FLOPPY_0, FLOPPY_1)
- MCFG_WD1770_ADD("wd177x", default_wd17xx_interface_2_drives )
+
+ MCFG_DEVICE_ADD("wd177x", WD1770, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w))
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface)
- /* slot devices */
+ /* cartridges */
MCFG_FRAGMENT_ADD(bbc_cartslot)
/* software lists */
@@ -824,11 +827,15 @@ static MACHINE_CONFIG_DERIVED( bbcb_us, bbca )
MCFG_DEVICE_ADD("i8271", I8271, 0)
MCFG_I8271_IRQ_CALLBACK(WRITELINE(bbc_state, bbc_i8271_interrupt))
MCFG_I8271_FLOPPIES(FLOPPY_0, FLOPPY_1)
- MCFG_WD1770_ADD("wd177x", default_wd17xx_interface_2_drives )
+
+ MCFG_DEVICE_ADD("wd177x", WD1770, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w))
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface)
+ /* cartridges */
MCFG_FRAGMENT_ADD(bbc_cartslot)
/* software lists */
@@ -988,9 +995,11 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(bbc_state, bbcb_via_user_irq_w))
/* fdc */
- MCFG_WD1770_ADD("wd177x", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("wd177x", WD1770, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w))
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface)
/* rom slots */
@@ -1076,7 +1085,8 @@ static MACHINE_CONFIG_DERIVED( bbcmc, bbcm )
/* fdc */
MCFG_DEVICE_REMOVE("wd177x")
- MCFG_WD1772_ADD("wd177x", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("wd177x", WD1772, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w))
diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c
index 76b6d329d24..aeb2daff475 100644
--- a/src/mess/drivers/cgenie.c
+++ b/src/mess/drivers/cgenie.c
@@ -528,10 +528,12 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state )
MCFG_CASSETTE_FORMATS(cgenie_cassette_formats)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface) // TODO confirm type
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(cgenie_state,cgenie_fdc_intrq_w))
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0) // TODO confirm type
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(cgenie_state, cgenie_fdc_intrq_w))
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(cgenie_floppy_interface)
+
/* cartridge */
MCFG_CARTSLOT_ADD("cart")
MCFG_CARTSLOT_EXTENSION_LIST("rom")
diff --git a/src/mess/drivers/dgn_beta.c b/src/mess/drivers/dgn_beta.c
index 4e94565cb96..d63dba2e303 100644
--- a/src/mess/drivers/dgn_beta.c
+++ b/src/mess/drivers/dgn_beta.c
@@ -364,7 +364,8 @@ static MACHINE_CONFIG_START( dgnbeta, dgn_beta_state )
MCFG_PIA_IRQA_HANDLER(WRITELINE(dgn_beta_state,d_pia2_irq_a))
MCFG_PIA_IRQB_HANDLER(WRITELINE(dgn_beta_state,d_pia2_irq_b))
- MCFG_WD2797_ADD(FDC_TAG, default_wd17xx_interface)
+ MCFG_DEVICE_ADD(FDC_TAG, WD2797, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(dgn_beta_state,dgnbeta_fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(dgn_beta_state,dgnbeta_fdc_drq_w))
diff --git a/src/mess/drivers/dragon.c b/src/mess/drivers/dragon.c
index aca628d42e4..0677aa6ec3f 100644
--- a/src/mess/drivers/dragon.c
+++ b/src/mess/drivers/dragon.c
@@ -236,7 +236,9 @@ static MACHINE_CONFIG_DERIVED_CLASS( dgnalpha, dragon_base, dragon_alpha_state )
// floppy
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(coco_floppy_interface)
- MCFG_WD2797_ADD(WD2797_TAG, default_wd17xx_interface)
+
+ MCFG_DEVICE_ADD(WD2797_TAG, WD2797, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(dragon_alpha_state, fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(dragon_alpha_state, fdc_drq_w))
diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c
index c32b2de43be..17323ab4c97 100644
--- a/src/mess/drivers/fm7.c
+++ b/src/mess/drivers/fm7.c
@@ -2009,9 +2009,10 @@ static MACHINE_CONFIG_START( fm7, fm7_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_drq_w))
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_drq_w))
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
MCFG_SLOT_OPTION_ADD( "dsjoy", DEMPA_SHINBUNSHA_JOYSTICK )
@@ -2065,9 +2066,10 @@ static MACHINE_CONFIG_START( fm8, fm7_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_drq_w))
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_drq_w))
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(fm7_state, write_centronics_busy))
@@ -2123,9 +2125,10 @@ static MACHINE_CONFIG_START( fm77av, fm7_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_drq_w))
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_drq_w))
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(fm7_state, write_centronics_busy))
@@ -2183,9 +2186,10 @@ static MACHINE_CONFIG_START( fm11, fm7_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_drq_w))
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_drq_w))
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(fm7_state, write_centronics_busy))
@@ -2236,9 +2240,10 @@ static MACHINE_CONFIG_START( fm16beta, fm7_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state,fm7_fdc_drq_w))
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(fm7_state, fm7_fdc_drq_w))
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(fm7_state, write_centronics_busy))
diff --git a/src/mess/drivers/hec2hrp.c b/src/mess/drivers/hec2hrp.c
index 21efbd24b20..3734ff6dd0e 100644
--- a/src/mess/drivers/hec2hrp.c
+++ b/src/mess/drivers/hec2hrp.c
@@ -615,7 +615,9 @@ static MACHINE_CONFIG_START( hec2mdhrx, hec2hrp_state )
MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2mdhrx)
/* Mini Disc */
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface_1_drive)
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE1_TAGS
+
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, minidisc_floppy_interface)
/* video hardware */
diff --git a/src/mess/drivers/jupiter.c b/src/mess/drivers/jupiter.c
index b17f40e3375..e96b9b67a57 100644
--- a/src/mess/drivers/jupiter.c
+++ b/src/mess/drivers/jupiter.c
@@ -228,7 +228,9 @@ static MACHINE_CONFIG_START( jupiter, jupiter2_state )
MCFG_CPU_IO_MAP(jupiter_m6800_io)
// devices
- MCFG_FD1771_ADD(INS1771N1_TAG, default_wd17xx_interface_2_drives)
+ MCFG_DEVICE_ADD(INS1771N1_TAG, FD1771, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
// internal ram
@@ -256,11 +258,12 @@ static MACHINE_CONFIG_START( jupiter3, jupiter3_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 320-1)
MCFG_SCREEN_PALETTE("palette")
-
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
// devices
- MCFG_FD1771_ADD(INS1771N1_TAG, default_wd17xx_interface_2_drives)
+ MCFG_DEVICE_ADD(INS1771N1_TAG, FD1771, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
MCFG_GENERIC_KEYBOARD_CB(WRITE8(jupiter3_state, kbd_put))
diff --git a/src/mess/drivers/mbc200.c b/src/mess/drivers/mbc200.c
index 9945db7d6e2..3a498e7313b 100644
--- a/src/mess/drivers/mbc200.c
+++ b/src/mess/drivers/mbc200.c
@@ -231,7 +231,10 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state )
MCFG_DEVICE_ADD("i8251_1", I8251, 0) // INS8251N
MCFG_DEVICE_ADD("i8251_2", I8251, 0) // INS8251A
- MCFG_MB8876_ADD("fdc",default_wd17xx_interface_2_drives) // MB8876A
+
+ MCFG_DEVICE_ADD("fdc", MB8876, 0) // MB8876A
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(mbc200_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/mbc55x.c b/src/mess/drivers/mbc55x.c
index 42591a653d7..94b2c53538f 100644
--- a/src/mess/drivers/mbc55x.c
+++ b/src/mess/drivers/mbc55x.c
@@ -279,10 +279,12 @@ static MACHINE_CONFIG_START( mbc55x, mbc55x_state )
MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(mbc55x_state, vid_vsync_changed))
/* Backing storage */
- MCFG_FD1793_ADD(FDC_TAG, default_wd17xx_interface)
+ MCFG_DEVICE_ADD(FDC_TAG, FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(mbc55x_state, mbc55x_fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(mbc55x_state, mbc55x_fdc_drq_w))
MCFG_WD17XX_DDEN_CALLBACK(GND)
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(mbc55x_floppy_interface)
/* Software list */
diff --git a/src/mess/drivers/ms0515.c b/src/mess/drivers/ms0515.c
index f45f2782466..f06fdb21e71 100644
--- a/src/mess/drivers/ms0515.c
+++ b/src/mess/drivers/ms0515.c
@@ -228,7 +228,8 @@ static MACHINE_CONFIG_START( ms0515, ms0515_state )
MCFG_T11_INITIAL_MODE(0xf2ff)
MCFG_CPU_PROGRAM_MAP(ms0515_mem)
- MCFG_FD1793_ADD( "vg93", default_wd17xx_interface_1_drive)
+ MCFG_DEVICE_ADD("vg93", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE1_TAGS
MCFG_WD17XX_DDEN_CALLBACK(VCC)
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, ms0515_floppy_interface)
diff --git a/src/mess/drivers/myb3k.c b/src/mess/drivers/myb3k.c
index beaf1348057..6226167ba29 100644
--- a/src/mess/drivers/myb3k.c
+++ b/src/mess/drivers/myb3k.c
@@ -259,12 +259,14 @@ static MACHINE_CONFIG_START( myb3k, myb3k_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", myb3k)
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
- /* Devices */
+ /* devices */
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/4) /* unknown clock, hand tuned to get ~60 fps */
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
- MCFG_MB8877_ADD("fdc", default_wd17xx_interface_2_drives) //unknown type
+ MCFG_DEVICE_ADD("fdc", MB8877, 0) // unknown type
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(myb3k_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/mz2000.c b/src/mess/drivers/mz2000.c
index 8ff56eea9ca..0543dc2ed27 100644
--- a/src/mess/drivers/mz2000.c
+++ b/src/mess/drivers/mz2000.c
@@ -819,8 +819,11 @@ static MACHINE_CONFIG_START( mz2000, mz2000_state )
MCFG_PIT8253_CLK1(31250) /* needed by "Art Magic" to boot */
MCFG_PIT8253_CLK2(31250)
- MCFG_MB8877_ADD("mb8877a",default_wd17xx_interface)
+ MCFG_DEVICE_ADD("mb8877a", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(mz2000_floppy_interface)
+
MCFG_SOFTWARE_LIST_ADD("flop_list","mz2000_flop")
MCFG_CASSETTE_ADD( "cassette" )
diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c
index 4b4cef91e2f..6258ffd4ebb 100644
--- a/src/mess/drivers/mz2500.c
+++ b/src/mess/drivers/mz2500.c
@@ -2076,8 +2076,11 @@ static MACHINE_CONFIG_START( mz2500, mz2500_state )
MCFG_PIT8253_CLK2(16) //CH2, trusted, used by Super MZ demo / The Black Onyx and a bunch of others (TODO: timing of this)
MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pit", pit8253_device, write_clk1))
- MCFG_MB8877_ADD("mb8877a",default_wd17xx_interface)
+ MCFG_DEVICE_ADD("mb8877a", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(mz2500_floppy_interface)
+
MCFG_SOFTWARE_LIST_ADD("flop_list","mz2500")
/* video hardware */
diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c
index 2a6809ff753..5de7b004419 100644
--- a/src/mess/drivers/nascom1.c
+++ b/src/mess/drivers/nascom1.c
@@ -329,9 +329,10 @@ static MACHINE_CONFIG_DERIVED( nascom2, nascom1 )
MCFG_GFXDECODE_MODIFY("gfxdecode", nascom2)
- MCFG_FD1793_ADD("wd1793", default_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(nascom1_state,nascom2_fdc_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(nascom1_state,nascom2_fdc_drq_w))
+ MCFG_DEVICE_ADD("wd1793", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(nascom1_state, nascom2_fdc_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(nascom1_state, nascom2_fdc_drq_w))
MCFG_WD17XX_DDEN_CALLBACK(VCC)
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(nascom2_floppy_interface)
diff --git a/src/mess/drivers/osbexec.c b/src/mess/drivers/osbexec.c
index 52b648e59bf..e01954835ef 100644
--- a/src/mess/drivers/osbexec.c
+++ b/src/mess/drivers/osbexec.c
@@ -595,7 +595,8 @@ static MACHINE_CONFIG_START( osbexec, osbexec_state )
MCFG_Z80SIO2_ADD("sio", MAIN_CLOCK/6, 0, 0, 0, 0)
- MCFG_MB8877_ADD("mb8877", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("mb8877", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
//MCFG_WD17XX_INTRQ_CALLBACK(DEVWRITELINE("pia_1", pia6821_device, cb1_w))
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(osbexec_floppy_interface)
diff --git a/src/mess/drivers/osborne1.c b/src/mess/drivers/osborne1.c
index 6e01813c09b..93fc59057d8 100644
--- a/src/mess/drivers/osborne1.c
+++ b/src/mess/drivers/osborne1.c
@@ -260,9 +260,11 @@ static MACHINE_CONFIG_START( osborne1, osborne1_state )
MCFG_PIA_CB2_HANDLER(WRITELINE(osborne1_state, video_pia_out_cb2_dummy))
MCFG_PIA_IRQA_HANDLER(WRITELINE(osborne1_state, video_pia_irq_a_func))
- MCFG_MB8877_ADD("mb8877", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("mb8877", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(osborne1_floppy_interface)
+
MCFG_IEEE488_BUS_ADD()
MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE("pia_0", pia6821_device, ca2_w))
MCFG_SOFTWARE_LIST_ADD("flop_list","osborne1")
diff --git a/src/mess/drivers/pk8020.c b/src/mess/drivers/pk8020.c
index 0210788e2bd..bc34ea6d580 100644
--- a/src/mess/drivers/pk8020.c
+++ b/src/mess/drivers/pk8020.c
@@ -219,7 +219,8 @@ static MACHINE_CONFIG_START( pk8020, pk8020_state )
MCFG_DEVICE_ADD("rs232", I8251, 0)
MCFG_DEVICE_ADD("lan", I8251, 0)
- MCFG_FD1793_ADD("wd1793", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("wd1793", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_DDEN_CALLBACK(VCC)
/* audio hardware */
diff --git a/src/mess/drivers/ql.c b/src/mess/drivers/ql.c
index 2d3cc7f3d37..d458c27792e 100644
--- a/src/mess/drivers/ql.c
+++ b/src/mess/drivers/ql.c
@@ -950,12 +950,6 @@ static const floppy_interface ql_floppy_interface =
NULL
};
-wd17xx_interface ql_wd17xx_interface =
-{
- {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
-};
-
-
//**************************************************************************
// MACHINE INITIALIZATION
//**************************************************************************
@@ -1117,12 +1111,15 @@ static MACHINE_CONFIG_START( ql, ql_state )
MCFG_ZX8302_IN_RAW1_CB(READLINE(ql_state, zx8302_raw1_r))
MCFG_ZX8302_OUT_RAW2_CB(WRITELINE(ql_state, zx8302_raw2_w))
MCFG_ZX8302_IN_RAW2_CB(READLINE(ql_state, zx8302_raw2_r))
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(ql_floppy_interface)
- MCFG_WD1772_ADD(WD1772_TAG,ql_wd17xx_interface)
- MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(ql_state,disk_io_intrq_w))
- MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(ql_state,disk_io_drq_w))
- MCFG_WD17XX_DDEN_CALLBACK(READLINE(ql_state,disk_io_dden_r))
+ MCFG_DEVICE_ADD(WD1772_TAG, WD1772, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+ MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(ql_state, disk_io_intrq_w))
+ MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(ql_state, disk_io_drq_w))
+ MCFG_WD17XX_DDEN_CALLBACK(READLINE(ql_state, disk_io_dden_r))
+
MCFG_MICRODRIVE_ADD(MDV_1)
MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(DEVWRITELINE(MDV_2, microdrive_image_device, comms_in_w))
MCFG_MICRODRIVE_ADD(MDV_2)
diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c
index be5a52c85f9..cffb8f7b8b4 100644
--- a/src/mess/drivers/rainbow.c
+++ b/src/mess/drivers/rainbow.c
@@ -1229,7 +1229,8 @@ static MACHINE_CONFIG_START( rainbow, rainbow_state )
MCFG_VT_VIDEO_RAM_CALLBACK(READ8(rainbow_state, read_video_ram_r))
MCFG_VT_VIDEO_CLEAR_VIDEO_INTERRUPT_CALLBACK(WRITELINE(rainbow_state, clear_video_interrupt))
- MCFG_FD1793_ADD("wd1793", default_wd17xx_interface )
+ MCFG_DEVICE_ADD("wd1793", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(floppy_intf)
MCFG_SOFTWARE_LIST_ADD("flop_list","rainbow")
diff --git a/src/mess/drivers/rm380z.c b/src/mess/drivers/rm380z.c
index f96ababd0f0..a82a4ddbcdb 100644
--- a/src/mess/drivers/rm380z.c
+++ b/src/mess/drivers/rm380z.c
@@ -155,7 +155,9 @@ static MACHINE_CONFIG_START( rm380z, rm380z_state )
MCFG_RAM_DEFAULT_SIZE("56K")
/* floppy disk */
- MCFG_FD1771_ADD("wd1771", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("wd1771", FD1771, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(rm380z_floppy_interface)
/* keyboard */
diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c
index 215e87db4b5..539b47367a1 100644
--- a/src/mess/drivers/smc777.c
+++ b/src/mess/drivers/smc777.c
@@ -1071,12 +1071,17 @@ static MACHINE_CONFIG_START( smc777, smc777_state )
MCFG_MC6845_SHOW_BORDER_AREA(true)
MCFG_MC6845_CHAR_WIDTH(8)
- MCFG_MB8876_ADD("fdc",default_wd17xx_interface_2_drives)
+ /* devices */
+ MCFG_DEVICE_ADD("fdc", MB8876, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(smc777_state, smc777_fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(smc777_state, smc777_fdc_drq_w))
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(smc777_floppy_interface)
+
MCFG_SOFTWARE_LIST_ADD("flop_list","smc777")
+ /* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("sn1", SN76489A, MASTER_CLOCK) // unknown clock / divider
diff --git a/src/mess/drivers/sorcerer.c b/src/mess/drivers/sorcerer.c
index ae19080fb33..3cfd198cf2d 100644
--- a/src/mess/drivers/sorcerer.c
+++ b/src/mess/drivers/sorcerer.c
@@ -466,8 +466,12 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sorcererd, sorcerer )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(sorcererd_mem)
+
MCFG_MACHINE_START_OVERRIDE(sorcerer_state, sorcererd )
- MCFG_MICROPOLIS_ADD("fdc", default_micropolis_interface )
+
+ MCFG_DEVICE_ADD("fdc", MICROPOLIS, 0)
+ MCFG_MICROPOLIS_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(sorcerer_floppy_interface)
MCFG_SOFTWARE_LIST_ADD("flop_list","sorcerer_flop")
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c
index e10bc15d981..df1f350315d 100644
--- a/src/mess/drivers/svi318.c
+++ b/src/mess/drivers/svi318.c
@@ -323,7 +323,8 @@ static MACHINE_CONFIG_START( svi318, svi318_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
MCFG_CASSETTE_INTERFACE("svi318_cass")
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(svi318_state,svi_fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(svi318_state,svi_fdc_drq_w))
@@ -459,7 +460,8 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
MCFG_CASSETTE_INTERFACE("svi318_cass")
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface_2_drives )
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(svi318_state,svi_fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(svi318_state,svi_fdc_drq_w))
diff --git a/src/mess/drivers/swtpc09.c b/src/mess/drivers/swtpc09.c
index 468e8114118..6c02fe897ba 100644
--- a/src/mess/drivers/swtpc09.c
+++ b/src/mess/drivers/swtpc09.c
@@ -169,12 +169,12 @@ static MACHINE_CONFIG_START( swtpc09, swtpc09_state )
MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(swtpc09_state, write_acia_clock))
- MCFG_FD1793_ADD("fdc", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(swtpc09_state, fdc_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(swtpc09_state, fdc_drq_w))
- MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(swtpc09_floppy_interface)
-
+ MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(swtpc09_floppy_interface)
MACHINE_CONFIG_END
/* MPU09, MPID, MPS2 DC4 PIAIDE*/
@@ -208,7 +208,9 @@ static MACHINE_CONFIG_START( swtpc09i, swtpc09_state )
MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(swtpc09_state, write_acia_clock))
- MCFG_FD1793_ADD("fdc", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(swtpc09_floppy_interface)
MCFG_DEVICE_ADD("piaide", PIA6821, 0)
@@ -219,8 +221,6 @@ static MACHINE_CONFIG_START( swtpc09i, swtpc09_state )
// MCFG_IDE_CONTROLLER_ADD("ide", NULL)
// MCFG_IDE_CONTROLLER_REGIONS("harddisk", NULL)
// MCFG_IDE_CONTROLLER_ADD( "ide", ide_intf, "hdd", NULL, false ) /* FIXME */ bebox
-
-
MACHINE_CONFIG_END
@@ -256,7 +256,9 @@ static MACHINE_CONFIG_START( swtpc09d3, swtpc09_state )
MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(swtpc09_state, write_acia_clock))
- MCFG_FD1793_ADD("fdc", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(swtpc09_floppy_interface)
MCFG_DEVICE_ADD("via", VIA6522, XTAL_4MHz / 4)
@@ -265,8 +267,6 @@ static MACHINE_CONFIG_START( swtpc09d3, swtpc09_state )
MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(swtpc09_state, dmf3_via_write_porta))
//MCFG_VIA6522_CA1_HANDLER(WRITELINE(swtpc09_state, dmf3_via_write_ca1))
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(swtpc09_state, dmf3_via_irq))
-
-
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/thomson.c b/src/mess/drivers/thomson.c
index 2378c6262c3..c5c26accad1 100644
--- a/src/mess/drivers/thomson.c
+++ b/src/mess/drivers/thomson.c
@@ -646,7 +646,10 @@ static MACHINE_CONFIG_START( to7, thomson_state )
/* floppy */
MCFG_DEVICE_ADD("mc6843", MC6843, 0)
- MCFG_WD2793_ADD("wd2793", default_wd17xx_interface )
+
+ MCFG_DEVICE_ADD("wd2793", WD2793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_DEVICE_ADD(FLOPPY_0, LEGACY_FLOPPY, 0)
MCFG_DEVICE_CONFIG(thomson_floppy_interface)
MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(thomson_state, fdc_index_0_w))
diff --git a/src/mess/drivers/trs80.c b/src/mess/drivers/trs80.c
index efe0eed2b5a..5c6959463ae 100644
--- a/src/mess/drivers/trs80.c
+++ b/src/mess/drivers/trs80.c
@@ -571,7 +571,6 @@ static MACHINE_CONFIG_START( trs80, trs80_state ) // the original model I,
MCFG_GFXDECODE_ADD("gfxdecode", "palette", trs80)
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
-
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
@@ -595,8 +594,11 @@ static MACHINE_CONFIG_DERIVED( model1, trs80 ) // model I, level II
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
MCFG_QUICKLOAD_ADD("quickload", trs80_state, trs80_cmd, "cmd", 0.5)
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface) // should be FD1771 or FD1791 but inverted data lines are too tricky to fix now
+
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0) // should be FD1771 or FD1791 but inverted data lines are too tricky to fix now
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(trs80_state,trs80_fdc_intrq_w))
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(trs80_floppy_interface)
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
diff --git a/src/mess/drivers/unixpc.c b/src/mess/drivers/unixpc.c
index 5fbbe0e74bf..d1cebaa971a 100644
--- a/src/mess/drivers/unixpc.c
+++ b/src/mess/drivers/unixpc.c
@@ -207,9 +207,11 @@ static MACHINE_CONFIG_START( unixpc, unixpc_state )
MCFG_RAM_EXTRA_OPTIONS("2M")
// floppy
- MCFG_WD2797_ADD("wd2797", default_wd17xx_interface_1_drive)
+ MCFG_DEVICE_ADD("wd2797", WD2797, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE1_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(unixpc_state, wd2797_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(unixpc_state, wd2797_drq_w))
+
MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, unixpc_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/vector06.c b/src/mess/drivers/vector06.c
index 054256b8f0e..4f6729e95f5 100644
--- a/src/mess/drivers/vector06.c
+++ b/src/mess/drivers/vector06.c
@@ -161,7 +161,7 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- /* Devices */
+ /* devices */
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
MCFG_I8255_OUT_PORTA_CB(WRITE8(vector06_state, vector06_8255_porta_w))
MCFG_I8255_IN_PORTB_CB(READ8(vector06_state, vector06_8255_portb_r))
@@ -176,8 +176,10 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_FD1793_ADD("wd1793", default_wd17xx_interface_2_drives)
+ MCFG_DEVICE_ADD("wd1793", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
MCFG_WD17XX_DDEN_CALLBACK(VCC)
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(vector_floppy_interface)
/* cartridge */
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index 4b0023b914a..c8ba118be1c 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -2475,7 +2475,8 @@ static MACHINE_CONFIG_START( x1, x1_state )
MCFG_VIDEO_START_OVERRIDE(x1_state,x1)
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_CARTSLOT_ADD("cart")
MCFG_CARTSLOT_EXTENSION_LIST("rom")
@@ -2528,7 +2529,8 @@ static MACHINE_CONFIG_DERIVED( x1turbo, x1 )
MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(x1_state, io_write_byte))
MCFG_DEVICE_REMOVE("fdc")
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(x1_state,fdc_drq_w))
MCFG_YM2151_ADD("ym", MAIN_CLOCK/8) //option board
diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c
index c0518173727..8505959262f 100644
--- a/src/mess/drivers/x1twin.c
+++ b/src/mess/drivers/x1twin.c
@@ -471,7 +471,8 @@ static MACHINE_CONFIG_START( x1twin, x1twin_state )
MCFG_VIDEO_START_OVERRIDE(x1twin_state,x1)
- MCFG_MB8877_ADD("fdc",default_wd17xx_interface)
+ MCFG_DEVICE_ADD("fdc", MB8877, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_CARTSLOT_ADD("cart")
MCFG_CARTSLOT_EXTENSION_LIST("rom")
diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c
index 85ce1f7872c..0a66ae2020a 100644
--- a/src/mess/drivers/z100.c
+++ b/src/mess/drivers/z100.c
@@ -713,7 +713,9 @@ static MACHINE_CONFIG_START( z100, z100_state )
MCFG_DEVICE_ADD("pia1", PIA6821, 0)
- MCFG_FD1797_ADD("z207_fdc",default_wd17xx_interface_2_drives)
+ MCFG_DEVICE_ADD("z207_fdc", FD1797, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
+
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(z100_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/z80ne.c b/src/mess/drivers/z80ne.c
index af48a454ee0..dfc641915ea 100644
--- a/src/mess/drivers/z80ne.c
+++ b/src/mess/drivers/z80ne.c
@@ -526,7 +526,9 @@ static MACHINE_CONFIG_START( z80netf, z80ne_state )
// AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND
// other lines not connected
- MCFG_FD1771_ADD("wd1771", default_wd17xx_interface)
+ MCFG_DEVICE_ADD("wd1771", FD1771, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(z80netf_floppy_interface)
MCFG_DEFAULT_LAYOUT(layout_z80netf)
diff --git a/src/mess/machine/beta.c b/src/mess/machine/beta.c
index 95a206b4fd9..998f0963a83 100644
--- a/src/mess/machine/beta.c
+++ b/src/mess/machine/beta.c
@@ -140,17 +140,19 @@ READ8_MEMBER(beta_disk_device::state_r)
WRITE8_MEMBER(beta_disk_device::param_w)
{
- if (m_betadisk_active==1) {
+ const char *floppy_tags[4] = { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 };
+
+ if (m_betadisk_active == 1)
+ {
m_wd179x->set_drive(data & 3);
m_wd179x->set_side ((data & 0x10) ? 0 : 1 );
m_wd179x->dden_w(!BIT(data, 6));
if ((data & 0x04) == 0) // reset
- {
m_wd179x->reset();
- }
+
// bit 3 connected to pin 23 "HRDY" of FDC
// TEMP HACK, FDD motor and RDY FDC pin controlled by HLD pin of FDC
- legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(default_wd17xx_interface.floppy_drive_tags[data & 3]);
+ legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(floppy_tags[data & 3]);
flop->floppy_mon_w(CLEAR_LINE);
flop->floppy_drive_set_ready_state(1, 0);
}
@@ -192,9 +194,11 @@ static const floppy_interface beta_floppy_interface =
};
static MACHINE_CONFIG_FRAGMENT( beta_disk )
- MCFG_WD2793_ADD("wd179x", default_wd17xx_interface ) // KR1818VG93 clone of WD1793
+ MCFG_DEVICE_ADD("wd179x", WD2793, 0) // KR1818VG93 clone of WD1793
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(beta_disk_device, wd179x_intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(beta_disk_device, wd179x_drq_w))
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(beta_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/concept_exp.c b/src/mess/machine/concept_exp.c
index 58a88cd41a4..6fe1adf6328 100644
--- a/src/mess/machine/concept_exp.c
+++ b/src/mess/machine/concept_exp.c
@@ -315,9 +315,11 @@ static const floppy_interface concept_floppy_interface =
static MACHINE_CONFIG_FRAGMENT( fdc )
- MCFG_FD1793_ADD("wd179x", default_wd17xx_interface )
+ MCFG_DEVICE_ADD("wd179x", FD1793, 0)
+ MCFG_WD17XX_DEFAULT_DRIVE4_TAGS
MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(concept_fdc_device, intrq_w))
MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(concept_fdc_device, drq_w))
+
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(concept_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/micropolis.c b/src/mess/machine/micropolis.c
index 93172ad6485..fec75de110b 100644
--- a/src/mess/machine/micropolis.c
+++ b/src/mess/machine/micropolis.c
@@ -58,23 +58,6 @@ static const UINT8 track_SD[][2] = {
#endif
/***************************************************************************
- DEFAULT INTERFACES
-***************************************************************************/
-
-const micropolis_interface default_micropolis_interface =
-{
- { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
-};
-
-#if 0
-const micropolis_interface default_micropolis_interface_2_drives =
-{
- { FLOPPY_0, FLOPPY_1, NULL, NULL}
-};
-#endif
-
-
-/***************************************************************************
MAME DEVICE INTERFACE
***************************************************************************/
@@ -98,32 +81,10 @@ micropolis_device::micropolis_device(const machine_config &mconfig, const char *
m_drive(NULL)
{
for (int i = 0; i < 6144; i++)
- {
m_buffer[i] = 0;
- }
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void micropolis_device::device_config_complete()
-{
- // inherit a copy of the static data
- const micropolis_interface *intf = reinterpret_cast<const micropolis_interface *>(static_config());
- if (intf != NULL)
- *static_cast<micropolis_interface *>(this) = *intf;
- // or initialize to defaults if none provided
- else
- {
- m_floppy_drive_tags[0] = "";
- m_floppy_drive_tags[1] = "";
- m_floppy_drive_tags[2] = "";
- m_floppy_drive_tags[3] = "";
- }
+ for (int i = 0; i < 4; i++)
+ m_floppy_drive_tags[i] = NULL;
}
//-------------------------------------------------
@@ -155,21 +116,17 @@ void micropolis_device::device_start()
void micropolis_device::device_reset()
{
- int i;
-
- for (i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++)
{
- if(m_floppy_drive_tags[i])
+ if (m_floppy_drive_tags[i])
{
- legacy_floppy_image_device *img = NULL;
-
- img = siblingdevice<legacy_floppy_image_device>(m_floppy_drive_tags[i]);
+ legacy_floppy_image_device *img = siblingdevice<legacy_floppy_image_device>(m_floppy_drive_tags[i]);
if (img)
{
img->floppy_drive_set_controller(this);
- //img->floppy_drive_set_index_pulse_callback( wd17xx_index_pulse_callback);
- img->floppy_drive_set_rpm( 300.);
+ //img->floppy_drive_set_index_pulse_callback(wd17xx_index_pulse_callback);
+ img->floppy_drive_set_rpm(300.);
}
}
}
diff --git a/src/mess/machine/micropolis.h b/src/mess/machine/micropolis.h
index 32dc071d368..fa4ec0482f0 100644
--- a/src/mess/machine/micropolis.h
+++ b/src/mess/machine/micropolis.h
@@ -17,6 +17,12 @@
TYPE DEFINITIONS
***************************************************************************/
+#define MCFG_MICROPOLIS_DRIVE_TAGS(_tag1, _tag2, _tag3, _tag4) \
+ micropolis_device::set_drive_tags(*device, _tag1, _tag2, _tag3, _tag4);
+
+#define MCFG_MICROPOLIS_DEFAULT_DRIVE4_TAGS \
+ MCFG_MICROPOLIS_DRIVE_TAGS(FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3)
+
#define MCFG_MICROPOLIS_DDEN_CALLBACK(_read) \
devcb = &micropolis_device::set_dden_rd_callback(*device, DEVCB_##_read);
@@ -26,18 +32,11 @@
#define MCFG_MICROPOLIS_DRQ_CALLBACK(_write) \
devcb = &micropolis_device::set_drq_wr_callback(*device, DEVCB_##_write);
-/* Interface */
-struct micropolis_interface
-{
- const char *m_floppy_drive_tags[4];
-};
-
/***************************************************************************
MACROS
***************************************************************************/
-class micropolis_device : public device_t,
- public micropolis_interface
+class micropolis_device : public device_t
{
public:
micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -47,6 +46,15 @@ public:
template<class _Object> static devcb_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast<micropolis_device &>(device).m_write_intrq.set_callback(object); }
template<class _Object> static devcb_base &set_drq_wr_callback(device_t &device, _Object object) { return downcast<micropolis_device &>(device).m_write_drq.set_callback(object); }
+ static void set_drive_tags(device_t &device, const char *tag1, const char *tag2, const char *tag3, const char *tag4)
+ {
+ micropolis_device &dev = downcast<micropolis_device &>(device);
+ dev.m_floppy_drive_tags[0] = tag1;
+ dev.m_floppy_drive_tags[1] = tag2;
+ dev.m_floppy_drive_tags[2] = tag3;
+ dev.m_floppy_drive_tags[3] = tag4;
+ }
+
void set_drive(UINT8 drive); // set current drive (0-3)
DECLARE_READ8_MEMBER( status_r );
@@ -60,7 +68,6 @@ public:
protected:
// device-level overrides
- virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
@@ -71,6 +78,8 @@ private:
devcb_write_line m_write_intrq;
devcb_write_line m_write_drq;
+ const char *m_floppy_drive_tags[4];
+
/* register */
UINT8 m_data;
UINT8 m_drive_num;
@@ -97,19 +106,4 @@ private:
extern const device_type MICROPOLIS;
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-extern const micropolis_interface default_micropolis_interface;
-
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_MICROPOLIS_ADD(_tag, _intrf) \
- MCFG_DEVICE_ADD(_tag, MICROPOLIS, 0) \
- MCFG_DEVICE_CONFIG(_intrf)
-
#endif /* __MICROPOLIS_H__ */