From 36ebc5ef089f132ee6d5572a35318b89299cb7db Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 26 Mar 2022 00:50:26 +1100 Subject: init vars for coverity (drivers/l,m) --- src/mame/drivers/lastbank.cpp | 4 ++-- src/mame/drivers/lastfght.cpp | 30 +++++++++++++++--------------- src/mame/drivers/laz_aftrshok.cpp | 2 +- src/mame/drivers/lbeach.cpp | 4 ++-- src/mame/drivers/ldplayer.cpp | 4 ++-- src/mame/drivers/leapfrog_iquest.cpp | 10 +++++----- src/mame/drivers/leapster.cpp | 2 +- src/mame/drivers/lft_craft.cpp | 10 +++++----- src/mame/drivers/lft_phasor.cpp | 16 ++++++++-------- src/mame/drivers/limenko.cpp | 14 +++++++------- src/mame/drivers/littlerb.cpp | 4 ++-- src/mame/drivers/looping.cpp | 4 ++-- src/mame/drivers/m14.cpp | 6 +++--- src/mame/drivers/m20.cpp | 4 ++-- src/mame/drivers/m5.cpp | 4 ++-- src/mame/drivers/m63.cpp | 20 ++++++++++---------- src/mame/drivers/m79152pc.cpp | 16 ++++++++-------- src/mame/drivers/macpdm.cpp | 24 ++++++++++++------------ src/mame/drivers/macprtb.cpp | 16 ++++++++-------- src/mame/drivers/macpwrbk030.cpp | 24 ++++++++++++------------ src/mame/drivers/macquadra700.cpp | 34 +++++++++++++++++----------------- src/mame/drivers/macrossp.cpp | 12 ++++++------ src/mame/drivers/macs.cpp | 4 ++-- 23 files changed, 134 insertions(+), 134 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp index 6c011d25d0e..8216892c7a8 100644 --- a/src/mame/drivers/lastbank.cpp +++ b/src/mame/drivers/lastbank.cpp @@ -58,8 +58,8 @@ private: DECLARE_WRITE_LINE_MEMBER(screen_vblank); - uint8_t m_mux_data; - uint8_t m_sound_flags; + uint8_t m_mux_data = 0; + uint8_t m_sound_flags = 0; void output_w(offs_t offset, uint8_t data); diff --git a/src/mame/drivers/lastfght.cpp b/src/mame/drivers/lastfght.cpp index 21d5121568f..62fe7527fa3 100644 --- a/src/mame/drivers/lastfght.cpp +++ b/src/mame/drivers/lastfght.cpp @@ -122,27 +122,27 @@ private: /* video-related */ bitmap_ind16 m_bitmap[2]; - int m_dest; - int m_hi; - int m_sx; - int m_sx1; - int m_dsx; - int m_sy; - int m_sy1; - int m_dsy; - int m_sp; - int m_sr; - int m_x; - int m_y; - int m_w; - int m_h; + int m_dest = 0; + int m_hi = 0; + int m_sx = 0; + int m_sx1 = 0; + int m_dsx = 0; + int m_sy = 0; + int m_sy1 = 0; + int m_dsy = 0; + int m_sp = 0; + int m_sr = 0; + int m_x = 0; + int m_y = 0; + int m_w = 0; + int m_h = 0; #ifdef MAME_DEBUG unsigned m_base = 0; int m_view_roms = 0; #endif /* misc */ - uint16_t m_c00006; + uint16_t m_c00006 = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/drivers/laz_aftrshok.cpp b/src/mame/drivers/laz_aftrshok.cpp index 3e8bdb68ed9..5747a248c19 100644 --- a/src/mame/drivers/laz_aftrshok.cpp +++ b/src/mame/drivers/laz_aftrshok.cpp @@ -60,7 +60,7 @@ private: required_device m_maincpu; required_device m_oki; - u8 m_sound_data; + u8 m_sound_data = 0; }; static INPUT_PORTS_START( aftrshok ) diff --git a/src/mame/drivers/lbeach.cpp b/src/mame/drivers/lbeach.cpp index 94c44d0f39b..80c8194f001 100644 --- a/src/mame/drivers/lbeach.cpp +++ b/src/mame/drivers/lbeach.cpp @@ -90,8 +90,8 @@ private: int m_collision_fg_car = 0; bitmap_ind16 m_colmap_car; - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); diff --git a/src/mame/drivers/ldplayer.cpp b/src/mame/drivers/ldplayer.cpp index a8150b2d7cc..7bb45afaaa0 100644 --- a/src/mame/drivers/ldplayer.cpp +++ b/src/mame/drivers/ldplayer.cpp @@ -134,10 +134,10 @@ protected: required_device m_laserdisc; // internal state - emu_timer *m_bit_timer; + emu_timer *m_bit_timer = nullptr; uint32_t m_command_buffer_in; uint32_t m_command_buffer_out; - uint8_t m_command_buffer[10]; + uint8_t m_command_buffer[10]{}; }; diff --git a/src/mame/drivers/leapfrog_iquest.cpp b/src/mame/drivers/leapfrog_iquest.cpp index 069b97ac0f0..006b28901e5 100644 --- a/src/mame/drivers/leapfrog_iquest.cpp +++ b/src/mame/drivers/leapfrog_iquest.cpp @@ -83,7 +83,7 @@ private: uint8_t unk_ff80_r(); void unk_ff80_w(uint8_t data); - uint8_t m_ff80; + uint8_t m_ff80 = 0; uint8_t unk_fc00_r(); uint8_t unk_fc01_r(offs_t offset); @@ -97,20 +97,20 @@ private: uint8_t unk_fce5_r(); void unk_fce5_w(uint8_t data); - uint8_t m_fce5; + uint8_t m_fce5 = 0; uint8_t unk_ff00_01_r(offs_t offset); void unk_ff81_84_w(offs_t offset, uint8_t data); - uint8_t m_ff81_84[4]; + uint8_t m_ff81_84[4]{}; uint8_t unk_ff91_93_r(offs_t offset); void unk_ff91_93_w(offs_t offset, uint8_t data); - uint8_t m_ff91_93[3]; + uint8_t m_ff91_93[3]{}; uint8_t unk_ffa8_r(); void unk_ffa8_w(uint8_t data); - uint8_t m_ffa8; + uint8_t m_ffa8 = 0; void unk_ffa9_w(uint8_t data); diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp index 84e55b771fd..44070693795 100644 --- a/src/mame/drivers/leapster.cpp +++ b/src/mame/drivers/leapster.cpp @@ -230,7 +230,7 @@ private: required_device m_maincpu; required_device m_cart; - memory_region *m_cart_rom; + memory_region *m_cart_rom = nullptr; }; diff --git a/src/mame/drivers/lft_craft.cpp b/src/mame/drivers/lft_craft.cpp index 532100bd5ff..b4ae014bd4c 100644 --- a/src/mame/drivers/lft_craft.cpp +++ b/src/mame/drivers/lft_craft.cpp @@ -58,13 +58,13 @@ protected: required_device m_screen; required_device m_palette; - uint8_t m_gpio_b; - uint8_t m_gpio_c; + uint8_t m_gpio_b = 0; + uint8_t m_gpio_c = 0; - uint32_t m_last_cycles; - uint64_t m_frame_start_cycle; + uint32_t m_last_cycles = 0; + uint64_t m_frame_start_cycle = 0; - uint8_t m_latched_color; + uint8_t m_latched_color = 0; std::unique_ptr m_pixels; }; diff --git a/src/mame/drivers/lft_phasor.cpp b/src/mame/drivers/lft_phasor.cpp index 06455454016..46ed2a47b5e 100644 --- a/src/mame/drivers/lft_phasor.cpp +++ b/src/mame/drivers/lft_phasor.cpp @@ -50,16 +50,16 @@ protected: required_device m_screen; required_device m_palette; - uint8_t m_gpio_b; + uint8_t m_gpio_b = 0; - uint64_t m_last_cycles; - uint64_t m_frame_start_cycle; + uint64_t m_last_cycles = 0; + uint64_t m_frame_start_cycle = 0; - uint8_t m_latched_sample; - bool m_in_blanking; - uint64_t m_blanking_start; - uint32_t m_sample_x; - uint32_t m_sample_y; + uint8_t m_latched_sample = 0; + bool m_in_blanking = false; + uint64_t m_blanking_start = 0; + uint32_t m_sample_x = 0; + uint32_t m_sample_y = 0; std::unique_ptr m_samples; }; diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp index 8c554407f93..a9d3272cda2 100644 --- a/src/mame/drivers/limenko.cpp +++ b/src/mame/drivers/limenko.cpp @@ -90,14 +90,14 @@ private: memory_bank_creator m_qs1000_bank; - tilemap_t *m_bg_tilemap; - tilemap_t *m_md_tilemap; - tilemap_t *m_fg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_md_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; - int m_spriteram_bit; + int m_spriteram_bit = 0; bitmap_ind16 m_sprites_bitmap; bitmap_ind8 m_sprites_bitmap_pri; - int m_prev_sprites_count; + int m_prev_sprites_count = 0; void coincounter_w(u32 data); void bg_videoram_w(offs_t offset, u32 data, u32 mem_mask = ~0); @@ -135,8 +135,8 @@ private: uint8_t audiocpu_p3_r(); void audiocpu_p3_w(uint8_t data); - uint8_t m_audiocpu_p1; - uint8_t m_audiocpu_p3; + uint8_t m_audiocpu_p1 = 0; + uint8_t m_audiocpu_p3 = 0; }; /***************************************************************************************************** diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp index 565fdda27b3..f07765a6c0d 100644 --- a/src/mame/drivers/littlerb.cpp +++ b/src/mame/drivers/littlerb.cpp @@ -133,8 +133,8 @@ private: required_device m_ldac; required_device m_rdac; - uint8_t m_sound_index_l,m_sound_index_r; - uint16_t m_sound_pointer_l,m_sound_pointer_r; + uint8_t m_sound_index_l = 0, m_sound_index_r = 0; + uint16_t m_sound_pointer_l = 0, m_sound_pointer_r = 0; int m_soundframe; void l_sound_w(uint16_t data); diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp index 30f35a1f656..8a25d673b1d 100644 --- a/src/mame/drivers/looping.cpp +++ b/src/mame/drivers/looping.cpp @@ -151,10 +151,10 @@ private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; required_shared_ptr m_spriteram; - uint8_t m_cop_port_l; + uint8_t m_cop_port_l = 0; // tilemaps - tilemap_t * m_bg_tilemap; + tilemap_t * m_bg_tilemap = nullptr; required_device m_maincpu; required_device m_audiocpu; diff --git a/src/mame/drivers/m14.cpp b/src/mame/drivers/m14.cpp index 99bedecc74c..fdeba9f3886 100644 --- a/src/mame/drivers/m14.cpp +++ b/src/mame/drivers/m14.cpp @@ -108,12 +108,12 @@ private: void m14_map(address_map &map); /* video-related */ - tilemap_t *m_m14_tilemap; + tilemap_t *m_m14_tilemap = nullptr; /* input-related */ //uint8_t m_hop_mux; - uint8_t m_ballx,m_bally; - uint8_t m_paddlex; + uint8_t m_ballx = 0, m_bally = 0; + uint8_t m_paddlex = 0; }; diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp index 1f48d6b83dc..a4380062ef8 100644 --- a/src/mame/drivers/m20.cpp +++ b/src/mame/drivers/m20.cpp @@ -114,8 +114,8 @@ private: void m20_io(address_map &map); void m20_program_mem(address_map &map); - offs_t m_memsize; - uint8_t m_port21; + offs_t m_memsize = 0; + uint8_t m_port21 = 0; void install_memory(); static void floppy_formats(format_registration &fr); diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp index dbc63f5e0b8..c13aadd1f20 100644 --- a/src/mame/drivers/m5.cpp +++ b/src/mame/drivers/m5.cpp @@ -440,9 +440,9 @@ private: required_device m_wdfdc; required_device m_floppy0; optional_device m_floppy1; - floppy_image_device *m_floppy; + floppy_image_device *m_floppy = nullptr; - u8 m_rammap[16]; // memory map + u8 m_rammap[16]{}; // memory map }; diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp index 2039e1451ab..368032aec77 100644 --- a/src/mame/drivers/m63.cpp +++ b/src/mame/drivers/m63.cpp @@ -171,20 +171,20 @@ private: required_shared_ptr m_videoram; required_shared_ptr m_colorram; - uint8_t m_nmi_mask; + uint8_t m_nmi_mask = 0; /* video-related */ - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; - int m_pal_bank; - int m_fg_flag; - int m_sy_offset; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + int m_pal_bank = 0; + int m_fg_flag = 0; + int m_sy_offset = 0; /* sound-related */ - uint8_t m_sound_irq; - int m_sound_status; - int m_p1; - int m_p2; + uint8_t m_sound_irq = 0; + int m_sound_status = 0; + int m_p1 = 0; + int m_p2 = 0; std::unique_ptr m_samplebuf; /* devices */ diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp index 2f05839a30c..96342676af0 100644 --- a/src/mame/drivers/m79152pc.cpp +++ b/src/mame/drivers/m79152pc.cpp @@ -86,14 +86,14 @@ private: required_device m_screen; required_device m_beep; - u8 m_line_base; - u8 m_line_count; - bool m_latch_full; - u8 m_mcu_p2; - bool m_hsync; - - emu_timer *m_hsync_on_timer; - emu_timer *m_hsync_off_timer; + u8 m_line_base = 0; + u8 m_line_count = 0; + bool m_latch_full = false; + u8 m_mcu_p2 = 0; + bool m_hsync = false; + + emu_timer *m_hsync_on_timer = nullptr; + emu_timer *m_hsync_off_timer = nullptr; }; void m79152pc_state::beep_w(offs_t offset, uint8_t data) diff --git a/src/mame/drivers/macpdm.cpp b/src/mame/drivers/macpdm.cpp index 90c5a863f76..7bb07d0b8eb 100644 --- a/src/mame/drivers/macpdm.cpp +++ b/src/mame/drivers/macpdm.cpp @@ -55,25 +55,25 @@ private: uint8_t m_irq_control; - uint8_t m_via2_ier, m_via2_ifr, m_via2_sier, m_via2_sifr; + uint8_t m_via2_ier = 0, m_via2_ifr = 0, m_via2_sier = 0, m_via2_sifr = 0; - uint64_t m_dma_scsi_buffer; + uint64_t m_dma_scsi_buffer = 0; - uint32_t m_dma_badr, m_dma_floppy_adr; - uint16_t m_dma_floppy_byte_count, m_dma_floppy_offset; + uint32_t m_dma_badr = 0, m_dma_floppy_adr = 0; + uint16_t m_dma_floppy_byte_count = 0, m_dma_floppy_offset = 0; - uint16_t m_dma_berr_en, m_dma_berr_flag; + uint16_t m_dma_berr_en = 0, m_dma_berr_flag = 0; - uint32_t m_dma_scsi_a_base_adr, m_dma_scsi_b_base_adr; - uint32_t m_dma_scsi_a_cur_offset, m_dma_scsi_b_cur_offset; + uint32_t m_dma_scsi_a_base_adr = 0, m_dma_scsi_b_base_adr = 0; + uint32_t m_dma_scsi_a_cur_offset = 0, m_dma_scsi_b_cur_offset = 0; - uint8_t m_dma_scsi_a_ctrl, m_dma_scsi_b_ctrl, m_dma_floppy_ctrl; - uint8_t m_dma_scsi_buffer_byte_count; + uint8_t m_dma_scsi_a_ctrl = 0, m_dma_scsi_b_ctrl = 0, m_dma_floppy_ctrl = 0; + uint8_t m_dma_scsi_buffer_byte_count = 0; - uint8_t m_dma_scc_txa_ctrl, m_dma_scc_rxa_ctrl, m_dma_scc_txb_ctrl, m_dma_scc_rxb_ctrl; - uint8_t m_dma_enet_rx_ctrl, m_dma_enet_tx_ctrl; + uint8_t m_dma_scc_txa_ctrl = 0, m_dma_scc_rxa_ctrl = 0, m_dma_scc_txb_ctrl = 0, m_dma_scc_rxb_ctrl = 0; + uint8_t m_dma_enet_rx_ctrl = 0, m_dma_enet_tx_ctrl = 0; - bool m_dma_scsi_a_in_step, m_dma_floppy_in_step, m_floppy_drq; + bool m_dma_scsi_a_in_step = false, m_dma_floppy_in_step = false, m_floppy_drq = false; void pdm_map(address_map &map); diff --git a/src/mame/drivers/macprtb.cpp b/src/mame/drivers/macprtb.cpp index f8c87ae4b88..2d0103b179e 100644 --- a/src/mame/drivers/macprtb.cpp +++ b/src/mame/drivers/macprtb.cpp @@ -165,10 +165,10 @@ private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - u16 *m_ram_ptr, *m_rom_ptr; - u32 m_ram_mask, m_ram_size, m_rom_size; + u16 *m_ram_ptr = nullptr, *m_rom_ptr = nullptr; + u32 m_ram_mask = 0, m_ram_size = 0, m_rom_size = 0; - emu_timer *m_6015_timer; + emu_timer *m_6015_timer = nullptr; uint16_t mac_via_r(offs_t offset); void mac_via_w(offs_t offset, uint16_t data, uint16_t mem_mask); @@ -179,14 +179,14 @@ private: void field_interrupts(); DECLARE_WRITE_LINE_MEMBER(via_irq_w); TIMER_CALLBACK_MEMBER(mac_6015_tick); - int m_via_cycles, m_via_interrupt, m_scc_interrupt, m_asc_interrupt, m_last_taken_interrupt; - int m_ca1_data; + int m_via_cycles = 0, m_via_interrupt = 0, m_scc_interrupt = 0, m_asc_interrupt = 0, m_last_taken_interrupt = 0; + int m_ca1_data = 0; void phases_w(uint8_t phases); void devsel_w(uint8_t devsel); uint16_t rom_switch_r(offs_t offset); - bool m_overlay; + bool m_overlay = 0; uint16_t scsi_r(offs_t offset, uint16_t mem_mask); void scsi_w(offs_t offset, uint16_t data, uint16_t mem_mask); @@ -224,7 +224,7 @@ private: field_interrupts(); } - u8 m_pmu_to_via, m_pmu_from_via, m_pmu_ack, m_pmu_req; + u8 m_pmu_to_via = 0, m_pmu_from_via = 0, m_pmu_ack = 0, m_pmu_req = 0; u8 pmu_data_r() { return m_pmu_from_via; } void pmu_data_w(u8 data) { m_pmu_to_via = data; } u8 pmu_comms_r() { return (m_pmu_req<<7); } @@ -241,7 +241,7 @@ private: m_pmu_ack = BIT(data, 6); //printf("PMU ACK = %d\n", m_pmu_ack); } - int m_adb_line; + int m_adb_line = 0; void set_adb_line(int state) { m_adb_line = state; } u8 pmu_adb_r() { return (m_adb_line<<1); } void pmu_adb_w(u8 data) { m_macadb->adb_linechange_w((data & 1) ^ 1); } diff --git a/src/mame/drivers/macpwrbk030.cpp b/src/mame/drivers/macpwrbk030.cpp index 13f7f91cbcd..685dfe103e5 100644 --- a/src/mame/drivers/macpwrbk030.cpp +++ b/src/mame/drivers/macpwrbk030.cpp @@ -184,13 +184,13 @@ private: u32 screen_update_macpb160(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_macpbwd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - u32 *m_ram_ptr, *m_rom_ptr; - u32 m_ram_mask, m_ram_size, m_rom_size; + u32 *m_ram_ptr = nullptr, *m_rom_ptr = nullptr; + u32 m_ram_mask = 0, m_ram_size = 0, m_rom_size = 0; - emu_timer *m_6015_timer; + emu_timer *m_6015_timer = nullptr; WRITE_LINE_MEMBER(adb_irq_w) { m_adb_irq_pending = state; } - int m_adb_irq_pending; + int m_adb_irq_pending = 0; u16 mac_via_r(offs_t offset); void mac_via_w(offs_t offset, u16 data, u16 mem_mask); @@ -210,11 +210,11 @@ private: DECLARE_WRITE_LINE_MEMBER(via2_irq_w); TIMER_CALLBACK_MEMBER(mac_6015_tick); WRITE_LINE_MEMBER(via_cb2_w) { m_macadb->adb_data_w(state); } - int m_via_interrupt, m_via2_interrupt, m_scc_interrupt, m_asc_interrupt, m_last_taken_interrupt; - int m_irq_count, m_ca1_data, m_ca2_data, m_via2_ca1_hack; + int m_via_interrupt = 0, m_via2_interrupt = 0, m_scc_interrupt = 0, m_asc_interrupt = 0, m_last_taken_interrupt = 0; + int m_irq_count = 0, m_ca1_data = 0, m_ca2_data = 0, m_via2_ca1_hack = 0; u32 rom_switch_r(offs_t offset); - bool m_overlay; + bool m_overlay = false; u16 scsi_r(offs_t offset, u16 mem_mask); void scsi_w(offs_t offset, u16 data, u16 mem_mask); @@ -229,8 +229,8 @@ private: } void mac_scc_2_w(offs_t offset, u16 data) { m_scc->dc_ab_w(offset, data >> 8); } - floppy_image_device *m_cur_floppy; - int m_hdsel; + floppy_image_device *m_cur_floppy = nullptr; + int m_hdsel = 0; void phases_w(uint8_t phases); void devsel_w(uint8_t devsel); @@ -271,9 +271,9 @@ private: uint32_t macwd_r(offs_t offset, uint32_t mem_mask = ~0); void macwd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - u32 m_colors[3], m_count, m_clutoffs, m_wd_palette[256]; + u32 m_colors[3]{}, m_count = 0, m_clutoffs = 0, m_wd_palette[256]{}; - u8 m_pmu_via_bus, m_pmu_ack, m_pmu_req; + u8 m_pmu_via_bus = 0, m_pmu_ack = 0, m_pmu_req = 0; u8 pmu_data_r() { return m_pmu_via_bus; } void pmu_data_w(u8 data) { m_pmu_via_bus = data; } u8 pmu_comms_r() { return (m_pmu_req<<7); } @@ -282,7 +282,7 @@ private: m_via1->write_cb1(BIT(data, 5)); m_pmu_ack = BIT(data, 6); } - int m_adb_line; + int m_adb_line = 0; void set_adb_line(int state) { m_adb_line = state; } u8 pmu_adb_r() { return (m_adb_line<<1); } void pmu_adb_w(u8 data) { m_macadb->adb_linechange_w((data & 1) ^ 1); } diff --git a/src/mame/drivers/macquadra700.cpp b/src/mame/drivers/macquadra700.cpp index 566ab3a70a0..f718cba94ff 100644 --- a/src/mame/drivers/macquadra700.cpp +++ b/src/mame/drivers/macquadra700.cpp @@ -116,18 +116,18 @@ private: TIMER_CALLBACK_MEMBER(dafb_vbl_tick); TIMER_CALLBACK_MEMBER(dafb_cursor_tick); - u32 *m_ram_ptr, *m_rom_ptr; - u32 m_ram_mask, m_ram_size, m_rom_size; + u32 *m_ram_ptr = nullptr, *m_rom_ptr = nullptr; + u32 m_ram_mask = 0, m_ram_size = 0, m_rom_size = 0; - emu_timer *m_vbl_timer, *m_cursor_timer, *m_6015_timer; + emu_timer *m_vbl_timer = nullptr, *m_cursor_timer = nullptr, *m_6015_timer = nullptr; - uint16_t m_cursor_line; - uint16_t m_dafb_int_status; - int m_dafb_scsi1_drq, m_dafb_scsi2_drq; - uint8_t m_dafb_mode; - uint32_t m_dafb_base, m_dafb_stride; - uint32_t m_dafb_colors[3], m_dafb_count, m_dafb_clutoffs, m_dafb_montype, m_dafb_vbltime; - uint32_t m_dafb_palette[256]; + uint16_t m_cursor_line = 0; + uint16_t m_dafb_int_status = 0; + int m_dafb_scsi1_drq = 0, m_dafb_scsi2_drq = 0; + uint8_t m_dafb_mode = 0; + uint32_t m_dafb_base = 0, m_dafb_stride = 0; + uint32_t m_dafb_colors[3]{}, m_dafb_count = 0, m_dafb_clutoffs = 0, m_dafb_montype = 0, m_dafb_vbltime = 0; + uint32_t m_dafb_palette[256]{}; DECLARE_WRITE_LINE_MEMBER(nubus_irq_9_w); DECLARE_WRITE_LINE_MEMBER(nubus_irq_a_w); @@ -136,18 +136,18 @@ private: DECLARE_WRITE_LINE_MEMBER(nubus_irq_d_w); DECLARE_WRITE_LINE_MEMBER(nubus_irq_e_w); void nubus_slot_interrupt(uint8_t slot, uint32_t state); - int m_via2_ca1_hack, m_nubus_irq_state; + int m_via2_ca1_hack = 0, m_nubus_irq_state = 0; WRITE_LINE_MEMBER(adb_irq_w) { m_adb_irq_pending = state; } - int m_adb_irq_pending; + int m_adb_irq_pending = 0; DECLARE_WRITE_LINE_MEMBER(irq_539x_1_w); DECLARE_WRITE_LINE_MEMBER(irq_539x_2_w); DECLARE_WRITE_LINE_MEMBER(drq_539x_1_w); DECLARE_WRITE_LINE_MEMBER(drq_539x_2_w); - floppy_image_device *m_cur_floppy; - int m_hdsel; + floppy_image_device *m_cur_floppy = nullptr; + int m_hdsel = 0; uint16_t mac_via_r(offs_t offset); void mac_via_w(offs_t offset, uint16_t data, uint16_t mem_mask); @@ -167,11 +167,11 @@ private: DECLARE_WRITE_LINE_MEMBER(mac_via2_irq); TIMER_CALLBACK_MEMBER(mac_6015_tick); WRITE_LINE_MEMBER(via_cb2_w) { m_macadb->adb_data_w(state); } - int m_via_interrupt, m_via2_interrupt, m_scc_interrupt, m_last_taken_interrupt; - int m_irq_count, m_ca2_data; + int m_via_interrupt = 0, m_via2_interrupt = 0, m_scc_interrupt = 0, m_last_taken_interrupt = 0; + int m_irq_count = 0, m_ca2_data = 0; uint32_t rom_switch_r(offs_t offset); - bool m_overlay; + bool m_overlay = 0; uint16_t mac_scc_r(offs_t offset) { diff --git a/src/mame/drivers/macrossp.cpp b/src/mame/drivers/macrossp.cpp index 4e804987c6c..5ea3e987ed3 100644 --- a/src/mame/drivers/macrossp.cpp +++ b/src/mame/drivers/macrossp.cpp @@ -360,14 +360,14 @@ private: std::unique_ptr m_spriteram_old2; /* video-related */ - tilemap_t *m_scra_tilemap; - tilemap_t *m_scrb_tilemap; - tilemap_t *m_scrc_tilemap; - tilemap_t *m_text_tilemap; + tilemap_t *m_scra_tilemap = nullptr; + tilemap_t *m_scrb_tilemap = nullptr; + tilemap_t *m_scrc_tilemap = nullptr; + tilemap_t *m_text_tilemap = nullptr; /* misc */ - int m_sndpending; - int m_snd_toggle; + int m_sndpending = 0; + int m_snd_toggle = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp index d4e10288d9c..c5e43d72b12 100644 --- a/src/mame/drivers/macs.cpp +++ b/src/mame/drivers/macs.cpp @@ -90,8 +90,8 @@ protected: void machine_start() override; private: - uint8_t m_mux_data; - uint8_t m_rev; + uint8_t m_mux_data = 0; + uint8_t m_rev = 0; uint8_t m_cart_bank; std::unique_ptr m_ram1; required_shared_ptr m_ram2; -- cgit v1.2.3