diff options
-rw-r--r-- | src/devices/bus/nes/mmc3_clones.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/spectrum/neogs.cpp | 4 | ||||
-rw-r--r-- | src/devices/cpu/avr8/avr8.h | 8 | ||||
-rw-r--r-- | src/devices/cpu/i386/i386segs.hxx | 2 | ||||
-rw-r--r-- | src/devices/machine/arm_iomd.cpp | 2 | ||||
-rw-r--r-- | src/devices/machine/psion_asic5.cpp | 2 | ||||
-rw-r--r-- | src/frontend/mame/ui/prscntrl.cpp | 4 | ||||
-rw-r--r-- | src/lib/netlist/tools/nl_convert.cpp | 2 | ||||
-rw-r--r-- | src/mame/ibm/ibm5100.cpp | 2 | ||||
-rw-r--r-- | src/mame/igs/igs_m027.cpp | 1 | ||||
-rw-r--r-- | src/mame/namco/namcos22_v.cpp | 2 | ||||
-rw-r--r-- | src/mame/namco/namcos23.cpp | 2 | ||||
-rw-r--r-- | src/mame/nec/pc88va_v.cpp | 2 | ||||
-rw-r--r-- | src/mame/sinclair/atm.cpp | 4 | ||||
-rw-r--r-- | src/mame/sinclair/specnext.cpp | 3 | ||||
-rw-r--r-- | src/mame/sinclair/specnext_tiles.cpp | 2 | ||||
-rw-r--r-- | src/mame/sinclair/sprinter.cpp | 10 | ||||
-rw-r--r-- | src/mame/ussr/juku.cpp | 4 |
18 files changed, 34 insertions, 28 deletions
diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp index 28fc05e8ad8..4c0da2b4fa2 100644 --- a/src/devices/bus/nes/mmc3_clones.cpp +++ b/src/devices/bus/nes/mmc3_clones.cpp @@ -2934,11 +2934,11 @@ void nes_bmc_f600_device::write_l(offs_t offset, u8 data) m_reg = offset; m_prg_base = (m_reg & 0x38) << 1; - m_prg_mask = 0x1f >> BIT(m_reg, 5); + m_prg_mask = 0x1f >> (BIT(m_reg, 5) ? 1 : 0); set_prg(m_prg_base, m_prg_mask); m_chr_base = (m_reg & 0x07) << 7; - m_chr_mask = 0xff >> !BIT(m_reg, 2); + m_chr_mask = 0xff >> (BIT(m_reg, 2) ? 0 : 1); set_chr(m_chr_source, m_chr_base, m_chr_mask); } } @@ -3332,7 +3332,7 @@ void nes_bmc_810305c_device::write_h(offs_t offset, u8 data) m_outer = BIT(offset, 13, 2); m_prg_base = m_outer << 5; - m_prg_mask = 0x1f >> (m_outer == 2); + m_prg_mask = 0x1f >> ((m_outer == 2) ? 1 : 0); set_prg(m_prg_base, m_prg_mask); m_chr_base = m_outer << 7; diff --git a/src/devices/bus/spectrum/neogs.cpp b/src/devices/bus/spectrum/neogs.cpp index de36a3c5fdf..f1733f83947 100644 --- a/src/devices/bus/spectrum/neogs.cpp +++ b/src/devices/bus/spectrum/neogs.cpp @@ -310,7 +310,9 @@ void neogs_device::dac_flush() right += out; if (BIT(m_gscfg0, 2) && BIT(m_gscfg0, 6)) // PAN4CH - ; + { + // TODO + } } m_dac[0]->data_w(left); m_dac[1]->data_w(right); diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h index 9dc3d09035a..fbf34b5c1d9 100644 --- a/src/devices/cpu/avr8/avr8.h +++ b/src/devices/cpu/avr8/avr8.h @@ -938,8 +938,8 @@ protected: void tccr1a_w(uint8_t data); void tccr1b_w(uint8_t data); void tccr1c_w(uint8_t data); - void tcnt1l_w(uint8_t data); - void tcnt1h_w(uint8_t data); + //void tcnt1l_w(uint8_t data); + //void tcnt1h_w(uint8_t data); void icr1l_w(uint8_t data); void icr1h_w(uint8_t data); void ocr1al_w(uint8_t data); @@ -1045,8 +1045,8 @@ protected: void tccr3a_w(uint8_t data); void tccr3b_w(uint8_t data); void tccr3c_w(uint8_t data); - void tcnt3l_w(uint8_t data); - void tcnt3h_w(uint8_t data); + //void tcnt3l_w(uint8_t data); + //void tcnt3h_w(uint8_t data); void icr3l_w(uint8_t data); void icr3h_w(uint8_t data); void ocr3al_w(uint8_t data); diff --git a/src/devices/cpu/i386/i386segs.hxx b/src/devices/cpu/i386/i386segs.hxx index ba121ebd0de..6771f2bef5f 100644 --- a/src/devices/cpu/i386/i386segs.hxx +++ b/src/devices/cpu/i386/i386segs.hxx @@ -794,7 +794,7 @@ void i386_device::i386_trap_with_error(int irq, int irq_gate, int trap_level, ui PUSH16(error); } } - catch(uint64_t e) + catch([[maybe_unused]] uint64_t e) { trap_level++; if(trap_level == 1) diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp index 5551d590f9c..8053f697949 100644 --- a/src/devices/machine/arm_iomd.cpp +++ b/src/devices/machine/arm_iomd.cpp @@ -469,7 +469,7 @@ template <unsigned Which> void arm_iomd_device::irqmsk_w(u32 data) // master clock control inline void arm7500fe_iomd_device::refresh_host_cpu_clocks() { - m_host_cpu->set_unscaled_clock(this->clock() >> (m_cpuclk_divider == false)); + m_host_cpu->set_unscaled_clock(this->clock() >> (m_cpuclk_divider ? 0 : 1)); } u32 arm7500fe_iomd_device::clkctl_r() diff --git a/src/devices/machine/psion_asic5.cpp b/src/devices/machine/psion_asic5.cpp index 49a11a621fe..34863197265 100644 --- a/src/devices/machine/psion_asic5.cpp +++ b/src/devices/machine/psion_asic5.cpp @@ -110,7 +110,7 @@ void psion_asic5_device::device_reset() m_int_mask = 0x00; m_int_status = 0x02; // UART transmitter empty m_control = 0x00; - m_bdr = 0xffff; + m_bdr = -1; receive_register_reset(); transmit_register_reset(); diff --git a/src/frontend/mame/ui/prscntrl.cpp b/src/frontend/mame/ui/prscntrl.cpp index aab071cfc0e..1d5d2fb4f81 100644 --- a/src/frontend/mame/ui/prscntrl.cpp +++ b/src/frontend/mame/ui/prscntrl.cpp @@ -46,9 +46,9 @@ menu_control_device_preset::~menu_control_device_preset() void menu_control_device_preset::populate() { auto presets = m_image.preset_images_list(); - for(int i = 0; i != int(presets.size()); i++) + for(uintptr_t i = 0; i != uintptr_t(presets.size()); i++) item_append(presets[i], 0, reinterpret_cast<void *>(i)); - set_selection(reinterpret_cast<void *>(m_image.current_preset_image_id())); + set_selection(reinterpret_cast<void *>(uintptr_t(m_image.current_preset_image_id()))); } diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp index 8fe3b19eca8..2859034c166 100644 --- a/src/lib/netlist/tools/nl_convert.cpp +++ b/src/lib/netlist/tools/nl_convert.cpp @@ -340,7 +340,7 @@ void nl_convert_spice_t::convert_block(const str_list &contents) { process_line(line); } - catch (const plib::pexception &e) + catch ([[maybe_unused]] const plib::pexception &e) { fprintf(stderr, "Error on line: <%d>\n", linenumber); throw; diff --git a/src/mame/ibm/ibm5100.cpp b/src/mame/ibm/ibm5100.cpp index 78575aad2a2..e6de0166083 100644 --- a/src/mame/ibm/ibm5100.cpp +++ b/src/mame/ibm/ibm5100.cpp @@ -536,7 +536,7 @@ u8 ibm5100_state::nxr_r() * giving 64KiB. Even and odd bytes are selected by a flip-flop * which is toggled with each read. */ - data = BIT(m_nxr[rs][m_nxr_address >> basic], (m_nxr_ff & NXR_B0) ? 0 : 8, 8); + data = BIT(m_nxr[rs][m_nxr_address >> (basic ? 1 : 0)], (m_nxr_ff & NXR_B0) ? 0 : 8, 8); } // always increment address for BASIC, only on odd bytes for APL diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 354012f5304..7501eb420ad 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -232,7 +232,6 @@ private: u32 slqz3_gpio_r(); u32 lhdmg_gpio_r(); u32 lhzb3106c5m_gpio_r(); - void unk2_w(u32 data); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); diff --git a/src/mame/namco/namcos22_v.cpp b/src/mame/namco/namcos22_v.cpp index d945346af4f..9d25d8246d4 100644 --- a/src/mame/namco/namcos22_v.cpp +++ b/src/mame/namco/namcos22_v.cpp @@ -1751,7 +1751,7 @@ void namcos22_state::draw_sprites() bool y_lowres = BIT(~m_spriteram[0], 18); const int deltax = (m_spriteram[1] & 0xffff) + (m_spriteram[2] & 0xffff) + 0x2d; - const int deltay = (m_spriteram[3] >> 16) + (0x2a >> y_lowres); + const int deltay = (m_spriteram[3] >> 16) + (0x2a >> (y_lowres ? 1 : 0)); const int base = m_spriteram[0] & 0xffff; // alpines/alpinr2b int num_sprites = ((m_spriteram[1] >> 16) - base) + 1; diff --git a/src/mame/namco/namcos23.cpp b/src/mame/namco/namcos23.cpp index e68f2a65494..dcba321cce7 100644 --- a/src/mame/namco/namcos23.cpp +++ b/src/mame/namco/namcos23.cpp @@ -4081,7 +4081,7 @@ void gorgon_state::render_run(screen_device &screen, bitmap_rgb32 &bitmap) { bool y_lowres = !BIT(m_c435.spritedata[0], 2); s16 deltax = (s16)((s16)m_c435.spritedata[6] + (s16)m_c435.spritedata[10] + 0x50); - s16 deltay = (s16)((s16)m_c435.spritedata[12] + (0x2a >> y_lowres)); + s16 deltay = (s16)((s16)m_c435.spritedata[12] + (0x2a >> (y_lowres ? 1 : 0))); u16 base = m_c435.spritedata[2]; u16 sprite_count = (m_c435.spritedata[4] - base) + 1; for (int i = 0; i < sprite_count; i++) diff --git a/src/mame/nec/pc88va_v.cpp b/src/mame/nec/pc88va_v.cpp index 30f4ce5fea4..d9d66b5cd9d 100644 --- a/src/mame/nec/pc88va_v.cpp +++ b/src/mame/nec/pc88va_v.cpp @@ -680,7 +680,7 @@ void pc88va_state::draw_text(bitmap_rgb32 &bitmap, const rectangle &cliprect) void pc88va_state::draw_graphic_layer(bitmap_rgb32 &bitmap, const rectangle &cliprect, u8 which) { // disable graphic B if screen 0 only setting is enabled - if (which > m_ymmd) + if (which && !m_ymmd) return; // ditto for 5bpp color mode diff --git a/src/mame/sinclair/atm.cpp b/src/mame/sinclair/atm.cpp index 5df94a09d1e..9d5452d5041 100644 --- a/src/mame/sinclair/atm.cpp +++ b/src/mame/sinclair/atm.cpp @@ -183,10 +183,10 @@ void atm_state::atm_update_video_mode() { bool zx_scale = m_rg & 1; bool double_width = BIT(m_rg, 1) && !zx_scale; - u8 border_x = (40 - (32 * !zx_scale)) << double_width; + u8 border_x = (40 - (32 * !zx_scale)) << (double_width ? 1 : 0); u8 border_y = (40 - (4 * !zx_scale)); rectangle scr = get_screen_area(); - m_screen->configure(448 << double_width, m_screen->height(), {scr.left() - border_x, scr.right() + border_x, scr.top() - border_y, scr.bottom() + border_y}, m_screen->frame_period().as_attoseconds()); + m_screen->configure(448 << (double_width ? 1 : 0), m_screen->height(), {scr.left() - border_x, scr.right() + border_x, scr.top() - border_y, scr.bottom() + border_y}, m_screen->frame_period().as_attoseconds()); LOGVIDEO("Video mode: %d\n", m_rg); //spectrum_palette(m_palette); diff --git a/src/mame/sinclair/specnext.cpp b/src/mame/sinclair/specnext.cpp index 19175e98bcd..c34a1628494 100644 --- a/src/mame/sinclair/specnext.cpp +++ b/src/mame/sinclair/specnext.cpp @@ -2609,7 +2609,8 @@ void specnext_state::map_io(address_map &map) return /*m_nr_d8_io_trap_fdc_en ? ... :*/ 0x00; }), NAME([this](u8 data) { if (m_nr_d8_io_trap_fdc_en) - ; + { + } })); diff --git a/src/mame/sinclair/specnext_tiles.cpp b/src/mame/sinclair/specnext_tiles.cpp index 9aced473d37..5cf55b0c0f4 100644 --- a/src/mame/sinclair/specnext_tiles.cpp +++ b/src/mame/sinclair/specnext_tiles.cpp @@ -65,7 +65,7 @@ specnext_tiles_device &specnext_tiles_device::set_palette(const char *tag, u16 b TILE_GET_INFO_MEMBER(specnext_tiles_device::get_tile_info) { const bool attr_in_map = BIT(~m_control, 5); - const u8 *data = &m_tiles_info[tile_index << attr_in_map]; + const u8 *data = &m_tiles_info[tile_index << (attr_in_map ? 1 : 0)]; u8 attr = attr_in_map ? *(data + attr_in_map) : m_default_flags; u16 code = *data; diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index 733d1c62177..63ed92f6234 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -424,7 +424,7 @@ void sprinter_state::draw_tile(u8* mode, bitmap_ind16 &bitmap, const rectangle & { for (auto dx = cliprect.left(); dx <= cliprect.right(); dx++) { - const u8 color = m_vram[(y + (((dy - m_hold.second) & 7) >> lowres)) * 1024 + x + (((dx - m_hold.first) & 15) >> (1 + lowres))]; + const u8 color = m_vram[(y + (((dy - m_hold.second) & 7) >> (lowres ? 1 : 0))) * 1024 + x + (((dx - m_hold.first) & 15) >> (1 + lowres))]; *pix++ = pal + (BIT(mode[0], 5) ? color : (((dx - m_hold.first) & 1) ? (color & 0x0f) : (color >> 4))); } pix += SPRINT_WIDTH - cliprect.width(); @@ -716,9 +716,13 @@ void sprinter_state::dcp_w(offs_t offset, u8 data) case 0x1b: if (data & 0x80) - ; // RESET + { + // RESET + } if (data & 0x40) - ; // AEN + { + // AEN + } m_isa_addr_ext = data & 0x3f; break; diff --git a/src/mame/ussr/juku.cpp b/src/mame/ussr/juku.cpp index 40737fd3e34..31f24760ac3 100644 --- a/src/mame/ussr/juku.cpp +++ b/src/mame/ussr/juku.cpp @@ -579,7 +579,7 @@ void juku_state::fdc_data_w(uint8_t data) void juku_state::speaker_w(int state) { - m_speaker->level_w((m_beep_state = state) << m_beep_level); + m_speaker->level_w((m_beep_state = state) << (m_beep_level ? 1 : 0)); } @@ -602,7 +602,7 @@ void juku_state::pio0_porta_w(uint8_t data) m_contrdat = (col_data & 0b1100'0000) >> 6; // decoded by 2x К555ИД7 if (m_beep_level != BIT(data, 4)) - m_speaker->level_w(m_beep_state << (m_beep_level = BIT(data, 4))); + m_speaker->level_w(m_beep_state << ((m_beep_level = BIT(data, 4)) ? 1 : 0)); m_key_encoder->update(); } |