From f768e0565e5d32c1cf82dd8c27dd9d7ad491b990 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 10 Apr 2022 20:28:32 +1000 Subject: init vars (includes) --- src/mame/includes/88games.h | 8 +++---- src/mame/includes/aerofgt.h | 22 ++++++++--------- src/mame/includes/airbustr.h | 8 +++---- src/mame/includes/battlnts.h | 2 +- src/mame/includes/bladestl.h | 4 ++-- src/mame/includes/blmbycar.h | 8 +++---- src/mame/includes/btime.h | 18 +++++++------- src/mame/includes/bwidow.h | 2 +- src/mame/includes/djboy.h | 16 ++++++------- src/mame/includes/elf.h | 2 +- src/mame/includes/fcrash.h | 24 +++++++++---------- src/mame/includes/firetrap.h | 28 +++++++++++----------- src/mame/includes/firetrk.h | 26 ++++++++++---------- src/mame/includes/flstory.h | 20 ++++++++-------- src/mame/includes/funybubl.h | 2 +- src/mame/includes/gaiden.h | 36 ++++++++++++++-------------- src/mame/includes/glass.h | 8 +++---- src/mame/includes/gundealr.h | 6 ++--- src/mame/includes/huebler.h | 8 +++---- src/mame/includes/hx20.h | 20 ++++++++-------- src/mame/includes/kickgoal.h | 30 ++++++++++++------------ src/mame/includes/lastduel.h | 12 +++++----- src/mame/includes/m107.h | 12 +++++----- src/mame/includes/mainevt.h | 4 ++-- src/mame/includes/malzak.h | 12 +++++----- src/mame/includes/mhavoc.h | 24 +++++++++---------- src/mame/includes/micronic.h | 10 ++++---- src/mame/includes/microtan.h | 22 ++++++++--------- src/mame/includes/mustache.h | 4 ++-- src/mame/includes/namcos1.h | 38 +++++++++++++++--------------- src/mame/includes/ondra.h | 6 ++--- src/mame/includes/pass.h | 4 ++-- src/mame/includes/pecom.h | 6 ++--- src/mame/includes/pgm.h | 32 ++++++++++++------------- src/mame/includes/pgm2.h | 48 ++++++++++++++++++------------------- src/mame/includes/polyplay.h | 4 ++-- src/mame/includes/prehisle.h | 16 ++++++------- src/mame/includes/primo.h | 10 ++++---- src/mame/includes/qdrmfgp.h | 8 +++---- src/mame/includes/renegade.h | 12 +++++----- src/mame/includes/rockrage.h | 2 +- src/mame/includes/sage2.h | 12 +++++----- src/mame/includes/segas24.h | 56 ++++++++++++++++++++++---------------------- src/mame/includes/shadfrce.h | 18 +++++++------- src/mame/includes/shangha3.h | 8 +++---- src/mame/includes/shuuz.h | 2 +- src/mame/includes/silkroad.h | 2 +- src/mame/includes/speedspn.h | 6 ++--- src/mame/includes/stactics.h | 26 ++++++++++---------- src/mame/includes/stadhero.h | 2 +- src/mame/includes/suna16.h | 4 ++-- src/mame/includes/superchs.h | 12 +++++----- src/mame/includes/svision.h | 16 ++++++------- src/mame/includes/taitoair.h | 26 ++++++++++---------- src/mame/includes/targeth.h | 4 ++-- src/mame/includes/tecmo.h | 14 +++++------ src/mame/includes/tecmosys.h | 14 +++++------ src/mame/includes/ti89.h | 30 ++++++++++++------------ src/mame/includes/tmc2000e.h | 6 ++--- src/mame/includes/ultraman.h | 2 +- src/mame/includes/vc4000.h | 42 ++++++++++++++++----------------- src/mame/includes/warpwarp.h | 18 +++++++------- src/mame/includes/xexex.h | 20 ++++++++-------- 63 files changed, 462 insertions(+), 462 deletions(-) diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index f4086c6fbb2..77f4171f3ea 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -37,10 +37,10 @@ public: private: /* video-related */ - int m_k88games_priority; - int m_videobank; - int m_zoomreadroms; - int m_speech_chip; + int m_k88games_priority = 0; + int m_videobank = 0; + int m_zoomreadroms = 0; + int m_speech_chip = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index c444a3fa007..5005e1ea473 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -62,17 +62,17 @@ public: optional_memory_bank m_okibank; /* video-related */ - tilemap_t *m_tilemap[2]; - uint8_t m_gfxbank[8]; - uint16_t m_bank[4]; - uint16_t m_scrollx[2]; - uint16_t m_scrolly[2]; - bool m_flip_screen; - uint16_t m_wbbc97_bitmap_enable; - int m_charpalettebank; - int m_spritepalettebank; - int m_sprite_gfx; - int m_spikes91_lookup; + tilemap_t *m_tilemap[2]{}; + uint8_t m_gfxbank[8]{}; + uint16_t m_bank[4]{}; + uint16_t m_scrollx[2]{}; + uint16_t m_scrolly[2]{}; + bool m_flip_screen = false; + uint16_t m_wbbc97_bitmap_enable = 0; + int m_charpalettebank = 0; + int m_spritepalettebank = 0; + int m_sprite_gfx = 0; + int m_spikes91_lookup = 0; uint32_t aerofgt_tile_callback( uint32_t code ); uint32_t aerofgt_old_tile_callback( uint32_t code ); diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h index 0deb971ef52..db0eafa2d58 100644 --- a/src/mame/includes/airbustr.h +++ b/src/mame/includes/airbustr.h @@ -51,10 +51,10 @@ public: required_memory_bank m_audiobank; /* video-related */ - tilemap_t *m_tilemap[2]; - int m_scrollx[2]; - int m_scrolly[2]; - int m_highbits; + tilemap_t *m_tilemap[2]{}; + int m_scrollx[2]{}; + int m_scrolly[2]{}; + int m_highbits = 0; /* devices */ required_device m_master; diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h index 8580e7bf8f6..4ac180d75f9 100644 --- a/src/mame/includes/battlnts.h +++ b/src/mame/includes/battlnts.h @@ -27,7 +27,7 @@ public: { } /* video-related */ - int m_spritebank; + int m_spritebank = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index 8bbb13efc93..1a1329211ea 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -74,10 +74,10 @@ protected: required_memory_bank m_rombank; /* video-related */ - int m_spritebank; + int m_spritebank = 0; /* misc */ - int m_last_track[4]; + int m_last_track[4]{}; output_finder<2> m_lamps; }; diff --git a/src/mame/includes/blmbycar.h b/src/mame/includes/blmbycar.h index f324137c431..e8b54aa1174 100644 --- a/src/mame/includes/blmbycar.h +++ b/src/mame/includes/blmbycar.h @@ -50,12 +50,12 @@ private: optional_ioport m_opt_wheel_io; /* video-related */ - tilemap_t *m_tilemap[2]; + tilemap_t *m_tilemap[2]{}; /* input-related */ - uint8_t m_pot_wheel; // blmbycar - uint8_t m_old_val; // blmbycar - int m_retvalue; // waterball + uint8_t m_pot_wheel = 0; // blmbycar + uint8_t m_old_val = 0; // blmbycar + int m_retvalue = 0; // waterball // common void okibank_w(uint8_t data); diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 4a744791185..a8df67be9e5 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -55,19 +55,19 @@ public: /* video-related */ std::unique_ptr m_background_bitmap; - uint8_t m_btime_palette; - uint8_t m_bnj_scroll1; - uint8_t m_bnj_scroll2; - uint8_t m_btime_tilemap[4]; + uint8_t m_btime_palette = 0; + uint8_t m_bnj_scroll1 = 0; + uint8_t m_bnj_scroll2 = 0; + uint8_t m_btime_tilemap[4]{}; /* audio-related */ - uint8_t m_audio_nmi_enable_type; + uint8_t m_audio_nmi_enable_type = 0; /* protection-related (for mmonkey) */ - int m_protection_command; - int m_protection_status; - int m_protection_value; - int m_protection_ret; + int m_protection_command = 0; + int m_protection_status = 0; + int m_protection_value = 0; + int m_protection_ret = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h index 4bcbb74868e..9116bda8c82 100644 --- a/src/mame/includes/bwidow.h +++ b/src/mame/includes/bwidow.h @@ -50,7 +50,7 @@ protected: virtual void machine_start() override { m_leds.resolve(); } virtual void machine_reset() override; - int m_lastdata; + int m_lastdata = 0; required_device m_maincpu; required_device m_earom; optional_ioport m_in3; diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 448e6de113e..8df13f4644d 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -63,16 +63,16 @@ private: required_ioport_array<2> m_port_dsw; /* video-related */ - tilemap_t *m_background; - uint8_t m_videoreg; - uint8_t m_scrollx; - uint8_t m_scrolly; + tilemap_t *m_background = nullptr; + uint8_t m_videoreg = 0; + uint8_t m_scrollx = 0; + uint8_t m_scrolly = 0; /* Kaneko BEAST state */ - uint8_t m_beast_p0; - uint8_t m_beast_p1; - uint8_t m_beast_p2; - uint8_t m_beast_p3; + uint8_t m_beast_p0 = 0; + uint8_t m_beast_p1 = 0; + uint8_t m_beast_p2 = 0; + uint8_t m_beast_p3 = 0; /* devices */ required_device m_mastercpu; diff --git a/src/mame/includes/elf.h b/src/mame/includes/elf.h index 0e2d02b4a20..6715acc18fc 100644 --- a/src/mame/includes/elf.h +++ b/src/mame/includes/elf.h @@ -75,7 +75,7 @@ private: output_finder<> m_led; // display state - uint8_t m_data; + uint8_t m_data = 0; }; #endif diff --git a/src/mame/includes/fcrash.h b/src/mame/includes/fcrash.h index 03752241622..7af41624be9 100644 --- a/src/mame/includes/fcrash.h +++ b/src/mame/includes/fcrash.h @@ -92,20 +92,20 @@ protected: void sgyxz_sound_map(address_map &map); /* sound hw */ - int m_sample_buffer1; - int m_sample_buffer2; - int m_sample_select1; - int m_sample_select2; + int m_sample_buffer1 = 0; + int m_sample_buffer2 = 0; + int m_sample_select1 = 0; + int m_sample_select2 = 0; /* video config */ - uint8_t m_layer_enable_reg; - uint8_t m_layer_mask_reg[4]; - int m_layer_scroll1x_offset; - int m_layer_scroll2x_offset; - int m_layer_scroll3x_offset; - int m_sprite_base; - int m_sprite_list_end_marker; - int m_sprite_x_offset; + uint8_t m_layer_enable_reg = 0; + uint8_t m_layer_mask_reg[4] = {}; + int m_layer_scroll1x_offset = 0; + int m_layer_scroll2x_offset = 0; + int m_layer_scroll3x_offset = 0; + int m_sprite_base = 0; + int m_sprite_list_end_marker = 0; + int m_sprite_x_offset = 0; std::unique_ptr m_bootleg_sprite_ram; std::unique_ptr m_bootleg_work_ram; diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index def48ddd1d8..d7d6736d150 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -54,23 +54,23 @@ private: required_shared_ptr m_spriteram; /* video-related */ - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg1_tilemap; - tilemap_t *m_bg2_tilemap; - uint8_t m_scroll1_x[2]; - uint8_t m_scroll1_y[2]; - uint8_t m_scroll2_x[2]; - uint8_t m_scroll2_y[2]; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_bg1_tilemap = nullptr; + tilemap_t *m_bg2_tilemap = nullptr; + uint8_t m_scroll1_x[2]{}; + uint8_t m_scroll1_y[2]{}; + uint8_t m_scroll2_x[2]{}; + uint8_t m_scroll2_y[2]{}; /* misc */ - int m_sound_irq_enable; - int m_nmi_enable; - int m_adpcm_toggle; - int m_coin_command_pending; + int m_sound_irq_enable = 0; + int m_nmi_enable = 0; + int m_adpcm_toggle = 0; + int m_coin_command_pending = 0; - uint8_t m_mcu_p3; - uint8_t m_maincpu_to_mcu; - uint8_t m_mcu_to_maincpu; + uint8_t m_mcu_p3 = 0; + uint8_t m_maincpu_to_mcu = 0; + uint8_t m_mcu_to_maincpu = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index 53dcf701690..f0345e0be64 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -155,21 +155,21 @@ private: optional_ioport_array<2> m_steer; output_finder<4> m_leds; - uint8_t m_in_service_mode; - uint32_t m_dial[2]; - uint8_t m_steer_dir[2]; - uint8_t m_steer_flag[2]; - uint8_t m_gear; - - uint8_t m_flash; - uint8_t m_crash[2]; - uint8_t m_skid[2]; + uint8_t m_in_service_mode = 0; + uint32_t m_dial[2]{}; + uint8_t m_steer_dir[2]{}; + uint8_t m_steer_flag[2]{}; + uint8_t m_gear = 0; + + uint8_t m_flash = 0; + uint8_t m_crash[2]{}; + uint8_t m_skid[2]{}; bitmap_ind16 m_helper1; bitmap_ind16 m_helper2; - uint32_t m_color1_mask; - uint32_t m_color2_mask; - tilemap_t *m_tilemap1; - tilemap_t *m_tilemap2; + uint32_t m_color1_mask = 0; + uint32_t m_color2_mask = 0; + tilemap_t *m_tilemap1 = nullptr; + tilemap_t *m_tilemap2 = nullptr; }; diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index 0b78de87c6b..2630fb2cab4 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -55,22 +55,22 @@ private: optional_shared_ptr m_workram; /* video-related */ - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; std::vector m_paletteram; std::vector m_paletteram_ext; - uint8_t m_gfxctrl; - uint8_t m_char_bank; - uint8_t m_palette_bank; + uint8_t m_gfxctrl = 0; + uint8_t m_char_bank = 0; + uint8_t m_palette_bank = 0; /* sound-related */ - uint8_t m_snd_ctrl0; - uint8_t m_snd_ctrl1; - uint8_t m_snd_ctrl2; - uint8_t m_snd_ctrl3; + uint8_t m_snd_ctrl0 = 0; + uint8_t m_snd_ctrl1 = 0; + uint8_t m_snd_ctrl2 = 0; + uint8_t m_snd_ctrl3 = 0; /* protection sims */ - uint8_t m_from_mcu; - int m_mcu_select; + uint8_t m_from_mcu = 0; + int m_mcu_select = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index b6fdab988cc..7dcc48ff129 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -44,7 +44,7 @@ private: required_memory_bank m_okibank; /* video-related */ - tilemap_t *m_tilemap; + tilemap_t *m_tilemap = nullptr; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index d05188a47e2..1a5eb8eb0d0 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -64,30 +64,30 @@ private: optional_memory_bank m_adpcm_bank; /* video-related */ - tilemap_t *m_text_layer; - tilemap_t *m_foreground; - tilemap_t *m_background; + tilemap_t *m_text_layer = nullptr; + tilemap_t *m_foreground = nullptr; + tilemap_t *m_background = nullptr; bitmap_ind16 m_sprite_bitmap; bitmap_ind16 m_tile_bitmap_bg; bitmap_ind16 m_tile_bitmap_fg; bitmap_ind16 m_tile_bitmap_tx; - uint16_t m_tx_scroll_x; - uint16_t m_tx_scroll_y; - uint16_t m_bg_scroll_x; - uint16_t m_bg_scroll_y; - uint16_t m_fg_scroll_x; - uint16_t m_fg_scroll_y; - int8_t m_tx_offset_y; - int8_t m_bg_offset_y; - int8_t m_fg_offset_y; - int8_t m_spr_offset_y; + uint16_t m_tx_scroll_x = 0; + uint16_t m_tx_scroll_y = 0; + uint16_t m_bg_scroll_x = 0; + uint16_t m_bg_scroll_y = 0; + uint16_t m_fg_scroll_x = 0; + uint16_t m_fg_scroll_y = 0; + int8_t m_tx_offset_y = 0; + int8_t m_bg_offset_y = 0; + int8_t m_fg_offset_y = 0; + int8_t m_spr_offset_y = 0; /* misc */ - int m_sprite_sizey; - int m_prot; - int m_jumpcode; - const int *m_jumppoints; // raiga, wildfang - bool m_adpcm_toggle; + int m_sprite_sizey = 0; + int m_prot = 0; + int m_jumpcode = 0; + const int *m_jumppoints = nullptr; // raiga, wildfang + bool m_adpcm_toggle = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/glass.h b/src/mame/includes/glass.h index 8be999b6af5..04922cc3509 100644 --- a/src/mame/includes/glass.h +++ b/src/mame/includes/glass.h @@ -49,13 +49,13 @@ private: required_memory_bank m_okibank; /* video-related */ - tilemap_t *m_pant[2]; + tilemap_t *m_pant[2]{}; std::unique_ptr m_screen_bitmap; /* misc */ - int m_current_bit; - int m_cause_interrupt; - int m_blitter_command; + int m_current_bit = 0; + int m_cause_interrupt = 0; + int m_blitter_command = 0; void shareram_w(offs_t offset, uint8_t data); uint8_t shareram_r(offs_t offset); diff --git a/src/mame/includes/gundealr.h b/src/mame/includes/gundealr.h index a3db8a416af..6e07327d011 100644 --- a/src/mame/includes/gundealr.h +++ b/src/mame/includes/gundealr.h @@ -41,9 +41,9 @@ private: optional_ioport_array<3> m_port_in; /* video-related */ - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; - uint8_t m_scroll[4]; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + uint8_t m_scroll[4]{}; /* misc */ int m_input_ports_hack; diff --git a/src/mame/includes/huebler.h b/src/mame/includes/huebler.h index 05cbcdb573b..432b3beb3fa 100644 --- a/src/mame/includes/huebler.h +++ b/src/mame/includes/huebler.h @@ -66,8 +66,8 @@ private: // keyboard state int m_key_d6; int m_key_d7; - int m_key_a4; - int m_key_a5; + int m_key_a4 = 0; + int m_key_a5 = 0; int m_key_a8; // video state @@ -79,8 +79,8 @@ private: void amu880_mem(address_map &map); // cassette variables - u8 m_cnt; - bool m_cassbit; + u8 m_cnt = 0; + bool m_cassbit = false; }; #endif diff --git a/src/mame/includes/hx20.h b/src/mame/includes/hx20.h index 1925084aca8..ebc6467822c 100644 --- a/src/mame/includes/hx20.h +++ b/src/mame/includes/hx20.h @@ -101,22 +101,22 @@ private: void update_interrupt(); // CPU state - int m_slave_sio; - int m_slave_rx; - int m_slave_tx; - int m_slave_flag; - int m_rtc_irq; + int m_slave_sio = 0; + int m_slave_rx = 0; + int m_slave_tx = 0; + int m_slave_flag = 0; + int m_rtc_irq = 0; // keyboard state - uint8_t m_ksc; - int m_kbrequest; + uint8_t m_ksc = 0; + int m_kbrequest = 0; // video state - uint8_t m_lcd_data; + uint8_t m_lcd_data = 0; // sio state - int m_sio_rx; - int m_sio_pin; + int m_sio_rx = 0; + int m_sio_pin = 0; void hx20_mem(address_map &map); void hx20_sub_mem(address_map &map); diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h index 3a2985d8698..65173fc3e71 100644 --- a/src/mame/includes/kickgoal.h +++ b/src/mame/includes/kickgoal.h @@ -78,28 +78,28 @@ private: void oki_map(address_map &map); /* video-related */ - tilemap_t *m_fgtm; - tilemap_t *m_bgtm; - tilemap_t *m_bg2tm; + tilemap_t *m_fgtm = nullptr; + tilemap_t *m_bgtm = nullptr; + tilemap_t *m_bg2tm = nullptr; /* misc */ - int m_snd_new; - int m_snd_sam[4]; + int m_snd_new = 0; + int m_snd_sam[4]{}; - u8 m_pic_portc; - u8 m_pic_portb; - int m_sound_command_sent; + u8 m_pic_portc = 0; + u8 m_pic_portb = 0; + int m_sound_command_sent = 0; - int m_fg_base; + int m_fg_base = 0; - int m_bg_base; - int m_bg_mask; + int m_bg_base = 0; + int m_bg_mask = 0; - int m_bg2_base; - int m_bg2_mask; - int m_bg2_region; + int m_bg2_base = 0; + int m_bg2_mask = 0; + int m_bg2_region = 0; - int m_sprbase; + int m_sprbase = 0; void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); diff --git a/src/mame/includes/lastduel.h b/src/mame/includes/lastduel.h index 54b0fe403f1..52f986f44fd 100644 --- a/src/mame/includes/lastduel.h +++ b/src/mame/includes/lastduel.h @@ -51,12 +51,12 @@ private: optional_memory_bank m_audiobank; /* video-related */ - tilemap_t *m_tilemap[2]; - tilemap_t *m_tx_tilemap; - uint16_t m_vctrl[8]; - int m_sprite_flipy_mask; - int m_sprite_pri_mask; - int m_tilemap_priority; + tilemap_t *m_tilemap[2]{}; + tilemap_t *m_tx_tilemap = nullptr; + uint16_t m_vctrl[8]{}; + int m_sprite_flipy_mask = 0; + int m_sprite_pri_mask = 0; + int m_tilemap_priority = 0; void mg_bankswitch_w(uint8_t data); void flip_w(uint8_t data); diff --git a/src/mame/includes/m107.h b/src/mame/includes/m107.h index d31e733451c..5cc3068a250 100644 --- a/src/mame/includes/m107.h +++ b/src/mame/includes/m107.h @@ -20,8 +20,8 @@ struct pf_layer_info { - tilemap_t * tmap; - uint16_t vram_base; + tilemap_t * tmap = nullptr; + uint16_t vram_base = 0; }; class m107_state : public driver_device @@ -66,12 +66,12 @@ private: optional_memory_bank m_mainbank; // driver init - uint8_t m_spritesystem; + uint8_t m_spritesystem = 0; - uint8_t m_sprite_display; - uint16_t m_raster_irq_position; + uint8_t m_sprite_display = 0; + uint16_t m_raster_irq_position = 0; pf_layer_info m_pf_layer[4]; - uint16_t m_control[0x10]; + uint16_t m_control[0x10]{}; void coincounter_w(uint8_t data); void bankswitch_w(uint8_t data); diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 2d92d05c1c0..586763fcc30 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -66,8 +66,8 @@ private: virtual void machine_reset() override; /* misc */ - int m_nmi_enable; - uint8_t m_sound_irq_mask; + int m_nmi_enable = 0; + uint8_t m_sound_irq_mask = 0; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h index 5902bc31874..378e2129869 100644 --- a/src/mame/includes/malzak.h +++ b/src/mame/includes/malzak.h @@ -72,12 +72,12 @@ private: TILE_GET_INFO_MEMBER(get_tile_info); std::unique_ptr m_trom_bitmap; std::unique_ptr m_playfield_bitmap; - tilemap_t *m_playfield_tilemap; - int m_playfield_code[256]; - int m_scrollx; - int m_scrolly; - int m_collision_counter; - u8 m_playfield_bank; + tilemap_t *m_playfield_tilemap = nullptr; + int m_playfield_code[256]{}; + int m_scrollx = 0; + int m_scrolly = 0; + int m_collision_counter = 0; + u8 m_playfield_bank = 0; }; #endif // MAME_INCLUDES_MALZAK_H diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index b266763d947..72d8bb848f6 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -88,16 +88,16 @@ private: optional_ioport m_coin; optional_ioport m_service; - uint8_t m_alpha_data; - uint8_t m_alpha_rcvd; - uint8_t m_alpha_xmtd; - uint8_t m_gamma_data; - uint8_t m_gamma_rcvd; - uint8_t m_gamma_xmtd; - uint8_t m_player_1; - uint8_t m_alpha_irq_clock; - uint8_t m_alpha_irq_clock_enable; - uint8_t m_gamma_irq_clock; - uint8_t m_has_gamma_cpu; - uint8_t m_speech_write_buffer; + uint8_t m_alpha_data = 0; + uint8_t m_alpha_rcvd = 0; + uint8_t m_alpha_xmtd = 0; + uint8_t m_gamma_data = 0; + uint8_t m_gamma_rcvd = 0; + uint8_t m_gamma_xmtd = 0; + uint8_t m_player_1 = 0; + uint8_t m_alpha_irq_clock = 0; + uint8_t m_alpha_irq_clock_enable = 0; + uint8_t m_gamma_irq_clock = 0; + uint8_t m_has_gamma_cpu = 0; + uint8_t m_speech_write_buffer = 0; }; diff --git a/src/mame/includes/micronic.h b/src/mame/includes/micronic.h index 4ff9b2bb4b7..5613849754c 100644 --- a/src/mame/includes/micronic.h +++ b/src/mame/includes/micronic.h @@ -87,11 +87,11 @@ private: required_device m_ram; required_shared_ptr m_ram_base; - uint8_t m_banks_num; - uint8_t m_kp_matrix; - uint8_t m_lcd_contrast; - int m_lcd_backlight; - uint8_t m_status_flag; + uint8_t m_banks_num = 0; + uint8_t m_kp_matrix = 0; + uint8_t m_lcd_contrast = 0; + int m_lcd_backlight = 0; + uint8_t m_status_flag = 0; required_memory_bank m_bank1; required_ioport m_bit0; diff --git a/src/mame/includes/microtan.h b/src/mame/includes/microtan.h index 7cdcbf4b25c..90c1ebd2928 100644 --- a/src/mame/includes/microtan.h +++ b/src/mame/includes/microtan.h @@ -72,15 +72,15 @@ protected: optional_ioport m_keypad; optional_device m_tanbus; - uint8_t m_keypad_column; - uint8_t m_keyboard_ascii; - emu_timer *m_pulse_nmi_timer; - uint8_t m_keyrows[10]; - int m_lastrow; - int m_mask; - int m_key; - int m_repeat; - int m_repeater; + uint8_t m_keypad_column = 0; + uint8_t m_keyboard_ascii = 0; + emu_timer *m_pulse_nmi_timer = nullptr; + uint8_t m_keyrows[10]{}; + int m_lastrow = 0; + int m_mask = 0; + int m_key = 0; + int m_repeat = 0; + int m_repeater = 0; virtual void store_key(int key); @@ -90,9 +90,9 @@ private: optional_memory_region m_gfx1; output_finder<> m_led; - uint8_t m_chunky_graphics; + uint8_t m_chunky_graphics = 0; std::unique_ptr m_chunky_buffer; - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; uint8_t sound_r(); void sound_w(uint8_t data); diff --git a/src/mame/includes/mustache.h b/src/mame/includes/mustache.h index bc4f9612cb0..1f3ff0660d7 100644 --- a/src/mame/includes/mustache.h +++ b/src/mame/includes/mustache.h @@ -40,8 +40,8 @@ private: required_ioport m_dswb; - tilemap_t *m_bg_tilemap; - int m_control_byte; + tilemap_t *m_bg_tilemap = nullptr; + int m_control_byte = 0; void videoram_w(offs_t offset, uint8_t data); void video_control_w(uint8_t data); diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h index 55c2dfe927b..fc2967446d7 100644 --- a/src/mame/includes/namcos1.h +++ b/src/mame/includes/namcos1.h @@ -96,25 +96,25 @@ private: required_ioport m_io_dipsw; required_device m_dsw_sel; - int m_key_id; - int m_key_reg; - int m_key_rng; - int m_key_swap4_arg; - int m_key_swap4; - int m_key_bottom4; - int m_key_top4; - u32 m_key_quotient; - u32 m_key_reminder; - u32 m_key_numerator_high_word; - u8 m_key[8]; - int m_mcu_patch_data; - int m_reset; - int m_input_count; - int m_strobe; - int m_strobe_count; - int m_stored_input[2]; - bool m_copy_sprites; - u8 m_drawmode_table[16]; + int m_key_id = 0; + int m_key_reg = 0; + int m_key_rng = 0; + int m_key_swap4_arg = 0; + int m_key_swap4 = 0; + int m_key_bottom4 = 0; + int m_key_top4 = 0; + u32 m_key_quotient = 0; + u32 m_key_reminder = 0; + u32 m_key_numerator_high_word = 0; + u8 m_key[8]{}; + int m_mcu_patch_data = 0; + int m_reset = 0; + int m_input_count = 0; + int m_strobe = 0; + int m_strobe_count = 0; + int m_stored_input[2]{}; + bool m_copy_sprites = false; + u8 m_drawmode_table[16]{}; DECLARE_WRITE_LINE_MEMBER(subres_w); void audiocpu_irq_ack_w(u8 data); diff --git a/src/mame/includes/ondra.h b/src/mame/includes/ondra.h index cbd06467788..c8b009a47e7 100644 --- a/src/mame/includes/ondra.h +++ b/src/mame/includes/ondra.h @@ -48,9 +48,9 @@ private: void update_banks(); - bool m_video_enable; - u8 m_bank_status; - u8 m_bank_old; + bool m_video_enable = false; + u8 m_bank_status = 0; + u8 m_bank_old = 0; required_device m_maincpu; required_device m_cassette; diff --git a/src/mame/includes/pass.h b/src/mame/includes/pass.h index 5ec351ab35f..4731407804b 100644 --- a/src/mame/includes/pass.h +++ b/src/mame/includes/pass.h @@ -38,8 +38,8 @@ private: void pass_sound_io_map(address_map &map); void pass_sound_map(address_map &map); - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; required_shared_ptr m_bg_videoram; required_shared_ptr m_fg_videoram; diff --git a/src/mame/includes/pecom.h b/src/mame/includes/pecom.h index 1ea81be0074..8a6f1c9b2e6 100644 --- a/src/mame/includes/pecom.h +++ b/src/mame/includes/pecom.h @@ -54,11 +54,11 @@ private: void mem_map(address_map &map); std::unique_ptr m_charram; /* character generator ROM */ - bool m_reset; /* CPU mode */ - bool m_dma; /* memory refresh DMA */ + bool m_reset = false; /* CPU mode */ + bool m_dma = false; /* memory refresh DMA */ /* timers */ - emu_timer *m_reset_timer; /* power on reset timer */ + emu_timer *m_reset_timer = nullptr; /* power on reset timer */ required_device m_maincpu; required_device m_cdp1869; diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h index d224051999f..6382f17f97a 100644 --- a/src/mame/includes/pgm.h +++ b/src/mame/includes/pgm.h @@ -68,7 +68,7 @@ protected: required_device m_maincpu; /* hack */ - int m_irq4_disabled; + int m_irq4_disabled = 0; void pgm_base_mem(address_map &map); void pgm_mem(address_map &map); @@ -78,25 +78,25 @@ private: required_shared_ptr m_videoregs; required_shared_ptr m_videoram; required_shared_ptr m_z80_mainram; - u16 * m_bg_videoram; - u16 * m_tx_videoram; - u16 * m_rowscrollram; + u16 * m_bg_videoram = nullptr; + u16 * m_tx_videoram = nullptr; + u16 * m_rowscrollram = nullptr; /* video-related */ struct sprite_t { - int x,y; - bool xgrow, ygrow; - u32 xzoom, yzoom; - u32 color, offs; - u32 width, height; - u8 flip, pri; + int x = 0, y = 0; + bool xgrow = false, ygrow = false; + u32 xzoom = 0, yzoom = 0; + u32 color = 0, offs = 0; + u32 width = 0, height = 0; + u8 flip = 0, pri = 0; }; std::unique_ptr m_spritelist; - struct sprite_t *m_sprite_ptr_pre; - tilemap_t *m_bg_tilemap; - tilemap_t *m_tx_tilemap; + struct sprite_t *m_sprite_ptr_pre = nullptr; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_tx_tilemap = nullptr; /* devices */ required_device m_soundcpu; @@ -109,9 +109,9 @@ private: /* used by rendering */ required_region_ptr m_adata; required_region_ptr m_bdata; - u32 m_aoffset; - u8 m_abit; - u32 m_boffset; + u32 m_aoffset = 0; + u8 m_abit = 0; + u32 m_boffset = 0; u16 videoram_r(offs_t offset); void videoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/mame/includes/pgm2.h b/src/mame/includes/pgm2.h index 598b75840b9..b1b0b402892 100644 --- a/src/mame/includes/pgm2.h +++ b/src/mame/includes/pgm2.h @@ -124,8 +124,8 @@ private: void decrypt_kov3_module(u32 addrxor, u16 dataxor); - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg_tilemap; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_bg_tilemap = nullptr; bitmap_ind16 m_sprite_bitmap; @@ -139,32 +139,32 @@ private: void copy_sprites_from_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect, u16 pri); void common_encryption_init(); - u8 m_encryption_table[0x100]; - bool m_has_decrypted; // so we only do it once. - bool m_has_decrypted_kov3_module; - u32 m_spritekey; - u32 m_realspritekey; - bool m_sprite_predecrypted; - - u8 m_shareram[0x100]; - u16 m_share_bank; - u32 m_mcu_regs[8]; - u32 m_mcu_result0; - u32 m_mcu_result1; - u8 m_mcu_last_cmd; + u8 m_encryption_table[0x100]{}; + bool m_has_decrypted = false; // so we only do it once. + bool m_has_decrypted_kov3_module = false; + u32 m_spritekey = 0; + u32 m_realspritekey = 0; + bool m_sprite_predecrypted = false; + + u8 m_shareram[0x100]{}; + u16 m_share_bank = 0; + u32 m_mcu_regs[8]{}; + u32 m_mcu_result0 = 0; + u32 m_mcu_result1 = 0; + u8 m_mcu_last_cmd = 0; void mcu_command(bool is_command); std::vector m_encrypted_copy; - u32 m_pio_out_data; - const kov3_module_key *module_key; - bool module_sum_read; - u32 module_in_latch; - u32 module_out_latch; - int module_prev_state; - int module_clk_cnt; - u8 module_rcv_buf[10]; - u8 module_send_buf[9]; + u32 m_pio_out_data = 0; + const kov3_module_key *module_key = nullptr; + bool module_sum_read = false; + u32 module_in_latch = 0; + u32 module_out_latch = 0; + int module_prev_state = 0; + int module_clk_cnt = 0; + u8 module_rcv_buf[10]{}; + u8 module_send_buf[9]{}; // devices required_device m_maincpu; diff --git a/src/mame/includes/polyplay.h b/src/mame/includes/polyplay.h index 952183544c9..c14ab8d9520 100644 --- a/src/mame/includes/polyplay.h +++ b/src/mame/includes/polyplay.h @@ -79,8 +79,8 @@ private: required_device m_palette; /* audio */ - uint8_t m_flipflop1; - uint8_t m_flipflop2; + uint8_t m_flipflop1 = 0; + uint8_t m_flipflop2 = 0; required_device m_speaker1; required_device m_speaker2; output_finder<4> m_lamps; diff --git a/src/mame/includes/prehisle.h b/src/mame/includes/prehisle.h index efae38f0d00..8da44163e53 100644 --- a/src/mame/includes/prehisle.h +++ b/src/mame/includes/prehisle.h @@ -59,15 +59,15 @@ private: required_region_ptr m_tilemap_rom; required_ioport m_io_p1; - uint8_t m_invert_controls; - uint16_t m_bg_scrollx; - uint16_t m_bg_scrolly; - uint16_t m_fg_scrollx; - uint16_t m_fg_scrolly; + uint8_t m_invert_controls = 0; + uint16_t m_bg_scrollx = 0; + uint16_t m_bg_scrolly = 0; + uint16_t m_fg_scrollx = 0; + uint16_t m_fg_scrolly = 0; - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; - tilemap_t *m_tx_tilemap; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_tx_tilemap = nullptr; required_device m_maincpu; required_device m_audiocpu; diff --git a/src/mame/includes/primo.h b/src/mame/includes/primo.h index 127e492b1bd..1c14510d9cd 100644 --- a/src/mame/includes/primo.h +++ b/src/mame/includes/primo.h @@ -86,12 +86,12 @@ private: required_ioport m_reset_port; required_shared_ptr m_vram; - memory_region *m_cart1_rom; - memory_region *m_cart2_rom; + memory_region *m_cart1_rom = nullptr; + memory_region *m_cart2_rom = nullptr; - uint16_t m_video_memory_base; - uint8_t m_port_FD; - int m_nmi; + uint16_t m_video_memory_base = 0; + uint8_t m_port_FD = 0; + int m_nmi = 0; }; diff --git a/src/mame/includes/qdrmfgp.h b/src/mame/includes/qdrmfgp.h index aa2aef28911..673a0ba355e 100644 --- a/src/mame/includes/qdrmfgp.h +++ b/src/mame/includes/qdrmfgp.h @@ -53,10 +53,10 @@ private: required_device m_palette; required_shared_ptr m_sndram; - uint16_t m_control; - int32_t m_gp2_irq_control; - int32_t m_pal; - emu_timer *m_gp2_timer; + uint16_t m_control = 0; + int32_t m_gp2_irq_control = 0; + int32_t m_pal = 0; + emu_timer *m_gp2_timer = nullptr; void gp_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void gp2_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/renegade.h b/src/mame/includes/renegade.h index aedfbf4e18a..599ec5fde79 100644 --- a/src/mame/includes/renegade.h +++ b/src/mame/includes/renegade.h @@ -61,13 +61,13 @@ private: required_region_ptr m_adpcmrom; - uint32_t m_adpcm_pos; - uint32_t m_adpcm_end; - bool m_adpcm_playing; + uint32_t m_adpcm_pos = 0; + uint32_t m_adpcm_end = 0; + bool m_adpcm_playing = false; - int32_t m_scrollx; - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; + int32_t m_scrollx = 0; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; uint8_t mcu_reset_r(); void bankswitch_w(uint8_t data); diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h index 10674d46d15..5cf2d1cbb6c 100644 --- a/src/mame/includes/rockrage.h +++ b/src/mame/includes/rockrage.h @@ -49,7 +49,7 @@ private: required_memory_bank m_rombank; /* video-related */ - int m_vreg; + int m_vreg = 0; void rockrage_bankswitch_w(uint8_t data); void rockrage_sh_irqtrigger_w(uint8_t data); diff --git a/src/mame/includes/sage2.h b/src/mame/includes/sage2.h index 86696d48d79..ccdb97f1ecd 100644 --- a/src/mame/includes/sage2.h +++ b/src/mame/includes/sage2.h @@ -89,12 +89,12 @@ private: required_device m_ieee488; // floppy state - int m_fdc_int; - int m_fdie; + int m_fdc_int = 0; + int m_fdie = 0; - int m_centronics_busy; - int m_centronics_perror; - int m_centronics_select; - int m_centronics_fault; + int m_centronics_busy = 0; + int m_centronics_perror = 0; + int m_centronics_select = 0; + int m_centronics_fault = 0; output_finder<> m_led; }; diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h index 8b9a0f41880..a9636d18f10 100644 --- a/src/mame/includes/segas24.h +++ b/src/mame/includes/segas24.h @@ -94,39 +94,39 @@ private: static const uint8_t s_quizmeku_mlt[8]; static const uint8_t s_dcclub_mlt[8]; - uint8_t m_fdc_track_side; - uint8_t m_fdc_mode; - int m_fdc_status; - int m_fdc_track; - int m_fdc_sector; - int m_fdc_data; - int m_fdc_phys_track; - bool m_fdc_irq; - bool m_fdc_drq; - int m_fdc_span; - int m_fdc_index_count; - uint8_t *m_fdc_pt; - int m_track_size; - int m_cur_input_line; - uint8_t m_curbank; - uint8_t m_mlatch; - const uint8_t *m_mlatch_table; - - uint16_t m_irq_tdata, m_irq_tval; - uint8_t m_irq_tmode, m_irq_allow0, m_irq_allow1; - bool m_irq_timer_pend0; - bool m_irq_timer_pend1; - bool m_irq_yms; - bool m_irq_vblank; - bool m_irq_sprite; + uint8_t m_fdc_track_side = 0; + uint8_t m_fdc_mode = 0; + int m_fdc_status = 0; + int m_fdc_track = 0; + int m_fdc_sector = 0; + int m_fdc_data = 0; + int m_fdc_phys_track = 0; + bool m_fdc_irq = false; + bool m_fdc_drq = false; + int m_fdc_span = 0; + int m_fdc_index_count = 0; + uint8_t *m_fdc_pt = nullptr; + int m_track_size = 0; + int m_cur_input_line = 0; + uint8_t m_curbank = 0; + uint8_t m_mlatch = 0; + const uint8_t *m_mlatch_table = nullptr; + + uint16_t m_irq_tdata = 0, m_irq_tval = 0; + uint8_t m_irq_tmode = 0, m_irq_allow0 = 0, m_irq_allow1 = 0; + bool m_irq_timer_pend0 = false; + bool m_irq_timer_pend1 = false; + bool m_irq_yms = false; + bool m_irq_vblank = false; + bool m_irq_sprite = false; attotime m_irq_synctime, m_irq_vsynctime; required_device m_irq_timer; required_device m_irq_timer_clear; //timer_device *m_irq_frc; required_device m_frc_cnt_timer; - uint8_t m_frc_mode; + uint8_t m_frc_mode = 0; - bool m_cnt1; + bool m_cnt1 = false; required_device m_vtile; required_device m_vsprite; @@ -177,7 +177,7 @@ private: // game specific TIMER_CALLBACK_MEMBER(gground_hack_timer_callback); - emu_timer *m_gground_hack_timer; + emu_timer *m_gground_hack_timer = nullptr; required_ioport m_p1; required_ioport m_p2; required_ioport m_p3; diff --git a/src/mame/includes/shadfrce.h b/src/mame/includes/shadfrce.h index cb5e9fb2119..c876a6ea5d3 100644 --- a/src/mame/includes/shadfrce.h +++ b/src/mame/includes/shadfrce.h @@ -67,15 +67,15 @@ private: required_shared_ptr m_spvideoram; std::unique_ptr m_spvideoram_old; - tilemap_t *m_fgtilemap; - tilemap_t *m_bg0tilemap; - tilemap_t *m_bg1tilemap; - int m_video_enable; - int m_irqs_enable; - int m_raster_scanline; - int m_raster_irq_enable; - int m_vblank; - int m_prev_value; + tilemap_t *m_fgtilemap = nullptr; + tilemap_t *m_bg0tilemap = nullptr; + tilemap_t *m_bg1tilemap = nullptr; + int m_video_enable = 0; + int m_irqs_enable = 0; + int m_raster_scanline = 0; + int m_raster_irq_enable = 0; + int m_vblank = 0; + int m_prev_value = 0; void flip_screen(uint16_t data); uint16_t input_ports_r(offs_t offset); diff --git a/src/mame/includes/shangha3.h b/src/mame/includes/shangha3.h index c55bce73886..9082d612289 100644 --- a/src/mame/includes/shangha3.h +++ b/src/mame/includes/shangha3.h @@ -53,11 +53,11 @@ private: optional_memory_bank m_okibank; // driver init configuration - int m_do_shadows; - uint8_t m_drawmode_table[16]; + int m_do_shadows = 0; + uint8_t m_drawmode_table[16]{}; - int m_prot_count; - uint16_t m_gfxlist_addr; + int m_prot_count = 0; + uint16_t m_gfxlist_addr = 0; bitmap_ind16 m_rawbitmap; // common diff --git a/src/mame/includes/shuuz.h b/src/mame/includes/shuuz.h index f07487764ef..cfe3a0db8b9 100644 --- a/src/mame/includes/shuuz.h +++ b/src/mame/includes/shuuz.h @@ -48,7 +48,7 @@ private: required_device m_screen; required_device m_vad; - int m_cur[2]; + int m_cur[2]{}; static const atari_motion_objects_config s_mob_config; }; diff --git a/src/mame/includes/silkroad.h b/src/mame/includes/silkroad.h index bbf7f80c6e3..d8afaff85e0 100644 --- a/src/mame/includes/silkroad.h +++ b/src/mame/includes/silkroad.h @@ -40,7 +40,7 @@ private: required_memory_bank m_okibank; - tilemap_t *m_tilemap[3]; + tilemap_t *m_tilemap[3]{}; void coin_w(uint8_t data); template void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/includes/speedspn.h b/src/mame/includes/speedspn.h index 68e5a2fa6ee..eb3ecf109be 100644 --- a/src/mame/includes/speedspn.h +++ b/src/mame/includes/speedspn.h @@ -44,9 +44,9 @@ private: required_memory_bank m_okibank; required_shared_ptr m_attram; - tilemap_t *m_tilemap; - bool m_display_disable; - uint32_t m_bank_vidram; + tilemap_t *m_tilemap = nullptr; + bool m_display_disable = false; + uint32_t m_bank_vidram = 0; std::vector m_vidram; uint8_t irq_ack_r(); void rombank_w(uint8_t data); diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h index 8d74185d34f..adc7937a709 100644 --- a/src/mame/includes/stactics.h +++ b/src/mame/includes/stactics.h @@ -110,21 +110,21 @@ private: required_ioport m_fake; /* machine state */ - int m_vert_pos; - int m_horiz_pos; - bool m_motor_on; + int m_vert_pos = 0; + int m_horiz_pos = 0; + bool m_motor_on = false; /* video state */ - uint8_t m_y_scroll_d; - uint8_t m_y_scroll_e; - uint8_t m_y_scroll_f; - uint8_t m_frame_count; - uint8_t m_shot_standby; - uint8_t m_shot_arrive; - uint16_t m_beam_state; - uint16_t m_old_beam_state; - uint16_t m_beam_states_per_frame; - uint8_t m_palette_bank; + uint8_t m_y_scroll_d = 0; + uint8_t m_y_scroll_e = 0; + uint8_t m_y_scroll_f = 0; + uint8_t m_frame_count = 0; + uint8_t m_shot_standby = 0; + uint8_t m_shot_arrive = 0; + uint16_t m_beam_state = 0; + uint16_t m_old_beam_state = 0; + uint16_t m_beam_states_per_frame = 0; + uint8_t m_palette_bank = 0; }; #endif // MAME_INCLUDES_STACTICS_H diff --git a/src/mame/includes/stadhero.h b/src/mame/includes/stadhero.h index 9482860ddf5..9ffa1b5d779 100644 --- a/src/mame/includes/stadhero.h +++ b/src/mame/includes/stadhero.h @@ -41,7 +41,7 @@ private: required_ioport m_coin; - tilemap_t *m_pf1_tilemap; + tilemap_t *m_pf1_tilemap = nullptr; void int_ack_w(uint16_t data); void pf1_data_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h index 24a9e871b02..5233785e4fb 100644 --- a/src/mame/includes/suna16.h +++ b/src/mame/includes/suna16.h @@ -103,6 +103,6 @@ private: output_finder<4> m_leds; std::unique_ptr m_paletteram; - int m_color_bank; - uint8_t m_prot; + int m_color_bank = 0; + uint8_t m_prot = 0; }; diff --git a/src/mame/includes/superchs.h b/src/mame/includes/superchs.h index d6387b9fd77..8dc4f01df7d 100644 --- a/src/mame/includes/superchs.h +++ b/src/mame/includes/superchs.h @@ -37,12 +37,12 @@ protected: private: struct schs_tempsprite { - u8 gfx; - u32 code,color; - bool flipx,flipy; - int x,y; - int zoomx,zoomy; - u32 primask; + u8 gfx = 0; + u32 code = 0, color = 0; + bool flipx = 0, flipy = 0; + int x = 0, y = 0; + int zoomx = 0, zoomy = 0; + u32 primask = 0; }; required_shared_ptr m_ram; diff --git a/src/mame/includes/svision.h b/src/mame/includes/svision.h index 74f0e2c5e30..2ba13f3d3f7 100644 --- a/src/mame/includes/svision.h +++ b/src/mame/includes/svision.h @@ -59,16 +59,16 @@ protected: private: struct svision_t { - emu_timer *timer1; - int timer_shot; + emu_timer *timer1 = nullptr; + int timer_shot = 0; }; struct svision_pet_t { - int state; - int on, clock, data; - uint8_t input; - emu_timer *timer; + int state = 0; + int on = 0, clock = 0, data = 0; + uint8_t input = 0; + emu_timer *timer = nullptr; }; DECLARE_WRITE_LINE_MEMBER(sound_irq_w); @@ -117,12 +117,12 @@ private: required_memory_bank m_bank1; required_memory_bank m_bank2; - memory_region *m_cart_rom; + memory_region *m_cart_rom = nullptr; svision_t m_svision; svision_pet_t m_pet; tvlink_t m_tvlink; - bool m_dma_finished; + bool m_dma_finished = false; }; #endif // MAME_INCLUDES_SVISION_H diff --git a/src/mame/includes/taitoair.h b/src/mame/includes/taitoair.h index ce38ccb856c..51940544881 100644 --- a/src/mame/includes/taitoair.h +++ b/src/mame/includes/taitoair.h @@ -20,13 +20,13 @@ enum { TAITOAIR_FRAC_SHIFT = 16, TAITOAIR_POLY_MAX_PT = 16 }; struct taitoair_spoint { - s32 x, y; + s32 x = 0, y = 0; }; struct taitoair_poly { struct taitoair_spoint p[TAITOAIR_POLY_MAX_PT]; - int pcount; - u16 header; + int pcount = 0; + u16 header = 0; }; @@ -67,7 +67,7 @@ private: taitoair_poly m_q; /* misc */ - int m_dsp_hold_signal; + int m_dsp_hold_signal = 0; /* devices */ required_device m_maincpu; @@ -84,15 +84,15 @@ private: std::unique_ptr m_framebuffer[2]; /* 3d info */ - s16 m_frustumLeft; - s16 m_frustumBottom; - s16 m_eyecoordBuffer[4]; /* homogeneous */ + s16 m_frustumLeft = 0; + s16 m_frustumBottom = 0; + s16 m_eyecoordBuffer[4]{}; /* homogeneous */ - bool m_gradbank; + bool m_gradbank = false; - u16 m_dsp_test_object_type; - s16 m_dsp_test_or_clip, m_dsp_test_and_clip; - s16 m_dsp_test_x, m_dsp_test_y, m_dsp_test_z; + u16 m_dsp_test_object_type = 0; + s16 m_dsp_test_or_clip = 0, m_dsp_test_and_clip = 0; + s16 m_dsp_test_x = 0, m_dsp_test_y = 0, m_dsp_test_z = 0; void dsp_test_start_w(u16 data); void dsp_test_x_w(u16 data); @@ -102,14 +102,14 @@ private: u16 dsp_test_or_clip_r(); u16 dsp_test_and_clip_r(); - s16 m_dsp_muldiv_a_1, m_dsp_muldiv_b_1, m_dsp_muldiv_c_1; + s16 m_dsp_muldiv_a_1 = 0, m_dsp_muldiv_b_1 = 0, m_dsp_muldiv_c_1 = 0; void dsp_muldiv_a_1_w(u16 data); void dsp_muldiv_b_1_w(u16 data); void dsp_muldiv_c_1_w(u16 data); u16 dsp_muldiv_1_r(); - s16 m_dsp_muldiv_a_2, m_dsp_muldiv_b_2, m_dsp_muldiv_c_2; + s16 m_dsp_muldiv_a_2 = 0, m_dsp_muldiv_b_2 = 0, m_dsp_muldiv_c_2 = 0; void dsp_muldiv_a_2_w(u16 data); void dsp_muldiv_b_2_w(u16 data); diff --git a/src/mame/includes/targeth.h b/src/mame/includes/targeth.h index ccc5e22363c..b5ab078b067 100644 --- a/src/mame/includes/targeth.h +++ b/src/mame/includes/targeth.h @@ -68,9 +68,9 @@ private: required_memory_bank m_okibank; - emu_timer *m_gun_irq_timer[2]; + emu_timer *m_gun_irq_timer[2]{}; - tilemap_t *m_pant[2]; + tilemap_t *m_pant[2]{}; }; #endif // MAME_INCLUDES_TARGETH_H diff --git a/src/mame/includes/tecmo.h b/src/mame/includes/tecmo.h index 4c8d591fbaf..c3a5e9e04b4 100644 --- a/src/mame/includes/tecmo.h +++ b/src/mame/includes/tecmo.h @@ -68,13 +68,13 @@ private: optional_region_ptr m_adpcm_rom; required_memory_bank m_mainbank; - tilemap_t *m_tx_tilemap; - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg_tilemap; - int m_adpcm_pos; - int m_adpcm_end; - int m_adpcm_data; - int m_video_type; + tilemap_t *m_tx_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_bg_tilemap = nullptr; + int m_adpcm_pos = 0; + int m_adpcm_end = 0; + int m_adpcm_data = 0; + int m_video_type = 0; void bankswitch_w(uint8_t data); void adpcm_end_w(uint8_t data); diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h index 5560d0e0fc7..3ba4206c949 100644 --- a/src/mame/includes/tecmosys.h +++ b/src/mame/includes/tecmosys.h @@ -74,20 +74,20 @@ private: required_region_ptr m_sprite_region; std::unique_ptr m_sprite_gfx; - offs_t m_sprite_gfx_mask; + offs_t m_sprite_gfx_mask = 0; required_memory_bank m_audiobank; required_memory_bank_array<2> m_okibank; - int m_spritelist; + int m_spritelist = 0; bitmap_ind16 m_sprite_bitmap; bitmap_ind16 m_tmp_tilemap_composebitmap; bitmap_ind16 m_tmp_tilemap_renderbitmap; - tilemap_t *m_tilemap[4]; - u8 m_device_read_ptr; - u8 m_device_status; - const struct prot_data* m_device_data; - u8 m_device_value; + tilemap_t *m_tilemap[4]{}; + u8 m_device_read_ptr = 0; + u8 m_device_status = 0; + const struct prot_data* m_device_data = nullptr; + u8 m_device_value = 0; u8 sound_command_pending_r(); void sound_nmi_disable_w(u8 data); diff --git a/src/mame/includes/ti89.h b/src/mame/includes/ti89.h index 9193feaf67a..24dd9f035a5 100644 --- a/src/mame/includes/ti89.h +++ b/src/mame/includes/ti89.h @@ -63,29 +63,29 @@ private: required_ioport m_io_bit7; // HW specifications - uint8_t m_hw_version; - bool m_ram_enabled; + uint8_t m_hw_version = 0; + bool m_ram_enabled = false; // keyboard - uint16_t m_kb_mask; - uint8_t m_on_key; + uint16_t m_kb_mask = 0; + uint8_t m_on_key = 0; // LCD - uint8_t m_lcd_on; - uint32_t m_lcd_base; - uint16_t m_lcd_width; - uint16_t m_lcd_height; - uint16_t m_lcd_contrast; + uint8_t m_lcd_on = 0; + uint32_t m_lcd_base = 0; + uint16_t m_lcd_width = 0; + uint16_t m_lcd_height = 0; + uint16_t m_lcd_contrast = 0; // I/O - uint16_t m_io_hw1[0x10]; - uint16_t m_io_hw2[0x80]; + uint16_t m_io_hw1[0x10]{}; + uint16_t m_io_hw2[0x80]{}; // Timer - uint8_t m_timer_on; - uint8_t m_timer_val; - uint16_t m_timer_mask; - uint64_t m_timer; + uint8_t m_timer_on = 0; + uint8_t m_timer_val = 0; + uint16_t m_timer_mask = 0; + uint64_t m_timer = 0; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/tmc2000e.h b/src/mame/includes/tmc2000e.h index 91b9ecc7695..8211c60c9fd 100644 --- a/src/mame/includes/tmc2000e.h +++ b/src/mame/includes/tmc2000e.h @@ -54,11 +54,11 @@ private: void dma_w(offs_t offset, uint8_t data); /* video state */ - int m_cdp1864_efx; /* EFx */ - uint8_t m_color; + int m_cdp1864_efx = 0; /* EFx */ + uint8_t m_color = 0; /* keyboard state */ - int m_keylatch; /* key latch */ + int m_keylatch = 0; /* key latch */ void tmc2000e_io_map(address_map &map); void tmc2000e_map(address_map &map); diff --git a/src/mame/includes/ultraman.h b/src/mame/includes/ultraman.h index 70c2de1c629..25038e5d032 100644 --- a/src/mame/includes/ultraman.h +++ b/src/mame/includes/ultraman.h @@ -33,7 +33,7 @@ public: void ultraman(machine_config &config); private: - int m_bank[3]; + int m_bank[3] = {}; /* devices */ required_device m_maincpu; diff --git a/src/mame/includes/vc4000.h b/src/mame/includes/vc4000.h index 9a7807bd924..b9093022417 100644 --- a/src/mame/includes/vc4000.h +++ b/src/mame/includes/vc4000.h @@ -66,31 +66,31 @@ public: private: struct SPRITE_HELPER { - uint8_t bitmap[10],x1,x2,y1,y2, res1, res2; + uint8_t bitmap[10], x1, x2, y1, y2, res1, res2; }; struct SPRITE { const SPRITE_HELPER *data; - int mask; - int state; - int delay; - int size; - int y; - uint8_t scolor; - int finished; - int finished_now; + int mask = 0; + int state = 0; + int delay = 0; + int size = 0; + int y = 0; + uint8_t scolor = 0; + int finished = 0; + int finished_now = 0; }; struct vc4000_video_t { SPRITE sprites[4]; - int line; - uint8_t sprite_collision; - uint8_t background_collision; + int line = 0; + uint8_t sprite_collision = 0; + uint8_t background_collision = 0; union { - uint8_t data[0x100]; + uint8_t data[0x100]{}; struct { SPRITE_HELPER sprites[3]; @@ -121,14 +121,14 @@ private: uint8_t elektor_cass_r(); void elektor_cass_w(uint8_t data); vc4000_video_t m_video; - uint8_t m_sprite_collision[0x20]; - uint8_t m_background_collision[0x20]; - uint8_t m_joy1_x; - uint8_t m_joy1_y; - uint8_t m_joy2_x; - uint8_t m_joy2_y; - uint8_t m_objects[512]; - uint8_t m_irq_pause; + uint8_t m_sprite_collision[0x20]{}; + uint8_t m_background_collision[0x20]{}; + uint8_t m_joy1_x = 0; + uint8_t m_joy1_y = 0; + uint8_t m_joy2_x = 0; + uint8_t m_joy2_y = 0; + uint8_t m_objects[512]{}; + uint8_t m_irq_pause = 0; std::unique_ptr m_bitmap; virtual void machine_start() override; virtual void video_start() override; diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index f575aac48b0..25882677ae9 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -71,15 +71,15 @@ private: optional_ioport m_in_config; optional_ioport_array<4> m_ports; - int m_geebee_bgw; - int m_ball_on; - int m_ball_h; - int m_ball_v; - int m_ball_pen; - int m_ball_sizex; - int m_ball_sizey; - int m_handle_joystick; - tilemap_t *m_bg_tilemap; + int m_geebee_bgw = 0; + int m_ball_on = 0; + int m_ball_h = 0; + int m_ball_v = 0; + int m_ball_pen = 0; + int m_ball_sizex = 0; + int m_ball_sizey = 0; + int m_handle_joystick = 0; + tilemap_t *m_bg_tilemap = nullptr; // warpwarp and bombbee uint8_t warpwarp_sw_r(offs_t offset); diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index c03ba14450d..769719a6092 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -62,18 +62,18 @@ private: required_memory_bank m_z80bank; /* video-related */ - int m_layer_colorbase[4]; - int m_sprite_colorbase; - int m_layerpri[4]; - int m_cur_alpha; + int m_layer_colorbase[4]{}; + int m_sprite_colorbase = 0; + int m_layerpri[4]{}; + int m_cur_alpha = 0; /* misc */ - uint16_t m_cur_control2; - int32_t m_strip_0x1a; - int m_suspension_active; - int m_resume_trigger; - emu_timer *m_dmadelay_timer; - int m_frame; + uint16_t m_cur_control2 = 0; + int32_t m_strip_0x1a = 0; + int m_suspension_active = 0; + int m_resume_trigger = 0; + emu_timer *m_dmadelay_timer = nullptr; + int m_frame = 0; /* devices */ required_device m_maincpu; -- cgit v1.2.3