From 35acc369c00bda703990a5849e98bc0c45001b86 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 25 Mar 2022 03:49:02 +1100 Subject: init vars for coverity (drivers/t,u) --- src/mame/drivers/tabe22.cpp | 2 +- src/mame/drivers/taitotz.cpp | 96 ++++++++++++++++++++--------------------- src/mame/drivers/talkingbb.cpp | 4 +- src/mame/drivers/talkingfb.cpp | 4 +- src/mame/drivers/tandy1t.cpp | 20 ++++----- src/mame/drivers/tapatune.cpp | 24 +++++------ src/mame/drivers/tasman.cpp | 2 +- src/mame/drivers/tattack.cpp | 12 +++--- src/mame/drivers/tecnbras.cpp | 4 +- src/mame/drivers/tekigw.cpp | 18 ++++---- src/mame/drivers/terak.cpp | 4 +- src/mame/drivers/tgtpanic.cpp | 2 +- src/mame/drivers/thayers.cpp | 48 ++++++++++----------- src/mame/drivers/ti990_4.cpp | 8 ++-- src/mame/drivers/ti99_8.cpp | 8 ++-- src/mame/drivers/tickee.cpp | 10 ++--- src/mame/drivers/tim011.cpp | 2 +- src/mame/drivers/tispeak.cpp | 6 +-- src/mame/drivers/tmaster.cpp | 4 +- src/mame/drivers/toki_ms.cpp | 8 ++-- src/mame/drivers/tomcat.cpp | 6 +-- src/mame/drivers/tomy_princ.cpp | 2 +- src/mame/drivers/toratora.cpp | 4 +- src/mame/drivers/tourvis.cpp | 2 +- src/mame/drivers/toypop.cpp | 6 +-- src/mame/drivers/tricep.cpp | 2 +- src/mame/drivers/trkfldch.cpp | 18 ++++---- src/mame/drivers/trvmadns.cpp | 2 +- src/mame/drivers/ts802.cpp | 6 +-- src/mame/drivers/ts816.cpp | 8 ++-- src/mame/drivers/tsispch.cpp | 2 +- src/mame/drivers/ttchamp.cpp | 28 ++++++------ src/mame/drivers/tugboat.cpp | 12 +++--- src/mame/drivers/tv950.cpp | 10 ++--- src/mame/drivers/tv990.cpp | 4 +- src/mame/drivers/tvc.cpp | 18 ++++---- src/mame/drivers/tvg01.cpp | 4 +- src/mame/drivers/twinkle.cpp | 36 ++++++++-------- src/mame/drivers/twins.cpp | 8 ++-- src/mame/drivers/uapce.cpp | 2 +- src/mame/drivers/umipoker.cpp | 4 +- src/mame/drivers/unixpc.cpp | 12 +++--- src/mame/drivers/upscope.cpp | 4 +- src/mame/drivers/uzebox.cpp | 14 +++--- 44 files changed, 250 insertions(+), 250 deletions(-) diff --git a/src/mame/drivers/tabe22.cpp b/src/mame/drivers/tabe22.cpp index cccb6f79506..3f306beea4e 100644 --- a/src/mame/drivers/tabe22.cpp +++ b/src/mame/drivers/tabe22.cpp @@ -90,7 +90,7 @@ private: SCN2674_DRAW_CHARACTER_MEMBER(draw_character); void palette(palette_device &palette) const; - bool m_screen_light; + bool m_screen_light = false; }; diff --git a/src/mame/drivers/taitotz.cpp b/src/mame/drivers/taitotz.cpp index addc57a0e60..6e0f775d317 100644 --- a/src/mame/drivers/taitotz.cpp +++ b/src/mame/drivers/taitotz.cpp @@ -596,28 +596,28 @@ private: std::unique_ptr m_screen_ram; std::unique_ptr m_frame_ram; std::unique_ptr m_texture_ram; - uint32_t m_video_unk_reg[0x10]; + uint32_t m_video_unk_reg[0x10]{}; - uint32_t m_video_fifo_ptr; - uint32_t m_video_ram_ptr; - uint32_t m_video_reg; - uint32_t m_scr_base; + uint32_t m_video_fifo_ptr = 0; + uint32_t m_video_ram_ptr = 0; + uint32_t m_video_reg = 0; + uint32_t m_scr_base = 0; - //uint64_t m_video_fifo_mem[4]; + //uint64_t m_video_fifo_mem[4]{}; - uint16_t m_io_share_ram[0x2000]; + uint16_t m_io_share_ram[0x2000]{}; - const char *m_hdd_serial_number; + const char *m_hdd_serial_number = nullptr; uint8_t tlcs_common_r(offs_t offset); void tlcs_common_w(offs_t offset, uint8_t data); uint8_t tlcs_rtc_r(offs_t offset); void tlcs_rtc_w(offs_t offset, uint8_t data); - uint8_t m_rtcdata[8]; + uint8_t m_rtcdata[8]{}; - uint32_t m_reg105; + uint32_t m_reg105 = 0; std::unique_ptr m_renderer; @@ -692,47 +692,47 @@ private: taitotz_state &m_state; std::unique_ptr m_fb; std::unique_ptr m_zbuffer; - uint32_t *m_texture; - uint32_t *m_screen_ram; + uint32_t *m_texture = nullptr; + uint32_t *m_screen_ram = nullptr; rectangle m_cliprect; - PLANE m_clip_plane[6]; - float m_matrix[4][3]; - - float m_diffuse_intensity; - float m_ambient_intensity; - float m_specular_intensity; - float m_specular_power; - - int m_ambient_r; - int m_ambient_g; - int m_ambient_b; - int m_diffuse_r; - int m_diffuse_g; - int m_diffuse_b; - int m_specular_r; - int m_specular_g; - int m_specular_b; - - float m_vp_center_x; - float m_vp_center_y; - float m_vp_focus; - float m_vp_x; - float m_vp_y; - float m_vp_mul; - - uint32_t m_reg_100; - uint32_t m_reg_101; - uint32_t m_reg_102; - - uint32_t m_reg_10000100; - uint32_t m_reg_10000101; - - uint32_t m_tnl_fifo[64]; - uint32_t m_direct_fifo[64]; - int m_tnl_fifo_ptr; - int m_direct_fifo_ptr; + PLANE m_clip_plane[6]{}; + float m_matrix[4][3]{}; + + float m_diffuse_intensity = 0; + float m_ambient_intensity = 0; + float m_specular_intensity = 0; + float m_specular_power = 0; + + int m_ambient_r = 0; + int m_ambient_g = 0; + int m_ambient_b = 0; + int m_diffuse_r = 0; + int m_diffuse_g = 0; + int m_diffuse_b = 0; + int m_specular_r = 0; + int m_specular_g = 0; + int m_specular_b = 0; + + float m_vp_center_x = 0; + float m_vp_center_y = 0; + float m_vp_focus = 0; + float m_vp_x = 0; + float m_vp_y = 0; + float m_vp_mul = 0; + + uint32_t m_reg_100 = 0; + uint32_t m_reg_101 = 0; + uint32_t m_reg_102 = 0; + + uint32_t m_reg_10000100 = 0; + uint32_t m_reg_10000101 = 0; + + uint32_t m_tnl_fifo[64]{}; + uint32_t m_direct_fifo[64]{}; + int m_tnl_fifo_ptr = 0; + int m_direct_fifo_ptr = 0; }; diff --git a/src/mame/drivers/talkingbb.cpp b/src/mame/drivers/talkingbb.cpp index 98814a14ecb..bbe12ae9376 100644 --- a/src/mame/drivers/talkingbb.cpp +++ b/src/mame/drivers/talkingbb.cpp @@ -141,8 +141,8 @@ private: void main_map(address_map &map); void main_io(address_map &map); - u8 m_bank; - u8 m_inp_mux; + u8 m_bank = 0; + u8 m_inp_mux = 0; // I/O handlers void bank_w(u8 data); diff --git a/src/mame/drivers/talkingfb.cpp b/src/mame/drivers/talkingfb.cpp index fab4ad509c0..6cb01c3acc6 100644 --- a/src/mame/drivers/talkingfb.cpp +++ b/src/mame/drivers/talkingfb.cpp @@ -59,8 +59,8 @@ private: void main_map(address_map &map); void main_io(address_map &map); - u8 m_bank; - u8 m_inp_mux; + u8 m_bank = 0; + u8 m_inp_mux = 0; // I/O handlers void bank_w(u8 data); diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index b536023f16f..05bb113f118 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -132,20 +132,20 @@ private: struct { - uint8_t low, high; + uint8_t low = 0, high = 0; } m_eeprom_ee[0x40]; /* only 0 to 4 used in hx, addressing seems to allow this */ - int m_eeprom_state; - int m_eeprom_clock; - uint8_t m_eeprom_oper; - uint16_t m_eeprom_data; + int m_eeprom_state = 0; + int m_eeprom_clock = 0; + uint8_t m_eeprom_oper = 0; + uint16_t m_eeprom_data = 0; - uint8_t m_tandy_data[8]; + uint8_t m_tandy_data[8]{}; - uint8_t m_tandy_bios_bank; /* I/O port FFEAh */ - uint8_t m_tandy_ppi_porta, m_tandy_ppi_ack; - uint8_t m_tandy_ppi_portb, m_tandy_ppi_portc; - uint8_t m_vram_bank; + uint8_t m_tandy_bios_bank = 0; /* I/O port FFEAh */ + uint8_t m_tandy_ppi_porta = 0, m_tandy_ppi_ack = 0; + uint8_t m_tandy_ppi_portb = 0, m_tandy_ppi_portc = 0; + uint8_t m_vram_bank = 0; static void cfg_fdc_35(device_t *device); static void cfg_fdc_525(device_t *device); diff --git a/src/mame/drivers/tapatune.cpp b/src/mame/drivers/tapatune.cpp index 7ce930e02eb..66fd313b89e 100644 --- a/src/mame/drivers/tapatune.cpp +++ b/src/mame/drivers/tapatune.cpp @@ -75,19 +75,19 @@ private: optional_shared_ptr m_videoram; - uint8_t m_paletteram[0x300]; - uint16_t m_palette_write_addr; + uint8_t m_paletteram[0x300]{}; + uint16_t m_palette_write_addr = 0; rgb_t m_pens[0x100]; - uint8_t m_controls_mux; - uint8_t m_z80_to_68k_index; - uint8_t m_z80_to_68k_data; - uint8_t m_68k_to_z80_index; - uint8_t m_68k_to_z80_data; - uint8_t m_z80_data_available; - uint8_t m_68k_data_available; - uint8_t m_bsmt_data_l; - uint8_t m_bsmt_data_h; - bool m_bsmt_reset; + uint8_t m_controls_mux = 0; + uint8_t m_z80_to_68k_index = 0; + uint8_t m_z80_to_68k_data = 0; + uint8_t m_68k_to_z80_index = 0; + uint8_t m_68k_to_z80_data = 0; + uint8_t m_z80_data_available = 0; + uint8_t m_68k_data_available = 0; + uint8_t m_bsmt_data_l = 0; + uint8_t m_bsmt_data_h = 0; + bool m_bsmt_reset = false; virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/tasman.cpp b/src/mame/drivers/tasman.cpp index f18ec010ee7..7aa051b0b9b 100644 --- a/src/mame/drivers/tasman.cpp +++ b/src/mame/drivers/tasman.cpp @@ -82,7 +82,7 @@ private: uint32_t test_r(); // uint32_t rng_r(); - uint8_t m_irq_mask; + uint8_t m_irq_mask = 0; uint32_t screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); WRITE_LINE_MEMBER(vblank_irq_ack_w); diff --git a/src/mame/drivers/tattack.cpp b/src/mame/drivers/tattack.cpp index cee01aeacb5..24a470cfe7a 100644 --- a/src/mame/drivers/tattack.cpp +++ b/src/mame/drivers/tattack.cpp @@ -105,12 +105,12 @@ private: required_shared_ptr m_colorram; required_device m_gfxdecode; required_device m_samples; - tilemap_t *m_tmap; - uint8_t m_ball_regs[2]; - uint8_t m_paddle_reg; - uint8_t m_paddle_ysize; - bool m_bottom_edge_enable; - bool m_bricks_color_bank; + tilemap_t *m_tmap = nullptr; + uint8_t m_ball_regs[2]{}; + uint8_t m_paddle_reg = 0; + uint8_t m_paddle_ysize = 0; + bool m_bottom_edge_enable = false; + bool m_bricks_color_bank = false; void draw_gameplay_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_edge_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/drivers/tecnbras.cpp b/src/mame/drivers/tecnbras.cpp index 43caeada1b0..2f8beaa53b4 100644 --- a/src/mame/drivers/tecnbras.cpp +++ b/src/mame/drivers/tecnbras.cpp @@ -53,8 +53,8 @@ private: required_device m_maincpu; output_finder<14 * 7> m_dmds; - int m_xcoord; - char m_digit[14][7]; + int m_xcoord = 0; + char m_digit[14][7]{}; }; void tecnbras_state::i80c31_prg(address_map &map) diff --git a/src/mame/drivers/tekigw.cpp b/src/mame/drivers/tekigw.cpp index 41abd5521f5..bb2789e2733 100644 --- a/src/mame/drivers/tekigw.cpp +++ b/src/mame/drivers/tekigw.cpp @@ -119,19 +119,19 @@ protected: output_finder<> m_led; - emu_timer *m_buserror; + emu_timer *m_buserror = nullptr; private: - u8 m_nmr; // nonvolatile memory register - u16 m_per; // parity error register - u8 m_scr; // system control register - u8 m_ssr; // system status register + u8 m_nmr = 0; // nonvolatile memory register + u16 m_per = 0; // parity error register + u8 m_scr = 0; // system control register + u8 m_ssr = 0; // system status register // ram parity state memory_passthrough_handler m_parity_mph; std::unique_ptr m_parity_flag; - unsigned m_parity_bad; - bool m_parity_check; + unsigned m_parity_bad = 0; + bool m_parity_check = 0; }; class tek6100_state : public tekigw_state_base @@ -185,10 +185,10 @@ private: optional_device m_dpu_cram; optional_device m_dpu_vram; - u8 m_hcr; // hard disk control register + u8 m_hcr = 0; // hard disk control register // hard disk controller buffer - u16 m_hdc_ptr; + u16 m_hdc_ptr = 0; std::unique_ptr m_hdc_buf; }; diff --git a/src/mame/drivers/terak.cpp b/src/mame/drivers/terak.cpp index 42d55a04860..75c352a26bc 100644 --- a/src/mame/drivers/terak.cpp +++ b/src/mame/drivers/terak.cpp @@ -37,8 +37,8 @@ private: void mem_map(address_map &map); - uint8_t m_unit; - uint8_t m_cmd; + uint8_t m_unit = 0; + uint8_t m_cmd = 0; virtual void machine_reset() override; virtual void video_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/tgtpanic.cpp b/src/mame/drivers/tgtpanic.cpp index 8e7598b7796..25882b3e0de 100644 --- a/src/mame/drivers/tgtpanic.cpp +++ b/src/mame/drivers/tgtpanic.cpp @@ -33,7 +33,7 @@ private: required_shared_ptr m_ram; - uint8_t m_color; + uint8_t m_color = 0; void color_w(uint8_t data); diff --git a/src/mame/drivers/thayers.cpp b/src/mame/drivers/thayers.cpp index 734e9378f37..97f343071a9 100644 --- a/src/mame/drivers/thayers.cpp +++ b/src/mame/drivers/thayers.cpp @@ -26,15 +26,15 @@ struct ssi263_t { - uint8_t dr; - uint8_t p; - uint16_t i; - uint8_t r; - uint8_t t; - uint8_t c; - uint8_t a; - uint8_t f; - uint8_t mode; + uint8_t dr = 0; + uint8_t p = 0; + uint16_t i = 0; + uint8_t r = 0; + uint8_t t = 0; + uint8_t c = 0; + uint8_t a = 0; + uint8_t f = 0; + uint8_t mode = 0; }; class thayers_state : public driver_device @@ -64,21 +64,21 @@ private: optional_device m_pr7820; optional_device m_ldv1000; - uint8_t m_laserdisc_data; - int m_rx_bit; - int m_keylatch; - uint8_t m_keydata; - bool m_kbdata; - bool m_kbclk; - uint8_t m_cop_data_latch; - int m_cop_data_latch_enable; - uint8_t m_cop_l; - uint8_t m_cop_cmd_latch; - int m_timer_int; - int m_data_rdy_int; - int m_ssi_data_request; - int m_cart_present; - int m_pr7820_enter; + uint8_t m_laserdisc_data = 0; + int m_rx_bit = 0; + int m_keylatch = 0; + uint8_t m_keydata = 0; + bool m_kbdata = false; + bool m_kbclk = false; + uint8_t m_cop_data_latch = 0; + int m_cop_data_latch_enable = 0; + uint8_t m_cop_l = 0; + uint8_t m_cop_cmd_latch = 0; + int m_timer_int = 0; + int m_data_rdy_int = 0; + int m_ssi_data_request = 0; + int m_cart_present = 0; + int m_pr7820_enter = 0; struct ssi263_t m_ssi263; void intrq_w(uint8_t data); uint8_t irqstate_r(); diff --git a/src/mame/drivers/ti990_4.cpp b/src/mame/drivers/ti990_4.cpp index 08d2bba45bf..8af87c0ef33 100644 --- a/src/mame/drivers/ti990_4.cpp +++ b/src/mame/drivers/ti990_4.cpp @@ -79,13 +79,13 @@ private: void hold_load(); void device_timer(emu_timer &timer, device_timer_id id, int param) override; - int m_intlines; - int m_int_level; - emu_timer* m_nmi_timer; + int m_intlines = 0; + int m_int_level = 0; + emu_timer* m_nmi_timer = nullptr; void reset_int_lines(); void set_int_line(int line, int state); - bool m_ckon_state; + bool m_ckon_state = 0; // Connected devices required_device m_maincpu; diff --git a/src/mame/drivers/ti99_8.cpp b/src/mame/drivers/ti99_8.cpp index 7285a1fc308..7c0fab42796 100644 --- a/src/mame/drivers/ti99_8.cpp +++ b/src/mame/drivers/ti99_8.cpp @@ -270,14 +270,14 @@ private: // Keyboard support void set_keyboard_column(int number, int data); - int m_keyboard_column; + int m_keyboard_column = 0; // READY handling - int m_ready_old; + int m_ready_old = 0; // Latch for 9901 INT2, INT1 lines - int m_int1; - int m_int2; + int m_int1 = 0; + int m_int2 = 0; // Connected devices required_device m_cpu; diff --git a/src/mame/drivers/tickee.cpp b/src/mame/drivers/tickee.cpp index 96c3d83672d..fb8dadde19d 100644 --- a/src/mame/drivers/tickee.cpp +++ b/src/mame/drivers/tickee.cpp @@ -68,11 +68,11 @@ private: required_shared_ptr m_vram; optional_shared_ptr m_control; - emu_timer *m_setup_gun_timer; - int m_beamxadd; - int m_beamyadd; - int m_palette_bank; - uint8_t m_gunx[2]; + emu_timer *m_setup_gun_timer = nullptr; + int m_beamxadd = 0; + int m_beamyadd = 0; + int m_palette_bank = 0; + uint8_t m_gunx[2]{}; void get_crosshair_xy(int player, int &x, int &y); void rapidfir_transparent_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/drivers/tim011.cpp b/src/mame/drivers/tim011.cpp index 201c9632987..ea1fe53d65a 100644 --- a/src/mame/drivers/tim011.cpp +++ b/src/mame/drivers/tim011.cpp @@ -42,7 +42,7 @@ private: void fdc_dma_w(uint8_t data); uint8_t print_r(); uint8_t scroll_r(); - uint8_t m_scroll; + uint8_t m_scroll = 0; required_device m_maincpu; required_device m_fdc; diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index 7d8f11b36b2..14d53b45fcc 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -509,10 +509,10 @@ private: output_finder<5> m_ol_out; // cartridge - u32 m_cart_max_size; - u8 *m_cart_base; + u32 m_cart_max_size = 0; + u8 *m_cart_base = nullptr; - u8 m_overlay; + u8 m_overlay = 0; }; void tispeak_state::machine_start() diff --git a/src/mame/drivers/tmaster.cpp b/src/mame/drivers/tmaster.cpp index 4693241f1ab..3cadd56147d 100644 --- a/src/mame/drivers/tmaster.cpp +++ b/src/mame/drivers/tmaster.cpp @@ -153,9 +153,9 @@ private: required_device m_microtouch; required_device m_duart; - int m_okibank; + int m_okibank = 0; - uint8_t m_rtc_ram[8]; + uint8_t m_rtc_ram[8]{}; }; WRITE_LINE_MEMBER(tmaster_state::blitter_irq_callback) diff --git a/src/mame/drivers/toki_ms.cpp b/src/mame/drivers/toki_ms.cpp index 9aecff5187e..f17ca709672 100644 --- a/src/mame/drivers/toki_ms.cpp +++ b/src/mame/drivers/toki_ms.cpp @@ -316,9 +316,9 @@ private: void bk1vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); void bk2vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); void vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); - tilemap_t *m_bk1_tilemap; - tilemap_t *m_bk2_tilemap; - tilemap_t *m_tx_tilemap; + tilemap_t *m_bk1_tilemap = nullptr; + tilemap_t *m_bk2_tilemap = nullptr; + tilemap_t *m_tx_tilemap = nullptr; u8 palette_r(offs_t offset); void palette_w(offs_t offset, u8 data); @@ -333,7 +333,7 @@ private: void sound_command_w(u8 data); void adpcm_w(u8 data); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - u8 m_adpcm_data; + u8 m_adpcm_data = 0; void descramble_16x16tiles(uint8_t* src, int len); }; diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp index 01842bf6cdf..248735a0409 100644 --- a/src/mame/drivers/tomcat.cpp +++ b/src/mame/drivers/tomcat.cpp @@ -84,9 +84,9 @@ private: required_device m_tms; required_shared_ptr m_shared_ram; - uint8_t m_nvram[0x800]; - int m_dsp_bio; - int m_dsp_idle; + uint8_t m_nvram[0x800]{}; + int m_dsp_bio = 0; + int m_dsp_idle = 0; required_device m_maincpu; required_device m_dsp; diff --git a/src/mame/drivers/tomy_princ.cpp b/src/mame/drivers/tomy_princ.cpp index 1de7dd1aeb1..c003788abe3 100644 --- a/src/mame/drivers/tomy_princ.cpp +++ b/src/mame/drivers/tomy_princ.cpp @@ -86,7 +86,7 @@ private: uint32_t screen_update_tomy_princ(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - bool bFirstPort8Read; + bool bFirstPort8Read = false; }; TIMER_DEVICE_CALLBACK_MEMBER(tomy_princ_state::scan_interrupt) diff --git a/src/mame/drivers/toratora.cpp b/src/mame/drivers/toratora.cpp index 4e3e827f373..451186e9c89 100644 --- a/src/mame/drivers/toratora.cpp +++ b/src/mame/drivers/toratora.cpp @@ -70,8 +70,8 @@ private: required_shared_ptr m_videoram; /* video-related */ - int m_timer; - uint8_t m_clear_tv; + int m_timer = 0; + uint8_t m_clear_tv = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp index f0e4736c303..641270730c6 100644 --- a/src/mame/drivers/tourvis.cpp +++ b/src/mame/drivers/tourvis.cpp @@ -220,7 +220,7 @@ private: required_device m_subcpu; required_device m_cart; - uint32_t m_rom_size; + uint32_t m_rom_size = 0; }; DEVICE_IMAGE_LOAD_MEMBER( tourvision_state::cart_load ) diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 2883d32f8c5..f06e5bc06ef 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -120,9 +120,9 @@ private: // virtual void video_start() override; - bool m_master_irq_enable; - bool m_slave_irq_enable; - uint8_t m_pal_bank; + bool m_master_irq_enable = false; + bool m_slave_irq_enable = false; + uint8_t m_pal_bank = 0; void legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect,bool flip); void legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect,bool flip); diff --git a/src/mame/drivers/tricep.cpp b/src/mame/drivers/tricep.cpp index 41855eaa599..bb09057d6cc 100644 --- a/src/mame/drivers/tricep.cpp +++ b/src/mame/drivers/tricep.cpp @@ -44,7 +44,7 @@ private: required_device_array m_usart; required_shared_ptr m_ram; - uint8_t m_mux; + uint8_t m_mux = 0; }; diff --git a/src/mame/drivers/trkfldch.cpp b/src/mame/drivers/trkfldch.cpp index 47a93279f04..b83743a9eb2 100644 --- a/src/mame/drivers/trkfldch.cpp +++ b/src/mame/drivers/trkfldch.cpp @@ -86,7 +86,7 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(scanline); - uint8_t m_which_vector; + uint8_t m_which_vector = 0; uint8_t tilemap_scroll_window_r(int which, uint8_t reg, uint16_t real_base); @@ -98,35 +98,35 @@ private: void tmap0_scroll_window_w(offs_t offset, uint8_t data); void tmap1_scroll_window_w(offs_t offset, uint8_t data); - uint8_t m_dmaregs[0xe]; + uint8_t m_dmaregs[0xe]{}; uint8_t dmaregs_r(offs_t offset); void dmaregs_w(offs_t offset, uint8_t data); - uint8_t m_modebank[0xb]; + uint8_t m_modebank[0xb]{}; uint8_t modebankregs_r(offs_t offset); void modebankregs_w(offs_t offset, uint8_t data); - uint8_t m_tilemapbase[0x3]; + uint8_t m_tilemapbase[0x3]{}; uint8_t tilemapbase_r(offs_t offset); void tilemapbase_w(offs_t offset, uint8_t data); - uint8_t m_sysregs[0x10]; + uint8_t m_sysregs[0x10]{}; uint8_t sysregs_r(offs_t offset); void sysregs_w(offs_t offset, uint8_t data); - uint8_t m_unkregs[0x90]; + uint8_t m_unkregs[0x90]{}; uint8_t unkregs_r(offs_t offset); void unkregs_w(offs_t offset, uint8_t data); - uint8_t m_tmapscroll_window[2][0x12]; + uint8_t m_tmapscroll_window[2][0x12]{}; - uint8_t m_unkdata[0x100000]; - int m_unkdata_addr; + uint8_t m_unkdata[0x100000]{}; + int m_unkdata_addr = 0; }; diff --git a/src/mame/drivers/trvmadns.cpp b/src/mame/drivers/trvmadns.cpp index 4bc3caa2a05..831e139e962 100644 --- a/src/mame/drivers/trvmadns.cpp +++ b/src/mame/drivers/trvmadns.cpp @@ -140,7 +140,7 @@ private: TILE_GET_INFO_MEMBER(tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - tilemap_t *m_tilemap; + tilemap_t *m_tilemap = nullptr; }; diff --git a/src/mame/drivers/ts802.cpp b/src/mame/drivers/ts802.cpp index 05ec1c23777..f75d4d0df89 100644 --- a/src/mame/drivers/ts802.cpp +++ b/src/mame/drivers/ts802.cpp @@ -62,9 +62,9 @@ private: void ts802_io(address_map &map); void ts802_mem(address_map &map); - uint8_t m_term_data; - address_space *m_mem; - address_space *m_io; + uint8_t m_term_data = 0; + address_space *m_mem = nullptr; + address_space *m_io = nullptr; required_device m_maincpu; required_device m_terminal; }; diff --git a/src/mame/drivers/ts816.cpp b/src/mame/drivers/ts816.cpp index 49786794d96..1ff3c43ab21 100644 --- a/src/mame/drivers/ts816.cpp +++ b/src/mame/drivers/ts816.cpp @@ -51,10 +51,10 @@ private: void ts816_io(address_map &map); void ts816_mem(address_map &map); - uint8_t m_term_data; - uint8_t m_status; - bool m_2ndbank; - bool m_endram; + uint8_t m_term_data = 0; + uint8_t m_status = 0; + bool m_2ndbank = false; + bool m_endram = false; void set_banks(); virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp index 9b499f6b8a1..9861bf03b38 100644 --- a/src/mame/drivers/tsispch.cpp +++ b/src/mame/drivers/tsispch.cpp @@ -176,7 +176,7 @@ private: required_device m_pic; required_device m_uart; - uint8_t m_paramReg; // status leds and resets and etc + uint8_t m_paramReg = 0; // status leds and resets and etc }; /* diff --git a/src/mame/drivers/ttchamp.cpp b/src/mame/drivers/ttchamp.cpp index 17523eb68fe..06a7240c9dd 100644 --- a/src/mame/drivers/ttchamp.cpp +++ b/src/mame/drivers/ttchamp.cpp @@ -89,11 +89,11 @@ private: required_device m_maincpu; required_device m_palette; - uint16_t m_paloff; - uint16_t m_port10; - uint8_t m_rombank; - uint16_t m_videoram0[0x10000 / 2]; - uint16_t m_videoram2[0x10000 / 2]; + uint16_t m_paloff = 0; + uint16_t m_port10 = 0; + uint8_t m_rombank = 0; + uint16_t m_videoram0[0x10000 / 2]{}; + uint16_t m_videoram2[0x10000 / 2]{}; enum class picmode : u8 { @@ -106,20 +106,20 @@ private: picmode m_picmodex; - int m_pic_readaddr; - int m_pic_writeaddr; - int m_pic_latched; - int m_pic_writelatched; + int m_pic_readaddr = 0; + int m_pic_writeaddr = 0; + int m_pic_latched = 0; + int m_pic_writelatched = 0; std::unique_ptr m_bakram; uint16_t m_mainram[0x10000 / 2]; - int m_spritesinit; - int m_spriteswidth; - int m_spritesaddr; - uint16_t* m_rom16; - uint8_t* m_rom8; + int m_spritesinit = 0; + int m_spriteswidth = 0; + int m_spritesaddr = 0; + uint16_t* m_rom16 = nullptr; + uint8_t* m_rom8 = nullptr; void paloff_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void paldat_w(uint16_t data); diff --git a/src/mame/drivers/tugboat.cpp b/src/mame/drivers/tugboat.cpp index 2252f1ab6f7..14c68c1006b 100644 --- a/src/mame/drivers/tugboat.cpp +++ b/src/mame/drivers/tugboat.cpp @@ -67,12 +67,12 @@ private: memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; - uint8_t m_hd46505_0_reg[18]; - uint8_t m_hd46505_1_reg[18]; - int m_reg0; - int m_reg1; - int m_ctrl; - emu_timer *m_interrupt_timer; + uint8_t m_hd46505_0_reg[18]{}; + uint8_t m_hd46505_1_reg[18]{}; + int m_reg0 = 0; + int m_reg1 = 0; + int m_ctrl = 0; + emu_timer *m_interrupt_timer = nullptr; void hd46505_0_w(offs_t offset, uint8_t data); void hd46505_1_w(offs_t offset, uint8_t data); diff --git a/src/mame/drivers/tv950.cpp b/src/mame/drivers/tv950.cpp index 1efd7691227..defe4784e7f 100644 --- a/src/mame/drivers/tv950.cpp +++ b/src/mame/drivers/tv950.cpp @@ -82,9 +82,9 @@ private: void tv950_mem(address_map &map); - uint8_t m_via_row; - uint8_t m_attr_row; - uint8_t m_attr_screen; + uint8_t m_via_row = 0; + uint8_t m_attr_row = 0; + uint8_t m_attr_screen = 0; required_device m_maincpu; required_device m_via; @@ -95,8 +95,8 @@ private: required_region_ptr m_gfx; required_ioport_array<4> m_dsw; - int m_row_addr; - int m_row; + int m_row_addr = 0; + int m_row = 0; }; void tv950_state::machine_start() diff --git a/src/mame/drivers/tv990.cpp b/src/mame/drivers/tv990.cpp index 6b7dc4f6d54..0c550372e4a 100644 --- a/src/mame/drivers/tv990.cpp +++ b/src/mame/drivers/tv990.cpp @@ -96,8 +96,8 @@ private: void tv990_mem(address_map &map); uint16_t tvi1111_regs[(0x100/2)+2]; - emu_timer *m_rowtimer; - int m_rowh, m_width, m_height; + emu_timer *m_rowtimer = nullptr; + int m_rowh = 0, m_width = 0, m_height = 0; }; WRITE_LINE_MEMBER(tv990_state::vblank_irq) diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp index ef16425a110..7d1b4a2a8b4 100644 --- a/src/mame/drivers/tvc.cpp +++ b/src/mame/drivers/tvc.cpp @@ -76,15 +76,15 @@ protected: required_device m_palette; required_ioport_array<16> m_keyboard; - uint8_t *m_vram_base; - uint8_t m_video_mode; - uint8_t m_keyline; - uint8_t m_active_slot; - uint8_t m_int_flipflop; - uint8_t m_col[4]; - uint8_t m_vram_bank; - uint8_t m_cassette_ff; - uint8_t m_centronics_ff; + uint8_t *m_vram_base = nullptr; + uint8_t m_video_mode = 0; + uint8_t m_keyline = 0; + uint8_t m_active_slot = 0; + uint8_t m_int_flipflop = 0; + uint8_t m_col[4]{}; + uint8_t m_vram_bank = 0; + uint8_t m_cassette_ff = 0; + uint8_t m_centronics_ff = 0; void bank_w(uint8_t data); void palette_w(offs_t offset, uint8_t data); diff --git a/src/mame/drivers/tvg01.cpp b/src/mame/drivers/tvg01.cpp index 4f3b97b6fc9..e252298ea25 100644 --- a/src/mame/drivers/tvg01.cpp +++ b/src/mame/drivers/tvg01.cpp @@ -92,8 +92,8 @@ private: required_region_ptr m_banked_rom; required_device m_hopper; - u8 m_input_select[2]; - u8 m_bank_select; + u8 m_input_select[2]{}; + u8 m_bank_select = 0; }; #define MAIN_CLOCK XTAL(21'477'272) diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp index 2135a0f631e..615b0b2ee2f 100644 --- a/src/mame/drivers/twinkle.cpp +++ b/src/mame/drivers/twinkle.cpp @@ -346,24 +346,24 @@ private: output_finder<2, 7> m_key_leds; output_finder<8> m_spu_leds; - uint16_t m_spu_ctrl; // SPU board control register - uint32_t m_spu_ata_dma; - int m_spu_ata_dmarq; - uint32_t m_wave_bank; - - int m_io_offset; - int m_output_last[ 0x100 ]; - uint8_t m_sector_buffer[ 4096 ]; - - int m_serial_shift; - int m_serial_bits; - int m_serial_cs; - int m_serial_clock; - - int m_output_shift; - int m_output_bits; - int m_output_cs; - int m_output_clock; + uint16_t m_spu_ctrl = 0; // SPU board control register + uint32_t m_spu_ata_dma = 0; + int m_spu_ata_dmarq = 0; + uint32_t m_wave_bank = 0; + + int m_io_offset = 0; + int m_output_last[ 0x100 ]{}; + uint8_t m_sector_buffer[ 4096 ]{}; + + int m_serial_shift = 0; + int m_serial_bits = 0; + int m_serial_cs = 0; + int m_serial_clock = 0; + + int m_output_shift = 0; + int m_output_bits = 0; + int m_output_cs = 0; + int m_output_clock = 0; static void cdrom_config(device_t *device); }; diff --git a/src/mame/drivers/twins.cpp b/src/mame/drivers/twins.cpp index 087591e2c2b..65d216ef47c 100644 --- a/src/mame/drivers/twins.cpp +++ b/src/mame/drivers/twins.cpp @@ -130,12 +130,12 @@ protected: std::unique_ptr m_bgvram; std::unique_ptr m_fgvram; std::unique_ptr m_paletteram; - uint16_t m_paloff; + uint16_t m_paloff = 0; int m_spritesinit; - int m_spriteswidth; - int m_spritesaddr; + int m_spriteswidth = 0; + int m_spritesaddr = 0; uint16_t m_videorambank; - uint8_t* m_rom8; + uint8_t* m_rom8 = nullptr; void base_config(machine_config &config); void video_config(machine_config &config); diff --git a/src/mame/drivers/uapce.cpp b/src/mame/drivers/uapce.cpp index f8fb440524a..a2d68b2b034 100644 --- a/src/mame/drivers/uapce.cpp +++ b/src/mame/drivers/uapce.cpp @@ -133,7 +133,7 @@ public: void uapce(machine_config &config); private: - uint8_t m_jamma_if_control_latch; + uint8_t m_jamma_if_control_latch = 0; void jamma_if_control_latch_w(uint8_t data); uint8_t jamma_if_control_latch_r(); uint8_t jamma_if_read_dsw(offs_t offset); diff --git a/src/mame/drivers/umipoker.cpp b/src/mame/drivers/umipoker.cpp index c2e5846de2a..a219c15b377 100644 --- a/src/mame/drivers/umipoker.cpp +++ b/src/mame/drivers/umipoker.cpp @@ -71,8 +71,8 @@ protected: required_device m_gfxdecode; required_device m_palette; - tilemap_t *m_tilemap[4]; - int m_scrolly[4]; + tilemap_t *m_tilemap[4]{}; + int m_scrolly[4]{}; }; class saiyukip_state : public umipoker_state diff --git a/src/mame/drivers/unixpc.cpp b/src/mame/drivers/unixpc.cpp index 4e4b2395667..ff22a804a56 100644 --- a/src/mame/drivers/unixpc.cpp +++ b/src/mame/drivers/unixpc.cpp @@ -109,12 +109,12 @@ private: required_shared_ptr m_mapram; required_shared_ptr m_videoram; - uint16_t *m_ramptr; - uint32_t m_ramsize; - uint16_t m_diskdmasize; - uint32_t m_diskdmaptr; - bool m_fdc_intrq; - bool m_hdc_intrq; + uint16_t *m_ramptr = nullptr; + uint32_t m_ramsize = 0; + uint16_t m_diskdmasize = 0; + uint32_t m_diskdmaptr = 0; + bool m_fdc_intrq = false; + bool m_hdc_intrq = false; }; diff --git a/src/mame/drivers/upscope.cpp b/src/mame/drivers/upscope.cpp index 7dcc1b8b340..5753608dde1 100644 --- a/src/mame/drivers/upscope.cpp +++ b/src/mame/drivers/upscope.cpp @@ -52,8 +52,8 @@ private: uint8_t m_nvram[0x100]; uint8_t m_prev_cia1_porta; uint8_t m_parallel_data; - uint8_t m_nvram_address_latch; - uint8_t m_nvram_data_latch; + uint8_t m_nvram_address_latch = 0; + uint8_t m_nvram_data_latch = 0; uint8_t upscope_cia_0_portb_r(); void upscope_cia_0_portb_w(uint8_t data); diff --git a/src/mame/drivers/uzebox.cpp b/src/mame/drivers/uzebox.cpp index ba721845722..28d5039afb3 100644 --- a/src/mame/drivers/uzebox.cpp +++ b/src/mame/drivers/uzebox.cpp @@ -71,13 +71,13 @@ private: void data_map(address_map &map); void prg_map(address_map &map); - int m_vpos; - uint64_t m_line_start_cycles; - uint32_t m_line_pos_cycles; - uint8_t m_port_a; - uint8_t m_port_b; - uint8_t m_port_c; - uint8_t m_port_d; + int m_vpos = 0; + uint64_t m_line_start_cycles = 0; + uint32_t m_line_pos_cycles = 0; + uint8_t m_port_a = 0; + uint8_t m_port_b = 0; + uint8_t m_port_c = 0; + uint8_t m_port_d = 0; bitmap_rgb32 m_bitmap; }; -- cgit v1.2.3