diff --git a/src/mame/drivers/acrnsys1.cpp b/src/mame/drivers/acrnsys1.cpp index 1b932637ec8..cbefa37c026 100644 --- a/src/mame/drivers/acrnsys1.cpp +++ b/src/mame/drivers/acrnsys1.cpp @@ -66,7 +66,6 @@ public: , m_ttl74145(*this, "ic8_7445") , m_cass(*this, "cassette") , m_display(*this, "digit%u", 0U) - , m_digit(0) { } void acrnsys1(machine_config &config); @@ -84,10 +83,10 @@ private: required_device m_ttl74145; required_device m_cass; output_finder<9> m_display; - uint8_t m_digit; - uint8_t m_cass_data[4]; - bool m_cassbit; - bool m_cassold; + uint8_t m_digit = 0; + uint8_t m_cass_data[4]{}; + bool m_cassbit = 0; + bool m_cassold = 0; }; diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp index 65607deeaae..da07a56b2e1 100644 --- a/src/mame/drivers/amust.cpp +++ b/src/mame/drivers/amust.cpp @@ -138,16 +138,16 @@ private: void machine_start() override; void do_int(); - u8 m_port04; - u8 m_port06; - u8 m_port08; - u8 m_port09; - u8 m_port0a; - u8 m_term_data; - bool m_drq; - //bool m_intrq; - bool m_hsync; - bool m_vsync; + u8 m_port04 = 0U; + u8 m_port06 = 0U; + u8 m_port08 = 0U; + u8 m_port09 = 0U; + u8 m_port0a = 0U; + u8 m_term_data = 0U; + bool m_drq = 0; + //bool m_intrq = 0; + bool m_hsync = 0; + bool m_vsync = 0; std::unique_ptr m_vram; memory_passthrough_handler *m_rom_shadow_tap; required_device m_palette; diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp index 4cc82ad40ce..80438ab9dd5 100644 --- a/src/mame/drivers/apf.cpp +++ b/src/mame/drivers/apf.cpp @@ -117,8 +117,8 @@ public: , m_fdc(*this, "fdc") , m_floppy0(*this, "fdc:0") , m_floppy1(*this, "fdc:1") - , m_joy(*this, "joy.%u", 0) - , m_key(*this, "key.%u", 0) + , m_joy(*this, "joy.%u", 0U) + , m_key(*this, "key.%u", 0U) , m_p_videoram(*this, "videoram") { } @@ -144,12 +144,12 @@ private: void apfimag_map(address_map &map); void apfm1000_map(address_map &map); - uint8_t m_latch; - uint8_t m_keyboard_data; - uint8_t m_pad_data; - uint8_t m_portb; - bool m_ca2; - bool m_has_cart_ram; + uint8_t m_latch = 0U; + uint8_t m_keyboard_data = 0U; + uint8_t m_pad_data = 0U; + uint8_t m_portb = 0U; + bool m_ca2 = 0; + bool m_has_cart_ram = 0; required_device m_maincpu; optional_device m_ram; required_device m_crtc; diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp index 9a85211d859..a3a4c3832e4 100644 --- a/src/mame/drivers/argo.cpp +++ b/src/mame/drivers/argo.cpp @@ -55,7 +55,7 @@ public: , m_crtc(*this, "crtc") , m_cass(*this, "cassette") , m_palette(*this, "palette") - , m_io_keyboard(*this, "X%d", 0) + , m_io_keyboard(*this, "X%d", 0U) { } void argo(machine_config &config); @@ -88,11 +88,11 @@ private: required_device m_cass; required_device m_palette; required_ioport_array<11> m_io_keyboard; - u8 m_framecnt; - bool m_ram_ctrl; - u8 m_scroll_ctrl; - bool m_txe, m_txd, m_rts, m_casspol; - u8 m_cass_data[4]; + u8 m_framecnt = 0U; + bool m_ram_ctrl = 0; + u8 m_scroll_ctrl = 0U; + bool m_txe = 0, m_txd = 0, m_rts = 0, m_casspol = 0; + u8 m_cass_data[4]{}; std::unique_ptr m_vram; std::unique_ptr m_eram; }; diff --git a/src/mame/drivers/babbage.cpp b/src/mame/drivers/babbage.cpp index 74d520744ac..e24a0756d9f 100644 --- a/src/mame/drivers/babbage.cpp +++ b/src/mame/drivers/babbage.cpp @@ -61,10 +61,10 @@ private: void babbage_io(address_map &map); void babbage_map(address_map &map); - uint8_t m_seg; - uint8_t m_key; - uint8_t m_prev_key; - bool m_step; + uint8_t m_seg = 0U; + uint8_t m_key = 0U; + uint8_t m_prev_key = 0U; + bool m_step = 0; required_device m_maincpu; required_device_array m_pio; diff --git a/src/mame/drivers/basic52.cpp b/src/mame/drivers/basic52.cpp index 83bf1d693a7..7d84ef082aa 100644 --- a/src/mame/drivers/basic52.cpp +++ b/src/mame/drivers/basic52.cpp @@ -62,7 +62,7 @@ private: uint8_t from_term(); void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_term_data; + uint8_t m_term_data = 0U; required_device m_maincpu; required_device m_terminal; required_device m_speaker; diff --git a/src/mame/drivers/bbcbc.cpp b/src/mame/drivers/bbcbc.cpp index 71d275f0f35..864a1fa5c23 100644 --- a/src/mame/drivers/bbcbc.cpp +++ b/src/mame/drivers/bbcbc.cpp @@ -43,7 +43,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_z80pio(*this, "z80pio") - , m_buttons(*this, "BUTTONS.%u", 0) + , m_buttons(*this, "BUTTONS.%u", 0U) { } void bbcbc(machine_config &config); @@ -53,7 +53,7 @@ private: void input_select_w(uint8_t data); void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_input_select; + uint8_t m_input_select = 0U; virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp index 1bb81ef9fc7..68b970f21d0 100644 --- a/src/mame/drivers/bcs3.cpp +++ b/src/mame/drivers/bcs3.cpp @@ -101,7 +101,7 @@ public: , m_p_chargen(*this, "chargen") , m_p_videoram(*this, "videoram") , m_cass(*this, "cassette") - , m_io_keyboard(*this, "KEY.%u", 0) + , m_io_keyboard(*this, "KEY.%u", 0U) { } void bcs3(machine_config &config); @@ -125,11 +125,11 @@ private: void bcs3_mem(address_map &map); void bcs3a_mem(address_map &map); void machine_start() override; - bool m_cassbit; - u8 s_curs; - u8 s_init; - u8 s_rows; - u8 s_cols; + bool m_cassbit = 0; + u8 s_curs = 0U; + u8 s_init = 0U; + u8 s_rows = 0U; + u8 s_cols = 0U; required_device m_maincpu; required_device m_screen; diff --git a/src/mame/drivers/br8641.cpp b/src/mame/drivers/br8641.cpp index 1ad1cd92a18..6cc378c3fb4 100644 --- a/src/mame/drivers/br8641.cpp +++ b/src/mame/drivers/br8641.cpp @@ -42,7 +42,7 @@ public: , m_pio3(*this, "pio3") , m_ctc(*this, "ctc") , m_sio(*this, "sio") - , m_io_keyboard(*this, "KEY.%u", 0) + , m_io_keyboard(*this, "KEY.%u", 0U) , m_beep(*this, "beeper") { } @@ -55,8 +55,8 @@ private: u8 port08_r(); void port08_w(u8 data); void port09_w(u8 data); - u8 m_port08; - u8 m_port09; + u8 m_port08 = 0U; + u8 m_port09 = 0U; required_device m_maincpu; required_device m_pio1; required_device m_pio2; diff --git a/src/mame/drivers/chaos.cpp b/src/mame/drivers/chaos.cpp index 4b8f58c1752..1a57f92920a 100644 --- a/src/mame/drivers/chaos.cpp +++ b/src/mame/drivers/chaos.cpp @@ -62,7 +62,7 @@ private: void data_map(address_map &map); void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; required_device m_terminal; required_shared_ptr m_p_ram; required_device m_maincpu; diff --git a/src/mame/drivers/ckz80.cpp b/src/mame/drivers/ckz80.cpp index c8921159564..747282277b5 100644 --- a/src/mame/drivers/ckz80.cpp +++ b/src/mame/drivers/ckz80.cpp @@ -76,7 +76,7 @@ private: DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; memory_passthrough_handler *m_rom_shadow_tap; required_device m_maincpu; required_region_ptr m_rom; diff --git a/src/mame/drivers/d6809.cpp b/src/mame/drivers/d6809.cpp index acb5a161501..72517bf69f5 100644 --- a/src/mame/drivers/d6809.cpp +++ b/src/mame/drivers/d6809.cpp @@ -127,7 +127,7 @@ private: void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; void machine_start() override; void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/datum.cpp b/src/mame/drivers/datum.cpp index 641d6144c4d..e8763504aca 100644 --- a/src/mame/drivers/datum.cpp +++ b/src/mame/drivers/datum.cpp @@ -81,8 +81,8 @@ private: void pa_w(uint8_t data); void pb_w(uint8_t data); void datum_mem(address_map &map); - uint8_t m_digit; - uint8_t m_seg; + uint8_t m_digit = 0U; + uint8_t m_seg = 0U; virtual void machine_start() override; virtual void machine_reset() override; required_device m_pia1; diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 27d2ad605b7..5fc66f2c4ab 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -58,12 +58,12 @@ private: void dlart_w(offs_t, u8); void kbd_put(u8 data); - u8 m_term_data; - u8 m_seg_lower; - u8 m_seg_upper; - u8 m_portc; - u16 m_irqs; - bool m_dlart_maintmode; + u8 m_term_data = 0U; + u8 m_seg_lower = 0U; + u8 m_seg_upper = 0U; + u8 m_portc = 0U; + u16 m_irqs = 0U; + bool m_dlart_maintmode = 0; void mem_map(address_map &map); diff --git a/src/mame/drivers/dg680.cpp b/src/mame/drivers/dg680.cpp index fee76a61779..ccb6b441e00 100644 --- a/src/mame/drivers/dg680.cpp +++ b/src/mame/drivers/dg680.cpp @@ -104,11 +104,11 @@ private: void machine_reset() override; void machine_start() override; - u8 m_pio_b; - u8 m_term_data; - u8 m_protection[0x100]; - u8 m_cass_data[4]; - bool m_cassold, m_cassinbit, m_cassoutbit; + u8 m_pio_b = 0U; + u8 m_term_data = 0U; + u8 m_protection[0x100]{}; + u8 m_cass_data[4]{}; + bool m_cassold = 0, m_cassinbit = 0, m_cassoutbit = 0; required_device m_maincpu; required_device m_cass; diff --git a/src/mame/drivers/dim68k.cpp b/src/mame/drivers/dim68k.cpp index c8690e3d91f..7f093fd9aad 100644 --- a/src/mame/drivers/dim68k.cpp +++ b/src/mame/drivers/dim68k.cpp @@ -99,9 +99,9 @@ private: void mem_map(address_map &map); - bool m_speaker_bit; - u8 m_video_control; - u8 m_fdc_irq; + bool m_speaker_bit = 0; + u8 m_video_control = 0U; + u8 m_fdc_irq = 0U; void machine_reset() override; void machine_start() override; diff --git a/src/mame/drivers/dms86.cpp b/src/mame/drivers/dms86.cpp index a4f16b0c797..68d55b7c64e 100644 --- a/src/mame/drivers/dms86.cpp +++ b/src/mame/drivers/dms86.cpp @@ -67,7 +67,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; required_device m_maincpu; required_device m_terminal; required_device_array m_sio; diff --git a/src/mame/drivers/eacc.cpp b/src/mame/drivers/eacc.cpp index c3fbda5d051..e96bded660a 100644 --- a/src/mame/drivers/eacc.cpp +++ b/src/mame/drivers/eacc.cpp @@ -85,10 +85,10 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(cb1_timer); TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); void mem_map(address_map &map); - uint8_t m_digit; - bool m_cb1; - bool m_cb2; - bool m_nmi; + uint8_t m_digit = 0U; + bool m_cb1 = 0; + bool m_cb2 = 0; + bool m_nmi = 0; required_device m_maincpu; required_device m_pia; diff --git a/src/mame/drivers/elekscmp.cpp b/src/mame/drivers/elekscmp.cpp index b3a43fc765b..4809462dd59 100644 --- a/src/mame/drivers/elekscmp.cpp +++ b/src/mame/drivers/elekscmp.cpp @@ -55,8 +55,8 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); TIMER_DEVICE_CALLBACK_MEMBER(kansas_w); u8 convert_key(u8 data); - bool m_cassinbit, m_cassoutbit, m_cassold; - u8 m_cass_data[4]; + bool m_cassinbit = 0, m_cassoutbit = 0, m_cassold = 0; + u8 m_cass_data[4]{}; void mem_map(address_map &map); diff --git a/src/mame/drivers/emma2.cpp b/src/mame/drivers/emma2.cpp index 8ccad2e2f96..9bc53bbf736 100644 --- a/src/mame/drivers/emma2.cpp +++ b/src/mame/drivers/emma2.cpp @@ -79,8 +79,8 @@ private: void mem_map(address_map &map); - uint8_t m_digit; - uint8_t m_seg; + uint8_t m_digit = 0U; + uint8_t m_seg = 0U; required_device m_maincpu; required_device m_cassette; required_device m_via; diff --git a/src/mame/drivers/evmbug.cpp b/src/mame/drivers/evmbug.cpp index 71f31e7f9c9..2147d513e14 100644 --- a/src/mame/drivers/evmbug.cpp +++ b/src/mame/drivers/evmbug.cpp @@ -43,10 +43,10 @@ private: virtual void machine_reset() override; virtual void machine_start() override; - uint8_t m_term_data; - uint8_t m_term_out; - bool m_rin; - bool m_rbrl; + uint8_t m_term_data = 0U; + uint8_t m_term_out = 0U; + bool m_rin = 0; + bool m_rbrl = 0; required_device m_maincpu; required_device m_terminal; }; diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp index 05f48542c8b..59447471ed8 100644 --- a/src/mame/drivers/fc100.cpp +++ b/src/mame/drivers/fc100.cpp @@ -64,7 +64,7 @@ public: , m_cart(*this, "cartslot") , m_uart(*this, "uart") , m_centronics(*this, "centronics") - , m_keyboard(*this, "KEY.%u", 0) + , m_keyboard(*this, "KEY.%u", 0U) { } void fc100(machine_config &config); @@ -94,19 +94,19 @@ private: virtual void machine_reset() override; // graphics signals - uint8_t m_ag; - uint8_t m_gm2; - uint8_t m_gm1; - uint8_t m_gm0; - uint8_t m_as; - uint8_t m_css; - uint8_t m_intext; - uint8_t m_inv; - uint8_t m_cass_data[4]; - bool m_cassbit; - bool m_cassold; - uint8_t m_key_pressed; - bool m_banksw_unlocked; + uint8_t m_ag = 0U; + uint8_t m_gm2 = 0U; + uint8_t m_gm1 = 0U; + uint8_t m_gm0 = 0U; + uint8_t m_as = 0U; + uint8_t m_css = 0U; + uint8_t m_intext = 0U; + uint8_t m_inv = 0U; + uint8_t m_cass_data[4]{}; + bool m_cassbit = 0; + bool m_cassold = 0; + uint8_t m_key_pressed = 0U; + bool m_banksw_unlocked = 0; required_device m_maincpu; required_device m_vdg; diff --git a/src/mame/drivers/ft68m.cpp b/src/mame/drivers/ft68m.cpp index 632140cfc69..fe04a2c7c0e 100644 --- a/src/mame/drivers/ft68m.cpp +++ b/src/mame/drivers/ft68m.cpp @@ -22,10 +22,10 @@ Interrupts: INT6 is output of Timer 2, INT7 is output of Timer 3 (refresh), class ft68m_state : public driver_device { public: - ft68m_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_p_base(*this, "rambase"), - m_maincpu(*this, "maincpu") + ft68m_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_p_base(*this, "rambase") + , m_maincpu(*this, "maincpu") { } diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp index cc095a80499..8f781cc4c51 100644 --- a/src/mame/drivers/h8.cpp +++ b/src/mame/drivers/h8.cpp @@ -96,13 +96,13 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_digit; - u8 m_segment; - u8 m_irq_ctl; - bool m_ff_b; - u8 m_cass_data[4]; - bool m_cassbit; - bool m_cassold; + u8 m_digit = 0U; + u8 m_segment = 0U; + u8 m_irq_ctl = 0U; + bool m_ff_b = 0; + u8 m_cass_data[4]{}; + bool m_cassbit = 0; + bool m_cassold = 0; required_device m_maincpu; required_device m_uart; diff --git a/src/mame/drivers/hpz80unk.cpp b/src/mame/drivers/hpz80unk.cpp index 1aead9076b4..4147444ed03 100644 --- a/src/mame/drivers/hpz80unk.cpp +++ b/src/mame/drivers/hpz80unk.cpp @@ -55,7 +55,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_p_rom(*this, "rom") - , m_uart(*this, "uart%u", 1) + , m_uart(*this, "uart%u", 1U) { } void hpz80unk(machine_config &config); @@ -70,7 +70,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_port02_data; + u8 m_port02_data = 0U; void machine_reset() override; void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/icebox.cpp b/src/mame/drivers/icebox.cpp index b16f75f0af7..27c10c0a0e6 100644 --- a/src/mame/drivers/icebox.cpp +++ b/src/mame/drivers/icebox.cpp @@ -184,7 +184,7 @@ private: void io_map(address_map &map); void machine_reset() override; void port_f1_w(u8 data); - u8 m_f1; + u8 m_f1 = 0U; required_device m_maincpu; required_device m_uart0; diff --git a/src/mame/drivers/imsai.cpp b/src/mame/drivers/imsai.cpp index f8b32f2beb9..2910ec18e0e 100644 --- a/src/mame/drivers/imsai.cpp +++ b/src/mame/drivers/imsai.cpp @@ -46,7 +46,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; void machine_reset() override; void machine_start() override; memory_passthrough_handler *m_rom_shadow_tap; diff --git a/src/mame/drivers/ipds.cpp b/src/mame/drivers/ipds.cpp index cd6379ed07e..0d7c7bdca24 100644 --- a/src/mame/drivers/ipds.cpp +++ b/src/mame/drivers/ipds.cpp @@ -39,7 +39,7 @@ private: void ipds_b1_w(uint8_t data); void kbd_put(u8 data); I8275_DRAW_CHARACTER_MEMBER( crtc_display_pixels ); - uint8_t m_term_data; + uint8_t m_term_data = 0U; virtual void machine_reset() override; void ipds_io(address_map &map); void ipds_mem(address_map &map); diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp index df05e2c1cb6..6d972d1c0fd 100644 --- a/src/mame/drivers/isbc.cpp +++ b/src/mame/drivers/isbc.cpp @@ -103,11 +103,11 @@ private: optional_shared_ptr m_biosram; optional_device_array m_sbx; - bool m_upperen; - offs_t m_megabyte_page; - bool m_nmi_enable; - bool m_override; - bool m_megabyte_enable; + bool m_upperen = 0; + offs_t m_megabyte_page = 0; + bool m_nmi_enable = 0; + bool m_override = 0; + bool m_megabyte_enable = 0; }; void isbc_state::machine_reset() diff --git a/src/mame/drivers/jonos.cpp b/src/mame/drivers/jonos.cpp index be919ab90b5..1381fbe909a 100644 --- a/src/mame/drivers/jonos.cpp +++ b/src/mame/drivers/jonos.cpp @@ -49,10 +49,10 @@ private: void mem_map(address_map &map); - u8 m_framecnt; - u8 m_term_data; - u8 m_curs_ctrl; - u16 m_curs_pos; + u8 m_framecnt = 0U; + u8 m_term_data = 0U; + u8 m_curs_ctrl = 0U; + u16 m_curs_pos = 0U; required_device m_maincpu; required_shared_ptr m_p_videoram; required_region_ptr m_p_chargen; diff --git a/src/mame/drivers/jr100.cpp b/src/mame/drivers/jr100.cpp index 0f1342e4fdf..e573e03091a 100644 --- a/src/mame/drivers/jr100.cpp +++ b/src/mame/drivers/jr100.cpp @@ -80,7 +80,7 @@ public: , m_cassette(*this, "cassette") , m_speaker(*this, "speaker") , m_region_maincpu(*this, "maincpu") - , m_io_keyboard(*this, "LINE%u", 0) + , m_io_keyboard(*this, "LINE%u", 0U) , m_maincpu(*this, "maincpu") , m_sound_timer(nullptr) { } @@ -92,9 +92,9 @@ protected: virtual void machine_reset() override; private: - uint8_t m_keyboard_line; - bool m_use_pcg; - bool m_pb7; + uint8_t m_keyboard_line = 0U; + bool m_use_pcg = 0; + bool m_pb7 = 0; uint32_t screen_update_jr100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(sound_tick); uint8_t pb_r(); diff --git a/src/mame/drivers/junior.cpp b/src/mame/drivers/junior.cpp index 7968da1ee4d..078c06dbced 100644 --- a/src/mame/drivers/junior.cpp +++ b/src/mame/drivers/junior.cpp @@ -63,8 +63,8 @@ private: u8 riot_a_r(); void riot_a_w(u8 data); void riot_b_w(u8 data); - u8 m_digit; - u8 m_seg; + u8 m_digit = 0U; + u8 m_seg = 0U; virtual void machine_start() override; @@ -227,4 +227,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1980, junior, 0, 0, junior, junior, junior_state, empty_init, "Elektor", "Junior Computer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) +COMP( 1980, junior, 0, 0, junior, junior, junior_state, empty_init, "Elektor", "Junior Computer", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/junior80.cpp b/src/mame/drivers/junior80.cpp index 71738afd1c2..55cff38889d 100644 --- a/src/mame/drivers/junior80.cpp +++ b/src/mame/drivers/junior80.cpp @@ -149,7 +149,7 @@ public: , m_fdc(*this, "fdc") , m_floppy0(*this, "fdc:0") , m_floppy1(*this, "fdc:1") - //, m_io_keyboard(*this, "LINE%u", 0) + //, m_io_keyboard(*this, "LINE%u", 0U) { } void junior80(machine_config &config); diff --git a/src/mame/drivers/k8915.cpp b/src/mame/drivers/k8915.cpp index 6f8f4bbd7d7..873bcac1fb7 100644 --- a/src/mame/drivers/k8915.cpp +++ b/src/mame/drivers/k8915.cpp @@ -40,7 +40,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_framecnt; + u8 m_framecnt = 0U; void machine_start() override; void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/lola8a.cpp b/src/mame/drivers/lola8a.cpp index 3ca470eb116..c9588a1f783 100644 --- a/src/mame/drivers/lola8a.cpp +++ b/src/mame/drivers/lola8a.cpp @@ -94,7 +94,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_portb; + u8 m_portb = 0U; memory_passthrough_handler *m_rom_shadow_tap; required_device m_maincpu; required_region_ptr m_rom; diff --git a/src/mame/drivers/m3.cpp b/src/mame/drivers/m3.cpp index 0d037813f4b..4535e4a1778 100644 --- a/src/mame/drivers/m3.cpp +++ b/src/mame/drivers/m3.cpp @@ -77,7 +77,7 @@ public: m_vram(*this, "vram"), m_palette(*this, "palette"), m_fdc(*this, "fdc"), - m_floppy(*this, "fdc:%u", 0), + m_floppy(*this, "fdc:%u", 0U), m_kbdmcu(*this, "kbdmcu"), m_special(*this, "SPECIAL"), m_keys(*this, "K%02u", 0U) @@ -113,9 +113,9 @@ private: void kbd_p1_w(uint8_t data); void kbd_p2_w(uint8_t data); void kbd_data_w(uint8_t data); - int m_kbd_col; - int m_kbd_row; - uint8_t m_kbd_data; + int m_kbd_col = 0; + int m_kbd_row = 0; + uint8_t m_kbd_data = 0U; void ppi2_pa_w(uint8_t data); uint8_t ppi2_pb_r(); diff --git a/src/mame/drivers/mc8020.cpp b/src/mame/drivers/mc8020.cpp index bcdd4f3c1fc..0637de0b950 100644 --- a/src/mame/drivers/mc8020.cpp +++ b/src/mame/drivers/mc8020.cpp @@ -30,7 +30,7 @@ public: : driver_device(mconfig, type, tag) , m_p_videoram(*this, "videoram") , m_maincpu(*this, "maincpu") - , m_keyboard(*this, "X%u", 0) + , m_keyboard(*this, "X%u", 0U) { } void mc8020(machine_config &config); @@ -44,7 +44,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_row; + u8 m_row = 0U; virtual void machine_start() override; required_shared_ptr m_p_videoram; required_device m_maincpu; diff --git a/src/mame/drivers/mccpm.cpp b/src/mame/drivers/mccpm.cpp index 8184c5ea06e..e70d50897e5 100644 --- a/src/mame/drivers/mccpm.cpp +++ b/src/mame/drivers/mccpm.cpp @@ -64,7 +64,7 @@ private: void fdc_irq(bool); template void bd_q_w(offs_t offset, u8 data); - u8 m_fdc_status; + u8 m_fdc_status = 0U; floppy_image_device *m_floppy; required_device m_maincpu; diff --git a/src/mame/drivers/mekd2.cpp b/src/mame/drivers/mekd2.cpp index b46e73fbcde..71e0994bc20 100644 --- a/src/mame/drivers/mekd2.cpp +++ b/src/mame/drivers/mekd2.cpp @@ -115,12 +115,12 @@ private: void mem_map(address_map &map); - uint8_t m_cass_data[4]; - uint8_t m_segment; - uint8_t m_digit; - uint8_t m_keydata; - bool m_cassbit; - bool m_cassold; + uint8_t m_cass_data[4]{}; + uint8_t m_segment = 0U; + uint8_t m_digit = 0U; + uint8_t m_keydata = 0U; + bool m_cassbit = 0; + bool m_cassold = 0; virtual void machine_start() override; required_device m_maincpu; required_device m_pia_s; diff --git a/src/mame/drivers/mfabfz.cpp b/src/mame/drivers/mfabfz.cpp index c0b74e5d738..e6fd3181054 100644 --- a/src/mame/drivers/mfabfz.cpp +++ b/src/mame/drivers/mfabfz.cpp @@ -78,7 +78,7 @@ private: void machine_start() override; DECLARE_WRITE_LINE_MEMBER(kansas_r); DECLARE_WRITE_LINE_MEMBER(kansas_w); - u8 m_cass_data[5]; + u8 m_cass_data[5]{}; bool m_cassoutbit, m_cassbit, m_cassold; required_device m_maincpu; required_device m_cass; diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp index 692c61480b7..829fd292128 100644 --- a/src/mame/drivers/micral.cpp +++ b/src/mame/drivers/micral.cpp @@ -97,9 +97,9 @@ private: void mem_kbd(address_map &map); void mem_map(address_map &map); - u16 s_curpos; - u8 s_command; - u8 s_data; + u16 s_curpos = 0U; + u8 s_command = 0U; + u8 s_data = 0U; std::unique_ptr m_vram; memory_passthrough_handler *m_rom_shadow_tap; required_device m_maincpu; diff --git a/src/mame/drivers/microdec.cpp b/src/mame/drivers/microdec.cpp index fe8a6232329..f0d6fb2a3a4 100644 --- a/src/mame/drivers/microdec.cpp +++ b/src/mame/drivers/microdec.cpp @@ -67,8 +67,8 @@ private: void microdec_io(address_map &map); void microdec_mem(address_map &map); - uint8_t m_portf8; - bool m_fdc_rdy; + uint8_t m_portf8 = 0U; + bool m_fdc_rdy = 0; required_device m_maincpu; required_device m_fdc; diff --git a/src/mame/drivers/microkit.cpp b/src/mame/drivers/microkit.cpp index e5260204718..8ec446a37fc 100644 --- a/src/mame/drivers/microkit.cpp +++ b/src/mame/drivers/microkit.cpp @@ -33,7 +33,6 @@ class microkit_state : public driver_device public: microkit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_a15(1) , m_maincpu(*this, "maincpu") , m_rom(*this, "maincpu") , m_rs232(*this, "rs232") @@ -56,8 +55,8 @@ private: virtual void machine_start() override; virtual void machine_reset() override; std::unique_ptr m_ram; - uint8_t m_resetcnt; - bool m_a15; + uint8_t m_resetcnt = 0U; + bool m_a15 = 1; required_device m_maincpu; required_memory_region m_rom; required_device m_rs232; @@ -80,9 +79,9 @@ void microkit_state::microkit_io(address_map &map) static INPUT_PORTS_START( microkit ) PORT_START("RESET") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, reset_button, 0) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RUN P") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, runp_button, 0) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RUN U") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, runu_button, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, reset_button, 0) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RUN P") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, runp_button, 0) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RUN U") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, microkit_state, runu_button, 0) INPUT_PORTS_END INPUT_CHANGED_MEMBER(microkit_state::reset_button) diff --git a/src/mame/drivers/mkit09.cpp b/src/mame/drivers/mkit09.cpp index aa4c45c1a0d..2fef381d402 100644 --- a/src/mame/drivers/mkit09.cpp +++ b/src/mame/drivers/mkit09.cpp @@ -67,7 +67,7 @@ protected: u8 pa_r(); u8 pb_r(); u8 m_digit; - u8 m_seg; + u8 m_seg = 0U; void machine_reset() override; void machine_start() override; required_device m_pia; diff --git a/src/mame/drivers/mmd2.cpp b/src/mame/drivers/mmd2.cpp index e27960aa533..f8f0d65eea8 100644 --- a/src/mame/drivers/mmd2.cpp +++ b/src/mame/drivers/mmd2.cpp @@ -107,7 +107,7 @@ public: , m_maincpu(*this, "maincpu") , m_cass(*this, "cassette") , m_banks(*this, "bank%u", 1U) - , m_io_keyboard(*this, "X%u", 0) + , m_io_keyboard(*this, "X%u", 0U) , m_io_dsw(*this, "DSW") , m_digits(*this, "digit%u", 0U) , m_p(*this, "p%u_%u", 0U, 0U) @@ -140,7 +140,7 @@ private: void mem_map(address_map &map); void reset_banks(); - u8 m_digit; + u8 m_digit = 0U; std::unique_ptr m_ram; required_device m_maincpu; required_device m_cass; diff --git a/src/mame/drivers/modellot.cpp b/src/mame/drivers/modellot.cpp index c33d1bc3460..edb1b3d6929 100644 --- a/src/mame/drivers/modellot.cpp +++ b/src/mame/drivers/modellot.cpp @@ -71,7 +71,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_term_data; + u8 m_term_data = 0U; void machine_start() override; void machine_reset() override; memory_passthrough_handler *m_rom_shadow_tap; diff --git a/src/mame/drivers/ms9540.cpp b/src/mame/drivers/ms9540.cpp index 68d8bb236f5..5bc9c1bdfaa 100644 --- a/src/mame/drivers/ms9540.cpp +++ b/src/mame/drivers/ms9540.cpp @@ -47,9 +47,9 @@ private: void latch_1f001_w(u8 data); void kbd_put(u8 data); void mem_map(address_map &map); - uint8_t m_term_data; - uint8_t m_latch_1e001; - uint8_t m_latch_1f001; + uint8_t m_term_data = 0U; + uint8_t m_latch_1e001 = 0U; + uint8_t m_latch_1f001 = 0U; void machine_reset() override; void machine_start() override; required_shared_ptr m_ram; diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp index f371768ea61..a5876aa64fd 100644 --- a/src/mame/drivers/mycom.cpp +++ b/src/mame/drivers/mycom.cpp @@ -118,11 +118,11 @@ private: void mycom_map(address_map &map); std::unique_ptr m_vram; - u8 m_port0a; - u8 m_keyb_press; - u8 m_sn_we; - u16 m_i_videoram; - bool m_keyb_press_flag; + u8 m_port0a = 0U; + u8 m_keyb_press = 0U; + u8 m_sn_we = 0U; + u16 m_i_videoram = 0U; + bool m_keyb_press_flag = 0; virtual void machine_reset() override; virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp index f024415038a..73619a79b1e 100644 --- a/src/mame/drivers/okean240.cpp +++ b/src/mame/drivers/okean240.cpp @@ -92,12 +92,8 @@ class okean240_state : public driver_device public: okean240_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_term_data(0) - , m_j(0) - , m_scroll(0) - , m_tog(0) , m_p_videoram(*this, "videoram") - , m_io_keyboard(*this, "X%d", 0) + , m_io_keyboard(*this, "X%d", 0U) , m_io_modifiers(*this, "MODIFIERS") , m_maincpu(*this, "maincpu") , m_rom(*this, "maincpu") @@ -127,12 +123,12 @@ private: virtual void machine_start() override; virtual void machine_reset() override; TIMER_DEVICE_CALLBACK_MEMBER(timer_k); - u8 m_term_data; - u8 m_j; - u8 m_scroll; - u8 m_tog; - bool m_key_pressed; - u8 m_kbd_row; + u8 m_term_data = 0U; + u8 m_j = 0U; + u8 m_scroll = 0U; + u8 m_tog = 0U; + bool m_key_pressed = 0; + u8 m_kbd_row = 0U; required_shared_ptr m_p_videoram; optional_ioport_array<11> m_io_keyboard; optional_ioport m_io_modifiers; diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp index 5fd5eca10b5..0a2f86146d2 100644 --- a/src/mame/drivers/pcm.cpp +++ b/src/mame/drivers/pcm.cpp @@ -97,8 +97,8 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - bool m_cone; - u8 m_port85; + bool m_cone = 0; + u8 m_port85 = 0U; void machine_start() override; void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/plan80.cpp b/src/mame/drivers/plan80.cpp index d1de5e6ce91..095126b055d 100644 --- a/src/mame/drivers/plan80.cpp +++ b/src/mame/drivers/plan80.cpp @@ -53,8 +53,8 @@ private: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void mem_map(address_map &map); - u8 m_kbd_row; - bool m_spk_pol; + u8 m_kbd_row = 0U; + bool m_spk_pol = 0; virtual void machine_reset() override; virtual void machine_start() override; memory_passthrough_handler *m_rom_shadow_tap; diff --git a/src/mame/drivers/pmi80.cpp b/src/mame/drivers/pmi80.cpp index 2c7a5d8c698..ae8080bf8e5 100644 --- a/src/mame/drivers/pmi80.cpp +++ b/src/mame/drivers/pmi80.cpp @@ -46,10 +46,6 @@ class pmi80_state : public driver_device public: pmi80_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_ledready(0) - , m_cassbit(0) - , m_cassold(0) - , m_cass_cnt(0) , m_maincpu(*this, "maincpu") , m_ppi1(*this, "ppi1") , m_cass(*this, "cassette") @@ -70,10 +66,10 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_keyrow; - bool m_ledready; - bool m_cassbit,m_cassold; - u16 m_cass_cnt; + uint8_t m_keyrow = 0U; + bool m_ledready = 0; + bool m_cassbit = 0,m_cassold = 0; + u16 m_cass_cnt = 0U; virtual void machine_reset() override; virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/pro80.cpp b/src/mame/drivers/pro80.cpp index 000d0413d60..1ae71b40915 100644 --- a/src/mame/drivers/pro80.cpp +++ b/src/mame/drivers/pro80.cpp @@ -55,9 +55,9 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_digit_sel; - u8 m_cass_in; - u16 m_cass_data[4]; + u8 m_digit_sel = 0U; + u8 m_cass_in = 0U; + u16 m_cass_data[4]{}; virtual void machine_reset() override; virtual void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp index 846f61ccc9b..c0cf0e84cf8 100644 --- a/src/mame/drivers/proteus3.cpp +++ b/src/mame/drivers/proteus3.cpp @@ -112,11 +112,11 @@ private: void mem_map(address_map &map); - u8 m_video_data; - u8 m_flashcnt; - u16 m_curs_pos; - u8 m_cass_data[4]; - bool m_cassbit, m_cassold, m_cassinbit; + u8 m_video_data = 0U; + u8 m_flashcnt = 0U; + u16 m_curs_pos = 0U; + u8 m_cass_data[4]{}; + bool m_cassbit = 0, m_cassold = 0, m_cassinbit = 0; std::unique_ptr m_vram; required_device m_maincpu; required_region_ptr m_p_chargen; diff --git a/src/mame/drivers/ptcsol.cpp b/src/mame/drivers/ptcsol.cpp index be55ca24bf9..bf676654072 100644 --- a/src/mame/drivers/ptcsol.cpp +++ b/src/mame/drivers/ptcsol.cpp @@ -198,10 +198,10 @@ private: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; virtual void machine_reset() override; virtual void machine_start() override; - u8 m_sol20_fa; - u8 m_sol20_fc; - u8 m_sol20_fe; - u8 m_framecnt; + u8 m_sol20_fa = 0U; + u8 m_sol20_fc = 0U; + u8 m_sol20_fe = 0U; + u8 m_framecnt = 0U; cass_data_t m_cass_data; emu_timer *m_cassette_timer; cassette_image_device *cassette_device_image(); diff --git a/src/mame/drivers/pyl601.cpp b/src/mame/drivers/pyl601.cpp index 8c4f3f9d740..3f8fcdabfcb 100644 --- a/src/mame/drivers/pyl601.cpp +++ b/src/mame/drivers/pyl601.cpp @@ -54,14 +54,14 @@ class pyl601_state : public driver_device { public: - pyl601_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_speaker(*this, "speaker"), - m_fdc(*this, "upd765"), - m_floppy(*this, "upd765:%u", 0U), - m_ram(*this, RAM_TAG), - m_maincpu(*this, "maincpu"), - m_palette(*this, "palette") + pyl601_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_speaker(*this, "speaker") + , m_fdc(*this, "upd765") + , m_floppy(*this, "upd765:%u", 0U) + , m_ram(*this, RAM_TAG) + , m_maincpu(*this, "maincpu") + , m_palette(*this, "palette") { } void pyl601(machine_config &config); @@ -95,13 +95,13 @@ private: static void floppy_formats(format_registration &fr); void mem_map(address_map &map); - uint8_t m_rom_page; - uint32_t m_vdisk_addr; - uint8_t m_key_code; - uint8_t m_keyboard_clk; - uint8_t m_video_mode; - uint8_t m_tick50_mark; - uint8_t m_floppy_ctrl; + uint8_t m_rom_page = 0U; + uint32_t m_vdisk_addr = 0U; + uint8_t m_key_code = 0U; + uint8_t m_keyboard_clk = 0U; + uint8_t m_video_mode = 0U; + uint8_t m_tick50_mark = 0U; + uint8_t m_floppy_ctrl = 0U; required_device m_speaker; required_device m_fdc; diff --git a/src/mame/drivers/sacstate.cpp b/src/mame/drivers/sacstate.cpp index 753d4b6e2cf..6e0a995e9fa 100644 --- a/src/mame/drivers/sacstate.cpp +++ b/src/mame/drivers/sacstate.cpp @@ -61,8 +61,8 @@ private: void sacstate_io(address_map &map); void sacstate_mem(address_map &map); - u8 m_term_data; - u8 m_val; + u8 m_term_data = 0U; + u8 m_val = 0U; required_device m_maincpu; required_device m_terminal; }; diff --git a/src/mame/drivers/sapi1.cpp b/src/mame/drivers/sapi1.cpp index d8b2783c5d6..0194ce96a71 100644 --- a/src/mame/drivers/sapi1.cpp +++ b/src/mame/drivers/sapi1.cpp @@ -62,7 +62,7 @@ public: : driver_device(mconfig, type, tag) , m_p_videoram(*this, "videoram") , m_bank1(*this, "bank1") - , m_io_keyboard(*this, "LINE%u", 0) + , m_io_keyboard(*this, "LINE%u", 0U) , m_maincpu(*this, "maincpu") , m_cass(*this, "cassette") , m_uart(*this, "uart") @@ -122,15 +122,15 @@ private: void sapi3b_io(address_map &map); void sapi3b_mem(address_map &map); - uint8_t m_term_data; - uint8_t m_keyboard_mask; - uint8_t m_refresh_counter; - uint8_t m_zps3_25; + uint8_t m_term_data = 0U; + uint8_t m_keyboard_mask = 0U; + uint8_t m_refresh_counter = 0U; + uint8_t m_zps3_25 = 0U; TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); DECLARE_WRITE_LINE_MEMBER(kansas_w); - u8 m_cass_data[4]; - bool m_cassinbit, m_cassoutbit, m_cassold; - bool m_ier, m_iet; + u8 m_cass_data[4]{}; + bool m_cassinbit = 0, m_cassoutbit = 0, m_cassold = 0; + bool m_ier = 0, m_iet = 0; optional_memory_bank m_bank1; // Only for sapi3 required_ioport_array<5> m_io_keyboard; required_device m_maincpu; diff --git a/src/mame/drivers/savia84.cpp b/src/mame/drivers/savia84.cpp index 01ddfdfcf75..d8692fe8ba5 100644 --- a/src/mame/drivers/savia84.cpp +++ b/src/mame/drivers/savia84.cpp @@ -59,8 +59,8 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_digit; - uint8_t m_seg; + uint8_t m_digit = 0U; + uint8_t m_seg = 0U; required_device m_maincpu; required_device m_ppi8255; diff --git a/src/mame/drivers/sbc6510.cpp b/src/mame/drivers/sbc6510.cpp index f93b65ba55e..740629632d7 100644 --- a/src/mame/drivers/sbc6510.cpp +++ b/src/mame/drivers/sbc6510.cpp @@ -87,8 +87,8 @@ private: void video_data_map(address_map &map); void video_mem_map(address_map &map); - u8 m_key_row; - u8 m_2; + u8 m_key_row = 0U; + u8 m_2 = 0U; virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/sdk85.cpp b/src/mame/drivers/sdk85.cpp index 96b310d16b2..afdc916c401 100644 --- a/src/mame/drivers/sdk85.cpp +++ b/src/mame/drivers/sdk85.cpp @@ -66,7 +66,7 @@ public: , m_ramio(*this, "ramio") , m_expramio(*this, "expramio") , m_tty(*this, "tty") - , m_keyboard(*this, "X%u", 0) + , m_keyboard(*this, "X%u", 0U) , m_digits(*this, "digit%u", 0U) { } @@ -85,7 +85,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_digit; + u8 m_digit = 0U; virtual void machine_reset() override; virtual void machine_start() override; diff --git a/src/mame/drivers/sdk86.cpp b/src/mame/drivers/sdk86.cpp index f5c59868c11..23f538d8fde 100644 --- a/src/mame/drivers/sdk86.cpp +++ b/src/mame/drivers/sdk86.cpp @@ -59,7 +59,7 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_digit; + u8 m_digit = 0U; void machine_start() override; required_device m_maincpu; required_device m_uart; diff --git a/src/mame/drivers/seattlecmp.cpp b/src/mame/drivers/seattlecmp.cpp index f8860479bbc..501f103e567 100644 --- a/src/mame/drivers/seattlecmp.cpp +++ b/src/mame/drivers/seattlecmp.cpp @@ -44,7 +44,7 @@ public: seattle_comp_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_pic(*this, "pic%u", 1) + , m_pic(*this, "pic%u", 1U) , m_monitor(*this, "monitor") { } diff --git a/src/mame/drivers/selz80.cpp b/src/mame/drivers/selz80.cpp index 6b2083546c5..b3304563205 100644 --- a/src/mame/drivers/selz80.cpp +++ b/src/mame/drivers/selz80.cpp @@ -62,8 +62,8 @@ protected: void selz80_io(address_map &map); - u8 m_digit; - u8 m_seg; + u8 m_digit = 0U; + u8 m_seg = 0U; void setup_baud(); void machine_start() override; required_device m_maincpu; diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp index fb1df6a2d27..a7d6ccbfab7 100644 --- a/src/mame/drivers/spc1000.cpp +++ b/src/mame/drivers/spc1000.cpp @@ -152,7 +152,7 @@ public: , m_cass(*this, "cassette") , m_ram(*this, RAM_TAG) , m_p_videoram(*this, "videoram") - , m_io_kb(*this, "LINE.%u", 0) + , m_io_kb(*this, "LINE.%u", 0U) , m_io_joy(*this, "JOY") , m_centronics(*this, "centronics") {} @@ -178,12 +178,12 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_IPLK; - uint8_t m_GMODE; - uint16_t m_page; + uint8_t m_IPLK = 0U; + uint8_t m_GMODE = 0U; + uint16_t m_page = 0U; std::unique_ptr m_work_ram; attotime m_time; - bool m_centronics_busy; + bool m_centronics_busy = 0; virtual void machine_start() override; virtual void machine_reset() override; required_device m_maincpu; diff --git a/src/mame/drivers/tavernie.cpp b/src/mame/drivers/tavernie.cpp index 3925d946421..d2ebd1ab0fc 100644 --- a/src/mame/drivers/tavernie.cpp +++ b/src/mame/drivers/tavernie.cpp @@ -91,8 +91,8 @@ protected: void pb_w(u8 data); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); void cpu09_mem(address_map &map); - u8 m_pa; - bool m_cassold; + u8 m_pa = 0U; + bool m_cassold = 0; required_device m_maincpu; required_device m_cass; required_device m_pia0; diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp index a85530ceef8..f801176883e 100644 --- a/src/mame/drivers/tec1.cpp +++ b/src/mame/drivers/tec1.cpp @@ -86,7 +86,6 @@ class tec1_state : public driver_device public: tec1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_key_pressed(0) , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") , m_cass(*this, "cassette") @@ -108,9 +107,9 @@ private: void tecjmon_digit_w(u8 data); void segment_w(u8 data); DECLARE_WRITE_LINE_MEMBER(da_w); - bool m_key_pressed; - u8 m_seg; - u8 m_digit; + bool m_key_pressed = 0; + u8 m_seg = 0U; + u8 m_digit = 0U; void tec1_io(address_map &map); void tec1_map(address_map &map); void tecjmon_io(address_map &map); diff --git a/src/mame/drivers/tk80.cpp b/src/mame/drivers/tk80.cpp index 41afcce9597..061411d655a 100644 --- a/src/mame/drivers/tk80.cpp +++ b/src/mame/drivers/tk80.cpp @@ -88,11 +88,11 @@ private: void tk80_mem(address_map &map); void tk85_mem(address_map &map); - uint8_t m_term_data; - uint8_t m_keyb_press; - uint8_t m_keyb_press_flag; - uint8_t m_shift_press_flag; - uint8_t m_ppi_portc; + uint8_t m_term_data = 0U; + uint8_t m_keyb_press = 0U; + uint8_t m_keyb_press_flag = 0U; + uint8_t m_shift_press_flag = 0U; + uint8_t m_ppi_portc = 0U; required_device m_maincpu; required_device m_ppi; diff --git a/src/mame/drivers/tk80bs.cpp b/src/mame/drivers/tk80bs.cpp index f050a94f56b..c73ae460274 100644 --- a/src/mame/drivers/tk80bs.cpp +++ b/src/mame/drivers/tk80bs.cpp @@ -57,7 +57,7 @@ private: uint8_t port_b_r(); uint32_t screen_update_tk80bs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void mem_map(address_map &map); - uint8_t m_term_data; + uint8_t m_term_data = 0U; required_shared_ptr m_p_videoram; required_device m_maincpu; required_device m_ppi; diff --git a/src/mame/drivers/trs80dt1.cpp b/src/mame/drivers/trs80dt1.cpp index c4446f0048e..a7d0bd61a98 100644 --- a/src/mame/drivers/trs80dt1.cpp +++ b/src/mame/drivers/trs80dt1.cpp @@ -56,7 +56,7 @@ public: , m_palette(*this, "palette") , m_crtc(*this, "crtc") , m_nvram(*this,"nvram") - , m_io_keyboard(*this, "X%u", 0) + , m_io_keyboard(*this, "X%u", 0U) , m_buzzer(*this, "buzzer") , m_7474(*this, "7474") , m_rs232(*this, "rs232") @@ -77,8 +77,8 @@ private: void io_map(address_map &map); void prg_map(address_map &map); - bool m_bow; - bool m_cent_busy; + bool m_bow = 0; + bool m_cent_busy = 0; virtual void machine_reset() override; virtual void machine_start() override; required_shared_ptr m_p_videoram; diff --git a/src/mame/drivers/unior.cpp b/src/mame/drivers/unior.cpp index 054e52e24e3..174d760028c 100644 --- a/src/mame/drivers/unior.cpp +++ b/src/mame/drivers/unior.cpp @@ -64,7 +64,7 @@ public: , m_cass(*this, "cassette") , m_palette(*this, "palette") , m_p_chargen(*this, "chargen") - , m_io_keyboard(*this, "X%d", 0) + , m_io_keyboard(*this, "X%d", 0U) { } void unior(machine_config &config); @@ -89,10 +89,10 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - u8 m_4c; - u8 m_4e; - bool m_txe, m_txd, m_rts, m_casspol; - u8 m_cass_data[4]; + u8 m_4c = 0U; + u8 m_4e = 0U; + bool m_txe = 0, m_txd = 0, m_rts = 0, m_casspol = 0; + u8 m_cass_data[4]{}; virtual void machine_reset() override; virtual void machine_start() override; std::unique_ptr m_vram; diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp index 63c90b8ef46..e06adac8881 100644 --- a/src/mame/drivers/univac.cpp +++ b/src/mame/drivers/univac.cpp @@ -140,10 +140,8 @@ public: , m_p_chargen(*this, "chargen") , m_p_videoram(*this, "videoram") , m_p_nvram(*this, "nvram") - , m_bank_mask(0) , m_parity_poison(false) , m_display_enable(false) - , m_framecnt(0) , m_nvram_protect(false) , m_alarm_enable(false) , m_alarm_toggle(false) @@ -210,24 +208,24 @@ private: required_shared_ptr m_p_nvram; std::unique_ptr m_p_parity; - u16 m_disp_mask; - u16 m_bank_mask; - bool m_parity_poison; - bool m_display_enable; - u8 m_framecnt; - bool m_nvram_protect; + u16 m_disp_mask = 0U; + u16 m_bank_mask = 0U; + bool m_parity_poison = 0; + bool m_display_enable = 0; + u8 m_framecnt = 0U; + bool m_nvram_protect = 0; - bool m_alarm_enable; - bool m_alarm_toggle; + bool m_alarm_enable = 0; + bool m_alarm_toggle = 0; - bool m_loopback_control; - bool m_comm_rxd; - bool m_sio_txda; - bool m_aux_rxd; - bool m_sio_txdb; - bool m_sio_rtsb; - bool m_aux_dsr; - bool m_sio_wrdyb; + bool m_loopback_control = 0; + bool m_comm_rxd = 0; + bool m_sio_txda = 0; + bool m_aux_rxd = 0; + bool m_sio_txdb = 0; + bool m_sio_rtsb = 0; + bool m_aux_dsr = 0; + bool m_sio_wrdyb = 0; }; diff --git a/src/mame/drivers/vcs80.cpp b/src/mame/drivers/vcs80.cpp index 7c2dfc40376..5eb32e1400a 100644 --- a/src/mame/drivers/vcs80.cpp +++ b/src/mame/drivers/vcs80.cpp @@ -102,9 +102,9 @@ private: } /* keyboard state */ - bool m_keyclk; - u8 m_digit; - u8 m_seg; + bool m_keyclk = 0; + u8 m_digit = 0U; + u8 m_seg = 0U; void init_vcs80(); TIMER_DEVICE_CALLBACK_MEMBER(vcs80_keyboard_tick); diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp index 6af36ce0652..ec6252b202c 100644 --- a/src/mame/drivers/video21.cpp +++ b/src/mame/drivers/video21.cpp @@ -55,8 +55,8 @@ private: void lamp1_w(uint8_t data); void lamp2_w(uint8_t data); - int m_hopper_motor; - int m_hopper_coin; + int m_hopper_motor = 0; + int m_hopper_coin = 0; emu_timer *m_hopper_timer; TIMER_CALLBACK_MEMBER(hopper_coinout); diff --git a/src/mame/drivers/votrpss.cpp b/src/mame/drivers/votrpss.cpp index ae4a7bc088f..bf6bfbda72b 100644 --- a/src/mame/drivers/votrpss.cpp +++ b/src/mame/drivers/votrpss.cpp @@ -408,10 +408,10 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_term_data; - uint8_t m_porta; - uint8_t m_portb; - uint8_t m_portc; + uint8_t m_term_data = 0U; + uint8_t m_porta = 0U; + uint8_t m_portb = 0U; + uint8_t m_portc = 0U; required_device m_maincpu; required_device m_terminal; diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp index 5e18aa8335d..1b39c31fd43 100644 --- a/src/mame/drivers/wmg.cpp +++ b/src/mame/drivers/wmg.cpp @@ -87,7 +87,7 @@ public: wmg_state(const machine_config &mconfig, device_type type, const char *tag) : defender_state(mconfig, type, tag) , m_p_ram(*this, "nvram") - , m_keyboard(*this, "X%d", 0) + , m_keyboard(*this, "X%d", 0U) , m_codebank(*this, "codebank") , m_soundbank(*this, "soundbank") { } @@ -115,10 +115,10 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - uint8_t m_wmg_c400; - uint8_t m_wmg_d000; - uint8_t m_wmg_port_select; - uint8_t m_wmg_vram_bank; + uint8_t m_wmg_c400 = 0U; + uint8_t m_wmg_d000 = 0U; + uint8_t m_wmg_port_select = 0U; + uint8_t m_wmg_vram_bank = 0U; required_shared_ptr m_p_ram; required_ioport_array<17> m_keyboard; required_memory_bank m_codebank; diff --git a/src/mame/drivers/z9001.cpp b/src/mame/drivers/z9001.cpp index 3e24d356356..27ca8890340 100644 --- a/src/mame/drivers/z9001.cpp +++ b/src/mame/drivers/z9001.cpp @@ -55,7 +55,6 @@ class z9001_state : public driver_device public: z9001_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_framecnt(0) , m_maincpu(*this, "maincpu") , m_rom(*this, "maincpu") , m_ram(*this, "mainram") @@ -79,8 +78,8 @@ private: void io_map(address_map &map); void mem_map(address_map &map); - uint8_t m_framecnt; - bool m_cassbit; + uint8_t m_framecnt = 0U; + bool m_cassbit = 0; virtual void machine_reset() override; virtual void machine_start() override; memory_passthrough_handler *m_rom_shadow_tap; diff --git a/src/mame/drivers/zexall.cpp b/src/mame/drivers/zexall.cpp index 874a7522041..b55c96c0b73 100644 --- a/src/mame/drivers/zexall.cpp +++ b/src/mame/drivers/zexall.cpp @@ -53,10 +53,10 @@ private: required_device m_maincpu; required_device m_terminal; required_shared_ptr m_main_ram; - uint8_t m_out_data; // byte written to 0xFFFF - uint8_t m_out_req; // byte written to 0xFFFE - uint8_t m_out_req_last; // old value at 0xFFFE before the most recent write - uint8_t m_out_ack; // byte written to 0xFFFC + uint8_t m_out_data = 0U; // byte written to 0xFFFF + uint8_t m_out_req = 0U; // byte written to 0xFFFE + uint8_t m_out_req_last = 0U; // old value at 0xFFFE before the most recent write + uint8_t m_out_ack = 0U; // byte written to 0xFFFC virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/drivers/zrt80.cpp b/src/mame/drivers/zrt80.cpp index 9927a085788..c2c595d85dd 100644 --- a/src/mame/drivers/zrt80.cpp +++ b/src/mame/drivers/zrt80.cpp @@ -55,7 +55,7 @@ private: void mem_map(address_map &map); TIMER_DEVICE_CALLBACK_MEMBER(beep_timer); - uint8_t m_term_data; + uint8_t m_term_data = 0U; void machine_reset() override; void machine_start() override; required_shared_ptr m_p_videoram;