summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ps2.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/ps2.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/ps2.cpp')
-rw-r--r--src/mame/drivers/ps2.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mame/drivers/ps2.cpp b/src/mame/drivers/ps2.cpp
index bdc22c86a48..2d54930bb8a 100644
--- a/src/mame/drivers/ps2.cpp
+++ b/src/mame/drivers/ps2.cpp
@@ -8,6 +8,7 @@
#include "machine/ram.h"
#include "bus/isa/isa_cards.h"
#include "bus/pc_kbd/keyboards.h"
+#include "softlist_dev.h"
class ps2_state : public driver_device
{
@@ -22,10 +23,20 @@ public:
required_device<at_mb_device> m_mb;
required_device<ram_device> m_ram;
+ void ps2m30286(machine_config &config);
+ void ps2386(machine_config &config);
+ void at_softlists(machine_config &config);
protected:
void machine_start() override;
};
+MACHINE_CONFIG_START(ps2_state::at_softlists)
+ /* software lists */
+ MCFG_SOFTWARE_LIST_ADD("pc_disk_list","ibm5150")
+ MCFG_SOFTWARE_LIST_ADD("at_disk_list","ibm5170")
+ MCFG_SOFTWARE_LIST_ADD("at_cdrom_list","ibm5170_cdrom")
+MACHINE_CONFIG_END
+
static ADDRESS_MAP_START( ps2_16_map, AS_PROGRAM, 16, ps2_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10")
@@ -66,7 +77,7 @@ void ps2_state::machine_start()
}
}
-static MACHINE_CONFIG_START( ps2m30286 )
+MACHINE_CONFIG_START(ps2_state::ps2m30286)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I80286, 10000000)
MCFG_CPU_PROGRAM_MAP(ps2_16_map)
@@ -90,7 +101,7 @@ static MACHINE_CONFIG_START( ps2m30286 )
MCFG_RAM_EXTRA_OPTIONS("2M,4M,8M,15M")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( ps2386 )
+MACHINE_CONFIG_START(ps2_state::ps2386)
MCFG_CPU_ADD("maincpu", I386, 12000000)
MCFG_CPU_PROGRAM_MAP(ps2_32_map)
MCFG_CPU_IO_MAP(ps2_32_io)