summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/sound/qs1000.cpp22
-rw-r--r--src/devices/sound/qs1000.h6
-rw-r--r--src/devices/video/315_5124.cpp35
-rw-r--r--src/devices/video/315_5124.h9
-rw-r--r--src/devices/video/315_5313.cpp16
-rw-r--r--src/devices/video/315_5313.h2
6 files changed, 32 insertions, 58 deletions
diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp
index 344a3b4d1ef..64d64bef64a 100644
--- a/src/devices/sound/qs1000.cpp
+++ b/src/devices/sound/qs1000.cpp
@@ -151,15 +151,6 @@ static ADDRESS_MAP_START( qs1000_io_map, AS_IO, 8, qs1000_device )
ADDRESS_MAP_END
-// Machine fragment
-static MACHINE_CONFIG_START( qs1000 )
- MCFG_CPU_ADD("cpu", I8052, DERIVED_CLOCK(1, 1))
- MCFG_CPU_PROGRAM_MAP(qs1000_prg_map)
- MCFG_CPU_IO_MAP(qs1000_io_map)
- MCFG_MCS51_SERIAL_RX_CB(READ8(qs1000_device, data_to_i8052))
-MACHINE_CONFIG_END
-
-
// ROM definition for the QS1000 internal program ROM
ROM_START( qs1000 )
ROM_REGION( 0x10000, "cpu", 0 )
@@ -203,13 +194,14 @@ const tiny_rom_entry *qs1000_device::device_rom_region() const
//-------------------------------------------------
-// machine_config_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add machine configuration
//-------------------------------------------------
-machine_config_constructor qs1000_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( qs1000 );
-}
+MACHINE_CONFIG_MEMBER( qs1000_device::device_add_mconfig )
+ MCFG_CPU_ADD("cpu", I8052, DERIVED_CLOCK(1, 1))
+ MCFG_CPU_PROGRAM_MAP(qs1000_prg_map)
+ MCFG_CPU_IO_MAP(qs1000_io_map)
+ MCFG_MCS51_SERIAL_RX_CB(READ8(qs1000_device, data_to_i8052))
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/devices/sound/qs1000.h b/src/devices/sound/qs1000.h
index 16201ea2424..6f3bd099283 100644
--- a/src/devices/sound/qs1000.h
+++ b/src/devices/sound/qs1000.h
@@ -85,12 +85,10 @@ public:
DECLARE_READ8_MEMBER( p3_r );
DECLARE_WRITE8_MEMBER( p3_w );
- DECLARE_READ8_MEMBER( data_to_i8052 );
-
protected:
// device-level overrides
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -153,6 +151,8 @@ private:
};
qs1000_channel m_channels[QS1000_CHANNELS];
+
+ DECLARE_READ8_MEMBER( data_to_i8052 );
};
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index 1529ce99dbe..21473f6d018 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Wilbert Pol, Enik Land
/*********************************************************************
- sega315_5124.c
+ sega315_5124.cpp
Implementation of video hardware chips used by Sega System E,
Master System, and Game Gear.
@@ -1686,21 +1686,14 @@ void sega315_5124_device::device_reset()
memset(m_CRAM, 0, sizeof(m_CRAM));
}
-static MACHINE_CONFIG_START( sega315_5124 )
- MCFG_PALETTE_ADD("palette", SEGA315_5124_PALETTE_SIZE)
- MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
-MACHINE_CONFIG_END
-
//-------------------------------------------------
-// machine_config_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add machine configuration
//-------------------------------------------------
-machine_config_constructor sega315_5124_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sega315_5124 );
-}
-
+MACHINE_CONFIG_MEMBER( sega315_5124_device::device_add_mconfig )
+ MCFG_PALETTE_ADD("palette", SEGA315_5124_PALETTE_SIZE)
+ MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
+MACHINE_CONFIG_END
void sega315_5378_device::device_reset()
{
@@ -1708,17 +1701,11 @@ void sega315_5378_device::device_reset()
m_draw_time = DRAW_TIME_GG;
}
-static MACHINE_CONFIG_START( sega315_5378 )
- MCFG_PALETTE_ADD("palette", SEGA315_5378_PALETTE_SIZE)
- MCFG_PALETTE_INIT_OWNER(sega315_5378_device, sega315_5378)
-MACHINE_CONFIG_END
-
//-------------------------------------------------
-// machine_config_additions - return a pointer to
-// the device's machine fragment
+// device_add_mconfig - add machine configuration
//-------------------------------------------------
-machine_config_constructor sega315_5378_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sega315_5378 );
-}
+MACHINE_CONFIG_MEMBER( sega315_5378_device::device_add_mconfig )
+ MCFG_PALETTE_ADD("palette", SEGA315_5378_PALETTE_SIZE)
+ MCFG_PALETTE_INIT_OWNER(sega315_5378_device, sega315_5378)
+MACHINE_CONFIG_END
diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h
index 8ca1b734d9f..8038abdcd7c 100644
--- a/src/devices/video/315_5124.h
+++ b/src/devices/video/315_5124.h
@@ -90,7 +90,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_0) ? &m_space_config : nullptr; }
@@ -192,18 +192,19 @@ class sega315_5378_device : public sega315_5124_device
public:
sega315_5378_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_PALETTE_INIT( sega315_5378 );
-
virtual void set_sega315_5124_compatibility_mode(bool sega315_5124_compatibility_mode) override;
protected:
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void update_palette() override;
virtual void cram_write(uint8_t data) override;
virtual void blit_scanline( int *line_buffer, int *priority_selected, int pixel_offset_x, int pixel_plot_y, int line ) override;
virtual uint16_t get_name_table_row(int row) override;
+
+private:
+ DECLARE_PALETTE_INIT( sega315_5378 );
};
diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp
index 22859becd5a..579212928ba 100644
--- a/src/devices/video/315_5313.cpp
+++ b/src/devices/video/315_5313.cpp
@@ -178,22 +178,16 @@ void sega315_5313_device::static_set_palette_tag(device_t &device, const char *t
downcast<sega315_5313_device &>(device).m_palette.set_tag(tag);
}
+//-------------------------------------------------
+// device_add_mconfig
+// add machine configuration
+//-------------------------------------------------
-static MACHINE_CONFIG_START( sega_genesis_vdp )
+MACHINE_CONFIG_MEMBER(sega315_5313_device::device_add_mconfig)
MCFG_PALETTE_ADD("palette", 0x200)
MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
MACHINE_CONFIG_END
-//-------------------------------------------------
-// machine_config_additions - return a pointer to
-// the device's machine fragment
-//-------------------------------------------------
-
-machine_config_constructor sega315_5313_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sega_genesis_vdp );
-}
-
TIMER_CALLBACK_MEMBER(sega315_5313_device::irq6_on_timer_callback)
{
// m_irq6_pending = 1;
diff --git a/src/devices/video/315_5313.h b/src/devices/video/315_5313.h
index 5be1f05d4b6..0c6ce095871 100644
--- a/src/devices/video/315_5313.h
+++ b/src/devices/video/315_5313.h
@@ -117,7 +117,7 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
// called when we hit 240 and 241 (used to control the z80 irq line on genesis, or the main irq on c2)
devcb_write_line m_sndirqline_callback;