From dade85a7240fe9c3e5b796d74a7b7dd0c962ea19 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 11 Apr 2022 01:48:18 +1000 Subject: init last bunch of vars for today --- src/mame/includes/1942.h | 4 +- src/mame/includes/4enraya.h | 2 +- src/mame/includes/8080bw.h | 34 ++++++------- src/mame/includes/a2600.h | 4 +- src/mame/includes/aim65.h | 10 ++-- src/mame/includes/alpha68k.h | 4 +- src/mame/includes/apollo.h | 6 +-- src/mame/includes/avigo.h | 2 +- src/mame/includes/bbc.h | 118 +++++++++++++++++++++---------------------- src/mame/includes/gamecom.h | 26 +++++----- src/mame/includes/gauntlet.h | 8 +-- src/mame/includes/mbee.h | 16 +++--- src/mame/includes/mikromik.h | 10 ++-- src/mame/includes/mystwarr.h | 30 +++++------ src/mame/includes/nmk16.h | 32 ++++++------ src/mame/includes/segaorun.h | 2 +- src/mame/includes/sorcerer.h | 26 +++++----- src/mame/includes/super80.h | 8 +-- src/mame/includes/trs80.h | 4 +- src/mame/includes/xavix.h | 106 +++++++++++++++++++------------------- src/mame/includes/z80ne.h | 42 +++++++-------- 21 files changed, 247 insertions(+), 247 deletions(-) diff --git a/src/mame/includes/1942.h b/src/mame/includes/1942.h index 1c47e8de90d..2c2d4aab071 100644 --- a/src/mame/includes/1942.h +++ b/src/mame/includes/1942.h @@ -72,8 +72,8 @@ protected: required_device m_soundlatch; /* video-related */ - tilemap_t *m_fg_tilemap = 0; - tilemap_t *m_bg_tilemap = 0; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_bg_tilemap = nullptr; int m_palette_bank = 0; uint8_t m_scroll[2]{}; void create_palette(palette_device &palette) const; diff --git a/src/mame/includes/4enraya.h b/src/mame/includes/4enraya.h index 35e727aeed6..f36ae893a95 100644 --- a/src/mame/includes/4enraya.h +++ b/src/mame/includes/4enraya.h @@ -63,7 +63,7 @@ protected: optional_region_ptr m_rom; /* video-related */ - tilemap_t *m_bg_tilemap = 0; + tilemap_t *m_bg_tilemap = nullptr; /* sound-related */ uint8_t m_soundlatch = 0U; diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index f29aa14c3f1..1429f6f4ed6 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -113,30 +113,30 @@ private: optional_ioport m_gunx; optional_ioport m_guny; - uint8_t m_color_map; - uint8_t m_screen_red; - uint8_t m_fleet_step; + uint8_t m_color_map = 0; + uint8_t m_screen_red = 0; + uint8_t m_fleet_step = 0; std::unique_ptr m_scattered_colorram; std::unique_ptr m_scattered_colorram2; /* sound-related */ - uint8_t m_port_1_last_extra; - uint8_t m_port_2_last_extra; - uint8_t m_port_3_last_extra; + uint8_t m_port_1_last_extra = 0; + uint8_t m_port_2_last_extra = 0; + uint8_t m_port_3_last_extra = 0; attotime m_schaser_effect_555_time_remain; - int32_t m_schaser_effect_555_time_remain_savable; - int m_schaser_effect_555_is_low; - int m_schaser_explosion; - int m_schaser_last_effect; - uint8_t m_polaris_cloud_speed; - uint8_t m_polaris_cloud_pos; - uint8_t m_schaser_background_disable; - uint8_t m_schaser_background_select; - uint16_t m_claybust_gun_pos; - u8 m_sound_data; - bool m_timer_state; + int32_t m_schaser_effect_555_time_remain_savable = 0; + int m_schaser_effect_555_is_low = 0; + int m_schaser_explosion = 0; + int m_schaser_last_effect = 0; + uint8_t m_polaris_cloud_speed = 0; + uint8_t m_polaris_cloud_pos = 0; + uint8_t m_schaser_background_disable = 0; + uint8_t m_schaser_background_select = 0; + uint16_t m_claybust_gun_pos = 0; + u8 m_sound_data = 0; + bool m_timer_state = false; TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); uint8_t indianbt_r(); diff --git a/src/mame/includes/a2600.h b/src/mame/includes/a2600.h index 6eaee424d96..28d2a9b2521 100644 --- a/src/mame/includes/a2600.h +++ b/src/mame/includes/a2600.h @@ -137,8 +137,8 @@ private: required_memory_bank m_bank; required_ioport m_a8; required_ioport m_swb; - emu_timer *m_reset_timer = 0; - emu_timer *m_game_select_button_timer = 0; + emu_timer *m_reset_timer = nullptr; + emu_timer *m_game_select_button_timer = nullptr; }; diff --git a/src/mame/includes/aim65.h b/src/mame/includes/aim65.h index e982922ba0f..3524020edc6 100644 --- a/src/mame/includes/aim65.h +++ b/src/mame/includes/aim65.h @@ -88,7 +88,7 @@ private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z13_load) { return load_cart(image, m_z13, "z13"); } DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z14_load) { return load_cart(image, m_z14, "z14"); } DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z15_load) { return load_cart(image, m_z15, "z15"); } - emu_timer *m_print_timer = 0; + emu_timer *m_print_timer = nullptr; TIMER_CALLBACK_MEMBER(printer_timer); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -99,13 +99,13 @@ private: optional_device m_palette; uint8_t m_riot_port_a = 0U; uint8_t m_pb_save = 0U; - bool m_kb_en = 0; - bool m_ca2 = 0; - bool m_cb2 = 0; + bool m_kb_en = false; + bool m_ca2 = false; + bool m_cb2 = false; u8 m_printer_x =0U; u8 m_printer_y = 0U; u8 m_printer_flag = 0U; - bool m_printer_level = 0; + bool m_printer_level = false; std::unique_ptr m_printerRAM {}; required_device m_maincpu; diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index efee93640dd..7474452f786 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -131,7 +131,7 @@ protected: u16 alpha_II_trigger_r(offs_t offset); /* video-related */ - tilemap_t *m_fix_tilemap = 0; + tilemap_t *m_fix_tilemap = nullptr; int m_bank_base = 0; void outlatch_w(offs_t offset, u8 data = 0); @@ -268,7 +268,7 @@ protected: private: u16 m_tile_transchar = 0U; int m_tile_bankshift = 0; - bool m_is_super_stingray = 0; + bool m_is_super_stingray = false; }; class sstingray_state : public alpha68k_N_state diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h index 5ced1eca1bc..257c4bf0f50 100644 --- a/src/mame/includes/apollo.h +++ b/src/mame/includes/apollo.h @@ -296,7 +296,7 @@ private: uint32_t ptm_counter = 0U; uint8_t sio_output_data = 0U; int m_dma_channel = 0; - bool m_cur_eop = 0; + bool m_cur_eop = false; }; /*----------- machine/apollo_config.cpp -----------*/ @@ -704,9 +704,9 @@ private: uint8_t m_xmitring[XMIT_RING_SIZE]{}; int m_xmit_read = 0, m_xmit_write = 0; - bool m_tx_busy = 0; + bool m_tx_busy = false; - emu_timer* m_poll_timer = 0; + emu_timer* m_poll_timer = nullptr; devcb_write_line m_tx_w; }; diff --git a/src/mame/includes/avigo.h b/src/mame/includes/avigo.h index d784f8b3151..c80107564f9 100644 --- a/src/mame/includes/avigo.h +++ b/src/mame/includes/avigo.h @@ -113,7 +113,7 @@ protected: uint8_t m_bank1_h = 0U; uint8_t m_ad_control_status = 0U; uint16_t m_ad_value = 0U; - std::unique_ptr m_video_memory{}; + std::unique_ptr m_video_memory; uint8_t m_screen_column = 0U; uint8_t m_warm_start = 0U; }; diff --git a/src/mame/includes/bbc.h b/src/mame/includes/bbc.h index 6a50378a640..1f38be90468 100644 --- a/src/mame/includes/bbc.h +++ b/src/mame/includes/bbc.h @@ -259,9 +259,9 @@ protected: output_finder<> m_motor_led; - int m_romsel; // This is the latch that holds the sideways ROM bank to read - int m_paged_ram; // BBC B+ memory handling - int m_vdusel; // BBC B+ memory handling + int m_romsel = 0; // This is the latch that holds the sideways ROM bank to read + int m_paged_ram = 0; // BBC B+ memory handling + int m_vdusel = 0; // BBC B+ memory handling /* ACCCON @@ -282,59 +282,59 @@ protected: ACCCON is a read/write register */ - int m_acccon; - int m_acccon_irr; - int m_acccon_tst; - int m_acccon_ifj; - int m_acccon_itu; - int m_acccon_y; - int m_acccon_x; - int m_acccon_e; - int m_acccon_d; + int m_acccon = 0; + int m_acccon_irr = 0; + int m_acccon_tst = 0; + int m_acccon_ifj = 0; + int m_acccon_itu = 0; + int m_acccon_y = 0; + int m_acccon_x = 0; + int m_acccon_e = 0; + int m_acccon_d = 0; void mc146818_set(); - int m_mc146818_as; // 6522 port b bit 7 - int m_mc146818_ce; // 6522 port b bit 6 + int m_mc146818_as = 0; // 6522 port b bit 7 + int m_mc146818_ce = 0; // 6522 port b bit 6 - int m_via_system_porta; + int m_via_system_porta = 0; // interrupt state - int m_adlc_irq; - int m_bus_nmi; + int m_adlc_irq = 0; + int m_bus_nmi = 0; - int m_column; // this is a counter in the keyboard circuit + int m_column = 0; // this is a counter in the keyboard circuit /*************************************** BBC 2C199 Serial Interface Cassette ****************************************/ - double m_last_dev_val; - int m_wav_len; - int m_len0; - int m_len1; - int m_len2; - int m_len3; - uint8_t m_serproc_data; - int m_rxd_serial; - int m_dcd_serial; - int m_cts_serial; - int m_dcd_cass; - int m_rxd_cass; - int m_cass_out_enabled; - int m_txd; - uint32_t m_nr_high_tones; - int m_cass_out_samples_to_go; - int m_cass_out_bit; - int m_cass_out_phase; - emu_timer *m_tape_timer; + double m_last_dev_val = 0; + int m_wav_len = 0; + int m_len0 = 0; + int m_len1 = 0; + int m_len2 = 0; + int m_len3 = 0; + uint8_t m_serproc_data = 0; + int m_rxd_serial = 0; + int m_dcd_serial = 0; + int m_cts_serial = 0; + int m_dcd_cass = 0; + int m_rxd_cass = 0; + int m_cass_out_enabled = 0; + int m_txd = 0; + uint32_t m_nr_high_tones = 0; + int m_cass_out_samples_to_go = 0; + int m_cass_out_bit = 0; + int m_cass_out_phase = 0; + emu_timer *m_tape_timer = nullptr; /************************************** WD1770 disc control ***************************************/ - int m_fdc_irq; - int m_fdc_drq; + int m_fdc_irq = 0; + int m_fdc_drq = 0; /************************************** Video Code @@ -342,31 +342,31 @@ protected: // this is the real location of the start of the BBC's ram in the emulation // it can be changed if shadow ram is being used to point at the upper 32K of RAM - uint8_t *m_video_ram; - uint8_t m_pixel_bits[256]; - int m_hsync; - int m_vsync; + uint8_t *m_video_ram = nullptr; + uint8_t m_pixel_bits[256]{}; + int m_hsync = 0; + int m_vsync = 0; - uint8_t m_teletext_latch; - uint8_t m_vula_ctrl; + uint8_t m_teletext_latch = 0; + uint8_t m_vula_ctrl = 0; struct video_nula { - uint8_t palette_mode; - uint8_t horiz_offset; - uint8_t left_blank; - uint8_t disable; - uint8_t attr_mode; - uint8_t attr_text; - uint8_t flash[8]; - uint8_t palette_byte; - uint8_t palette_write; + uint8_t palette_mode = 0; + uint8_t horiz_offset = 0; + uint8_t left_blank = 0; + uint8_t disable = 0; + uint8_t attr_mode = 0; + uint8_t attr_text = 0; + uint8_t flash[8]{}; + uint8_t palette_byte = 0; + uint8_t palette_write = 0; } m_vnula; - int m_pixels_per_byte; - int m_cursor_size; + int m_pixels_per_byte = 0; + int m_cursor_size = 0; - uint8_t m_vula_palette[16]; - uint8_t m_vula_palette_lookup[16]; + uint8_t m_vula_palette[16]{}; + uint8_t m_vula_palette_lookup[16]{}; void setvideoshadow(int vdusel); void set_pixel_lookup(); @@ -379,7 +379,7 @@ protected: uint16_t calculate_video_address(uint16_t ma, uint8_t ra); private: - emu_timer *m_reset_timer; + emu_timer *m_reset_timer = nullptr; }; diff --git a/src/mame/includes/gamecom.h b/src/mame/includes/gamecom.h index 496abfa1a5f..a01e194d6be 100644 --- a/src/mame/includes/gamecom.h +++ b/src/mame/includes/gamecom.h @@ -179,13 +179,13 @@ struct GAMECOM_DMA u16 dest_mask = 0U; u8 transfer_mode = 0U; s16 adjust_x = 0U; - bool decrement_y = 0; - bool overwrite_mode = 0; + bool decrement_y = false; + bool overwrite_mode = false; }; struct GAMECOM_TIMER { - bool enabled = 0; + bool enabled = false; u32 prescale_count = 0U; u32 prescale_max = 0U; u8 upcounter_max = 0U; @@ -256,8 +256,8 @@ private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void gamecom_mem_map(address_map &map); - uint8_t *m_p_ram = 0; - uint8_t *m_cart_ptr = 0; + uint8_t *m_p_ram = nullptr; + uint8_t *m_cart_ptr = nullptr; uint8_t m_lcdc_reg = 0U; uint8_t m_lch_reg = 0U; uint8_t m_lcv_reg = 0U; @@ -265,16 +265,16 @@ private: uint8_t m_sound1_cnt = 0U; uint16_t m_scanline = 0U; uint16_t m_base_address = 0U; - memory_region *m_cart1_rom = 0; - memory_region *m_cart2_rom = 0; - emu_timer *m_clock_timer = 0; - emu_timer *m_sound0_timer = 0; - emu_timer *m_sound1_timer = 0; - emu_timer *m_scanline_timer = 0; + memory_region *m_cart1_rom = nullptr; + memory_region *m_cart2_rom = nullptr; + emu_timer *m_clock_timer = nullptr; + emu_timer *m_sound0_timer = nullptr; + emu_timer *m_sound1_timer = nullptr; + emu_timer *m_scanline_timer = nullptr; GAMECOM_DMA m_dma; - GAMECOM_TIMER m_timer[2]{}; + GAMECOM_TIMER m_timer[2]; gamecom_sound_t m_sound; - bitmap_ind16 m_bitmap = 0; + bitmap_ind16 m_bitmap; void gamecom_set_mmu(uint8_t mmu, uint8_t data); void handle_stylus_press(int column); void recompute_lcd_params(); diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h index dc7126f20f4..32f30d48783 100644 --- a/src/mame/includes/gauntlet.h +++ b/src/mame/includes/gauntlet.h @@ -96,10 +96,10 @@ private: required_shared_ptr m_yscroll; required_device m_mob; - uint16_t m_sound_reset_val; - bool m_vindctr2_screen_refresh; - uint8_t m_playfield_tile_bank; - uint8_t m_playfield_color_bank; + uint16_t m_sound_reset_val = 0; + bool m_vindctr2_screen_refresh = false; + uint8_t m_playfield_tile_bank = 0; + uint8_t m_playfield_color_bank = 0; static const atari_motion_objects_config s_mob_config; diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h index 003feaacc0c..8cb40b3d5e0 100644 --- a/src/mame/includes/mbee.h +++ b/src/mame/includes/mbee.h @@ -157,23 +157,23 @@ private: u8 m_features = 0; u16 m_size = 0; u32 m_ramsize = 0; - bool m_b7_rtc = 0; - bool m_b7_vs = 0; - bool m_b2 = 0; + bool m_b7_rtc = false; + bool m_b7_vs = false; + bool m_b2 = false; u8 m_framecnt = 0; u8 m_08 = 0; u8 m_09 = 0; u8 m_0a = 0; u8 m_0b = 0; u8 m_1c = 0; - u8 m_newkb_was_pressed[15] = { 0, }; - u8 m_newkb_q[20] = { 0, }; + u8 m_newkb_was_pressed[15] = { }; + u8 m_newkb_q[20] = { }; u8 m_newkb_q_pos = 0; - u8 m_sy6545_reg[32] = { 0, }; + u8 m_sy6545_reg[32] = { }; u8 m_sy6545_ind = 0; u8 m_fdc_rq = 0; - u8 m_bank_array[33] = { 0, }; - bool m_pak_extended[10] = { 0, }; + u8 m_bank_array[33] = { }; + bool m_pak_extended[10] = { }; std::unique_ptr m_dummy; // black hole for writes to rom std::unique_ptr m_ram; // main banked-switch ram, 128/256/pp std::unique_ptr m_vram; // video ram, all models diff --git a/src/mame/includes/mikromik.h b/src/mame/includes/mikromik.h index 8061892e7ad..ba4e96690eb 100644 --- a/src/mame/includes/mikromik.h +++ b/src/mame/includes/mikromik.h @@ -103,13 +103,13 @@ private: int m_a8; // video state - int m_llen; + int m_llen = 0; // serial state - int m_intc; - int m_rx21; - int m_tx21; - int m_rcl; + int m_intc = 0; + int m_rx21 = 0; + int m_tx21 = 0; + int m_rcl = 0; // floppy state int m_recall; diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index 6c38516fc0e..b70bac000dd 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -38,22 +38,22 @@ private: optional_memory_bank m_okibank; // for viostormabbl std::unique_ptr m_decoded; - uint8_t m_mw_irq_control; - int m_cur_sound_region; - int m_layer_colorbase[6]; - int m_oinprion; - int m_cbparam; - int m_sprite_colorbase; - int m_sub1_colorbase; - int m_last_psac_colorbase; - int m_gametype; - int m_roz_enable; - int m_roz_rombank; - tilemap_t *m_ult_936_tilemap; - uint16_t m_clip; + uint8_t m_mw_irq_control = 0; + int m_cur_sound_region = 0; + int m_layer_colorbase[6]{}; + int m_oinprion = 0; + int m_cbparam = 0; + int m_sprite_colorbase = 0; + int m_sub1_colorbase = 0; + int m_last_psac_colorbase = 0; + int m_gametype = 0; + int m_roz_enable = 0; + int m_roz_rombank = 0; + tilemap_t *m_ult_936_tilemap = nullptr; + uint16_t m_clip = 0; - uint8_t m_sound_ctrl; - uint8_t m_sound_nmi_clk; + uint8_t m_sound_ctrl = 0; + uint8_t m_sound_nmi_clk = 0; uint16_t eeprom_r(offs_t offset, uint16_t mem_mask = ~0); void mweeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index 4ade1a15b2a..538573dc548 100644 --- a/src/mame/includes/nmk16.h +++ b/src/mame/includes/nmk16.h @@ -119,24 +119,24 @@ protected: optional_ioport_array<2> m_dsw_io; optional_ioport_array<3> m_in_io; - emu_timer *m_dma_timer; - int m_tilerambank; - int m_sprdma_base; - int mask[4*2]; + emu_timer *m_dma_timer = nullptr; + int m_tilerambank = 0; + int m_sprdma_base = 0; + int mask[4*2]{}; std::unique_ptr m_spriteram_old; std::unique_ptr m_spriteram_old2; - int m_bgbank; - int m_bioship_background_bank; - tilemap_t *m_bg_tilemap[2]; - tilemap_t *m_tx_tilemap; - int m_mustang_bg_xscroll; - u8 m_scroll[2][4]; - u16 m_vscroll[4]; - int m_prot_count; - u8 m_input_pressed; - u8 m_start_helper; - u8 m_coin_count[2]; - u8 m_coin_count_frac[2]; + int m_bgbank = 0; + int m_bioship_background_bank = 0; + tilemap_t *m_bg_tilemap[2]{}; + tilemap_t *m_tx_tilemap = nullptr; + int m_mustang_bg_xscroll = 0; + u8 m_scroll[2][4]{}; + u16 m_vscroll[4]{}; + int m_prot_count = 0; + u8 m_input_pressed = 0; + u8 m_start_helper = 0; + u8 m_coin_count[2]{}; + u8 m_coin_count_frac[2]{}; void mainram_strange_w(offs_t offset, u16 data/*, u16 mem_mask = ~0*/); u16 mainram_swapped_r(offs_t offset); void mainram_swapped_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/mame/includes/segaorun.h b/src/mame/includes/segaorun.h index 1e023bfa270..0aaffeff78f 100644 --- a/src/mame/includes/segaorun.h +++ b/src/mame/includes/segaorun.h @@ -162,7 +162,7 @@ protected: // internal state emu_timer * m_scanline_timer; - emu_timer * m_irq2_gen_timer; + emu_timer * m_irq2_gen_timer = nullptr; uint8_t m_irq2_state; uint8_t m_adc_select; uint8_t m_vblank_irq_state; diff --git a/src/mame/includes/sorcerer.h b/src/mame/includes/sorcerer.h index 69ee38c32a3..4e4ddcceebf 100644 --- a/src/mame/includes/sorcerer.h +++ b/src/mame/includes/sorcerer.h @@ -37,14 +37,14 @@ class sorcerer_state : public driver_device struct cass_data_t { struct { - int length; // time cassette level is at input.level - int level; // cassette level - int bit; // bit being read + int length = 0; // time cassette level is at input.level + int level = 0; // cassette level + int bit = 0; // bit being read } input; struct { - int length; // time cassette level is at output.level - int level; // cassette level - int bit; // bit to output + int length = 0; // time cassette level is at output.level + int level = 0; // cassette level + int bit = 0; // bit to output } output; }; @@ -111,8 +111,8 @@ protected: u8 m_portfe = 0U; u8 m_keyboard_line = 0U; - emu_timer *m_serial_timer; - emu_timer *m_cassette_timer; + emu_timer *m_serial_timer = nullptr; + emu_timer *m_cassette_timer = nullptr; cass_data_t m_cass_data; virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override; required_device m_maincpu; @@ -145,8 +145,8 @@ protected: memory_passthrough_handler m_rom_shadow_tap; private: - u8 m_port48; - u8 m_port34; + u8 m_port48 = 0; + u8 m_port34 = 0; u8 port34_r(); u8 port48_r(); void port34_w(u8 data); @@ -180,9 +180,9 @@ private: void intrq2_w(bool state); void drq2_w(bool state); u8 m_port2c = 0U; - bool m_wait = 0; - bool m_drq_off = 0; - bool m_intrq_off = 0; + bool m_wait = false; + bool m_drq_off = false; + bool m_intrq_off = false; virtual void machine_start() override; virtual void machine_reset() override; optional_device m_fdc; diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index f2b05671f69..a8a74191a55 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -76,7 +76,7 @@ protected: u8 m_cass_data[4]{}; u8 m_key_pressed = 0U; u8 m_last_data = 0U; - bool m_boot_in_progress = 0; + bool m_boot_in_progress = false; void super80m_palette(palette_device &palette) const; TIMER_DEVICE_CALLBACK_MEMBER(timer_k); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); @@ -117,9 +117,9 @@ private: void super80e_io(address_map &map); void super80m_map(address_map &map); - u8 m_int_sw; - u16 m_vidpg; - bool m_current_charset; + u8 m_int_sw = 0; + u16 m_vidpg = 0; + bool m_current_charset = false; }; diff --git a/src/mame/includes/trs80.h b/src/mame/includes/trs80.h index c9846055506..629f37ff7ef 100644 --- a/src/mame/includes/trs80.h +++ b/src/mame/includes/trs80.h @@ -90,9 +90,9 @@ protected: u8 m_tape_unit = 1U; bool m_reg_load = true; bool m_cassette_data = false; - emu_timer *m_cassette_data_timer = 0; + emu_timer *m_cassette_data_timer = nullptr; double m_old_cassette_val = 0; - bool m_cpl = 0; + bool m_cpl = false; u8 m_cols = 0xffU; bool m_7bit = false; u16 m_timeout = 600U; diff --git a/src/mame/includes/xavix.h b/src/mame/includes/xavix.h index 3e14b299ec3..e549bc96173 100644 --- a/src/mame/includes/xavix.h +++ b/src/mame/includes/xavix.h @@ -51,16 +51,16 @@ protected: virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; private: - sound_stream *m_stream; + sound_stream *m_stream = nullptr; struct xavix_voice { - bool enabled[2]; - uint32_t position[2]; - uint32_t startposition[2]; - uint8_t bank; // no samples appear to cross a bank boundary, so likely wraps - int type; - int rate; - int vol; + bool enabled[2]{}; + uint32_t position[2]{}; + uint32_t startposition[2]{}; + uint8_t bank = 0; // no samples appear to cross a bank boundary, so likely wraps + int type = 0; + int rate = 0; + int vol = 0; }; devcb_read8 m_readregs_cb; @@ -134,8 +134,8 @@ public: DECLARE_WRITE_LINE_MEMBER(ioevent_trg04); DECLARE_WRITE_LINE_MEMBER(ioevent_trg08); - int m_rgnlen; - uint8_t* m_rgn; + int m_rgnlen = 0; + uint8_t* m_rgn = nullptr; /* this is just a quick memory system bypass for video reads etc. because going through the memory system is slow and also pollutes logs significantly with unmapped reads if the games @@ -200,7 +200,7 @@ protected: optional_device m_nvram; required_device m_screen; required_device m_lowbus; - address_space* m_cpuspace; + address_space* m_cpuspace = nullptr; private: @@ -283,8 +283,8 @@ private: void ioevent_enable_w(uint8_t data); uint8_t ioevent_irqstate_r(); void ioevent_irqack_w(uint8_t data); - uint8_t m_ioevent_enable; - uint8_t m_ioevent_active; + uint8_t m_ioevent_enable = 0; + uint8_t m_ioevent_active = 0; void process_ioevent(uint8_t bits); void slotreg_7810_w(uint8_t data); @@ -312,8 +312,8 @@ private: void io0_direction_w(uint8_t data); void io1_direction_w(uint8_t data); - uint8_t m_io0_data; - uint8_t m_io1_data; + uint8_t m_io0_data = 0; + uint8_t m_io1_data = 0; uint8_t m_io0_direction; uint8_t m_io1_direction; @@ -377,13 +377,13 @@ private: uint8_t sound_irqstatus_r(); void sound_irqstatus_w(uint8_t data); void sound_75ff_w(uint8_t data); - uint8_t m_sound_irqstatus; - uint8_t m_soundreg16_0[2]; - uint8_t m_soundreg16_1[2]; - uint8_t m_sound_regbase; + uint8_t m_sound_irqstatus = 0; + uint8_t m_soundreg16_0[2]{}; + uint8_t m_soundreg16_1[2]{}; + uint8_t m_sound_regbase = 0; TIMER_CALLBACK_MEMBER(sound_timer_done); - emu_timer *m_sound_timer[4]; + emu_timer *m_sound_timer[4]{}; uint8_t timer_status_r(); @@ -393,10 +393,10 @@ private: uint8_t timer_freq_r(); void timer_freq_w(uint8_t data); uint8_t timer_curval_r(); - uint8_t m_timer_control; - uint8_t m_timer_freq; + uint8_t m_timer_control = 0; + uint8_t m_timer_freq = 0; TIMER_CALLBACK_MEMBER(freq_timer_done); - emu_timer *m_freq_timer; + emu_timer *m_freq_timer = nullptr; void palram_sh_w(offs_t offset, uint8_t data); void palram_l_w(offs_t offset, uint8_t data); @@ -418,7 +418,7 @@ private: uint8_t xavix_memoryemu_txarray_r(offs_t offset); void xavix_memoryemu_txarray_w(offs_t offset, uint8_t data); - uint8_t m_txarray[3]; + uint8_t m_txarray[3]{}; inline uint8_t txarray_r(uint16_t offset) { @@ -474,40 +474,40 @@ private: uint8_t anport3_r() { logerror("%s: unhandled anport3_r\n", machine().describe_context()); return 0xff; } void update_irqs(); - uint8_t m_irqsource; + uint8_t m_irqsource = 0; - uint8_t m_vectorenable; - uint8_t m_nmi_vector_lo_data; - uint8_t m_nmi_vector_hi_data; - uint8_t m_irq_vector_lo_data; - uint8_t m_irq_vector_hi_data; + uint8_t m_vectorenable = 0; + uint8_t m_nmi_vector_lo_data = 0; + uint8_t m_nmi_vector_hi_data = 0; + uint8_t m_irq_vector_lo_data = 0; + uint8_t m_irq_vector_hi_data = 0; - uint8_t m_spritefragment_dmaparam1[2]; - uint8_t m_spritefragment_dmaparam2[2]; + uint8_t m_spritefragment_dmaparam1[2]{}; + uint8_t m_spritefragment_dmaparam2[2]{}; - uint8_t m_tmap1_regs[8]; - uint8_t m_tmap2_regs[8]; + uint8_t m_tmap1_regs[8]{}; + uint8_t m_tmap2_regs[8]{}; - int m_arena_start; - int m_arena_end; - uint8_t m_arena_control; + int m_arena_start = 0; + int m_arena_end = 0; + uint8_t m_arena_control = 0; - uint8_t m_6ff0; - uint8_t m_video_ctrl; + uint8_t m_6ff0 = 0; + uint8_t m_video_ctrl = 0; - uint8_t m_mastervol; - uint8_t m_unk_snd75f8; - uint8_t m_unk_snd75f9; - uint8_t m_unk_snd75ff; - uint8_t m_sndtimer[4]; + uint8_t m_mastervol = 0; + uint8_t m_unk_snd75f8 = 0; + uint8_t m_unk_snd75f9 = 0; + uint8_t m_unk_snd75ff = 0; + uint8_t m_sndtimer[4]{}; - uint8_t m_timer_baseval; + uint8_t m_timer_baseval = 0; int16_t get_vectors(int which, int half); // raster IRQ TIMER_CALLBACK_MEMBER(interrupt_gen); - emu_timer *m_interrupt_timer; + emu_timer *m_interrupt_timer = nullptr; void dispctrl_posirq_x_w(uint8_t data); void dispctrl_posirq_y_w(uint8_t data); @@ -549,12 +549,12 @@ private: bitmap_ind16 m_zbuffer; - uint8_t m_spritereg; + uint8_t m_spritereg = 0; // variables used by rendering - int m_tmp_dataaddress; - int m_tmp_databit; - uint8_t m_bit; + int m_tmp_dataaddress = 0; + int m_tmp_databit = 0; + uint8_t m_bit = 0; void set_data_address(int address, int bit); uint8_t get_next_bit(); @@ -573,13 +573,13 @@ protected: required_device m_math; optional_device m_xavix2002io; - uint8_t m_extbusctrl[3]; + uint8_t m_extbusctrl[3]{}; virtual uint8_t extintrf_790x_r(offs_t offset); virtual void extintrf_790x_w(offs_t offset, uint8_t data); // additional SuperXaviX / XaviX2002 stuff - uint8_t m_sx_extended_extbus[3]; + uint8_t m_sx_extended_extbus[3]{}; void extended_extbus_reg0_w(uint8_t data); void extended_extbus_reg1_w(uint8_t data); @@ -885,7 +885,7 @@ protected: } } - int m_cartlimit; + int m_cartlimit = 0; required_device m_cartslot; }; diff --git a/src/mame/includes/z80ne.h b/src/mame/includes/z80ne.h index 2fb3fd8a944..ded6791f7f3 100644 --- a/src/mame/includes/z80ne.h +++ b/src/mame/includes/z80ne.h @@ -45,20 +45,20 @@ enum z80netape_speed struct z80ne_cass_data_t { struct { - int length; /* time cassette level is at input.level */ - int level; /* cassette level */ - int bit; /* bit being read */ + int length = 0; /* time cassette level is at input.level */ + int level = 0; /* cassette level */ + int bit = 0; /* bit being read */ } input; struct { - int length; /* time cassette level is at output.level */ - int level; /* cassette level */ - int bit; /* bit to output */ + int length = 0; /* time cassette level is at output.level */ + int level = 0; /* cassette level */ + int bit = 0; /* bit to output */ } output; z80netape_speed speed; /* 300 - 600 - 1200 */ - int wave_filter; - int wave_length; - int wave_short; - int wave_long; + int wave_filter = 0; + int wave_length = 0; + int wave_short = 0; + int wave_long = 0; }; @@ -101,12 +101,12 @@ protected: static void floppy_formats(format_registration &fr); - uint8_t m_lx383_scan_counter; - uint8_t m_lx383_key[LX383_KEYS]; - int m_lx383_downsampler; - uint8_t m_lx385_ctrl; - emu_timer *m_cassette_timer; - emu_timer *m_kbd_timer; + uint8_t m_lx383_scan_counter = 0; + uint8_t m_lx383_key[LX383_KEYS]{}; + int m_lx383_downsampler = 0; + uint8_t m_lx385_ctrl = 0; + emu_timer *m_cassette_timer = nullptr; + emu_timer *m_kbd_timer = nullptr; z80ne_cass_data_t m_cass_data; uint8_t lx383_r(); @@ -140,7 +140,7 @@ protected: required_region_ptr m_rom; optional_shared_ptr m_mram; - emu_timer *m_timer_nmi; + emu_timer *m_timer_nmi = nullptr; cassette_image_device *cassette_device_image(); @@ -228,10 +228,10 @@ private: struct wd17xx_state_t { - int drq; - int intrq; - uint8_t drive; /* current drive */ - uint8_t head; /* current head */ + int drq = 0; + int intrq = 0; + uint8_t drive = 0; /* current drive */ + uint8_t head = 0; /* current head */ }; void mem_map(address_map &map); -- cgit v1.2.3