diff options
Diffstat (limited to 'src/devices/bus/nes/ave.cpp')
-rw-r--r-- | src/devices/bus/nes/ave.cpp | 53 |
1 files changed, 14 insertions, 39 deletions
diff --git a/src/devices/bus/nes/ave.cpp b/src/devices/bus/nes/ave.cpp index 836cdaed9df..8f2b6cace2d 100644 --- a/src/devices/bus/nes/ave.cpp +++ b/src/devices/bus/nes/ave.cpp @@ -21,12 +21,11 @@ #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" //------------------------------------------------- @@ -38,12 +37,12 @@ DEFINE_DEVICE_TYPE(NES_NINA006, nes_nina006_device, "nes_nina006", "NES Cart AVE DEFINE_DEVICE_TYPE(NES_MAXI15, nes_maxi15_device, "nes_maxi15", "NES Cart AVE Maxi 15 PCB") -nes_nina001_device::nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nina001_device::nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_NINA001, tag, owner, clock) { } -nes_nina006_device::nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nina006_device::nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_NINA006, tag, owner, clock) { } @@ -56,30 +55,6 @@ nes_maxi15_device::nes_maxi15_device(const machine_config &mconfig, const char * -void nes_nina001_device::device_start() -{ - common_start(); -} - -void nes_nina001_device::pcb_reset() -{ - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; - prg32(0); - chr8(0, m_chr_source); -} - -void nes_nina006_device::device_start() -{ - common_start(); -} - -void nes_nina006_device::pcb_reset() -{ - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; - prg32(0); - chr8(0, m_chr_source); -} - void nes_maxi15_device::device_start() { common_start(); @@ -90,7 +65,6 @@ void nes_maxi15_device::pcb_reset() { prg32(0); chr8(0, CHRROM); - set_nt_mirroring(PPU_MIRROR_VERT); m_reg[0] = m_reg[1] = 0; } @@ -117,9 +91,11 @@ void nes_maxi15_device::pcb_reset() -------------------------------------------------*/ -void nes_nina001_device::write_m(offs_t offset, uint8_t data) +void nes_nina001_device::write_m(offs_t offset, u8 data) { - LOG_MMC(("nina-001 write_m, offset: %04x, data: %02x\n", offset, data)); + LOG("nina-001 write_m, offset: %04x, data: %02x\n", offset, data); + + device_nes_cart_interface::write_m(offset, data); // write WRAM switch (offset) { @@ -133,8 +109,6 @@ void nes_nina001_device::write_m(offs_t offset, uint8_t data) chr4_4(data, CHRROM); break; } - - m_prgram[offset] = data; } /*------------------------------------------------- @@ -150,11 +124,12 @@ void nes_nina001_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_nina006_device::write_l(offs_t offset, uint8_t data) +void nes_nina006_device::write_l(offs_t offset, u8 data) { - LOG_MMC(("nina-006 write_l, offset: %04x, data: %02x\n", offset, data)); + LOG("nina-006 write_l, offset: %04x, data: %02x\n", offset, data); - if (!(offset & 0x0100)) + offset += 0x100; + if (BIT(offset, 8)) // $41xx, $43xx, ... $5fxx { prg32(data >> 3); chr8(data & 7, CHRROM); @@ -175,7 +150,7 @@ void nes_nina006_device::write_l(offs_t offset, uint8_t data) u8 nes_maxi15_device::read_h(offs_t offset) { - LOG_MMC(("Maxi 15 read_h, offset: %04x\n", offset)); + LOG("Maxi 15 read_h, offset: %04x\n", offset); u8 temp = hi_access_rom(offset); |