summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/karastudio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/karastudio.cpp')
-rw-r--r--src/devices/bus/nes/karastudio.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp
index fc98a658213..158af1ed2df 100644
--- a/src/devices/bus/nes/karastudio.cpp
+++ b/src/devices/bus/nes/karastudio.cpp
@@ -36,8 +36,7 @@
#else
#define VERBOSE 0
#endif
-
-#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0)
+#include "logmacro.h"
//-----------------------------------------
@@ -51,7 +50,7 @@
//-------------------------------------------------
kstudio_cart_interface::kstudio_cart_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
+ : device_interface(device, "kstudiocart")
, m_rom(nullptr), m_bank(0)
{
}
@@ -74,7 +73,7 @@ DEFINE_DEVICE_TYPE(NES_KSEXPANSION_SLOT, nes_kstudio_slot_device, "nes_ks_slot",
nes_kstudio_slot_device::nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NES_KSEXPANSION_SLOT, tag, owner, clock)
, device_image_interface(mconfig, *this)
- , device_slot_interface(mconfig, *this)
+ , device_single_card_slot_interface<kstudio_cart_interface>(mconfig, *this)
, m_cart(nullptr)
{
}
@@ -86,15 +85,15 @@ nes_kstudio_slot_device::~nes_kstudio_slot_device()
void nes_kstudio_slot_device::device_start()
{
- m_cart = dynamic_cast<kstudio_cart_interface *>(get_card_device());
+ m_cart = get_card_device();
}
uint8_t nes_kstudio_slot_device::read(offs_t offset)
{
if (m_cart)
return m_cart->read(offset);
-
- return 0xff;
+ else
+ return 0xff;
}
image_init_result nes_kstudio_slot_device::call_load()
@@ -227,13 +226,13 @@ void nes_karaokestudio_device::pcb_reset()
uint8_t nes_karaokestudio_device::read_m(offs_t offset)
{
- LOG_MMC(("karaoke studio read_m, offset: %04x\n", offset));
+ LOG("karaoke studio read_m, offset: %04x\n", offset);
return m_mic_ipt->read();
}
uint8_t nes_karaokestudio_device::read_h(offs_t offset)
{
- LOG_MMC(("karaoke studio read_h, offset: %04x\n", offset));
+ LOG("karaoke studio read_h, offset: %04x\n", offset);
// this shall be the proper code, but it's a bit slower, so we access directly the subcart below
//return m_subslot->read(offset);
@@ -249,7 +248,7 @@ uint8_t nes_karaokestudio_device::read_h(offs_t offset)
void nes_karaokestudio_device::write_h(offs_t offset, uint8_t data)
{
- LOG_MMC(("karaoke studio write_h, offset: %04x, data: %02x\n", offset, data));
+ LOG("karaoke studio write_h, offset: %04x, data: %02x\n", offset, data);
// bit3 1 = M ROM (main unit), 0=E ROM (expansion)
// HACK(?): currently it is not clear how the unit acknowledges the presence of the expansion
// cart (when expansion is present, code keeps switching both from the expansion rom and from