From 63f9a01f8c5d43b9cfe68c2d401a84647d19c10e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 29 Jun 2016 08:34:30 +0200 Subject: Cleanup and version bump --- src/devices/bus/nes/bootleg.cpp | 27 +++++++++++++-------------- src/devices/bus/nes/bootleg.h | 4 ++-- src/devices/bus/nes/kaiser.cpp | 37 ++++++++++++++++++------------------- src/devices/bus/nes/kaiser.h | 12 ++++++------ 4 files changed, 39 insertions(+), 41 deletions(-) (limited to 'src/devices/bus/nes') diff --git a/src/devices/bus/nes/bootleg.cpp b/src/devices/bus/nes/bootleg.cpp index fbd00b7fadf..f21db4454ff 100644 --- a/src/devices/bus/nes/bootleg.cpp +++ b/src/devices/bus/nes/bootleg.cpp @@ -1238,7 +1238,7 @@ READ8_MEMBER(nes_lh32_device::read_m) READ8_MEMBER(nes_lh32_device::read_h) { -// LOG_MMC(("lh32 read_h, offset: %04x\n", offset)); +// LOG_MMC(("lh32 read_h, offset: %04x\n", offset)); if (offset >= 0x4000 && offset < 0x6000) return m_prgram[offset & 0x1fff]; @@ -1294,7 +1294,7 @@ READ8_MEMBER(nes_lh10_device::read_m) READ8_MEMBER(nes_lh10_device::read_h) { -// LOG_MMC(("lh10 read_h, offset: %04x\n", offset)); +// LOG_MMC(("lh10 read_h, offset: %04x\n", offset)); if (offset >= 0x4000 && offset < 0x6000) return m_prgram[offset & 0x1fff]; @@ -1363,7 +1363,7 @@ READ8_MEMBER(nes_lh53_device::read_m) READ8_MEMBER(nes_lh53_device::read_h) { -// LOG_MMC(("lh53 read_h, offset: %04x\n", offset)); +// LOG_MMC(("lh53 read_h, offset: %04x\n", offset)); if (offset >= 0x3800 && offset < 0x5800) return m_battery[offset & 0x1fff]; @@ -1431,7 +1431,7 @@ WRITE8_MEMBER(nes_2708_device::write_m) READ8_MEMBER(nes_2708_device::read_h) { -// LOG_MMC(("btl-2708 read_h, offset: %04x\n", offset)); +// LOG_MMC(("btl-2708 read_h, offset: %04x\n", offset)); if (offset >= 0x3800 && offset < 0x5800 && !m_reg[1]) return m_prgram[0x2000 + ((offset - 0x3800) & 0x1fff)]; // higher 8K of WRAM @@ -1656,30 +1656,29 @@ READ8_MEMBER(nes_shuiguan_device::read_m) /*------------------------------------------------- - + RT-01 - + Games: Russian test cart - - The PRG EPROM has copy protected areas with + + The PRG EPROM has copy protected areas with "weak bits", which is tested at some points (info from Cah4e3). - + iNES: - + In MESS: - + -------------------------------------------------*/ READ8_MEMBER(nes_rt01_device::read_h) { -// LOG_MMC(("rt01 read_h, offset: %04x\n", offset)); +// LOG_MMC(("rt01 read_h, offset: %04x\n", offset)); if ((offset >= 0x4e80) && (offset < 0x4f00)) return 0xf2 | (machine().rand() & 0x0d); if ((offset >= 0x7e80) && (offset < 0x7f00)) return 0xf2 | (machine().rand() & 0x0d); - + return hi_access_rom(offset); } - diff --git a/src/devices/bus/nes/bootleg.h b/src/devices/bus/nes/bootleg.h index 30b40b589a4..59f02a476a5 100644 --- a/src/devices/bus/nes/bootleg.h +++ b/src/devices/bus/nes/bootleg.h @@ -460,11 +460,11 @@ class nes_rt01_device : public nes_nrom_device public: // construction/destruction nes_rt01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() override; virtual DECLARE_READ8_MEMBER(read_h) override; - + virtual void pcb_reset() override; }; diff --git a/src/devices/bus/nes/kaiser.cpp b/src/devices/bus/nes/kaiser.cpp index 340aca500cc..e335681157d 100644 --- a/src/devices/bus/nes/kaiser.cpp +++ b/src/devices/bus/nes/kaiser.cpp @@ -252,7 +252,7 @@ void nes_ks7016_device::pcb_reset() prg8_cd(0xe); prg8_ef(0xf); chr8(0, CHRRAM); - + m_reg = 4; } @@ -270,7 +270,7 @@ void nes_ks7037_device::pcb_reset() prg8_cd(0); prg8_ef(0x1f); chr8(0, CHRRAM); - + memset(m_reg, 0, sizeof(m_reg)); m_latch = 0; } @@ -637,15 +637,15 @@ WRITE8_MEMBER(nes_ks7031_device::write_h) /*------------------------------------------------- - + Kaiser Board KS7016 - + Games: Exciting Basket FDS Conversion - + iNES: - + In MESS: Unsupported. - + -------------------------------------------------*/ READ8_MEMBER(nes_ks7016_device::read_m) @@ -666,20 +666,20 @@ WRITE8_MEMBER(nes_ks7016_device::write_h) /*------------------------------------------------- - + Kaiser Board KS7037 - + Games: Metroid (FDS conversion) - + This PCB maps PRG in 0x7000-0x7fff in a very similar fashion to LH10 (see bootleg.cpp) but with WRAM split between 0x6000-0x6fff and 0xb000-0xbfff. - + iNES: - + In MESS: Unsupported. - + -------------------------------------------------*/ void nes_ks7037_device::update_prg() @@ -696,7 +696,7 @@ void nes_ks7037_device::update_prg() READ8_MEMBER(nes_ks7037_device::read_m) { -// LOG_MMC(("ks7037 read_m, offset: %04x\n", offset)); +// LOG_MMC(("ks7037 read_m, offset: %04x\n", offset)); if (offset < 0x1000) return m_prgram[offset & 0x0fff]; else @@ -712,18 +712,18 @@ WRITE8_MEMBER(nes_ks7037_device::write_m) READ8_MEMBER(nes_ks7037_device::read_h) { -// LOG_MMC(("ks7037 read_h, offset: %04x\n", offset)); - +// LOG_MMC(("ks7037 read_h, offset: %04x\n", offset)); + if (offset >= 0x3000 && offset < 0x4000) return m_prgram[0x1000 + (offset & 0x0fff)]; - + return hi_access_rom(offset); } WRITE8_MEMBER(nes_ks7037_device::write_h) { LOG_MMC(("ks7037 write_h, offset: %04x, data: %02x\n", offset, data)); - + if (offset >= 0x3000 && offset < 0x4000) m_prgram[0x1000 + (offset & 0x0fff)] = data; else @@ -740,4 +740,3 @@ WRITE8_MEMBER(nes_ks7037_device::write_h) } } } - diff --git a/src/devices/bus/nes/kaiser.h b/src/devices/bus/nes/kaiser.h index e5ad8628436..6d58ff134fe 100644 --- a/src/devices/bus/nes/kaiser.h +++ b/src/devices/bus/nes/kaiser.h @@ -177,14 +177,14 @@ class nes_ks7016_device : public nes_nrom_device public: // construction/destruction nes_ks7016_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() override; virtual DECLARE_READ8_MEMBER(read_m) override; virtual DECLARE_WRITE8_MEMBER(write_h) override; - + virtual void pcb_reset() override; - + private: UINT8 m_reg; }; @@ -196,16 +196,16 @@ class nes_ks7037_device : public nes_nrom_device public: // construction/destruction nes_ks7037_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() override; virtual DECLARE_READ8_MEMBER(read_m) override; virtual DECLARE_READ8_MEMBER(read_h) override; virtual DECLARE_WRITE8_MEMBER(write_m) override; virtual DECLARE_WRITE8_MEMBER(write_h) override; - + virtual void pcb_reset() override; - + private: void update_prg(); UINT8 m_latch; -- cgit v1.2.3