summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cpc/cpc_rom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/cpc/cpc_rom.cpp')
-rw-r--r--src/devices/bus/cpc/cpc_rom.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/devices/bus/cpc/cpc_rom.cpp b/src/devices/bus/cpc/cpc_rom.cpp
index 3fa2848aa8c..e3ff29108cc 100644
--- a/src/devices/bus/cpc/cpc_rom.cpp
+++ b/src/devices/bus/cpc/cpc_rom.cpp
@@ -9,7 +9,7 @@
#include "emu.h"
#include "cpc_rom.h"
-const device_type CPC_ROM = device_creator<cpc_rom_device>;
+DEFINE_DEVICE_TYPE(CPC_ROM, cpc_rom_device, "cpc_rom", "CPC ROM Box")
SLOT_INTERFACE_EXTERN(cpc_exp_cards);
@@ -19,14 +19,14 @@ SLOT_INTERFACE_EXTERN(cpc_exp_cards);
// device machine config
static MACHINE_CONFIG_FRAGMENT( cpc_rom )
- MCFG_ROMSLOT_ADD("rom1")
- MCFG_ROMSLOT_ADD("rom2")
- MCFG_ROMSLOT_ADD("rom3")
- MCFG_ROMSLOT_ADD("rom4")
- MCFG_ROMSLOT_ADD("rom5")
- MCFG_ROMSLOT_ADD("rom6")
- MCFG_ROMSLOT_ADD("rom7")
- MCFG_ROMSLOT_ADD("rom8")
+ MCFG_CPC_ROMSLOT_ADD("rom1")
+ MCFG_CPC_ROMSLOT_ADD("rom2")
+ MCFG_CPC_ROMSLOT_ADD("rom3")
+ MCFG_CPC_ROMSLOT_ADD("rom4")
+ MCFG_CPC_ROMSLOT_ADD("rom5")
+ MCFG_CPC_ROMSLOT_ADD("rom6")
+ MCFG_CPC_ROMSLOT_ADD("rom7")
+ MCFG_CPC_ROMSLOT_ADD("rom8")
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
@@ -48,8 +48,9 @@ machine_config_constructor cpc_rom_device::device_mconfig_additions() const
//**************************************************************************
cpc_rom_device::cpc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, CPC_ROM, "ROM Box", tag, owner, clock, "cpc_rom", __FILE__),
- device_cpc_expansion_card_interface(mconfig, *this)
+ device_t(mconfig, CPC_ROM, tag, owner, clock),
+ device_cpc_expansion_card_interface(mconfig, *this),
+ m_rom(*this, "rom%u", 1)
{
}
@@ -73,23 +74,24 @@ void cpc_rom_device::device_reset()
/*** ROM image device ***/
// device type definition
-const device_type ROMSLOT = device_creator<rom_image_device>;
+DEFINE_DEVICE_TYPE(CPC_ROMSLOT, cpc_rom_image_device, "cpc_rom_image", "CPC ROM image")
//-------------------------------------------------
-// rom_image_device - constructor
+// cpc_rom_image_device - constructor
//-------------------------------------------------
-rom_image_device::rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, ROMSLOT, "ROM image", tag, owner, clock, "rom_image", __FILE__),
- device_image_interface(mconfig, *this), m_base(nullptr)
+cpc_rom_image_device::cpc_rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, CPC_ROMSLOT, tag, owner, clock)
+ , device_image_interface(mconfig, *this)
+ , m_base(nullptr)
{
}
//-------------------------------------------------
-// rom_image_device - destructor
+// cpc_rom_image_device - destructor
//-------------------------------------------------
-rom_image_device::~rom_image_device()
+cpc_rom_image_device::~cpc_rom_image_device()
{
}
@@ -97,7 +99,7 @@ rom_image_device::~rom_image_device()
// device_start - device-specific startup
//-------------------------------------------------
-void rom_image_device::device_start()
+void cpc_rom_image_device::device_start()
{
m_base = nullptr;
}
@@ -105,7 +107,7 @@ void rom_image_device::device_start()
/*-------------------------------------------------
DEVICE_IMAGE_LOAD( rom )
-------------------------------------------------*/
-image_init_result rom_image_device::call_load()
+image_init_result cpc_rom_image_device::call_load()
{
device_image_interface* image = this;
uint64_t size = image->length();
@@ -128,7 +130,7 @@ image_init_result rom_image_device::call_load()
/*-------------------------------------------------
DEVICE_IMAGE_UNLOAD( rom )
-------------------------------------------------*/
-void rom_image_device::call_unload()
+void cpc_rom_image_device::call_unload()
{
m_base = nullptr;
}