summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/batlab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/batlab.cpp')
-rw-r--r--src/devices/bus/nes/batlab.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/devices/bus/nes/batlab.cpp b/src/devices/bus/nes/batlab.cpp
index 7f11696134d..3a9df33a3cf 100644
--- a/src/devices/bus/nes/batlab.cpp
+++ b/src/devices/bus/nes/batlab.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders: kmg, Fabio Priuli
+// copyright-holders:kmg
/***********************************************************************************************************
@@ -20,13 +20,14 @@
#include "video/ppu2c0x.h" // this has to be included so that IRQ functions can access ppu2c0x_device::BOTTOM_VISIBLE_SCANLINE
+#define LOG_HIFREQ (1U << 1)
+
#ifdef NES_PCB_DEBUG
-#define VERBOSE 1
+#define VERBOSE (LOG_GENERAL)
#else
-#define VERBOSE 0
+#define VERBOSE (0)
#endif
-
-#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0)
+#include "logmacro.h"
//-------------------------------------------------
@@ -51,7 +52,6 @@ nes_batmap_srrx_device::nes_batmap_srrx_device(const machine_config &mconfig, co
void nes_batmap_000_device::pcb_reset()
{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
mmc3_common_initialize(0x0f, 0xff, 0);
prg16_89ab(0);
@@ -112,7 +112,7 @@ void nes_batmap_srrx_device::pcb_reset()
void nes_batmap_000_device::write_h(offs_t offset, u8 data)
{
- LOG_MMC(("batmap_000 write_h, offset: %04x, data: %02x\n", offset, data));
+ LOG("batmap_000 write_h, offset: %04x, data: %02x\n", offset, data);
switch (offset & 0x6001)
{
@@ -163,7 +163,7 @@ void nes_batmap_000_device::write_h(offs_t offset, u8 data)
-------------------------------------------------*/
// IRQ based on our MMC3 implementation, details for SRR are unclear
-void nes_batmap_srrx_device::hblank_irq(int scanline, int vblank, int blanked)
+void nes_batmap_srrx_device::hblank_irq(int scanline, bool vblank, bool blanked)
{
if (scanline < ppu2c0x_device::BOTTOM_VISIBLE_SCANLINE)
{
@@ -174,7 +174,7 @@ void nes_batmap_srrx_device::hblank_irq(int scanline, int vblank, int blanked)
if (m_irq_enable && !blanked && !m_irq_count)
{
- LOG_MMC(("irq fired, scanline: %d\n", scanline));
+ LOG("irq fired, scanline: %d\n", scanline);
set_irq_line(ASSERT_LINE);
}
}
@@ -188,7 +188,7 @@ u8 nes_batmap_srrx_device::read_dpcm()
u8 nes_batmap_srrx_device::read_l(offs_t offset)
{
-// LOG_MMC(("batmap_srrx read_l, offset: %04x", offset));
+ LOGMASKED(LOG_HIFREQ, "batmap_srrx read_l, offset: %04x", offset);
offset += 0x100;
switch (offset & 0x1800)
@@ -204,13 +204,13 @@ u8 nes_batmap_srrx_device::read_l(offs_t offset)
u8 nes_batmap_srrx_device::read_m(offs_t offset)
{
-// LOG_MMC(("batmap_srrx read_m, offset: %04x", offset));
+ LOGMASKED(LOG_HIFREQ, "batmap_srrx read_m, offset: %04x", offset);
return m_prg[(m_reg * 0x2000 + offset) & (m_prg_size - 1)];
}
u8 nes_batmap_srrx_device::read_h(offs_t offset)
{
- LOG_MMC(("batmap_srrx read_h, offset: %04x", offset));
+ LOG("batmap_srrx read_h, offset: %04x", offset);
if ((offset & 0x7000) == 0x4000)
return read_dpcm();
@@ -220,7 +220,7 @@ u8 nes_batmap_srrx_device::read_h(offs_t offset)
void nes_batmap_srrx_device::write_h(offs_t offset, u8 data)
{
- LOG_MMC(("batmap_srrx write_h, offset: %04x, data: %02x\n", offset, data));
+ LOG("batmap_srrx write_h, offset: %04x, data: %02x\n", offset, data);
switch (offset & 0x7000)
{
@@ -237,7 +237,7 @@ void nes_batmap_srrx_device::write_h(offs_t offset, u8 data)
set_irq_line(CLEAR_LINE);
break;
case 0x4000:
- m_dpcm_addr = (m_dpcm_addr << 1 | data >> 7);
+ m_dpcm_addr = m_dpcm_addr << 1 | data >> 7;
break;
case 0x5000:
m_dpcm_ctrl = data;