diff options
author | 2019-03-25 23:13:40 +0100 | |
---|---|---|
committer | 2019-03-25 23:13:40 +0100 | |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/nes/mmc3_clones.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/nes/mmc3_clones.cpp')
-rw-r--r-- | src/devices/bus/nes/mmc3_clones.cpp | 202 |
1 files changed, 101 insertions, 101 deletions
diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp index 9be591c7d9f..5c578c0fcbd 100644 --- a/src/devices/bus/nes/mmc3_clones.cpp +++ b/src/devices/bus/nes/mmc3_clones.cpp @@ -637,11 +637,11 @@ void nes_pjoy84_device::pcb_reset() -------------------------------------------------*/ -void nes_nitra_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_nitra_device::write_h) { LOG_MMC(("nitra write_h, offset: %04x, data: %02x\n", offset, data)); - txrom_write((offset & 0x6000) | ((offset & 0x400) >> 10), offset & 0xff); + txrom_write(space, (offset & 0x6000) | ((offset & 0x400) >> 10), offset & 0xff, mem_mask); } /*------------------------------------------------- @@ -656,12 +656,12 @@ void nes_nitra_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_ks7057_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_ks7057_device::write_h) { LOG_MMC(("ks7057 write_h, offset: %04x, data: %02x\n", offset, data)); offset = (BIT(offset, 0) << 1) | BIT(offset, 1) | (offset & ~0x03); - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); } /*------------------------------------------------- @@ -679,11 +679,11 @@ void nes_ks7057_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_sbros11_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sbros11_device::write_h) { LOG_MMC(("smb11 write_h, offset: %04x, data: %02x\n", offset, data)); - txrom_write((offset & 0x6000) | ((offset & 0x04) >> 2), data); + txrom_write(space, (offset & 0x6000) | ((offset & 0x04) >> 2), data, mem_mask); } /*------------------------------------------------- @@ -711,14 +711,14 @@ void nes_malisb_device::chr_cb(int start, int bank, int source) chr1_x(start, bank, source); } -void nes_malisb_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_malisb_device::write_h) { LOG_MMC(("malisb write_h, offset: %04x, data: %02x\n", offset, data)); if (offset > 0x4000) - txrom_write((offset & 0xfffe) | ((offset & 0x04) >> 2) | ((offset & 0x08) >> 3), data); + txrom_write(space, (offset & 0xfffe) | ((offset & 0x04) >> 2) | ((offset & 0x08) >> 3), data, mem_mask); else - txrom_write((offset & 0xfffe) | ((offset & 0x08) >> 3), data); + txrom_write(space, (offset & 0xfffe) | ((offset & 0x08) >> 3), data, mem_mask); } /*------------------------------------------------- @@ -736,7 +736,7 @@ void nes_malisb_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_family4646_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_family4646_device::write_m) { LOG_MMC(("family4646 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -763,7 +763,7 @@ void nes_family4646_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_pikay2k_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_pikay2k_device::write_h) { LOG_MMC(("pikay2k write_h, offset: %04x, data: %02x\n", offset, data)); @@ -776,20 +776,20 @@ void nes_pikay2k_device::write_h(offs_t offset, uint8_t data) case 0x2000: m_reg[0] = 0; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } // strange WRAM usage: it is protected at start, and gets unprotected after the first write to 0xa000 -void nes_pikay2k_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_pikay2k_device::write_m) { LOG_MMC(("pikay2k write_m, offset: %04x, data: %02x\n", offset, data)); m_prgram[offset & 0x1fff] = data; } -uint8_t nes_pikay2k_device::read_m(offs_t offset) +READ8_MEMBER(nes_pikay2k_device::read_m) { LOG_MMC(("pikay2k read_m, offset: %04x\n", offset)); @@ -820,7 +820,7 @@ void nes_8237_device::chr_cb(int start, int bank, int source) chr1_x(start, bank, source); } -void nes_8237_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_8237_device::write_l) { LOG_MMC(("unl_8237 write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -854,7 +854,7 @@ void nes_8237_device::write_l(offs_t offset, uint8_t data) } } -void nes_8237_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_8237_device::write_h) { static const uint8_t conv_table[8] = {0, 2, 6, 1, 7, 3, 4, 5}; LOG_MMC(("unl_8237 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -870,7 +870,7 @@ void nes_8237_device::write_h(offs_t offset, uint8_t data) case 0x3000: m_cd_enable = 1; data = (data & 0xc0) | conv_table[data & 0x07]; - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); break; case 0x4000: @@ -878,7 +878,7 @@ void nes_8237_device::write_h(offs_t offset, uint8_t data) if (m_cd_enable) { m_cd_enable = 0; - txrom_write(0x0001, data); + txrom_write(space, 0x0001, data, mem_mask); } break; @@ -886,9 +886,9 @@ void nes_8237_device::write_h(offs_t offset, uint8_t data) break; case 0x7000: - txrom_write(0x6001, data); - txrom_write(0x4000, data); - txrom_write(0x4001, data); + txrom_write(space, 0x6001, data, mem_mask); + txrom_write(space, 0x4000, data, mem_mask); + txrom_write(space, 0x4001, data, mem_mask); break; } } @@ -907,7 +907,7 @@ void nes_8237_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_sglionk_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sglionk_device::write_m) { LOG_MMC(("sglionk write_m, offset: %04x, data: %02x\n", offset, data)); @@ -923,7 +923,7 @@ void nes_sglionk_device::write_m(offs_t offset, uint8_t data) } -void nes_sglionk_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sglionk_device::write_h) { static const uint8_t conv_table[8] = {0, 3, 1, 5, 6, 7, 2, 4}; LOG_MMC(("sglionk write_h, offset: %04x, data: %02x\n", offset, data)); @@ -938,13 +938,13 @@ void nes_sglionk_device::write_h(offs_t offset, uint8_t data) case 0x2000: m_reg_enabled = 1; data = (data & 0xc0) | conv_table[data & 0x07]; - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); break; case 0x4000: if (m_reg_enabled && (m_reg & 0x80) == 0) { m_reg_enabled = 0; - txrom_write(0x0001, data); + txrom_write(space, 0x0001, data, mem_mask); } break; } @@ -954,12 +954,12 @@ void nes_sglionk_device::write_h(offs_t offset, uint8_t data) switch (offset & 0x03) { case 0x02: - txrom_write(0x6000, data); + txrom_write(space, 0x6000, data, mem_mask); break; case 0x03: - txrom_write(0x6001, data); - txrom_write(0x4000, data); - txrom_write(0x4001, data); + txrom_write(space, 0x6001, data, mem_mask); + txrom_write(space, 0x4000, data, mem_mask); + txrom_write(space, 0x4001, data, mem_mask); break; } } @@ -1022,7 +1022,7 @@ void nes_sgboog_device::set_prg(int prg_base, int prg_mask) } } -void nes_sgboog_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sgboog_device::write_l) { LOG_MMC(("sgboog write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -1046,7 +1046,7 @@ void nes_sgboog_device::write_l(offs_t offset, uint8_t data) } } -void nes_sgboog_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sgboog_device::write_m) { LOG_MMC(("sgboog write_m, offset: %04x, data: %02x\n", offset, data)); @@ -1069,7 +1069,7 @@ void nes_sgboog_device::write_m(offs_t offset, uint8_t data) } } -void nes_sgboog_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sgboog_device::write_h) { static const uint8_t conv_table[8] = {0,2,5,3,6,1,7,4}; LOG_MMC(("sgboog write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1085,14 +1085,14 @@ void nes_sgboog_device::write_h(offs_t offset, uint8_t data) if (m_reg[2] && ((m_reg[0] & 0x80) == 0 || (m_latch & 0x07) < 6)) // if we use the prg16 banks and cmd=6,7 DON'T enter! { m_reg[2] = 0; - txrom_write(0x0001, data); + txrom_write(space, 0x0001, data, mem_mask); } break; case 0x2000: data = (data & 0xc0) | conv_table[data & 0x07]; m_reg[2] = 1; - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); break; case 0x4000: @@ -1100,21 +1100,21 @@ void nes_sgboog_device::write_h(offs_t offset, uint8_t data) break; case 0x4001: - txrom_write(0x6001, data); + txrom_write(space, 0x6001, data, mem_mask); break; case 0x6001: - txrom_write(0x4000, data); - txrom_write(0x4001, data); + txrom_write(space, 0x4000, data, mem_mask); + txrom_write(space, 0x4001, data, mem_mask); break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } else - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); } /*------------------------------------------------- @@ -1140,7 +1140,7 @@ void nes_kasing_device::prg_cb(int start, int bank) prg8_x(start, bank); } -void nes_kasing_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kasing_device::write_m) { LOG_MMC(("kasing write_m, offset: %04x, data: %02x\n", offset, data)); @@ -1172,7 +1172,7 @@ void nes_kasing_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_kay_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kay_device::write_l) { LOG_MMC(("kay write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -1195,7 +1195,7 @@ void nes_kay_device::write_l(offs_t offset, uint8_t data) } } -uint8_t nes_kay_device::read_l(offs_t offset) +READ8_MEMBER(nes_kay_device::read_l) { LOG_MMC(("kay read_l, offset: %04x\n", offset)); offset += 0x100; @@ -1269,14 +1269,14 @@ void nes_kay_device::chr_cb(int start, int bank, int source) chr1_x(start, bank, source); } -void nes_kay_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kay_device::write_h) { LOG_MMC(("kay write_h, offset: %04x, data: %02x\n", offset, data)); switch (offset & 0x6003) { case 0x0000: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); set_prg(m_prg_base, m_prg_mask); break; @@ -1285,19 +1285,19 @@ void nes_kay_device::write_h(offs_t offset, uint8_t data) | (BIT(data, 3) << 2) | (BIT(data, 4) << 1) | BIT(data, 5); if (!m_reg[7]) update_regs(); - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); set_prg(m_prg_base, m_prg_mask); break; case 0x0003: m_reg[5] = data; update_regs(); - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); set_prg(m_prg_base, m_prg_mask); break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -1314,7 +1314,7 @@ void nes_h2288_device::prg_cb(int start, int bank) prg8_x(start, bank); } -void nes_h2288_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_h2288_device::write_l) { LOG_MMC(("h2288 write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -1334,7 +1334,7 @@ void nes_h2288_device::write_l(offs_t offset, uint8_t data) } } -uint8_t nes_h2288_device::read_l(offs_t offset) +READ8_MEMBER(nes_h2288_device::read_l) { LOG_MMC(("h2288 read_l, offset: %04x\n", offset)); offset += 0x100; @@ -1351,7 +1351,7 @@ uint8_t nes_h2288_device::read_l(offs_t offset) return 0; } -void nes_h2288_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_h2288_device::write_h) { static const uint8_t conv_table[8] = {0, 3, 1, 5, 6, 7, 2, 4}; LOG_MMC(("h2288 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1359,11 +1359,11 @@ void nes_h2288_device::write_h(offs_t offset, uint8_t data) switch (offset & 0x6001) { case 0x0000: - txrom_write(0x0000, (data & 0xc0) | conv_table[data & 0x07]); + txrom_write(space, 0x0000, (data & 0xc0) | conv_table[data & 0x07], mem_mask); break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -1378,7 +1378,7 @@ void nes_h2288_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_6035052_device::write_ex(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_6035052_device::write_ex) { LOG_MMC(("6035052 write_ex, offset: %04x, data: %02x\n", offset, data)); m_prot = data & 0x03; @@ -1386,7 +1386,7 @@ void nes_6035052_device::write_ex(offs_t offset, uint8_t data) m_prot = 2; } -uint8_t nes_6035052_device::read_ex(offs_t offset) +READ8_MEMBER(nes_6035052_device::read_ex) { LOG_MMC(("6035052 read_ex, offset: %04x\n", offset)); return m_prot; @@ -1406,7 +1406,7 @@ uint8_t nes_6035052_device::read_ex(offs_t offset) -------------------------------------------------*/ -void nes_txc_tw_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_txc_tw_device::write_l) { LOG_MMC(("txc_tw write_l, offset: %04x, data: %02x\n", offset, data)); @@ -1436,22 +1436,22 @@ inline uint8_t kof97_unscramble( uint8_t data ) return ((data >> 1) & 0x01) | ((data >> 4) & 0x02) | ((data << 2) & 0x04) | ((data >> 0) & 0xd8) | ((data << 3) & 0x20); } -void nes_kof97_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kof97_device::write_h) { LOG_MMC(("kof97 write_h, offset: %04x, data: %02x\n", offset, data)); /* Addresses 0x9000, 0xa000, 0xd000 & 0xf000 behaves differently than MMC3 */ if (offset == 0x1000) - txrom_write(0x0001, kof97_unscramble(data)); + txrom_write(space, 0x0001, kof97_unscramble(data), mem_mask); else if (offset == 0x2000) - txrom_write(0x0000, kof97_unscramble(data)); + txrom_write(space, 0x0000, kof97_unscramble(data), mem_mask); else if (offset == 0x5000) - txrom_write(0x4001, kof97_unscramble(data)); + txrom_write(space, 0x4001, kof97_unscramble(data), mem_mask); else if (offset == 0x7000) - txrom_write(0x6001, kof97_unscramble(data)); + txrom_write(space, 0x6001, kof97_unscramble(data), mem_mask); /* Other addresses behaves like MMC3, up to unscrambling data */ else - txrom_write(offset, kof97_unscramble(data)); + txrom_write(space, offset, kof97_unscramble(data), mem_mask); } /*------------------------------------------------- @@ -1485,7 +1485,7 @@ void nes_kof96_device::chr_cb(int start, int bank, int source) chr1_x(start, bank, source); } -void nes_kof96_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kof96_device::write_l) { uint8_t new_bank; LOG_MMC(("kof96 write_l, offset: %04x, data: %02x\n", offset, data)); @@ -1532,11 +1532,11 @@ void nes_kof96_device::write_l(offs_t offset, uint8_t data) if (!m_reg[3] && offset > 0x1000) { m_reg[3] = 1; - poke(0x4017, 0x40); // FIXME + space.write_byte(0x4017, 0x40); } } -uint8_t nes_kof96_device::read_l(offs_t offset) +READ8_MEMBER(nes_kof96_device::read_l) { LOG_MMC(("kof96 read_l, offset: %04x\n", offset)); offset += 0x100; @@ -1547,7 +1547,7 @@ uint8_t nes_kof96_device::read_l(offs_t offset) return 0; } -void nes_kof96_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_kof96_device::write_h) { LOG_MMC(("kof96 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1555,12 +1555,12 @@ void nes_kof96_device::write_h(offs_t offset, uint8_t data) { case 0x0000: m_reg[2] = 1; - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); break; case 0x0001: if (m_reg[2]) - txrom_write(0x0001, data); + txrom_write(space, 0x0001, data, mem_mask); break; case 0x0002: @@ -1576,7 +1576,7 @@ void nes_kof96_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -1600,7 +1600,7 @@ void nes_sf3_device::set_chr(uint8_t chr_source, int chr_base, int chr_mask) chr2_6(chr_base | (m_mmc_vrom_bank[2] & chr_mask), chr_source); } -void nes_sf3_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_sf3_device::write_h) { uint8_t cmd; LOG_MMC(("sf3 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1624,7 +1624,7 @@ void nes_sf3_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -1643,7 +1643,7 @@ void nes_sf3_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_gouder_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_gouder_device::write_l) { static const uint8_t conv_table[256] = { @@ -1675,7 +1675,7 @@ void nes_gouder_device::write_l(offs_t offset, uint8_t data) prg32(((data >> 3) & 0x02) | (data & 0x01)); } -uint8_t nes_gouder_device::read_l(offs_t offset) +READ8_MEMBER(nes_gouder_device::read_l) { LOG_MMC(("gouder read_l, offset: %04x\n", offset)); @@ -1722,7 +1722,7 @@ void nes_sa9602b_device::prg_cb(int start, int bank) } -void nes_sa9602b_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER( nes_sa9602b_device::write_h ) { LOG_MMC(("sa9602b write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1738,7 +1738,7 @@ void nes_sa9602b_device::write_h(offs_t offset, uint8_t data) break; } - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); } /*------------------------------------------------- @@ -1762,7 +1762,7 @@ void nes_sachen_shero_device::chr_cb( int start, int bank, int source ) } -void nes_sachen_shero_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER( nes_sachen_shero_device::write_l ) { LOG_MMC(("shero write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x4100; @@ -1777,7 +1777,7 @@ void nes_sachen_shero_device::write_l(offs_t offset, uint8_t data) } } -uint8_t nes_sachen_shero_device::read_l(offs_t offset) +READ8_MEMBER( nes_sachen_shero_device::read_l ) { LOG_MMC(("shero read_l, offset: %04x\n", offset)); offset += 0x4100; @@ -1786,7 +1786,7 @@ uint8_t nes_sachen_shero_device::read_l(offs_t offset) { // DSW read! } - return get_open_bus(); // open bus + return m_open_bus; // open bus } @@ -1886,7 +1886,7 @@ void nes_fk23c_device::fk23c_set_chr() } } -void nes_fk23c_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_fk23c_device::write_l) { LOG_MMC(("fk23c write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -1903,7 +1903,7 @@ void nes_fk23c_device::write_l(offs_t offset, uint8_t data) } } -void nes_fk23c_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_fk23c_device::write_h) { LOG_MMC(("fk23c write_h, offset: %04x, data: %02x\n", offset, data)); @@ -1929,7 +1929,7 @@ void nes_fk23c_device::write_h(offs_t offset, uint8_t data) fk23c_set_chr(); } else - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; case 0x2000: @@ -1937,7 +1937,7 @@ void nes_fk23c_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -1971,7 +1971,7 @@ void nes_s24in1sc03_device::chr_cb(int start, int bank, int source) chr1_x(start, chr_base | bank, chr); } -void nes_s24in1sc03_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_s24in1sc03_device::write_l) { LOG_MMC(("s24in1sc03 write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; @@ -2009,7 +2009,7 @@ void nes_s24in1sc03_device::write_l(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_15in1_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_15in1_device::write_m) { LOG_MMC(("bmc_15in1 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2037,7 +2037,7 @@ void nes_bmc_15in1_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_sbig7_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_sbig7_device::write_h) { uint8_t page; LOG_MMC(("bmc_sbig7 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -2058,7 +2058,7 @@ void nes_bmc_sbig7_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -2076,7 +2076,7 @@ void nes_bmc_sbig7_device::write_h(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_hik8_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_hik8_device::write_m) { LOG_MMC(("bmc_hik8 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2123,7 +2123,7 @@ void nes_bmc_hik8_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_hik4_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_hik4_device::write_m) { LOG_MMC(("bmc_hik4 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2162,7 +2162,7 @@ void nes_bmc_hik4_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_mario7in1_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_mario7in1_device::write_m) { uint8_t helper1, helper2; LOG_MMC(("bmc_mario7in1 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2204,7 +2204,7 @@ void nes_bmc_mario7in1_device::write_m(offs_t offset, uint8_t data) -------------------------------------------------*/ -void nes_bmc_gold7in1_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_gold7in1_device::write_m) { uint8_t helper1, helper2; LOG_MMC(("bmc_gold7in1 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2265,7 +2265,7 @@ void nes_bmc_gc6in1_device::chr_cb(int start, int bank, int source) chr1_x(start, ((m_reg[1] & 0x03) << 8) | bank, source); } -void nes_bmc_gc6in1_device::write_l(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_gc6in1_device::write_l) { uint8_t bank; LOG_MMC(("bmc_gc6in1 write_l, offset: %04x, data: %02x\n", offset, data)); @@ -2294,7 +2294,7 @@ void nes_bmc_gc6in1_device::write_l(offs_t offset, uint8_t data) } } -void nes_bmc_gc6in1_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_gc6in1_device::write_h) { uint8_t cmd; static const uint8_t conv_table[8] = {0, 6, 3, 7, 5, 2, 4, 1}; @@ -2303,20 +2303,20 @@ void nes_bmc_gc6in1_device::write_h(offs_t offset, uint8_t data) if (!m_reg[2]) { // in this case we act like MMC3, only with alt prg/chr handlers - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); } else { switch (offset & 0x6001) { case 0x0000: - txrom_write(0x4000, data); + txrom_write(space, 0x4000, data, mem_mask); break; case 0x0001: data = (data & 0xc0) | conv_table[data & 0x07]; m_reg[3] = 1; - txrom_write(0x0000, data); + txrom_write(space, 0x0000, data, mem_mask); break; case 0x2000: @@ -2346,7 +2346,7 @@ void nes_bmc_gc6in1_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } @@ -2377,7 +2377,7 @@ void nes_bmc_411120c_device::chr_cb(int start, int bank, int source) chr1_x(start, bank | ((m_reg & 3) << 7), source); } -void nes_bmc_411120c_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_411120c_device::write_m) { LOG_MMC(("bmc_411120c write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2422,7 +2422,7 @@ void nes_bmc_830118c_device::chr_cb(int start, int bank, int source) chr1_x(start, (bank & 0x7f) | ((m_reg & 0x0c) << 5), source); } -void nes_bmc_830118c_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_bmc_830118c_device::write_m) { LOG_MMC(("bmc_830118c write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2478,7 +2478,7 @@ inline void nes_pjoy84_device::set_base_mask() m_chr_mask = BIT(m_reg[0], 7) ? 0x7f : 0xff; } -void nes_pjoy84_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_pjoy84_device::write_m) { LOG_MMC(("pjoy84 write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2523,7 +2523,7 @@ void nes_coolboy_device::chr_cb(int start, int bank, int source) chr1_x(start, bank, source); } -void nes_coolboy_device::write_m(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_coolboy_device::write_m) { LOG_MMC(("coolboy write_m, offset: %04x, data: %02x\n", offset, data)); @@ -2593,7 +2593,7 @@ void nes_a9746_device::update_banks(uint8_t value) } } -void nes_a9746_device::write_h(offs_t offset, uint8_t data) +WRITE8_MEMBER(nes_a9746_device::write_h) { LOG_MMC(("unl_a9746 write_h, offset: %04x, data: %02x\n", offset, data)); @@ -2619,7 +2619,7 @@ void nes_a9746_device::write_h(offs_t offset, uint8_t data) break; default: - txrom_write(offset, data); + txrom_write(space, offset, data, mem_mask); break; } } |