From b206c1c7bde611aa1d9935e4ddcbadf4491c2da8 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 2 Apr 2022 02:16:51 +1100 Subject: init vars for coverity (bus/l-w) --- src/devices/bus/lpci/southbridge.h | 2 +- src/devices/bus/mc10/mcx128.cpp | 4 +-- src/devices/bus/megadrive/eeprom.h | 26 +++++++------- src/devices/bus/megadrive/rom.h | 2 +- src/devices/bus/msx_slot/ram_mm.h | 2 +- src/devices/bus/multibus/isbc202.h | 52 +++++++++++++-------------- src/devices/bus/neogeo/boot_kof10th.h | 8 ++--- src/devices/bus/neogeo/prot_kof2k3bl.h | 6 ++-- src/devices/bus/neogeo/slot.h | 2 +- src/devices/bus/neogeo_ctrl/kizuna4p.h | 2 +- src/devices/bus/nes/disksys.h | 2 +- src/devices/bus/nes/jy.h | 38 ++++++++++---------- src/devices/bus/nes/kaiser.h | 16 ++++----- src/devices/bus/nes/mmc3_clones.h | 4 +-- src/devices/bus/nes/nes_slot.h | 6 ++-- src/devices/bus/nes/pirate.h | 12 +++---- src/devices/bus/nes/vrc_clones.h | 6 ++-- src/devices/bus/newbrain/fdc.h | 12 +++---- src/devices/bus/nscsi/cd.h | 12 +++---- src/devices/bus/nscsi/cw7501.h | 2 +- src/devices/bus/nubus/laserview.h | 4 +-- src/devices/bus/nubus/nubus_image.h | 8 ++--- src/devices/bus/pc_kbd/pcat101.h | 4 +-- src/devices/bus/pce/pce_rom.h | 2 +- src/devices/bus/pofo/hpc102.h | 2 +- src/devices/bus/pofo/hpc104.h | 4 +-- src/devices/bus/qbus/dvk_kgd.h | 10 +++--- src/devices/bus/qbus/pc11.h | 16 ++++----- src/devices/bus/rs232/mboardd.cpp | 4 +-- src/devices/bus/rtpc/kbd.h | 8 ++--- src/devices/bus/sat_ctrl/ctrl.h | 2 +- src/devices/bus/sbus/cgsix.h | 56 +++++++++++++++--------------- src/devices/bus/sbus/sbus.h | 6 ++-- src/devices/bus/scsi/omti5100.h | 2 +- src/devices/bus/scsi/scsi.h | 2 +- src/devices/bus/scsi/scsicd512.h | 2 +- src/devices/bus/sega8/rom.h | 8 ++--- src/devices/bus/sg1000_exp/sg1000exp.h | 2 +- src/devices/bus/snes/sa1.h | 4 +-- src/devices/bus/snes/sdd1.h | 14 ++++---- src/devices/bus/spectrum/beta.h | 6 ++-- src/devices/bus/spectrum/d40.h | 6 ++-- src/devices/bus/spectrum/kempdisc.h | 4 +-- src/devices/bus/spectrum/lprint.h | 16 ++++----- src/devices/bus/spectrum/mface.h | 14 ++++---- src/devices/bus/spectrum/mgt.h | 2 +- src/devices/bus/spectrum/sixword.h | 8 ++--- src/devices/bus/ss50/piaide.cpp | 4 +-- src/devices/bus/tanbus/radisc.h | 4 +-- src/devices/bus/tanbus/tanbus.h | 2 +- src/devices/bus/ti99/gromport/cartridges.h | 6 ++-- src/devices/bus/ti99/gromport/gromport.h | 2 +- src/devices/bus/ti99/gromport/multiconn.h | 4 +-- src/devices/bus/ti99/internal/998board.h | 6 ++-- src/devices/bus/ti99/internal/genkbd.h | 26 +++++++------- src/devices/bus/ti99/peb/bwg.h | 2 +- src/devices/bus/ti99/peb/cc_fdc.h | 2 +- src/devices/bus/ti99/peb/evpc.h | 12 +++---- src/devices/bus/ti99/peb/hfdc.h | 4 +-- src/devices/bus/ti99/peb/horizon.h | 4 +-- src/devices/bus/ti99/peb/memex.h | 2 +- src/devices/bus/ti99/peb/myarcfdc.h | 2 +- src/devices/bus/ti99/peb/peribox.h | 2 +- src/devices/bus/ti99/peb/pgram.h | 6 ++-- src/devices/bus/ti99/peb/scsicard.h | 6 ++-- src/devices/bus/ti99/peb/ti_fdc.h | 4 +-- src/devices/bus/ti99/peb/tipi.h | 20 +++++------ src/devices/bus/ti99/peb/tn_ide.h | 4 +-- src/devices/bus/tmc600/euro.h | 2 +- src/devices/bus/vcs/dpc.h | 14 ++++---- src/devices/bus/vme/vme.h | 10 +++--- src/devices/bus/vme/vme_cp31.h | 8 ++--- src/devices/bus/vme/vme_fccpu20.h | 8 ++--- src/devices/bus/vme/vme_fcisio.h | 2 +- src/devices/bus/vme/vme_fcscsi.h | 6 ++-- src/devices/bus/vme/vme_hcpu30.h | 14 ++++---- src/devices/bus/vsmile/rom.h | 2 +- src/devices/bus/vtech/ioexp/ioexp.h | 2 +- src/devices/bus/vtech/memexp/memexp.h | 2 +- src/devices/bus/wswan/rom.h | 18 +++++----- 80 files changed, 322 insertions(+), 322 deletions(-) diff --git a/src/devices/bus/lpci/southbridge.h b/src/devices/bus/lpci/southbridge.h index 92953a5df0f..8fb6f488419 100644 --- a/src/devices/bus/lpci/southbridge.h +++ b/src/devices/bus/lpci/southbridge.h @@ -78,7 +78,7 @@ protected: uint8_t m_channel_check; uint8_t m_nmi_enabled; bool m_ide_io_ports_enabled; - address_space *spaceio; + address_space *spaceio = nullptr; void pc_select_dma_channel(int channel, bool state); diff --git a/src/devices/bus/mc10/mcx128.cpp b/src/devices/bus/mc10/mcx128.cpp index d507ad612c5..cc004e68eec 100644 --- a/src/devices/bus/mc10/mcx128.cpp +++ b/src/devices/bus/mc10/mcx128.cpp @@ -101,8 +101,8 @@ private: memory_share_creator m_share; memory_view m_view; memory_bank_array_creator<8> m_bank; - uint8_t ram_bank_cr; - uint8_t rom_map_cr; + uint8_t ram_bank_cr = 0; + uint8_t rom_map_cr = 0; void update_banks(); diff --git a/src/devices/bus/megadrive/eeprom.h b/src/devices/bus/megadrive/eeprom.h index 7f5b0e450a4..9b7770445fc 100644 --- a/src/devices/bus/megadrive/eeprom.h +++ b/src/devices/bus/megadrive/eeprom.h @@ -204,20 +204,20 @@ private: std::vector m_sram; // EEPROM runtime vars - uint8_t m_eeprom_sda; // current SDA - uint8_t m_eeprom_prev_sda; // previous SDA - uint8_t m_eeprom_scl; // current SCL - uint8_t m_eeprom_prev_scl; // previous SCL - uint8_t m_eeprom_cnt; // operation count in 0-9 - uint8_t m_eeprom_readwrite; // read/write bit - uint16_t m_eeprom_slave_mask; // dev addr - uint16_t m_eeprom_word_address; // memory addr - uint16_t m_eeprom_devsel; // selected device - uint16_t m_eeprom_byte; // byte to be written - int m_eeprom_cur_state; // current state + uint8_t m_eeprom_sda = 0; // current SDA + uint8_t m_eeprom_prev_sda = 0; // previous SDA + uint8_t m_eeprom_scl = 0; // current SCL + uint8_t m_eeprom_prev_scl = 0; // previous SCL + uint8_t m_eeprom_cnt = 0; // operation count in 0-9 + uint8_t m_eeprom_readwrite = 0; // read/write bit + uint16_t m_eeprom_slave_mask = 0; // dev addr + uint16_t m_eeprom_word_address = 0; // memory addr + uint16_t m_eeprom_devsel = 0; // selected device + uint16_t m_eeprom_byte = 0; // byte to be written + int m_eeprom_cur_state = 0; // current state // EEPROM physical characteristics (configured at init) - uint16_t m_eeprom_mask; // size of the memory - 1 - uint16_t m_eeprom_pagewrite_mask; // max number of bytes that can be written in a single write cycle + uint16_t m_eeprom_mask = 0; // size of the memory - 1 + uint16_t m_eeprom_pagewrite_mask = 0; // max number of bytes that can be written in a single write cycle }; diff --git a/src/devices/bus/megadrive/rom.h b/src/devices/bus/megadrive/rom.h index 0acf73061ee..b9899dc9b56 100644 --- a/src/devices/bus/megadrive/rom.h +++ b/src/devices/bus/megadrive/rom.h @@ -501,7 +501,7 @@ protected: virtual void device_reset() override; private: - uint16_t m_retvalue; + uint16_t m_retvalue = 0; }; diff --git a/src/devices/bus/msx_slot/ram_mm.h b/src/devices/bus/msx_slot/ram_mm.h index 55f13659a4c..49a2dd19900 100644 --- a/src/devices/bus/msx_slot/ram_mm.h +++ b/src/devices/bus/msx_slot/ram_mm.h @@ -30,7 +30,7 @@ private: uint32_t m_total_size; uint8_t m_bank_mask; uint8_t m_bank_selected[4]; - uint8_t *m_bank_base[4]; + uint8_t *m_bank_base[4]{}; uint8_t m_ramio_set_bits; }; diff --git a/src/devices/bus/multibus/isbc202.h b/src/devices/bus/multibus/isbc202.h index c1f3b1d036d..38fbb0a8c48 100644 --- a/src/devices/bus/multibus/isbc202.h +++ b/src/devices/bus/multibus/isbc202.h @@ -100,38 +100,38 @@ private: cpu_device *m_cpu; // When != nullptr: CPU is suspended in wait state bool m_cpu_rd; uint8_t m_ready_in; - uint8_t m_ready_ff; // I-A44 & I-A43 - bool m_gate_lower; // I-A58-9 - bool m_irq; // C-A37-9 - uint8_t m_data_low_out; // C-A43 - uint8_t m_data_low_in; // C-A25 - uint8_t m_cpu_data; - uint8_t m_addr_low_out; // C-A41 - bool m_mem_wrt; // I-A58-4 - bool m_wrt_inh; // I-A46-13 - bool m_direction; // I-A58-11 - bool m_ibus_cached; - uint8_t m_ibus; - uint16_t m_crc; // I-A62 - bool m_crc_enabled; // I-A58-13 - bool m_crc_out; // C-A16-2 - bool m_reading; // I-A46-9 - bool m_writing; // C-A16-4 - uint16_t m_data_sr; // C-A36 & C-A29 (MSB), next byte in LSB - bool m_last_data_bit; // I-A48-6 - uint16_t m_clock_sr; // C-A34 & C-A27 (MSB), next byte in LSB + uint8_t m_ready_ff = 0; // I-A44 & I-A43 + bool m_gate_lower = false; // I-A58-9 + bool m_irq = false; // C-A37-9 + uint8_t m_data_low_out = 0; // C-A43 + uint8_t m_data_low_in = 0; // C-A25 + uint8_t m_cpu_data = 0; + uint8_t m_addr_low_out = 0; // C-A41 + bool m_mem_wrt = false; // I-A58-4 + bool m_wrt_inh = false; // I-A46-13 + bool m_direction = false; // I-A58-11 + bool m_ibus_cached = false; + uint8_t m_ibus = 0; + uint16_t m_crc = 0; // I-A62 + bool m_crc_enabled = false; // I-A58-13 + bool m_crc_out = false; // C-A16-2 + bool m_reading = false; // I-A46-9 + bool m_writing = false; // C-A16-4 + uint16_t m_data_sr = 0; // C-A36 & C-A29 (MSB), next byte in LSB + bool m_last_data_bit = false; // I-A48-6 + uint16_t m_clock_sr = 0; // C-A34 & C-A27 (MSB), next byte in LSB attotime m_last_f_time; - bool m_clock_gate; // I-A10-8 - bool m_amwrt; // I-A58-6 - bool m_dlyd_amwrt; + bool m_clock_gate = false; // I-A10-8 + bool m_amwrt = false; // I-A58-6 + bool m_dlyd_amwrt = false; // PLL fdc_pll_t m_pll; // Timers - emu_timer *m_timeout_timer; - emu_timer *m_byte_timer; - emu_timer *m_f_timer; + emu_timer *m_timeout_timer = nullptr; + emu_timer *m_byte_timer = nullptr; + emu_timer *m_f_timer = nullptr; void set_output(); unsigned selected_drive() const; diff --git a/src/devices/bus/neogeo/boot_kof10th.h b/src/devices/bus/neogeo/boot_kof10th.h index 8e422f6d6ec..72df63aba1c 100644 --- a/src/devices/bus/neogeo/boot_kof10th.h +++ b/src/devices/bus/neogeo/boot_kof10th.h @@ -36,10 +36,10 @@ protected: virtual void device_add_mconfig(machine_config &config) override; private: - uint8_t* m_fixed; - uint32_t m_special_bank; - uint16_t m_cart_ram[0x1000]; - uint16_t m_cart_ram2[0x10000]; + uint8_t* m_fixed = nullptr; + uint32_t m_special_bank = 0; + uint16_t m_cart_ram[0x1000]{}; + uint16_t m_cart_ram2[0x10000]{}; }; // device type definition diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.h b/src/devices/bus/neogeo/prot_kof2k3bl.h index c4c83d30e5d..bff03feb276 100644 --- a/src/devices/bus/neogeo/prot_kof2k3bl.h +++ b/src/devices/bus/neogeo/prot_kof2k3bl.h @@ -29,9 +29,9 @@ protected: virtual void device_reset() override; private: - uint16_t m_overlay; - uint32_t m_bank_base; - uint16_t m_cartridge_ram[0x1000]; // bootlegs + uint16_t m_overlay = 0; + uint32_t m_bank_base = 0; + uint16_t m_cartridge_ram[0x1000]{}; // bootlegs }; #endif // MAME_BUS_NEOGEO_PROT_KOF2K3BL_H diff --git a/src/devices/bus/neogeo/slot.h b/src/devices/bus/neogeo/slot.h index 4c86456ff61..bd9fdaff5bb 100644 --- a/src/devices/bus/neogeo/slot.h +++ b/src/devices/bus/neogeo/slot.h @@ -334,7 +334,7 @@ protected: virtual void device_start() override; private: - int m_type; + int m_type = 0; device_neogeo_cart_interface* m_cart; }; diff --git a/src/devices/bus/neogeo_ctrl/kizuna4p.h b/src/devices/bus/neogeo_ctrl/kizuna4p.h index 404055cdec6..2539d5f764b 100644 --- a/src/devices/bus/neogeo_ctrl/kizuna4p.h +++ b/src/devices/bus/neogeo_ctrl/kizuna4p.h @@ -40,7 +40,7 @@ protected: private: required_ioport_array<4> m_joy; required_ioport_array<2> m_ss; - uint8_t m_ctrl_sel; + uint8_t m_ctrl_sel = 0; }; diff --git a/src/devices/bus/nes/disksys.h b/src/devices/bus/nes/disksys.h index 61bd9dd2048..c7d3b6d0d3d 100644 --- a/src/devices/bus/nes/disksys.h +++ b/src/devices/bus/nes/disksys.h @@ -57,7 +57,7 @@ private: uint16_t m_irq_count, m_irq_count_latch; int m_irq_enable, m_irq_repeat, m_irq_transfer; int m_disk_reg_enable; - bool m_sound_en; + bool m_sound_en = false; uint8_t m_fds_motor_on; uint8_t m_fds_door_closed; diff --git a/src/devices/bus/nes/jy.h b/src/devices/bus/nes/jy.h index ac4cf8e397e..3a30cdcca15 100644 --- a/src/devices/bus/nes/jy.h +++ b/src/devices/bus/nes/jy.h @@ -42,27 +42,27 @@ protected: virtual void update_mirror() { update_mirror_typea(); } inline uint8_t unscramble(uint8_t bank); - uint8_t m_mul[2]; - uint8_t m_latch; - uint8_t m_reg[4]; - uint8_t m_chr_latch[2]; // type C uses a more complex CHR 4K mode, and these vars are only changed for those games - uint8_t m_mmc_prg_bank[4]; - uint16_t m_mmc_nt_bank[4]; - uint16_t m_mmc_vrom_bank[8]; - uint16_t m_extra_chr_bank; - uint16_t m_extra_chr_mask; - int m_bank_6000; - - uint8_t m_irq_mode; - uint8_t m_irq_count; - uint8_t m_irq_prescale; - uint8_t m_irq_prescale_mask; - uint8_t m_irq_flip; - int m_irq_enable; - int m_irq_up, m_irq_down; + uint8_t m_mul[2]{}; + uint8_t m_latch = 0; + uint8_t m_reg[4]{}; + uint8_t m_chr_latch[2]{}; // type C uses a more complex CHR 4K mode, and these vars are only changed for those games + uint8_t m_mmc_prg_bank[4]{}; + uint16_t m_mmc_nt_bank[4]{}; + uint16_t m_mmc_vrom_bank[8]{}; + uint16_t m_extra_chr_bank = 0; + uint16_t m_extra_chr_mask = 0; + int m_bank_6000 = 0; + + uint8_t m_irq_mode = 0; + uint8_t m_irq_count = 0; + uint8_t m_irq_prescale = 0; + uint8_t m_irq_prescale_mask = 0; + uint8_t m_irq_flip = 0; + int m_irq_enable = 0; + int m_irq_up = 0, m_irq_down = 0; static const device_timer_id TIMER_IRQ = 0; - emu_timer *irq_timer; + emu_timer *irq_timer = nullptr; attotime timer_freq; }; diff --git a/src/devices/bus/nes/kaiser.h b/src/devices/bus/nes/kaiser.h index 5962a77dd13..31bef65627b 100644 --- a/src/devices/bus/nes/kaiser.h +++ b/src/devices/bus/nes/kaiser.h @@ -23,7 +23,7 @@ protected: virtual void device_start() override; private: - u8 m_latch; + u8 m_latch = 0; }; @@ -63,7 +63,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch; + uint8_t m_latch = 0; }; @@ -88,11 +88,11 @@ protected: virtual void device_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override; - u8 m_reg[8]; + u8 m_reg[8]{}; private: void prg_update(); - u8 m_latch; + u8 m_latch = 0; u16 m_irq_count, m_irq_count_latch; int m_irq_enable; @@ -136,7 +136,7 @@ protected: virtual void device_start() override; private: - u8 m_latch; + u8 m_latch = 0; const u8 m_a15_flip; }; @@ -171,7 +171,7 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override; private: - uint8_t m_latch; + uint8_t m_latch = 0; uint16_t m_irq_count; uint8_t m_irq_status; @@ -218,7 +218,7 @@ protected: virtual void device_start() override; private: - u8 m_latch; + u8 m_latch = 0; }; @@ -327,7 +327,7 @@ protected: private: void update_prg(); - uint8_t m_latch; + uint8_t m_latch = 0; uint8_t m_reg[8]; }; diff --git a/src/devices/bus/nes/mmc3_clones.h b/src/devices/bus/nes/mmc3_clones.h index d6da92864d6..87e57474143 100644 --- a/src/devices/bus/nes/mmc3_clones.h +++ b/src/devices/bus/nes/mmc3_clones.h @@ -187,7 +187,7 @@ protected: virtual void device_start() override; private: - int m_prot; + int m_prot = 0; }; @@ -320,7 +320,7 @@ protected: virtual void device_start() override; private: - uint8_t m_prot; + uint8_t m_prot = 0; }; diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index e3e0a6cbe03..b666ec38bb4 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -314,7 +314,7 @@ public: // PRG inline int prg_8k_bank_num(int bank); inline void update_prg_banks(int prg_bank_start, int prg_bank_end); - memory_bank *m_prg_bank_mem[4]; + memory_bank *m_prg_bank_mem[4]{}; int m_prg_bank[4]; uint32_t m_prg_chunks; uint32_t m_prg_mask; @@ -337,7 +337,7 @@ public: //because some of these change multiple times per scanline! int m_chr_src[8]; //defines source of base pointer int m_chr_orig[8]; //defines offset of 0x400 byte segment at base pointer - uint8_t *m_chr_access[8]; //source translated + origin -> valid pointer! + uint8_t *m_chr_access[8]{}; //source translated + origin -> valid pointer! uint32_t m_vrom_chunks; uint32_t m_vram_chunks; @@ -371,7 +371,7 @@ public: int m_nt_src[4]; int m_nt_orig[4]; int m_nt_writable[4]; - uint8_t *m_nt_access[4]; //quick banking structure for a maximum of 4K of RAM/ROM/ExRAM + uint8_t *m_nt_access[4]{}; //quick banking structure for a maximum of 4K of RAM/ROM/ExRAM void set_nt_page(int page, int source, int bank, int writable); void set_nt_mirroring(int mirroring); diff --git a/src/devices/bus/nes/pirate.h b/src/devices/bus/nes/pirate.h index a94f541b498..6e11ca29255 100644 --- a/src/devices/bus/nes/pirate.h +++ b/src/devices/bus/nes/pirate.h @@ -64,7 +64,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch; + uint8_t m_latch = 0; uint8_t m_ram[0xb00]; }; @@ -174,7 +174,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch; + uint8_t m_latch = 0; }; @@ -198,7 +198,7 @@ protected: private: void update_banks(); - u8 m_latch; + u8 m_latch = 0; u8 m_reg[6]; u16 m_irq_count, m_irq_count_latch; @@ -224,7 +224,7 @@ protected: virtual void device_start() override; private: - uint16_t m_latch; + uint16_t m_latch = 0; }; @@ -247,7 +247,7 @@ protected: private: u8 m_jumper; - u16 m_latch; + u16 m_latch = 0; u8 m_reg; }; @@ -272,7 +272,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch; + uint8_t m_latch = 0; }; #endif diff --git a/src/devices/bus/nes/vrc_clones.h b/src/devices/bus/nes/vrc_clones.h index 780dc6ae0cb..a659c670701 100644 --- a/src/devices/bus/nes/vrc_clones.h +++ b/src/devices/bus/nes/vrc_clones.h @@ -148,7 +148,7 @@ protected: virtual void device_start() override; private: - u8 m_reg; + u8 m_reg = 0; }; @@ -203,7 +203,7 @@ protected: private: u16 m_irq_count; - u8 m_irq_latch; + u8 m_irq_latch = 0; int m_irq_enable; static const device_timer_id TIMER_IRQ = 0; @@ -230,7 +230,7 @@ protected: virtual void device_start() override; private: - u8 m_chr_mask, m_chr_match; + u8 m_chr_mask = 0, m_chr_match; }; // ======================> nes_hengg_shjy3_device diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h index 3ac24faffa6..17623f1e525 100644 --- a/src/devices/bus/newbrain/fdc.h +++ b/src/devices/bus/newbrain/fdc.h @@ -62,12 +62,12 @@ private: void moton(int state); - int m_paging; - int m_ma16; - int m_mpm; - int m_fdc_att; - int m_fdc_int; - int m_pa15; + int m_paging = 0; + int m_ma16 = 0; + int m_mpm = 0; + int m_fdc_att = 0; + int m_fdc_int = 0; + int m_pa15 = 0; }; diff --git a/src/devices/bus/nscsi/cd.h b/src/devices/bus/nscsi/cd.h index 1a87e150b13..aa7624cdb7a 100644 --- a/src/devices/bus/nscsi/cd.h +++ b/src/devices/bus/nscsi/cd.h @@ -46,13 +46,13 @@ private: uint32_t bytes_per_block; int lba, cur_sector; required_device image; - uint8_t mode_data[12]; + uint8_t mode_data[12]{}; - char manufacturer[8]; - char product[16]; - char revision[4]; - uint8_t inquiry_data; - uint8_t compliance; + char manufacturer[8]{}; + char product[16]{}; + char revision[4]{}; + uint8_t inquiry_data = 0; + uint8_t compliance = 0; void return_no_cd(); static int to_msf(int frame); diff --git a/src/devices/bus/nscsi/cw7501.h b/src/devices/bus/nscsi/cw7501.h index 0b785c4d3ba..772b247a518 100644 --- a/src/devices/bus/nscsi/cw7501.h +++ b/src/devices/bus/nscsi/cw7501.h @@ -32,7 +32,7 @@ private: required_device m_cdcpu; - u8 m_mystery_address; + u8 m_mystery_address = 0; }; class cdr4210_device : public cw7501_device diff --git a/src/devices/bus/nubus/laserview.h b/src/devices/bus/nubus/laserview.h index 88131ca72ec..196f8c19c3e 100644 --- a/src/devices/bus/nubus/laserview.h +++ b/src/devices/bus/nubus/laserview.h @@ -40,8 +40,8 @@ private: std::vector m_vram; uint32_t m_vbl_disable, m_palette[2]; - int m_prot_state; - int m_toggle; + int m_prot_state = 0; + int m_toggle = 0; }; // device type definition diff --git a/src/devices/bus/nubus/nubus_image.h b/src/devices/bus/nubus/nubus_image.h index ae9257ac0c4..dcfc1179fad 100644 --- a/src/devices/bus/nubus/nubus_image.h +++ b/src/devices/bus/nubus/nubus_image.h @@ -37,13 +37,13 @@ protected: struct nbfilectx { - uint32_t curcmd; - char filename[128]; + uint32_t curcmd = 0; + char filename[128]{}; std::string curdir; osd::directory::ptr dirp; osd_file::ptr fd; - uint64_t filelen; - uint32_t bytecount; + uint64_t filelen = 0; + uint32_t bytecount = 0; }; nubus_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/pc_kbd/pcat101.h b/src/devices/bus/pc_kbd/pcat101.h index 449947eccad..902c8738e22 100644 --- a/src/devices/bus/pc_kbd/pcat101.h +++ b/src/devices/bus/pc_kbd/pcat101.h @@ -46,8 +46,8 @@ private: required_ioport_array<16> m_matrix; output_finder<3> m_leds; - u8 m_porta; - u8 m_portc; + u8 m_porta = 0; + u8 m_portc = 0; }; // device type definition diff --git a/src/devices/bus/pce/pce_rom.h b/src/devices/bus/pce/pce_rom.h index 43499851eb7..0a5e386d585 100644 --- a/src/devices/bus/pce/pce_rom.h +++ b/src/devices/bus/pce/pce_rom.h @@ -103,7 +103,7 @@ private: const uint32_t m_bram_size = 0x800*4; uint8_t m_bram[0x800*4]; - uint8_t m_bram_locked; + uint8_t m_bram_locked = false; }; diff --git a/src/devices/bus/pofo/hpc102.h b/src/devices/bus/pofo/hpc102.h index c7168b12787..54972df4d8f 100644 --- a/src/devices/bus/pofo/hpc102.h +++ b/src/devices/bus/pofo/hpc102.h @@ -48,7 +48,7 @@ protected: private: required_device m_uart; - uint8_t m_vector; + uint8_t m_vector = 0; }; diff --git a/src/devices/bus/pofo/hpc104.h b/src/devices/bus/pofo/hpc104.h index d5d1c36c3d3..9272e31dda2 100644 --- a/src/devices/bus/pofo/hpc104.h +++ b/src/devices/bus/pofo/hpc104.h @@ -60,8 +60,8 @@ private: memory_share_creator m_nvram; required_ioport m_io_sw1; - bool m_sw1; - bool m_ncc1_out; + bool m_sw1 = false; + bool m_ncc1_out = false; }; diff --git a/src/devices/bus/qbus/dvk_kgd.h b/src/devices/bus/qbus/dvk_kgd.h index 8ecd4ef23e2..78a0cb8edfb 100644 --- a/src/devices/bus/qbus/dvk_kgd.h +++ b/src/devices/bus/qbus/dvk_kgd.h @@ -50,12 +50,12 @@ protected: private: std::unique_ptr m_videoram_base; - uint8_t *m_videoram; + uint8_t *m_videoram = nullptr; - uint16_t m_cr; - uint16_t m_dr; - uint16_t m_ar; - uint16_t m_ct; + uint16_t m_cr = 0; + uint16_t m_dr = 0; + uint16_t m_ar = 0; + uint16_t m_ct = 0; }; diff --git a/src/devices/bus/qbus/pc11.h b/src/devices/bus/qbus/pc11.h index 8d32925f459..e8f35860ec3 100644 --- a/src/devices/bus/qbus/pc11.h +++ b/src/devices/bus/qbus/pc11.h @@ -61,17 +61,17 @@ private: int m_rxvec; int m_txvec; - device_image_interface *m_fd; + device_image_interface *m_fd = nullptr; - line_state m_rxrdy; - line_state m_txrdy; + line_state m_rxrdy{}; + line_state m_txrdy{}; - uint16_t m_rcsr; - uint16_t m_rbuf; - uint16_t m_tcsr; - uint16_t m_tbuf; + uint16_t m_rcsr = 0; + uint16_t m_rbuf = 0; + uint16_t m_tcsr = 0; + uint16_t m_tbuf = 0; - const char *pc11_regnames[4]; + const char *pc11_regnames[4]{}; }; diff --git a/src/devices/bus/rs232/mboardd.cpp b/src/devices/bus/rs232/mboardd.cpp index b2b44a6db70..0b0b1717be2 100644 --- a/src/devices/bus/rs232/mboardd.cpp +++ b/src/devices/bus/rs232/mboardd.cpp @@ -57,8 +57,8 @@ private: void c000_w(u8 data) { m_c000_latch = data; }; void m6803_mem(address_map &map); - int m_rx_state; - u8 m_c000_latch; + int m_rx_state = 0; + u8 m_c000_latch = 0; }; mockingboard_d_device::mockingboard_d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) diff --git a/src/devices/bus/rtpc/kbd.h b/src/devices/bus/rtpc/kbd.h index 860cb5c2218..c2794515bd0 100644 --- a/src/devices/bus/rtpc/kbd.h +++ b/src/devices/bus/rtpc/kbd.h @@ -36,10 +36,10 @@ private: required_ioport_array<8> m_matrix[4]; output_finder<3> m_leds; - bool m_t1; - u8 m_bus; - u8 m_p1; - u8 m_p2; + bool m_t1 = false; + u8 m_bus = 0; + u8 m_p1 = 0; + u8 m_p2 = 0; }; DECLARE_DEVICE_TYPE(RTPC_KBD, rtpc_kbd_device) diff --git a/src/devices/bus/sat_ctrl/ctrl.h b/src/devices/bus/sat_ctrl/ctrl.h index d17bed9b067..97c2897207a 100644 --- a/src/devices/bus/sat_ctrl/ctrl.h +++ b/src/devices/bus/sat_ctrl/ctrl.h @@ -34,7 +34,7 @@ public: protected: device_saturn_control_port_interface(const machine_config &mconfig, device_t &device); - uint8_t m_ctrl_id; + uint8_t m_ctrl_id = 0; saturn_control_port_device *m_port; }; diff --git a/src/devices/bus/sbus/cgsix.h b/src/devices/bus/sbus/cgsix.h index b6f3fe7520d..062982da739 100644 --- a/src/devices/bus/sbus/cgsix.h +++ b/src/devices/bus/sbus/cgsix.h @@ -470,36 +470,36 @@ protected: uint32_t m_itri_relx; uint32_t m_itri_rely; uint32_t m_itri_relz; - uint32_t m_itri_r; - uint32_t m_itri_g; - uint32_t m_itri_b; - uint32_t m_itri_a; - - uint32_t m_iquad_absx; - uint32_t m_iquad_absy; - uint32_t m_iquad_absz; - uint32_t m_iquad_relx; - uint32_t m_iquad_rely; - uint32_t m_iquad_relz; - uint32_t m_iquad_r; - uint32_t m_iquad_g; - uint32_t m_iquad_b; - uint32_t m_iquad_a; - - uint32_t m_irect_absx; - uint32_t m_irect_absy; - uint32_t m_irect_absz; - uint32_t m_irect_relx; - uint32_t m_irect_rely; - uint32_t m_irect_relz; - uint32_t m_irect_r; - uint32_t m_irect_g; - uint32_t m_irect_b; - uint32_t m_irect_a; + uint32_t m_itri_r = 0; + uint32_t m_itri_g = 0; + uint32_t m_itri_b = 0; + uint32_t m_itri_a = 0; + + uint32_t m_iquad_absx = 0; + uint32_t m_iquad_absy = 0; + uint32_t m_iquad_absz = 0; + uint32_t m_iquad_relx = 0; + uint32_t m_iquad_rely = 0; + uint32_t m_iquad_relz = 0; + uint32_t m_iquad_r = 0; + uint32_t m_iquad_g = 0; + uint32_t m_iquad_b = 0; + uint32_t m_iquad_a = 0; + + uint32_t m_irect_absx = 0; + uint32_t m_irect_absy = 0; + uint32_t m_irect_absz = 0; + uint32_t m_irect_relx = 0; + uint32_t m_irect_rely = 0; + uint32_t m_irect_relz = 0; + uint32_t m_irect_r = 0; + uint32_t m_irect_g = 0; + uint32_t m_irect_b = 0; + uint32_t m_irect_a = 0; std::unique_ptr m_prim_buf; - uint32_t m_vertex_count; - uint32_t m_curr_prim_type; + uint32_t m_vertex_count = 0; + uint32_t m_curr_prim_type = 0; }; uint32_t m_thc_misc; diff --git a/src/devices/bus/sbus/sbus.h b/src/devices/bus/sbus/sbus.h index 2c66318c8aa..108b7ac7a05 100644 --- a/src/devices/bus/sbus/sbus.h +++ b/src/devices/bus/sbus/sbus.h @@ -100,12 +100,12 @@ protected: // internal state required_device m_maincpu; required_address_space m_type1space; - address_space *m_space; + address_space *m_space = nullptr; devcb_write_line::array<7> m_irq_cb; devcb_write32 m_buserr; - device_sbus_card_interface *m_device_list[3]; + device_sbus_card_interface *m_device_list[3]{}; private: void slot1_timeout_map(address_map &map); @@ -148,7 +148,7 @@ protected: optional_device m_sbus_finder; sbus_device *m_sbus; - const char *m_sbus_slottag; + const char *m_sbus_slottag = nullptr; int m_slot; uint32_t m_base; }; diff --git a/src/devices/bus/scsi/omti5100.h b/src/devices/bus/scsi/omti5100.h index 4b1e1dda59a..9b3ab83405e 100644 --- a/src/devices/bus/scsi/omti5100.h +++ b/src/devices/bus/scsi/omti5100.h @@ -24,7 +24,7 @@ protected: private: required_device m_image0; required_device m_image1; - hard_disk_file::info m_param[2]; + hard_disk_file::info m_param[2]{}; }; DECLARE_DEVICE_TYPE(OMTI5100, omti5100_device) diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h index 07e64d5f102..b191d86b2e6 100644 --- a/src/devices/bus/scsi/scsi.h +++ b/src/devices/bus/scsi/scsi.h @@ -195,7 +195,7 @@ protected: int m_msg; int m_req; int m_ack; - int m_atn; + int m_atn = 0; int m_rst; int m_data0; int m_data1; diff --git a/src/devices/bus/scsi/scsicd512.h b/src/devices/bus/scsi/scsicd512.h index 0345a74ca9a..b416f21b0f8 100644 --- a/src/devices/bus/scsi/scsicd512.h +++ b/src/devices/bus/scsi/scsicd512.h @@ -37,7 +37,7 @@ protected: char m_manufacturer[8]; char m_product[16]; char m_revision[4]; - uint8_t m_data; + uint8_t m_data = 0; }; class dec_rrd45_device : public scsicd512_device diff --git a/src/devices/bus/sega8/rom.h b/src/devices/bus/sega8/rom.h index 1af8cdb1c5b..06e74634859 100644 --- a/src/devices/bus/sega8/rom.h +++ b/src/devices/bus/sega8/rom.h @@ -392,8 +392,8 @@ protected: virtual void device_start() override; virtual void device_reset() override; - uint8_t m_gamesel; - uint8_t m_readxor; + uint8_t m_gamesel = 0; + uint8_t m_readxor = 0; }; @@ -420,7 +420,7 @@ protected: virtual void device_reset() override; private: - uint8_t m_block; + uint8_t m_block = 0; }; @@ -447,7 +447,7 @@ protected: virtual void device_reset() override; private: - uint8_t m_block; + uint8_t m_block = 0; }; class sega8_x_terminator_device : public sega8_rom_device diff --git a/src/devices/bus/sg1000_exp/sg1000exp.h b/src/devices/bus/sg1000_exp/sg1000exp.h index d297e255d97..75b33900f3c 100644 --- a/src/devices/bus/sg1000_exp/sg1000exp.h +++ b/src/devices/bus/sg1000_exp/sg1000exp.h @@ -72,7 +72,7 @@ public: protected: device_sg1000_expansion_slot_interface(const machine_config &mconfig, device_t &device); - sg1000_expansion_slot_device *m_port; + sg1000_expansion_slot_device *m_port = nullptr; }; diff --git a/src/devices/bus/snes/sa1.h b/src/devices/bus/snes/sa1.h index fcc9bbd9dc1..2ad641a8d83 100644 --- a/src/devices/bus/snes/sa1.h +++ b/src/devices/bus/snes/sa1.h @@ -139,8 +139,8 @@ private: u8 m_iram_write_snes, m_iram_write_sa1; // $2230-$2231 u8 m_dma_ctrl, m_dma_ccparam; - u8 m_dma_cconv_size; - u8 m_dma_cconv_bits; + u8 m_dma_cconv_size = 0; + u8 m_dma_cconv_bits = 8; // DMA Control (DCNT) inline const bool DCNT_DMAEN() { return BIT(m_dma_ctrl, 7); } // DMA Enable control //inline const bool DCNT_DPRIO() { return BIT(m_dma_ctrl, 6); } // Processing priority between SA-1 CPU and DMA; Not emulated currently diff --git a/src/devices/bus/snes/sdd1.h b/src/devices/bus/snes/sdd1.h index 5164a169f65..a7c92037111 100644 --- a/src/devices/bus/snes/sdd1.h +++ b/src/devices/bus/snes/sdd1.h @@ -73,8 +73,8 @@ protected: struct SDD1_PEM_ContextInfo { - uint8_t status; - uint8_t MPS; + uint8_t status = 0; + uint8_t MPS = 0; }; class SDD1_PEM //Probability Estimation Module @@ -167,8 +167,8 @@ protected: struct { - uint32_t addr; // $43x2-$43x4 -- DMA transfer address - uint16_t size; // $43x5-$43x6 -- DMA transfer size + uint32_t addr = 0; // $43x2-$43x4 -- DMA transfer address + uint16_t size = 0; // $43x5-$43x6 -- DMA transfer size } m_dma[8]; std::unique_ptr m_sdd1emu; @@ -176,9 +176,9 @@ protected: struct { std::unique_ptr data; // pointer to decompressed S-DD1 data (65536 bytes) - uint16_t offset; // read index into S-DD1 decompression buffer - uint32_t size; // length of data buffer; reads decrement counter, set ready to false at 0 - uint8_t ready; // 1 when data[] is valid; 0 to invoke sdd1emu.decompress() + uint16_t offset = 0; // read index into S-DD1 decompression buffer + uint32_t size = 0; // length of data buffer; reads decrement counter, set ready to false at 0 + uint8_t ready = 0; // 1 when data[] is valid; 0 to invoke sdd1emu.decompress() } m_buffer; }; diff --git a/src/devices/bus/spectrum/beta.h b/src/devices/bus/spectrum/beta.h index 1827c741355..c52ed588b7a 100644 --- a/src/devices/bus/spectrum/beta.h +++ b/src/devices/bus/spectrum/beta.h @@ -60,10 +60,10 @@ protected: required_device_array m_floppy; required_device m_exp; - int m_romcs; - u8 m_masterdisable; + int m_romcs = 0; + u8 m_masterdisable = 0; u8 m_control; - bool m_motor_active; + bool m_motor_active = false; void fdc_hld_w(int state); virtual void motors_control(); diff --git a/src/devices/bus/spectrum/d40.h b/src/devices/bus/spectrum/d40.h index 250b2feccd8..94b24963dfc 100644 --- a/src/devices/bus/spectrum/d40.h +++ b/src/devices/bus/spectrum/d40.h @@ -86,9 +86,9 @@ protected: void fdc_drq_w(int state); virtual void nmi_check() override; - uint8_t m_control; - int m_intrq; - int m_drq; + uint8_t m_control = 0; + int m_intrq = 0; + int m_drq = 0; }; class spectrum_d80_device : diff --git a/src/devices/bus/spectrum/kempdisc.h b/src/devices/bus/spectrum/kempdisc.h index 3a3b5118402..c5475444206 100644 --- a/src/devices/bus/spectrum/kempdisc.h +++ b/src/devices/bus/spectrum/kempdisc.h @@ -56,8 +56,8 @@ protected: required_device_array m_floppy; required_device m_exp; - int m_romcs; -// u8 m_control; + int m_romcs = 0; +// u8 m_control = 0; }; class spectrum_spdos_device : diff --git a/src/devices/bus/spectrum/lprint.h b/src/devices/bus/spectrum/lprint.h index d58793607c6..cb5dad32217 100644 --- a/src/devices/bus/spectrum/lprint.h +++ b/src/devices/bus/spectrum/lprint.h @@ -46,8 +46,8 @@ protected: required_memory_region m_rom; required_device m_centronics; - int m_romcs; - int m_busy; + int m_romcs = 0; + int m_busy = 0; }; class spectrum_lprint3_device : @@ -87,8 +87,8 @@ protected: required_device m_rs232; required_device m_exp; - int m_romcs; - int m_busy; + int m_romcs = 0; + int m_busy = 0; }; class spectrum_kempcentrs_device : @@ -115,7 +115,7 @@ protected: required_device m_centronics; - int m_busy; + int m_busy = 0; }; class spectrum_kempcentre_device : @@ -150,9 +150,9 @@ protected: required_memory_region m_rom; required_device m_centronics; - int m_active; - int m_romcs; - int m_busy; + int m_active = 0; + int m_romcs = 0; + int m_busy = 0; }; class spectrum_kempcentreu_device : diff --git a/src/devices/bus/spectrum/mface.h b/src/devices/bus/spectrum/mface.h index 7b3fbf03e72..36b38c9dd82 100644 --- a/src/devices/bus/spectrum/mface.h +++ b/src/devices/bus/spectrum/mface.h @@ -53,8 +53,8 @@ protected: required_memory_region m_rom; required_device m_exp; - int m_romcs; - int m_nmi_pending; + int m_romcs = 0; + int m_nmi_pending = 0; std::unique_ptr m_ram; }; @@ -143,7 +143,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; - int m_hidden; + int m_hidden = 0; }; class spectrum_mface128v1_device : public spectrum_mface128_base_device @@ -163,7 +163,7 @@ protected: virtual uint8_t iorq_r(offs_t offset) override; virtual void iorq_w(offs_t offset, uint8_t data) override; - int m_d3_ff; // no initial state + int m_d3_ff = 0; // no initial state }; class spectrum_mface128_device : public spectrum_mface128v1_device @@ -200,8 +200,8 @@ protected: virtual void iorq_w(offs_t offset, uint8_t data) override; private: - uint8_t m_reg_file[4]; // no initial state - int m_disable; + uint8_t m_reg_file[4]{}; // no initial state + int m_disable = 0; }; class spectrum_mprint_device : public spectrum_mface128_base_device @@ -227,7 +227,7 @@ private: required_device m_centronics; - int m_busy; + int m_busy = 0; }; diff --git a/src/devices/bus/spectrum/mgt.h b/src/devices/bus/spectrum/mgt.h index 628477c1f8a..25edfb6736e 100644 --- a/src/devices/bus/spectrum/mgt.h +++ b/src/devices/bus/spectrum/mgt.h @@ -60,7 +60,7 @@ protected: required_device_array m_floppy; required_device m_centronics; - int m_romcs; + int m_romcs = 0; uint8_t m_ram[8 * 1024]; bool m_centronics_busy; }; diff --git a/src/devices/bus/spectrum/sixword.h b/src/devices/bus/spectrum/sixword.h index c11108454f6..8933c6adb12 100644 --- a/src/devices/bus/spectrum/sixword.h +++ b/src/devices/bus/spectrum/sixword.h @@ -64,10 +64,10 @@ protected: required_device m_rs232; required_ioport m_joy; - int m_romcs; - u8 m_ram[0x2000]; - u16 m_rombank; - u8 m_control; + int m_romcs = 0; + u8 m_ram[0x2000]{}; + u16 m_rombank = 0; + u8 m_control = 0; }; class spectrum_swiftdisc2_device : diff --git a/src/devices/bus/ss50/piaide.cpp b/src/devices/bus/ss50/piaide.cpp index a8ac76efdf6..d8e6aebdab0 100644 --- a/src/devices/bus/ss50/piaide.cpp +++ b/src/devices/bus/ss50/piaide.cpp @@ -70,8 +70,8 @@ private: optional_device m_pia; optional_device m_ide; - uint8_t m_pia_porta; - uint8_t m_pia_portb; + uint8_t m_pia_porta = 0; + uint8_t m_pia_portb = 0; uint8_t pia_a_r(); uint8_t pia_b_r(); diff --git a/src/devices/bus/tanbus/radisc.h b/src/devices/bus/tanbus/radisc.h index bbcfc2298ac..a6e1b708bb6 100644 --- a/src/devices/bus/tanbus/radisc.h +++ b/src/devices/bus/tanbus/radisc.h @@ -64,8 +64,8 @@ private: int m_beeper_state; uint8_t m_drive_control; - int m_irq_enable; - int m_drq_enable; + int m_irq_enable = 0; + int m_drq_enable = 0; }; diff --git a/src/devices/bus/tanbus/tanbus.h b/src/devices/bus/tanbus/tanbus.h index 7f5e87eb0aa..33834af70c2 100644 --- a/src/devices/bus/tanbus/tanbus.h +++ b/src/devices/bus/tanbus/tanbus.h @@ -51,7 +51,7 @@ protected: private: required_device m_tanbus; - int m_bus_num; + int m_bus_num = 0; }; // device type definition diff --git a/src/devices/bus/ti99/gromport/cartridges.h b/src/devices/bus/ti99/gromport/cartridges.h index be4a8840d84..c5eb988aa3e 100644 --- a/src/devices/bus/ti99/gromport/cartridges.h +++ b/src/devices/bus/ti99/gromport/cartridges.h @@ -112,7 +112,7 @@ private: const std::string m_pathname; }; - bool m_readrom; + bool m_readrom = false; int m_pcbtype; int m_slot; int get_index_from_tagname(); @@ -155,12 +155,12 @@ protected: template void logerror(Format &&fmt, Params &&... args) const { m_cart->logerror(fmt, args...); } ti99_cartridge_device* m_cart; - tmc0430_device* m_grom[5]; + tmc0430_device* m_grom[5]{}; bool m_grom_idle; int m_grom_size; int m_rom_size; int m_ram_size; - int m_bank_mask; + int m_bank_mask = 0; uint8_t* m_rom_ptr; uint8_t* m_ram_ptr; diff --git a/src/devices/bus/ti99/gromport/gromport.h b/src/devices/bus/ti99/gromport/gromport.h index 74c844d7ed7..10d94cf432c 100644 --- a/src/devices/bus/ti99/gromport/gromport.h +++ b/src/devices/bus/ti99/gromport/gromport.h @@ -99,7 +99,7 @@ protected: virtual void device_config_complete() override; gromport_device* m_gromport; - bool m_grom_selected; + bool m_grom_selected = false; }; } // end namespace bus::ti99::gromport diff --git a/src/devices/bus/ti99/gromport/multiconn.h b/src/devices/bus/ti99/gromport/multiconn.h index 517224eff14..d41ea462e01 100644 --- a/src/devices/bus/ti99/gromport/multiconn.h +++ b/src/devices/bus/ti99/gromport/multiconn.h @@ -45,11 +45,11 @@ protected: virtual ioport_constructor device_input_ports() const override; private: - bool m_readrom; + bool m_readrom = false; int m_active_slot; int m_fixed_slot; int m_next_free_slot; - ti99_cartridge_device* m_cartridge[NUMBER_OF_CARTRIDGE_SLOTS]; + ti99_cartridge_device* m_cartridge[NUMBER_OF_CARTRIDGE_SLOTS]{}; void set_slot(int slotnumber); int get_active_slot(bool changebase, offs_t offset); diff --git a/src/devices/bus/ti99/internal/998board.h b/src/devices/bus/ti99/internal/998board.h index 86c5da12787..410313d43bf 100644 --- a/src/devices/bus/ti99/internal/998board.h +++ b/src/devices/bus/ti99/internal/998board.h @@ -236,7 +236,7 @@ private: video_waitstate_generator m_vidws; // Pointer to mainboard - mainboard8_device* m_mainboard; + mainboard8_device* m_mainboard = nullptr; }; /* @@ -323,7 +323,7 @@ private: int m_msast = 0; // Pointer to mainboard - mainboard8_device* m_mainboard; + mainboard8_device* m_mainboard = nullptr; }; /* @@ -381,7 +381,7 @@ private: uint8_t* m_sram = nullptr; // Pointer to mainboard - mainboard8_device* m_mainboard; + mainboard8_device* m_mainboard = nullptr; // Keep the system ready state int m_srdy = 0; diff --git a/src/devices/bus/ti99/internal/genkbd.h b/src/devices/bus/ti99/internal/genkbd.h index a54951e2134..147474c97e3 100644 --- a/src/devices/bus/ti99/internal/genkbd.h +++ b/src/devices/bus/ti99/internal/genkbd.h @@ -40,8 +40,8 @@ protected: virtual DECLARE_WRITE_LINE_MEMBER( data_write ) override; private: - emu_timer *m_poll_timer; - emu_timer *m_send_timer; + emu_timer *m_poll_timer = nullptr; + emu_timer *m_send_timer = nullptr; static constexpr unsigned KEYQUEUESIZE = 256; static constexpr unsigned MAXKEYMSGLENGTH = 10; @@ -55,7 +55,7 @@ private: required_ioport_array<8> m_keys; int m_queue_length; - int m_queue_head; + int m_queue_head = 0; uint8_t m_queue[KEYQUEUESIZE]; uint32_t m_key_state_save[4]; int m_autorepeat_code; @@ -63,22 +63,22 @@ private: bool m_fake_shift_state; bool m_fake_unshift_state; - bool m_left_shift; - bool m_right_shift; - bool m_left_ctrl; - bool m_right_ctrl; - bool m_left_alt; - bool m_altgr; - bool m_numlock; + bool m_left_shift = false; + bool m_right_shift = false; + bool m_left_ctrl = false; + bool m_right_ctrl = false; + bool m_left_alt = false; + bool m_altgr = false; + bool m_numlock = false; bool m_resetting; line_state m_clock_line; line_state m_data_line; - int m_reset_timer; + int m_reset_timer = 0; - int m_shift_reg; - int m_shift_count; + int m_shift_reg = 0; + int m_shift_count = 0; }; diff --git a/src/devices/bus/ti99/peb/bwg.h b/src/devices/bus/ti99/peb/bwg.h index 671f584dc9a..17f17ca9ee3 100644 --- a/src/devices/bus/ti99/peb/bwg.h +++ b/src/devices/bus/ti99/peb/bwg.h @@ -113,7 +113,7 @@ private: required_device m_buffer_ram; // Link to the attached floppy drives - floppy_image_device* m_floppy[4]; + floppy_image_device* m_floppy[4]{}; // Currently selected floppy drive (1-4, 0=none) int m_sel_floppy; diff --git a/src/devices/bus/ti99/peb/cc_fdc.h b/src/devices/bus/ti99/peb/cc_fdc.h index e72bfa3ea57..fa22a2a68b6 100644 --- a/src/devices/bus/ti99/peb/cc_fdc.h +++ b/src/devices/bus/ti99/peb/cc_fdc.h @@ -90,7 +90,7 @@ protected: void operate_ready_line(); // Link to the attached floppy drives - floppy_image_device* m_floppy[4]; + floppy_image_device* m_floppy[4]{}; // Motor monoflop required_device m_motormf; diff --git a/src/devices/bus/ti99/peb/evpc.h b/src/devices/bus/ti99/peb/evpc.h index 683933a5780..b32d8cbec94 100644 --- a/src/devices/bus/ti99/peb/evpc.h +++ b/src/devices/bus/ti99/peb/evpc.h @@ -42,11 +42,11 @@ public: protected: struct evpc_palette { - uint8_t read_index, write_index, mask; - int read; - int state; - struct { uint8_t red, green, blue; } color[0x100]; - //int dirty; + uint8_t read_index = 0, write_index = 0, mask = 0; + int read = 0; + int state = 0; + struct { uint8_t red = 0, green = 0, blue = 0; } color[0x100]; + //int dirty = 0; }; void device_start() override; @@ -66,7 +66,7 @@ private: DECLARE_WRITE_LINE_MEMBER( video_interrupt_in ); - int m_address; + int m_address = 0; int m_dsr_page; bool m_inDsrArea; bool m_novram_accessed; diff --git a/src/devices/bus/ti99/peb/hfdc.h b/src/devices/bus/ti99/peb/hfdc.h index c7c17834b79..e6db9687738 100644 --- a/src/devices/bus/ti99/peb/hfdc.h +++ b/src/devices/bus/ti99/peb/hfdc.h @@ -100,10 +100,10 @@ private: required_device m_clock; // Link to the attached floppy drives - floppy_image_device* m_floppy_unit[4]; + floppy_image_device* m_floppy_unit[4]{}; // Link to the attached hard disks - mfm_harddisk_device* m_harddisk_unit[3]; + mfm_harddisk_device* m_harddisk_unit[3]{}; // Currently selected floppy drive floppy_image_device* m_current_floppy; diff --git a/src/devices/bus/ti99/peb/horizon.h b/src/devices/bus/ti99/peb/horizon.h index 72ab43a08fc..53177486603 100644 --- a/src/devices/bus/ti99/peb/horizon.h +++ b/src/devices/bus/ti99/peb/horizon.h @@ -77,8 +77,8 @@ private: int m_cru_base_phoenix; // Debugging - int m_current_bank; - int m_current_page; + int m_current_bank = 0; + int m_current_page = 0; }; } // end namespace bus::ti99::peb diff --git a/src/devices/bus/ti99/peb/memex.h b/src/devices/bus/ti99/peb/memex.h index 32c56326d47..7e4231bd71a 100644 --- a/src/devices/bus/ti99/peb/memex.h +++ b/src/devices/bus/ti99/peb/memex.h @@ -39,7 +39,7 @@ protected: private: bool access_enabled(offs_t offset); required_device m_ram; - uint8_t m_switches; + uint8_t m_switches = 0; }; } // end namespace bus::ti99::peb diff --git a/src/devices/bus/ti99/peb/myarcfdc.h b/src/devices/bus/ti99/peb/myarcfdc.h index 7eacdd79f26..f5cab180943 100644 --- a/src/devices/bus/ti99/peb/myarcfdc.h +++ b/src/devices/bus/ti99/peb/myarcfdc.h @@ -86,7 +86,7 @@ private: uint8_t* m_dsrrom; // Link to the attached floppy drives - floppy_image_device* m_floppy[4]; + floppy_image_device* m_floppy[4]{}; // Debugger accessors void debug_read(offs_t offset, uint8_t* value); diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h index 157c2099106..e78e8cba459 100644 --- a/src/devices/bus/ti99/peb/peribox.h +++ b/src/devices/bus/ti99/peb/peribox.h @@ -191,7 +191,7 @@ protected: device_ti99_peribox_card_interface(const machine_config &mconfig, device_t &device); virtual void interface_config_complete() override; - peribox_slot_device *m_slot; // using a link to the slot for callbacks + peribox_slot_device *m_slot = nullptr; // using a link to the slot for callbacks int m_senila; int m_senilb; diff --git a/src/devices/bus/ti99/peb/pgram.h b/src/devices/bus/ti99/peb/pgram.h index d050c3deac7..04c24848c19 100644 --- a/src/devices/bus/ti99/peb/pgram.h +++ b/src/devices/bus/ti99/peb/pgram.h @@ -43,9 +43,9 @@ private: void device_add_mconfig(machine_config &config) override; // Settings - bool m_active; - uint16_t m_crubase; - bool m_pgramplus; + bool m_active = false; + uint16_t m_crubase = 0; + bool m_pgramplus = false; ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ti99/peb/scsicard.h b/src/devices/bus/ti99/peb/scsicard.h index a55ad228886..adee7f9dbcf 100644 --- a/src/devices/bus/ti99/peb/scsicard.h +++ b/src/devices/bus/ti99/peb/scsicard.h @@ -61,13 +61,13 @@ private: required_device m_scsibus; // DSR ROM - uint8_t* m_eprom; + uint8_t* m_eprom = nullptr; // Recent address - int m_address; + int m_address = 0; // Settings - int m_sw2; + int m_sw2 = 0; // Latches for the lines // Should be removed and accessor functions be added to ncr5380 diff --git a/src/devices/bus/ti99/peb/ti_fdc.h b/src/devices/bus/ti99/peb/ti_fdc.h index 81c2324dbc9..df3f37cda62 100644 --- a/src/devices/bus/ti99/peb/ti_fdc.h +++ b/src/devices/bus/ti99/peb/ti_fdc.h @@ -87,7 +87,7 @@ private: bool m_inDsrArea; // When true the CPU is halted while DRQ/IRQ are true. - bool m_WAITena; + bool m_WAITena = false; // WD chip selected bool m_WDsel; @@ -105,7 +105,7 @@ private: uint8_t* m_dsrrom; // Link to the attached floppy drives - floppy_image_device* m_floppy[3]; + floppy_image_device* m_floppy[3]{}; // Currently selected floppy drive int m_sel_floppy; diff --git a/src/devices/bus/ti99/peb/tipi.h b/src/devices/bus/ti99/peb/tipi.h index 609b9d491df..0b45672b8b6 100644 --- a/src/devices/bus/ti99/peb/tipi.h +++ b/src/devices/bus/ti99/peb/tipi.h @@ -64,23 +64,23 @@ private: bool m_portaccess; // DSR ROM - uint8_t* m_eprom; + uint8_t* m_eprom = nullptr; // Websocket support std::unique_ptr m_wsclient; std::shared_ptr m_send_stream; std::unique_ptr m_rpimessage; - int m_msgindex; - int m_msglength; - emu_timer* m_restart_timer; - int m_attempts; - bool m_connected; + int m_msgindex = 0; + int m_msglength = 0; + emu_timer* m_restart_timer = nullptr; + int m_attempts = 0; + bool m_connected = 0; // Computer interface - u8 m_tc; - u8 m_td; - u8 m_rc; - u8 m_rd; + u8 m_tc = 0; + u8 m_td = 0; + u8 m_rc = 0; + u8 m_rd = 0; }; /* diff --git a/src/devices/bus/ti99/peb/tn_ide.h b/src/devices/bus/ti99/peb/tn_ide.h index f3174e2c0ee..189e794c6ca 100644 --- a/src/devices/bus/ti99/peb/tn_ide.h +++ b/src/devices/bus/ti99/peb/tn_ide.h @@ -63,7 +63,7 @@ private: int m_page; // Is the SRAM buffered? - bool m_srammap; + bool m_srammap = false; // RTC type int m_rtctype; @@ -77,7 +77,7 @@ private: void decode(offs_t offset, bool& mmap, bool& sramsel, bool& xramsel, bool& rtcsel, bool& cs1fx, bool& cs3fx); - int m_rtc_int; + int m_rtc_int = 0; }; } // end namespace bus::ti99::peb diff --git a/src/devices/bus/tmc600/euro.h b/src/devices/bus/tmc600/euro.h index 699de5b8383..8d9badda1dc 100644 --- a/src/devices/bus/tmc600/euro.h +++ b/src/devices/bus/tmc600/euro.h @@ -91,7 +91,7 @@ protected: // device-level overrides virtual void device_start() override; - device_tmc600_eurobus_card_interface *m_card; + device_tmc600_eurobus_card_interface *m_card = nullptr; }; diff --git a/src/devices/bus/vcs/dpc.h b/src/devices/bus/vcs/dpc.h index 40dd844e800..378b2ab9af3 100644 --- a/src/devices/bus/vcs/dpc.h +++ b/src/devices/bus/vcs/dpc.h @@ -30,13 +30,13 @@ protected: static constexpr device_timer_id TIMER_OSC = 0; struct df_t { - uint8_t top; - uint8_t bottom; - uint8_t low; - uint8_t high; - uint8_t flag; - uint8_t music_mode; /* Only used by data fetchers 5,6, and 7 */ - uint8_t osc_clk; /* Only used by data fetchers 5,6, and 7 */ + uint8_t top = 0; + uint8_t bottom = 0; + uint8_t low = 0; + uint8_t high = 0; + uint8_t flag = 0; + uint8_t music_mode = 0; /* Only used by data fetchers 5,6, and 7 */ + uint8_t osc_clk = 0; /* Only used by data fetchers 5,6, and 7 */ }; // device-level overrides diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h index e49b23cbbbe..e68f4a9a125 100644 --- a/src/devices/bus/vme/vme.h +++ b/src/devices/bus/vme/vme.h @@ -118,7 +118,7 @@ protected: // callbacks devcb_write_line m_vme_j1_callback; - device_vme_card_interface *m_card; + device_vme_card_interface *m_card = nullptr; }; DECLARE_DEVICE_TYPE(VME, vme_device) @@ -195,12 +195,12 @@ protected: virtual space_config_vector memory_space_config() const override; // internal state - cpu_device *m_maincpu; + cpu_device *m_maincpu = nullptr; // address spaces - address_space *m_prgspace; - int m_prgwidth; - bool m_allocspaces; + address_space *m_prgspace = nullptr; + int m_prgwidth = 0; + bool m_allocspaces = false; const char *m_cputag; diff --git a/src/devices/bus/vme/vme_cp31.h b/src/devices/bus/vme/vme_cp31.h index 5921eef9fe8..0fd806b9b36 100644 --- a/src/devices/bus/vme/vme_cp31.h +++ b/src/devices/bus/vme/vme_cp31.h @@ -46,11 +46,11 @@ private: // Pointer to System ROMs needed by bootvect_r and masking RAM buffer for post reset accesses memory_passthrough_handler m_rom_shadow_tap; - bool m_bus_error; - emu_timer *m_bus_error_timer; + bool m_bus_error = false; + emu_timer *m_bus_error_timer = nullptr; - uint8_t bim_irq_state; - int bim_irq_level; + uint8_t bim_irq_state = 0; + int bim_irq_level = 0; DECLARE_WRITE_LINE_MEMBER(bim_irq_callback); void update_irq_to_maincpu(); diff --git a/src/devices/bus/vme/vme_fccpu20.h b/src/devices/bus/vme/vme_fccpu20.h index ae26d07eccc..d45443165ce 100644 --- a/src/devices/bus/vme/vme_fccpu20.h +++ b/src/devices/bus/vme/vme_fccpu20.h @@ -49,10 +49,10 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - uint8_t bim_irq_state; - int bim_irq_level; + uint8_t bim_irq_state = 0; + int bim_irq_level = 0; - emu_timer *m_arbiter_start; // Need a startup delay because it is hooked up to the sense inputs of the PIT + emu_timer *m_arbiter_start = nullptr; // Need a startup delay because it is hooked up to the sense inputs of the PIT required_device m_maincpu; @@ -78,7 +78,7 @@ private: required_device m_mpcc3; // Pointer to System ROMs needed by bootvect_r and masking RAM buffer for post reset accesses - uint32_t *m_sysrom; + uint32_t *m_sysrom = nullptr; uint32_t m_sysram[2]; void update_irq_to_maincpu(); const fc_board_t m_board_id; diff --git a/src/devices/bus/vme/vme_fcisio.h b/src/devices/bus/vme/vme_fcisio.h index 6ffecb0e6af..1f1e8f43a95 100644 --- a/src/devices/bus/vme/vme_fcisio.h +++ b/src/devices/bus/vme/vme_fcisio.h @@ -48,7 +48,7 @@ private: required_device m_bim; // Pointer to System ROMs needed by bootvect_r - uint16_t *m_sysrom; + uint16_t *m_sysrom = nullptr; }; #endif // MAME_BUS_VME_VME_FCISIO_H diff --git a/src/devices/bus/vme/vme_fcscsi.h b/src/devices/bus/vme/vme_fcscsi.h index 58c57c88fdc..32b39687a18 100644 --- a/src/devices/bus/vme/vme_fcscsi.h +++ b/src/devices/bus/vme/vme_fcscsi.h @@ -30,8 +30,8 @@ protected: void update_irq_to_maincpu(); - uint8_t fdc_irq_state; - uint8_t dmac_irq_state; + uint8_t fdc_irq_state = 0; + uint8_t dmac_irq_state = 0; private: //dmac @@ -66,7 +66,7 @@ private: uint8_t m_tcr; // Pointer to System ROMs needed by bootvect_r - uint16_t *m_sysrom; + uint16_t *m_sysrom = nullptr; }; #endif // MAME_BUS_VME_VME_FCSCSI_H diff --git a/src/devices/bus/vme/vme_hcpu30.h b/src/devices/bus/vme/vme_hcpu30.h index 656e8b716b6..b210f9f03f3 100644 --- a/src/devices/bus/vme/vme_hcpu30.h +++ b/src/devices/bus/vme/vme_hcpu30.h @@ -62,13 +62,13 @@ private: // Pointer to System ROMs needed by bootvect_r and masking RAM buffer for post reset accesses memory_passthrough_handler m_rom_shadow_tap; - uint16_t m_irq_state; - uint16_t m_irq_mask; - uint8_t m_rtc_reg[16]; - bool m_rtc_hack; - int m_fdcdrq_hack; - bool m_bus_error; - emu_timer *m_bus_error_timer; + uint16_t m_irq_state = 0; + uint16_t m_irq_mask = 0; + uint8_t m_rtc_reg[16]{}; + bool m_rtc_hack = false; + int m_fdcdrq_hack = 0; + bool m_bus_error = false; + emu_timer *m_bus_error_timer = nullptr; uint32_t irq_state_r(offs_t offset); void irq_mask_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/bus/vsmile/rom.h b/src/devices/bus/vsmile/rom.h index b9ac8ef0b07..4374fa028f7 100644 --- a/src/devices/bus/vsmile/rom.h +++ b/src/devices/bus/vsmile/rom.h @@ -31,7 +31,7 @@ protected: virtual void device_start() override; virtual void device_resolve_objects() override; - uint32_t m_bank_offset; + uint32_t m_bank_offset = 0; }; diff --git a/src/devices/bus/vtech/ioexp/ioexp.h b/src/devices/bus/vtech/ioexp/ioexp.h index c851d0e0d48..0ebcd9410ee 100644 --- a/src/devices/bus/vtech/ioexp/ioexp.h +++ b/src/devices/bus/vtech/ioexp/ioexp.h @@ -66,7 +66,7 @@ protected: private: required_address_space m_iospace; - device_vtech_ioexp_interface *m_module; + device_vtech_ioexp_interface *m_module = nullptr; }; // class representing interface-specific live ioexp device diff --git a/src/devices/bus/vtech/memexp/memexp.h b/src/devices/bus/vtech/memexp/memexp.h index 5fd3ee6a449..02d00bce172 100644 --- a/src/devices/bus/vtech/memexp/memexp.h +++ b/src/devices/bus/vtech/memexp/memexp.h @@ -89,7 +89,7 @@ private: devcb_write_line m_nmi_handler; devcb_write_line m_reset_handler; - device_vtech_memexp_interface *m_module; + device_vtech_memexp_interface *m_module = nullptr; }; // class representing interface-specific live memexp device diff --git a/src/devices/bus/wswan/rom.h b/src/devices/bus/wswan/rom.h index 6a99f98e3a4..a7d8ba4c113 100644 --- a/src/devices/bus/wswan/rom.h +++ b/src/devices/bus/wswan/rom.h @@ -34,7 +34,7 @@ protected: u16 m_io_regs[8]; u32 m_base20, m_base30, m_base40; - u32 m_rom_mask; + u32 m_rom_mask = 0; // RTC u8 m_rtc_setting; /* Timer setting byte */ @@ -122,14 +122,14 @@ private: READ_MODE = 0, COMMAND_MODE }; - u8 m_flash_seq; - u8 m_flash_command; - bool m_write_flash; - bool m_writing_flash; - bool m_write_resetting; - u8 m_flash_mode; - u8 m_flash_status; - u8 m_flash_count; + u8 m_flash_seq = 0; + u8 m_flash_command = 0; + bool m_write_flash = false; + bool m_writing_flash = false; + bool m_write_resetting = false; + u8 m_flash_mode = 0; + u8 m_flash_status = 0; + u8 m_flash_count = 0; }; -- cgit v1.2.3