summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/binbug.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/binbug.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/binbug.cpp')
-rw-r--r--src/mame/drivers/binbug.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mame/drivers/binbug.cpp b/src/mame/drivers/binbug.cpp
index 8f5ef0baa6c..9e7861b0a08 100644
--- a/src/mame/drivers/binbug.cpp
+++ b/src/mame/drivers/binbug.cpp
@@ -88,6 +88,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cass;
+ void binbug(machine_config &config);
private:
uint8_t m_framecnt;
required_shared_ptr<uint8_t> m_p_videoram;
@@ -293,7 +294,7 @@ static DEVICE_INPUT_DEFAULTS_START( keyboard )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
DEVICE_INPUT_DEFAULTS_END
-static MACHINE_CONFIG_START( binbug )
+MACHINE_CONFIG_START(binbug_state::binbug)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(binbug_mem)
@@ -422,6 +423,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(time_tick);
TIMER_DEVICE_CALLBACK_MEMBER(uart_tick);
+ void dg680(machine_config &config);
private:
uint8_t m_pio_b;
uint8_t m_term_data;
@@ -525,7 +527,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(dg680_state::uart_tick)
m_ctc->trg3(0);
}
-static MACHINE_CONFIG_START( dg680 )
+MACHINE_CONFIG_START(dg680_state::dg680)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",Z80, XTAL_8MHz / 4)
MCFG_CPU_PROGRAM_MAP(dg680_mem)