diff --git a/src/mess/machine/nes_jy.c b/src/mess/machine/nes_jy.c index 3568c650559..7f415063498 100644 --- a/src/mess/machine/nes_jy.c +++ b/src/mess/machine/nes_jy.c @@ -271,11 +271,11 @@ READ8_MEMBER(nes_jy_typea_device::read_l) } if (offset >= 0x1800) { - if ((offset & 3) & 3 == 0) + if ((offset & 3) == 0) return (m_mul[0] * m_mul[1]) & 0xff; - if ((offset & 3) & 3 == 1) + if ((offset & 3) == 1) return ((m_mul[0] * m_mul[1]) >> 8) & 0xff; - if ((offset & 3) & 3 == 3) + if ((offset & 3) == 3) return m_latch; } return ((offset + 0x4000) & 0xff00) >> 8; // open bus @@ -290,9 +290,9 @@ WRITE8_MEMBER(nes_jy_typea_device::write_l) { if ((offset & 3) == 0) m_mul[0] = data; - if ((offset & 3) & 3 == 1) + if ((offset & 3) == 1) m_mul[1] = data; - if ((offset & 3) & 3 == 3) + if ((offset & 3) == 3) m_latch = data; } } diff --git a/src/mess/machine/nes_mmc3_clones.c b/src/mess/machine/nes_mmc3_clones.c index 705f559035c..8456978ec9b 100644 --- a/src/mess/machine/nes_mmc3_clones.c +++ b/src/mess/machine/nes_mmc3_clones.c @@ -2496,7 +2496,7 @@ WRITE8_MEMBER(nes_bmc_411120c_device::write_m) void nes_bmc_830118c_device::prg_cb(int start, int bank) { - if (m_reg & 0x0c != 0x0c) + if ((m_reg & 0x0c) != 0x0c) prg8_x(start, (bank & 0x0f) | ((m_reg & 0x0c) << 2)); else { diff --git a/src/mess/machine/nes_pirate.c b/src/mess/machine/nes_pirate.c index 64e7710d3ec..359a0df56e3 100644 --- a/src/mess/machine/nes_pirate.c +++ b/src/mess/machine/nes_pirate.c @@ -1064,7 +1064,7 @@ WRITE8_MEMBER(nes_whero_device::write_h) case 0x1002: case 0x1080: - if (m_reg != data & 2) + if (m_reg != (data & 2)) { m_reg = data & 2; // swap banks! @@ -1126,7 +1126,7 @@ WRITE8_MEMBER(nes_43272_device::write_h) { LOG_MMC(("unl_43272 write_h, offset: %04x, data: %02x\n", offset, data)); - if (m_latch & 0x81 == 0x81) + if ((m_latch & 0x81) == 0x81) prg32((m_latch & 0x38) >> 3); m_latch = offset & 0xffff;