summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/pc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/pc.cpp')
-rw-r--r--src/mame/drivers/pc.cpp170
1 files changed, 80 insertions, 90 deletions
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index 2d8b7476bc4..64e490b327e 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -208,11 +208,11 @@ MACHINE_CONFIG_START(pc_state::pccga)
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
+ ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -254,13 +254,12 @@ Expansion: 8087 FPU
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::ataripc1)
+void pc_state::ataripc1(machine_config &config)
+{
pccga(config);
- MCFG_DEVICE_MODIFY("isa1")
- MCFG_SLOT_DEFAULT_OPTION("ega")
- MCFG_DEVICE_MODIFY("isa2")
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_single_360K)
-MACHINE_CONFIG_END
+ subdevice<isa8_slot_device>("isa1")->set_default_option("ega");
+ subdevice<isa8_slot_device>("isa2")->set_option_machine_config("fdc_xt", cfg_single_360K);
+}
ROM_START ( ataripc1 )
ROM_REGION(0x10000,"bios", 0)
@@ -356,13 +355,14 @@ ToDo: The ROM for the CGA is available (see ROM section)
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::mpc1600)
+void pc_state::mpc1600(machine_config &config)
+{
pccga(config);
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa7", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa8", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa8", 0, "mb:isa", pc_isa8_cards, nullptr, false);
subdevice<ram_device>(RAM_TAG)->set_default_size("128K").set_extra_options("256K, 512K, 640K");
-MACHINE_CONFIG_END
+}
ROM_START( mpc1600 )
ROM_REGION(0x10000,"bios", 0)
@@ -408,12 +408,12 @@ CPU:
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::comport)
+void pc_state::comport(machine_config &config)
+{
pccga(config);
- MCFG_DEVICE_MODIFY("isa1")
- MCFG_SLOT_DEFAULT_OPTION("ega")
+ subdevice<isa8_slot_device>("isa1")->set_default_option("ega");
subdevice<ram_device>(RAM_TAG)->set_default_size("128K").set_extra_options("256K, 512K, 640K");
-MACHINE_CONFIG_END
+}
ROM_START( comport )
ROM_REGION(0x10000, "bios", 0)
@@ -446,11 +446,11 @@ Expansion: Expansion box, with 5 ISA slots and space for a 5.25" drive and a har
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::dgone)
+void pc_state::dgone(machine_config &config)
+{
pccga(config);
- MCFG_DEVICE_MODIFY("isa2")
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_dual_720K)
-MACHINE_CONFIG_END
+ subdevice<isa8_slot_device>("isa2")->set_option_machine_config("fdc_xt", cfg_dual_720K);
+}
ROM_START( dgone )
ROM_REGION(0x10000,"bios", 0)
@@ -558,9 +558,8 @@ MACHINE_CONFIG_START(pc_state::epc)
pccga(config);
config.device_remove("maincpu");
MCFG_CPU_PC(pc8, epc, I8088, 4772720)
- MCFG_DEVICE_MODIFY("isa1")
- MCFG_SLOT_DEFAULT_OPTION("ega")
- MCFG_DEVICE_ADD("i8251", I8251, 0) // clock?
+ subdevice<isa8_slot_device>("isa1")->set_default_option("ega");
+ I8251(config, "i8251", 0); // clock?
MACHINE_CONFIG_END
ROM_START( epc )
@@ -623,10 +622,10 @@ MACHINE_CONFIG_START(pc_state::ibm5550)
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -681,20 +680,16 @@ Misc: A Kaypro 16/2 is a configuration without harddisk but with two floppy disk
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::kaypro16)
+void pc_state::kaypro16(machine_config &config)
+{
pccga(config);
- MCFG_DEVICE_MODIFY("isa1")
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_MODIFY("isa2")
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_MODIFY("isa3")
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_MODIFY("isa4")
- MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_MODIFY("isa5")
- MCFG_SLOT_DEFAULT_OPTION(nullptr)
+ subdevice<isa8_slot_device>("isa1")->set_fixed(true);
+ subdevice<isa8_slot_device>("isa2")->set_fixed(true);
+ subdevice<isa8_slot_device>("isa3")->set_fixed(true);
+ subdevice<isa8_slot_device>("isa4")->set_fixed(true);
+ subdevice<isa8_slot_device>("isa5")->set_default_option(nullptr);
subdevice<ram_device>(RAM_TAG)->set_default_size("256K").set_extra_options("512K, 640K");
-MACHINE_CONFIG_END
+}
ROM_START( kaypro16 )
ROM_REGION(0x10000, "bios", 0)
@@ -706,11 +701,11 @@ ROM_END
******************************************************************************/
// MK-88
-MACHINE_CONFIG_START(pc_state::mk88)
+void pc_state::mk88(machine_config &config)
+{
poisk2(config);
- MCFG_DEVICE_MODIFY("isa1")
- MCFG_SLOT_DEFAULT_OPTION("cga_ec1841")
-MACHINE_CONFIG_END
+ subdevice<isa8_slot_device>("isa1")->set_default_option("cga_ec1841");
+}
// MK-88
ROM_START( mk88 )
@@ -751,14 +746,15 @@ Options: 8087 FPU, K101 memory upgrade in 64K steps, 1.2MB floppy and controller
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::ncrpc4i)
+void pc_state::ncrpc4i(machine_config & config)
+{
pccga(config);
//MCFG_DEVICE_MODIFY("mb:isa")
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa7", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false);
subdevice<ram_device>(RAM_TAG)->set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( ncrpc4i )
ROM_REGION(0x10000,"bios", 0)
@@ -789,14 +785,14 @@ static DEVICE_INPUT_DEFAULTS_START( m15 )
DEVICE_INPUT_DEFAULTS("DSW0", 0x01, 0x00)
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(pc_state::m15)
+void pc_state::m15(machine_config &config)
+{
pccga(config);
subdevice<ibm5160_mb_device>("mb")->set_input_default(DEVICE_INPUT_DEFAULTS_NAME(m15));
- MCFG_DEVICE_MODIFY("isa2")
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_dual_720K)
+ subdevice<isa8_slot_device>("isa2")->set_option_machine_config("fdc_xt", cfg_dual_720K);
subdevice<ram_device>(RAM_TAG)->set_default_size("448K").set_extra_options("16K, 160K, 304K");
-MACHINE_CONFIG_END
+}
ROM_START( olivm15 )
ROM_REGION(0x10000,"bios", 0)
@@ -825,12 +821,9 @@ MACHINE_CONFIG_START(pc_state::olytext30)
pccga(config);
config.device_remove("maincpu");
MCFG_CPU_PC(pc8, pc8, V20, XTAL(14'318'181)/3) /* 4,77 MHz */
- MCFG_DEVICE_MODIFY("isa2")
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_single_720K)
- MCFG_DEVICE_MODIFY("isa3")
- MCFG_SLOT_DEFAULT_OPTION("")
- MCFG_DEVICE_MODIFY("isa5")
- MCFG_SLOT_DEFAULT_OPTION("hdc")
+ subdevice<isa8_slot_device>("isa2")->set_option_machine_config("fdc_xt", cfg_single_720K);
+ subdevice<isa8_slot_device>("isa3")->set_default_option("");
+ subdevice<isa8_slot_device>("isa5")->set_default_option("hdc");
subdevice<ram_device>(RAM_TAG)->set_default_size("768K");
MACHINE_CONFIG_END
@@ -852,10 +845,10 @@ MACHINE_CONFIG_START(pc_state::poisk2)
mb.set_cputag(m_maincpu);
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga));
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga_poisk2", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga_poisk2", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -944,12 +937,10 @@ MACHINE_CONFIG_START(pc_state::iskr3104)
mb.set_cputag(m_maincpu);
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(iskr3104));
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "ega", false) // FIXME: determine ISA bus clock
- MCFG_SLOT_OPTION_DEFAULT_BIOS("ega", "iskr3104")
-
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "ega", false).set_option_default_bios("ega", "iskr3104"); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -1022,12 +1013,12 @@ MACHINE_CONFIG_START(pc_state::siemens)
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(siemens));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "hercules", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "hdc", false)
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "hercules", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
+ ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "hdc", false);
+ ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -1066,14 +1057,14 @@ MACHINE_CONFIG_START(pc_state::laser_turbo_xt)
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false) // Multi I/O card (includes FDC)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa7", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa8", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); // Multi I/O card (includes FDC)
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa8", 0, "mb:isa", pc_isa8_cards, nullptr, false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
@@ -1145,11 +1136,10 @@ MACHINE_CONFIG_START(pc_state::zenith)
mb.set_cputag(m_maincpu);
mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga));
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_dual_720K)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_dual_720K);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
/* keyboard */
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));