diff options
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 |
commit | d469cc04bcace0f601802301caeddc5b473b75f2 (patch) | |
tree | a9d71540c9c69cee5ab3a533476b81833fa02f5f /src/mame/drivers/swtpc.cpp | |
parent | 9f383f76ce6f00cc3320e5ba53dc323781e0077b (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/swtpc.cpp')
-rw-r--r-- | src/mame/drivers/swtpc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mame/drivers/swtpc.cpp b/src/mame/drivers/swtpc.cpp index cd7acfc2461..6343835d496 100644 --- a/src/mame/drivers/swtpc.cpp +++ b/src/mame/drivers/swtpc.cpp @@ -58,6 +58,8 @@ public: virtual void machine_start() override; + void swtpcm(machine_config &config); + void swtpc(machine_config &config); private: required_device<cpu_device> m_maincpu; required_device<ram_device> m_ram; @@ -91,7 +93,7 @@ void swtpc_state::machine_start() m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); } -static MACHINE_CONFIG_START( swtpc ) +MACHINE_CONFIG_START(swtpc_state::swtpc) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6800, XTAL_1_8432MHz / 2) MCFG_CPU_PROGRAM_MAP(mem_map) @@ -173,7 +175,7 @@ static MACHINE_CONFIG_START( swtpc ) MCFG_RAM_EXTRA_OPTIONS("4K,8K,12K,16K,20K,24K,28K,32K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( swtpcm, swtpc ) +MACHINE_CONFIG_DERIVED(swtpc_state::swtpcm, swtpc) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_CLOCK(XTAL_1_7971MHz / 2) |