summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/europc.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-01-07 22:20:14 +0100
committer Olivier Galibert <galibert@pobox.com>2018-01-17 16:11:18 +0100
commitd469cc04bcace0f601802301caeddc5b473b75f2 (patch)
treea9d71540c9c69cee5ab3a533476b81833fa02f5f /src/mame/drivers/europc.cpp
parent9f383f76ce6f00cc3320e5ba53dc323781e0077b (diff)
API Change: Machine configs are now a method of the owner class, and the prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD anymore due to the prototype change. So creating a device then configuring through a fragment doesn't work as-is. The simplest solution is just to add a MCFG_DEVICE_MODIFY at the start of the fragment with the correct tag.
Diffstat (limited to 'src/mame/drivers/europc.cpp')
-rw-r--r--src/mame/drivers/europc.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index 0dc89e55a4f..72bc79b7d1f 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -84,6 +84,10 @@ public:
{
TIMER_RTC
};
+ static void cfg_builtin_720K(device_t *device);
+ void europc(machine_config &config);
+ void europc2(machine_config &config);
+ void euroxt(machine_config &config);
};
/*
@@ -504,17 +508,15 @@ static ADDRESS_MAP_START(europc_io, AS_IO, 8, europc_pc_state )
ADDRESS_MAP_END
/* single built-in 3.5" 720K drive, connector for optional external 3.5" or 5.25" drive */
-static MACHINE_CONFIG_START( cfg_builtin_720K )
- MCFG_DEVICE_MODIFY("fdc:0")
- MCFG_SLOT_DEFAULT_OPTION("35dd")
- MCFG_SLOT_FIXED(true)
-
- MCFG_DEVICE_MODIFY("fdc:1")
- MCFG_SLOT_DEFAULT_OPTION("")
-MACHINE_CONFIG_END
+void europc_pc_state::cfg_builtin_720K(device_t *device)
+{
+ device_slot_interface::static_set_default_option(*device->subdevice("fdc:0"), "35dd");
+ device_slot_interface::static_set_fixed(*device->subdevice("fdc:0"), true);
+ device_slot_interface::static_set_default_option(*device->subdevice("fdc:1"), "");
+}
//Euro PC
-static MACHINE_CONFIG_START( europc )
+MACHINE_CONFIG_START(europc_pc_state::europc)
MCFG_CPU_ADD("maincpu", I8088, 4772720*2)
MCFG_CPU_PROGRAM_MAP(europc_map)
MCFG_CPU_IO_MAP(europc_io)
@@ -544,13 +546,13 @@ static MACHINE_CONFIG_START( europc )
MACHINE_CONFIG_END
//Euro PC II
-static MACHINE_CONFIG_DERIVED ( europc2, europc )
+MACHINE_CONFIG_DERIVED(europc_pc_state::europc2, europc)
MCFG_DEVICE_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("768K") // could be configured by the BIOS as 640K, 640K+128K EMS or 512K+256K EMS
MACHINE_CONFIG_END
//Euro XT
-static MACHINE_CONFIG_DERIVED ( euroxt, europc )
+MACHINE_CONFIG_DERIVED(europc_pc_state::euroxt, europc)
MCFG_DEVICE_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("768K")
MCFG_DEVICE_MODIFY("isa2")