summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_cart/hfox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/msx_cart/hfox.cpp')
-rw-r--r--src/devices/bus/msx_cart/hfox.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/devices/bus/msx_cart/hfox.cpp b/src/devices/bus/msx_cart/hfox.cpp
index fa8ea7b8870..d7fb793e42d 100644
--- a/src/devices/bus/msx_cart/hfox.cpp
+++ b/src/devices/bus/msx_cart/hfox.cpp
@@ -4,40 +4,40 @@
#include "hfox.h"
-const device_type MSX_CART_HFOX = device_creator<msx_cart_hfox>;
+DEFINE_DEVICE_TYPE(MSX_CART_HFOX, msx_cart_hfox_device, "msx_cart_hfox", "MSX Cartridge - Harry Fox")
-msx_cart_hfox::msx_cart_hfox(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, MSX_CART_HFOX, "MSX Cartridge - Harry Fox", tag, owner, clock, "msx_cart_hfox", __FILE__)
+msx_cart_hfox_device::msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, MSX_CART_HFOX, tag, owner, clock)
, msx_cart_interface(mconfig, *this)
+ , m_selected_bank{ 0, 0 }
+ , m_bank_base{ nullptr, nullptr }
{
- m_selected_bank[0] = m_selected_bank[1] = 0;
- m_bank_base[0] = m_bank_base[1] = nullptr;
}
-void msx_cart_hfox::device_start()
+void msx_cart_hfox_device::device_start()
{
save_item(NAME(m_selected_bank));
- machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_hfox::restore_banks), this));
+ machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_hfox_device::restore_banks), this));
}
-void msx_cart_hfox::restore_banks()
+void msx_cart_hfox_device::restore_banks()
{
m_bank_base[0] = get_rom_base() + ((m_selected_bank[0] & 0x01) * 0x8000);
m_bank_base[1] = get_rom_base() + ((m_selected_bank[1] & 0x01) * 0x8000) + 0x4000;
}
-void msx_cart_hfox::device_reset()
+void msx_cart_hfox_device::device_reset()
{
m_selected_bank[0] = m_selected_bank[1] = 0;
}
-void msx_cart_hfox::initialize_cartridge()
+void msx_cart_hfox_device::initialize_cartridge()
{
if (get_rom_size() < 0x10000)
{
@@ -48,7 +48,7 @@ void msx_cart_hfox::initialize_cartridge()
}
-READ8_MEMBER(msx_cart_hfox::read_cart)
+READ8_MEMBER(msx_cart_hfox_device::read_cart)
{
if (offset >= 0x4000 && offset < 0xc000)
{
@@ -58,7 +58,7 @@ READ8_MEMBER(msx_cart_hfox::read_cart)
}
-WRITE8_MEMBER(msx_cart_hfox::write_cart)
+WRITE8_MEMBER(msx_cart_hfox_device::write_cart)
{
switch (offset)
{
@@ -73,7 +73,7 @@ WRITE8_MEMBER(msx_cart_hfox::write_cart)
break;
default:
- logerror("msx_cart_hfox: unhandled write %02x to %04x\n", data, offset);
+ logerror("msx_cart_hfox_device: unhandled write %02x to %04x\n", data, offset);
break;
}
}