diff options
author | Robbbert <Robbbert@users.noreply.github.com> | 2022-04-02 20:49:26 +1100 |
---|---|---|
committer | Robbbert <Robbbert@users.noreply.github.com> | 2022-04-02 20:49:26 +1100 |
commit | 7c1dac74a8a56515def7b8db29664b31557b0c2f (patch) | |
tree | a9d254c0816ce9ce9576fb4b81d45ecd6eb2b33b | |
parent | 02faf3a3a1bc55bf97b8a7fdc4ba376110918a1c (diff) |
init vars for coverity (devices/machine/5-i)
47 files changed, 417 insertions, 417 deletions
diff --git a/src/devices/machine/53c810.h b/src/devices/machine/53c810.h index b6ecd035072..e6e28bcf06c 100644 --- a/src/devices/machine/53c810.h +++ b/src/devices/machine/53c810.h @@ -72,36 +72,36 @@ private: uint32_t lsi53c810_dasm_fetch(uint32_t pc); unsigned lsi53c810_dasm(char *buf, uint32_t pc); - uint8_t scntl0; - uint8_t scntl1; - uint8_t scntl2; - uint8_t scntl3; - uint8_t scid; - uint8_t sxfer; - uint8_t socl; - uint8_t istat; - uint8_t dstat; - uint8_t sstat0; - uint8_t sstat1; - uint8_t sstat2; - uint8_t dien; - uint8_t dcntl; - uint8_t dmode; - uint32_t temp; - uint32_t dsa; - uint32_t dsp; - uint32_t dsps; - uint32_t dcmd; - uint8_t sien0; - uint8_t sien1; - uint8_t stime0; - uint8_t respid; - uint8_t stest1; - uint8_t scratch_a[4]; - uint8_t scratch_b[4]; - int dma_icount; - int halted; - int carry; + uint8_t scntl0 = 0; + uint8_t scntl1 = 0; + uint8_t scntl2 = 0; + uint8_t scntl3 = 0; + uint8_t scid = 0; + uint8_t sxfer = 0; + uint8_t socl = 0; + uint8_t istat = 0; + uint8_t dstat = 0; + uint8_t sstat0 = 0; + uint8_t sstat1 = 0; + uint8_t sstat2 = 0; + uint8_t dien = 0; + uint8_t dcntl = 0; + uint8_t dmode = 0; + uint32_t temp = 0; + uint32_t dsa = 0; + uint32_t dsp = 0; + uint32_t dsps = 0; + uint32_t dcmd = 0; + uint8_t sien0 = 0; + uint8_t sien1 = 0; + uint8_t stime0 = 0; + uint8_t respid = 0; + uint8_t stest1 = 0; + uint8_t scratch_a[4]{}; + uint8_t scratch_b[4]{}; + int dma_icount = 0; + int halted = 0; + int carry = 0; }; // device type definition diff --git a/src/devices/machine/68340ser.h b/src/devices/machine/68340ser.h index b9775f2ad86..62a9401c4cc 100644 --- a/src/devices/machine/68340ser.h +++ b/src/devices/machine/68340ser.h @@ -30,13 +30,13 @@ public: void module_reset(); protected: - m68340_cpu_device *m_cpu; + m68340_cpu_device *m_cpu = nullptr; // Module registers not in the DUART part - uint8_t m_mcrh; - uint8_t m_mcrl; - uint8_t m_ilr; - uint8_t m_ivr; + uint8_t m_mcrh = 0; + uint8_t m_mcrl = 0; + uint8_t m_ilr = 0; + uint8_t m_ivr = 0; enum { REG_MCRH = 0, diff --git a/src/devices/machine/acorn_memc.h b/src/devices/machine/acorn_memc.h index 930e7477b19..75354f65cd1 100644 --- a/src/devices/machine/acorn_memc.h +++ b/src/devices/machine/acorn_memc.h @@ -71,28 +71,28 @@ private: optional_device<acorn_vidc10_device> m_vidc; const address_space_config m_space_config; - address_space * m_space; + address_space * m_space = nullptr; devcb_write_line m_abort_w; devcb_write_line m_sirq_w; - bool m_output_dram_rowcol; - int m_spvmd; - uint8_t m_pagesize; - bool m_latchrom; - bool m_video_dma_on; - bool m_sound_dma_on; - bool m_cursor_enabled; - bool m_os_mode; - uint32_t m_vidinit; - uint32_t m_vidstart; - uint32_t m_vidend; - uint32_t m_vidcur; - uint32_t m_cinit; - uint32_t m_sndstart; - uint32_t m_sndend; - uint32_t m_sndcur; - uint32_t m_sndendcur; - int16_t m_pages[0x2000]; // the logical RAM area is 32 megs, and the smallest page size is 4k - uint8_t m_pages_ppl[0x2000]; + bool m_output_dram_rowcol = false; + int m_spvmd = 0; + uint8_t m_pagesize = 0; + bool m_latchrom = false; + bool m_video_dma_on = false; + bool m_sound_dma_on = false; + bool m_cursor_enabled = false; + bool m_os_mode = false; + uint32_t m_vidinit = 0; + uint32_t m_vidstart = 0; + uint32_t m_vidend = 0; + uint32_t m_vidcur = 0; + uint32_t m_cinit = 0; + uint32_t m_sndstart = 0; + uint32_t m_sndend = 0; + uint32_t m_sndcur = 0; + uint32_t m_sndendcur = 0; + int16_t m_pages[0x2000]{}; // the logical RAM area is 32 megs, and the smallest page size is 4k + uint8_t m_pages_ppl[0x2000]{}; }; diff --git a/src/devices/machine/acorn_vidc.h b/src/devices/machine/acorn_vidc.h index 5b68aefc559..a2fdf7bae6b 100644 --- a/src/devices/machine/acorn_vidc.h +++ b/src/devices/machine/acorn_vidc.h @@ -179,13 +179,13 @@ private: void vidc20_sound_control_w(u32 data); void fsynreg_w(u32 data); - u8 m_pal_data_index; + u8 m_pal_data_index = 0; inline void update_8bpp_palette(u16 index, u32 paldata); - bool m_dac_serial_mode; - u8 m_pixel_source; - u8 m_pixel_rate; - u8 m_vco_r_modulo; - u8 m_vco_v_modulo; + bool m_dac_serial_mode = false; + u8 m_pixel_source = 0; + u8 m_pixel_rate = 0; + u8 m_vco_r_modulo = 0; + u8 m_vco_v_modulo = 0; }; DECLARE_DEVICE_TYPE(ARM_VIDC20, arm_vidc20_device) diff --git a/src/devices/machine/adc083x.h b/src/devices/machine/adc083x.h index babde2515b1..be1ed368a44 100644 --- a/src/devices/machine/adc083x.h +++ b/src/devices/machine/adc083x.h @@ -67,7 +67,7 @@ private: int32_t m_clk; int32_t m_di; int32_t m_se; - int32_t m_sars; + int32_t m_sars = 0; int32_t m_do; int32_t m_sgl; int32_t m_odd; diff --git a/src/devices/machine/adc1213x.h b/src/devices/machine/adc1213x.h index 7d3f69caccd..89fef9396e7 100644 --- a/src/devices/machine/adc1213x.h +++ b/src/devices/machine/adc1213x.h @@ -48,17 +48,17 @@ protected: private: // internal state - int m_cycle; - int m_data_out; - int m_data_in; - int m_conv_mode; - int m_auto_cal; - int m_auto_zero; - int m_acq_time; - int m_data_out_sign; - int m_input_shift_reg; - int m_output_shift_reg; - int m_end_conv; + int m_cycle = 0; + int m_data_out = 0; + int m_data_in = 0; + int m_conv_mode = 0; + int m_auto_cal = 0; + int m_auto_zero = 0; + int m_acq_time = 0; + int m_data_out_sign = 0; + int m_input_shift_reg = 0; + int m_output_shift_reg = 0; + int m_end_conv = 0; }; diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h index 048aa6de0c8..e758745322b 100644 --- a/src/devices/machine/aic6250.h +++ b/src/devices/machine/aic6250.h @@ -247,34 +247,34 @@ private: }; // internal state - emu_timer *m_state_timer; - state_t m_state; - bool m_int_asserted; + emu_timer *m_state_timer = nullptr; + state_t m_state{}; + bool m_int_asserted = false; - u32 m_scsi_ctrl_state; + u32 m_scsi_ctrl_state = 0; - u8 m_address_reg; + u8 m_address_reg = 0; // registers - u32 m_dma_count; - bool m_offset_count_zero; - u8 m_rev_cntrl; - u8 m_status_reg_0; - u8 m_status_reg_1; - u8 m_scsi_signal_reg; - u8 m_scsi_id_data; - u8 m_source_dest_id; - u8 m_memory_data; - u8 m_port_a_latch; - u8 m_port_b_latch; - u8 m_scsi_latch_data; - - u8 m_int_msk_reg_0; - u8 m_offset_cntrl; - u8 m_dma_cntrl; - u8 m_int_msk_reg_1; - u8 m_control_reg_0; - u8 m_control_reg_1; + u32 m_dma_count = 0; + bool m_offset_count_zero = false; + u8 m_rev_cntrl = 0; + u8 m_status_reg_0 = 0; + u8 m_status_reg_1 = 0; + u8 m_scsi_signal_reg = 0; + u8 m_scsi_id_data = 0; + u8 m_source_dest_id = 0; + u8 m_memory_data = 0; + u8 m_port_a_latch = 0; + u8 m_port_b_latch = 0; + u8 m_scsi_latch_data = 0; + + u8 m_int_msk_reg_0 = 0; + u8 m_offset_cntrl = 0; + u8 m_dma_cntrl = 0; + u8 m_int_msk_reg_1 = 0; + u8 m_control_reg_0 = 0; + u8 m_control_reg_1 = 0; util::fifo <u8, 8> m_fifo; }; diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h index e1dcec9576e..f252a6c6f36 100644 --- a/src/devices/machine/am9517a.h +++ b/src/devices/machine/am9517a.h @@ -94,30 +94,30 @@ protected: virtual int transfer_size(int const channel) const { return 1; } int m_icount; - uint32_t m_address_mask; + uint32_t m_address_mask = 0; struct { - uint32_t m_address; - uint32_t m_count; - uint32_t m_base_address; - uint32_t m_base_count; - uint8_t m_mode; + uint32_t m_address = 0; + uint32_t m_count = 0; + uint32_t m_base_address = 0; + uint32_t m_base_count = 0; + uint8_t m_mode = 0; } m_channel[4]; - int m_msb; - int m_hreq; - int m_hack; - int m_ready; - int m_eop; - int m_state; - int m_current_channel; - int m_last_channel; - uint8_t m_command; - uint8_t m_mask; - uint8_t m_status; - uint16_t m_temp; - uint8_t m_request; + int m_msb = 0; + int m_hreq = 0; + int m_hack = 0; + int m_ready = 0; + int m_eop = 0; + int m_state = 0; + int m_current_channel = 0; + int m_last_channel = 0; + uint8_t m_command = 0; + uint8_t m_mask = 0; + uint8_t m_status = 0; + uint16_t m_temp = 0; + uint8_t m_request = 0; private: void dma_request(int channel, bool state); diff --git a/src/devices/machine/appldriv.h b/src/devices/machine/appldriv.h index 86f7c1658bf..3a2fcc44b74 100644 --- a/src/devices/machine/appldriv.h +++ b/src/devices/machine/appldriv.h @@ -53,16 +53,16 @@ public: unsigned int tween_tracks : 1; unsigned int track_loaded : 1; unsigned int track_dirty : 1; - int position; - int spin_count; /* simulate drive spin to fool RWTS test at $BD34 */ + int position = 0; + int spin_count = 0; /* simulate drive spin to fool RWTS test at $BD34 */ uint8_t track_data[APPLE2_NIBBLE_SIZE * APPLE2_SECTOR_COUNT]; protected: virtual void device_start() override; private: - int m_dividend; - int m_divisor; + int m_dividend = 0; + int m_divisor = 0; }; // device type definition diff --git a/src/devices/machine/applefdc.h b/src/devices/machine/applefdc.h index 30a2bb50fc2..3dc9a78f3d9 100644 --- a/src/devices/machine/applefdc.h +++ b/src/devices/machine/applefdc.h @@ -90,15 +90,15 @@ protected: private: // data that is constant for the lifetime of the emulation - emu_timer * m_motor_timer; + emu_timer * m_motor_timer = nullptr; applefdc_t m_type; const applefdc_interface *m_interface; // data that changes at emulation time - uint8_t m_write_byte; - uint8_t m_lines; /* flags from IWM_MOTOR - IWM_Q7 */ - uint8_t m_mode; /* 0-31; see above */ - uint8_t m_handshake_hack; /* not sure what this is for */ + uint8_t m_write_byte = 0; + uint8_t m_lines = 0; /* flags from IWM_MOTOR - IWM_Q7 */ + uint8_t m_mode = 0; /* 0-31; see above */ + uint8_t m_handshake_hack = 0; /* not sure what this is for */ // functions const applefdc_interface *get_interface(); diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h index cdfe55243f1..a1c7a876c1d 100644 --- a/src/devices/machine/at28c16.h +++ b/src/devices/machine/at28c16.h @@ -48,7 +48,7 @@ protected: private: // internal state address_space_config m_space_config; - emu_timer *m_write_timer; + emu_timer *m_write_timer = nullptr; int m_a9_12v; int m_oe_12v; int m_last_write; diff --git a/src/devices/machine/at28c64b.h b/src/devices/machine/at28c64b.h index 83d74cda5a4..7b18986b1e7 100644 --- a/src/devices/machine/at28c64b.h +++ b/src/devices/machine/at28c64b.h @@ -57,7 +57,7 @@ private: }; address_space_config m_space_config; - emu_timer *m_write_timer; + emu_timer *m_write_timer = nullptr; int m_a9_12v; int m_oe_12v; int m_last_write; diff --git a/src/devices/machine/at29x.h b/src/devices/machine/at29x.h index d32c159b8b6..8a8697a3a70 100644 --- a/src/devices/machine/at29x.h +++ b/src/devices/machine/at29x.h @@ -44,8 +44,8 @@ protected: int m_cycle_time; // ms int m_boot_block_size; int m_version; - int m_address_mask; - int m_sector_mask; + int m_address_mask = 0; + int m_sector_mask = 0; private: enum s_cmd_t @@ -67,22 +67,22 @@ private: std::unique_ptr<uint8_t[]> m_eememory; - bool m_lower_bbl; // set when lower boot block lockout is enabled - bool m_higher_bbl; // set when upper boot block lockout is enabled - bool m_sdp; // set when in software data protect mode + bool m_lower_bbl = false; // set when lower boot block lockout is enabled + bool m_higher_bbl = false; // set when upper boot block lockout is enabled + bool m_sdp = false; // set when in software data protect mode - bool m_id_mode; // set when in chip id mode - s_cmd_t m_cmd; // command state - bool m_enabling_bbl; // set when a boot block lockout command is expecting its parameter - bool m_long_sequence; // set if 0x80 command has just been executed (some command require this prefix) - s_pgm_t m_pgm; // programming state - bool m_enabling_sdb; // set when a sdp enable command is in progress - bool m_disabling_sdb; // set when a sdp disable command is in progress - bool m_toggle_bit; // indicates flashing in progress (toggles for each query) + bool m_id_mode = false; // set when in chip id mode + s_cmd_t m_cmd{}; // command state + bool m_enabling_bbl = false; // set when a boot block lockout command is expecting its parameter + bool m_long_sequence = false; // set if 0x80 command has just been executed (some command require this prefix) + s_pgm_t m_pgm{}; // programming state + bool m_enabling_sdb = false; // set when a sdp enable command is in progress + bool m_disabling_sdb = false; // set when a sdp disable command is in progress + bool m_toggle_bit = false; // indicates flashing in progress (toggles for each query) std::unique_ptr<uint8_t[]> m_programming_buffer; - int m_programming_last_offset; - emu_timer* m_programming_timer; + int m_programming_last_offset = 0; + emu_timer* m_programming_timer = nullptr; }; /* diff --git a/src/devices/machine/at45dbxx.h b/src/devices/machine/at45dbxx.h index 2521ac10acc..ceebf2a4d33 100644 --- a/src/devices/machine/at45dbxx.h +++ b/src/devices/machine/at45dbxx.h @@ -61,38 +61,38 @@ protected: // internal state std::vector<uint8_t> m_data; - uint32_t m_size; - uint8_t m_mode; - uint8_t m_status; + uint32_t m_size = 0; + uint8_t m_mode = 0; + uint8_t m_status = 0; std::vector<uint8_t> m_buffer1; //std::vector<uint8_t> m_buffer2; - uint8_t m_si_byte; - uint8_t m_si_bits; - uint8_t m_so_byte; - uint8_t m_so_bits; + uint8_t m_si_byte = 0; + uint8_t m_si_bits = 0; + uint8_t m_so_byte = 0; + uint8_t m_so_bits = 0; struct AT45DBXX_PINS { - int cs; // chip select - int sck; // serial clock - int si; // serial input - int so; // serial output - int wp; // write protect - int reset; // reset - int busy; // busy + int cs = 0; // chip select + int sck = 0; // serial clock + int si = 0; // serial input + int so = 0; // serial output + int wp = 0; // write protect + int reset = 0; // reset + int busy = 0; // busy } m_pin; struct AT45DBXX_IO { - uint8_t *data; - uint32_t size; - uint32_t pos; + uint8_t *data = nullptr; + uint32_t size = 0; + uint32_t pos = 0; } m_io; struct AT45DBXX_CMD { - uint8_t data[8]; - uint8_t size; + uint8_t data[8]{}; + uint8_t size = 0; } m_cmd; }; diff --git a/src/devices/machine/ataflash.h b/src/devices/machine/ataflash.h index e52c78ee27a..9a402845a02 100644 --- a/src/devices/machine/ataflash.h +++ b/src/devices/machine/ataflash.h @@ -30,10 +30,10 @@ protected: uint8_t calculate_status() override { return ata_hle_device::calculate_status(); } private: - uint8_t m_cis[512]; - uint8_t m_configuration_option; - uint8_t m_configuration_and_status; - uint8_t m_pin_replacement; + uint8_t m_cis[512]{}; + uint8_t m_configuration_option = 0; + uint8_t m_configuration_and_status = 0; + uint8_t m_pin_replacement = 0; }; DECLARE_DEVICE_TYPE(TAITO_PCCARD1, taito_pccard1_device) diff --git a/src/devices/machine/bl_handhelds_menucontrol.h b/src/devices/machine/bl_handhelds_menucontrol.h index 747a60db76b..af0f59ff60c 100644 --- a/src/devices/machine/bl_handhelds_menucontrol.h +++ b/src/devices/machine/bl_handhelds_menucontrol.h @@ -32,17 +32,17 @@ private: bool m_is_unsp_type_hack; // internal state - uint16_t m_menupos; + uint16_t m_menupos = 0; // command handling - uint8_t m_clockstate; - uint8_t m_datashifterpos; + uint8_t m_clockstate = 0; + uint8_t m_datashifterpos = 0; - uint8_t m_responsebit; - uint8_t m_response; + uint8_t m_responsebit = 0; + uint8_t m_response = 0; - uint8_t m_commandbit; - uint8_t m_command; + uint8_t m_commandbit = 0; + uint8_t m_command = 0; void handle_command(); diff --git a/src/devices/machine/bq4847.h b/src/devices/machine/bq4847.h index 2658e207962..94d6fe0bc91 100644 --- a/src/devices/machine/bq4847.h +++ b/src/devices/machine/bq4847.h @@ -70,7 +70,7 @@ private: void update_int(); void set_wdo(int state); - emu_timer *m_update_timer; + emu_timer *m_update_timer = nullptr; emu_timer *m_periodic_timer; emu_timer *m_watchdog_timer; diff --git a/src/devices/machine/cop452.h b/src/devices/machine/cop452.h index 048c8c7d5cd..99a6295b98f 100644 --- a/src/devices/machine/cop452.h +++ b/src/devices/machine/cop452.h @@ -49,24 +49,24 @@ private: devcb_write_line::array<2> m_out_handlers; // Timers - emu_timer *m_timers[ 2 ]; + emu_timer *m_timers[ 2 ]{}; // State - uint8_t m_mode; - bool m_clk_div_4; - bool m_cs; - bool m_sk; - bool m_di; - bool m_out[ 2 ]; - bool m_regA_b16; - uint16_t m_reg[ 2 ]; - uint16_t m_cnt[ 2 ]; + uint8_t m_mode = 0; + bool m_clk_div_4 = false; + bool m_cs = false; + bool m_sk = false; + bool m_di = false; + bool m_out[ 2 ]{}; + bool m_regA_b16 = false; + uint16_t m_reg[ 2 ]{}; + uint16_t m_cnt[ 2 ]{}; // 0 : idle // 1..5 : shifting instruction in // 6..21: shifting register in // >= 22: done - unsigned m_spi_state; - uint8_t m_sr; + unsigned m_spi_state = 0; + uint8_t m_sr = 0; // Operating modes enum : uint8_t { diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h index 01af8f2bd52..5f304c0b5d1 100644 --- a/src/devices/machine/corvushd.h +++ b/src/devices/machine/corvushd.h @@ -71,8 +71,8 @@ private: // Timing-related values uint16_t m_last_cylinder; // Last cylinder accessed - for calculating seek times uint32_t m_delay; // Delay in microseconds for callback - emu_timer *m_timeout_timer; // Four-second timer for timeouts - emu_timer *m_cmd_timer; + emu_timer *m_timeout_timer = nullptr; // Four-second timer for timeouts + emu_timer *m_cmd_timer = nullptr; bool m_invalid_command_flag; // I hate this, but it saves a lot more tests // @@ -344,8 +344,8 @@ private: // Command size structure (number of bytes to xmit and recv for each command) struct corvus_cmd_t { - uint16_t recv_bytes; // Number of bytes from host for this command - uint16_t xmit_bytes; // Number of bytes to return to host + uint16_t recv_bytes = 0; // Number of bytes from host for this command + uint16_t xmit_bytes = 0; // Number of bytes to return to host }; void dump_buffer(uint8_t *buffer, uint16_t length); diff --git a/src/devices/machine/cs8221.h b/src/devices/machine/cs8221.h index 63b3102d5e9..c6e3778894e 100644 --- a/src/devices/machine/cs8221.h +++ b/src/devices/machine/cs8221.h @@ -58,9 +58,9 @@ private: uint8_t m_address; bool m_address_valid; - const char *m_cputag; - const char *m_isatag; - const char *m_biostag; + const char *m_cputag = nullptr; + const char *m_isatag = nullptr; + const char *m_biostag = nullptr; uint8_t m_registers[0x10]; diff --git a/src/devices/machine/dp8573.h b/src/devices/machine/dp8573.h index 6a184ae8c6b..59e793d9054 100644 --- a/src/devices/machine/dp8573.h +++ b/src/devices/machine/dp8573.h @@ -133,12 +133,12 @@ protected: ICR1_COMPARE_MASK = 0x3f }; - uint8_t m_ram[32]; - uint8_t m_tscr; - uint8_t m_pfr; - uint8_t m_millis; + uint8_t m_ram[32]{}; + uint8_t m_tscr = 0; + uint8_t m_pfr = 0; + uint8_t m_millis = 0; - emu_timer *m_timer; + emu_timer *m_timer = nullptr; devcb_write_line m_intr_cb; devcb_write_line m_mfo_cb; diff --git a/src/devices/machine/ds1302.h b/src/devices/machine/ds1302.h index ea0a0d4e809..a0dd44c4174 100644 --- a/src/devices/machine/ds1302.h +++ b/src/devices/machine/ds1302.h @@ -64,21 +64,21 @@ private: const uint8_t m_ram_size; - int m_ce; - int m_clk; - int m_io; - int m_state; - int m_bits; - uint8_t m_cmd; - uint8_t m_data; - int m_addr; - - uint8_t m_reg[9]; - uint8_t m_user[9]; - uint8_t m_ram[31]; + int m_ce = 0; + int m_clk = 0; + int m_io = 0; + int m_state = 0; + int m_bits = 0; + uint8_t m_cmd = 0; + uint8_t m_data = 0; + int m_addr = 0; + + uint8_t m_reg[9]{}; + uint8_t m_user[9]{}; + uint8_t m_ram[31]{}; // timers - emu_timer *m_clock_timer; + emu_timer *m_clock_timer = nullptr; }; // ======================> ds1202_device diff --git a/src/devices/machine/ds1994.h b/src/devices/machine/ds1994.h index df5c5216e30..dfb22bce905 100644 --- a/src/devices/machine/ds1994.h +++ b/src/devices/machine/ds1994.h @@ -120,7 +120,7 @@ class ds1994_device : public device_t, public device_nvram_interface uint8_t m_regs[REGS_SIZE]; int m_state[6]; int m_state_ptr; - bool m_auth; + bool m_auth = false; bool m_offs_ro; attotime t_samp, t_rdv, t_rstl, t_pdh, t_pdl; diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h index 4301c2a050f..61096942dca 100644 --- a/src/devices/machine/ds2404.h +++ b/src/devices/machine/ds2404.h @@ -84,7 +84,7 @@ private: uint8_t m_sram[512]; /* 4096 bits */ uint8_t m_ram[32]; /* scratchpad ram, 256 bits */ uint8_t m_rtc[5]; /* 40-bit RTC counter */ - STATE m_state[8]; + STATE m_state[8]{}; int m_state_ptr; }; diff --git a/src/devices/machine/ds6417.h b/src/devices/machine/ds6417.h index 94d5e109426..d7200354b4a 100644 --- a/src/devices/machine/ds6417.h +++ b/src/devices/machine/ds6417.h @@ -43,19 +43,19 @@ private: CMD_READMASK = 0x18, CMD_READCRC = 0x03 }; - bool m_reset; - bool m_clk; - bool m_data; - bool m_read; - bool m_start; - u8 m_count; - u8 m_shiftreg; - u8 m_command; - u8 m_crc; - u8 m_selbits; - u32 m_addr; - u16 m_select; - u16 m_selectval; + bool m_reset = false; + bool m_clk = false; + bool m_data = false; + bool m_read = false; + bool m_start = false; + u8 m_count = 0; + u8 m_shiftreg = 0; + u8 m_command = 0; + u8 m_crc = 0; + u8 m_selbits = 0; + u32 m_addr = 0; + u16 m_select = 0; + u16 m_selectval = 0; }; DECLARE_DEVICE_TYPE(DS6417, ds6417_device) diff --git a/src/devices/machine/edlc.h b/src/devices/machine/edlc.h index 1a57841212a..6e8beca1d42 100644 --- a/src/devices/machine/edlc.h +++ b/src/devices/machine/edlc.h @@ -119,21 +119,21 @@ protected: TXC_B = 0x60, // register bank select (80c03 only) }; - emu_timer *m_tx_timer; - emu_timer *m_int_timer; + emu_timer *m_tx_timer = nullptr; + emu_timer *m_int_timer = nullptr; // device state devcb_write_line m_out_int; devcb_write_line m_out_rxrdy; devcb_write_line m_out_txrdy; - int m_int_state; - int m_reset_state; - u8 m_station_address[6]; - u8 m_rx_status; - u8 m_tx_status; - u8 m_rx_command; - u8 m_tx_command; + int m_int_state = 0; + int m_reset_state = 0; + u8 m_station_address[6]{}; + u8 m_rx_status = 0; + u8 m_tx_status = 0; + u8 m_rx_command = 0; + u8 m_tx_command = 0; util::fifo<u8, MAX_FRAME_SIZE> m_rx_fifo; util::fifo<u8, MAX_FRAME_SIZE> m_tx_fifo; @@ -210,14 +210,14 @@ protected: CFG_RXC = 0x40, // receive crc CFG_FRD = 0x80, // fast receive discard }; - u16 m_tx_cc; - u16 m_cc; - u8 m_flags; + u16 m_tx_cc = 0; + u16 m_cc = 0; + u8 m_flags = 0; - u8 m_control; - u8 m_config; + u8 m_control = 0; + u8 m_config = 0; - u64 m_multicast_filter; + u64 m_multicast_filter = 0; }; DECLARE_DEVICE_TYPE(SEEQ8003, seeq8003_device) diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h index d3d33db19d6..ac61f8f4aa9 100644 --- a/src/devices/machine/eepromser.h +++ b/src/devices/machine/eepromser.h @@ -198,10 +198,10 @@ protected: void copy_ram_to_eeprom(); void copy_eeprom_to_ram(); void device_start() override; - uint8_t m_ram_length; - uint16_t m_ram_data[16]; - uint16_t m_reading; - uint8_t m_store_latch; + uint8_t m_ram_length = 0; + uint16_t m_ram_data[16]{}; + uint16_t m_reading = 0; + uint8_t m_store_latch = 0; }; diff --git a/src/devices/machine/er1400.h b/src/devices/machine/er1400.h index f8c6edb5614..2945fb3763f 100644 --- a/src/devices/machine/er1400.h +++ b/src/devices/machine/er1400.h @@ -81,7 +81,7 @@ private: // timing attotime m_write_time; attotime m_erase_time; - emu_timer *m_data_propagation_timer; + emu_timer *m_data_propagation_timer = nullptr; // internal registers u16 m_data_register; diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h index f7d6adb3b5c..0654d58e8e9 100644 --- a/src/devices/machine/f3853.h +++ b/src/devices/machine/f3853.h @@ -159,9 +159,9 @@ protected: virtual void timer_start(uint8_t value) override; - u8 m_timer_count; - u8 m_timer_modulo; - bool m_timer_start; + u8 m_timer_count = 0; + u8 m_timer_modulo = 0; + bool m_timer_start = false; }; class f38t56_device : public f3856_device diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h index e3dfd6aeb20..757b6151967 100644 --- a/src/devices/machine/generalplus_gpl16250soc.h +++ b/src/devices/machine/generalplus_gpl16250soc.h @@ -149,49 +149,49 @@ protected: uint16_t m_7863_porta_attribute; uint16_t m_786a_portb_direction; - uint16_t m_786b_portb_attribute; + uint16_t m_786b_portb_attribute = 0; - uint16_t m_7872_portc_direction; - uint16_t m_7873_portc_attribute; + uint16_t m_7872_portc_direction = 0; + uint16_t m_7873_portc_attribute = 0; - uint16_t m_787a_portd_direction; - uint16_t m_787b_portd_attribute; + uint16_t m_787a_portd_direction = 0; + uint16_t m_787b_portd_attribute = 0; - uint16_t m_7870; + uint16_t m_7870 = 0; - //uint16_t m_7871; + //uint16_t m_7871 = 0; - uint16_t m_7882; - uint16_t m_7883; + uint16_t m_7882 = 0; + uint16_t m_7883 = 0; - uint16_t m_78a0; + uint16_t m_78a0 = 0; - uint16_t m_78a4; - uint16_t m_78a5; - uint16_t m_78a6; + uint16_t m_78a4 = 0; + uint16_t m_78a5 = 0; + uint16_t m_78a6 = 0; - uint16_t m_78a8; + uint16_t m_78a8 = 0; - uint16_t m_78b0; - uint16_t m_78b1; - uint16_t m_78b2; + uint16_t m_78b0 = 0; + uint16_t m_78b1 = 0; + uint16_t m_78b2 = 0; - uint16_t m_78b8; + uint16_t m_78b8 = 0; - uint16_t m_78f0; + uint16_t m_78f0 = 0; - uint16_t m_78fb; + uint16_t m_78fb = 0; // unk 79xx - uint16_t m_7934; - uint16_t m_7935; - uint16_t m_7936; + uint16_t m_7934 = 0; + uint16_t m_7935 = 0; + uint16_t m_7936 = 0; - uint16_t m_7960; - uint16_t m_7961; + uint16_t m_7960 = 0; + uint16_t m_7961 = 0; - uint16_t m_system_dma_memtype; + uint16_t m_system_dma_memtype = 0; devcb_read16 m_nand_read_cb; uint32_t m_csbase; @@ -359,7 +359,7 @@ private: void checkirq6(); - emu_timer *m_unk_timer; + emu_timer *m_unk_timer = nullptr; virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override; inline uint16_t read_space(uint32_t offset); @@ -423,21 +423,21 @@ private: void nand_785d_w(uint16_t data); uint16_t nand_785e_r(); - uint16_t m_nandcommand; + uint16_t m_nandcommand = 0; - uint16_t m_nand_addr_low; - uint16_t m_nand_addr_high; + uint16_t m_nand_addr_low = 0; + uint16_t m_nand_addr_high = 0; - uint16_t m_nand_dma_ctrl; - uint16_t m_nand_7850; - uint16_t m_nand_785d; - uint16_t m_nand_785c; - uint16_t m_nand_785b; - uint16_t m_nand_7856; - uint16_t m_nand_7857; + uint16_t m_nand_dma_ctrl = 0; + uint16_t m_nand_7850 = 0; + uint16_t m_nand_785d = 0; + uint16_t m_nand_785c = 0; + uint16_t m_nand_785b = 0; + uint16_t m_nand_7856 = 0; + uint16_t m_nand_7857 = 0; - int m_curblockaddr; - uint32_t m_effectiveaddress; + int m_curblockaddr = 0; + uint32_t m_effectiveaddress = 0; }; @@ -497,7 +497,7 @@ private: void spi_direct_78e8_w(uint16_t data); uint16_t spi_direct_79f4_r(); - uint16_t m_7af0; + uint16_t m_7af0 = 0; }; diff --git a/src/devices/machine/glukrs.h b/src/devices/machine/glukrs.h index 74c581ff068..bce641a5444 100644 --- a/src/devices/machine/glukrs.h +++ b/src/devices/machine/glukrs.h @@ -28,7 +28,7 @@ protected: private: u8 m_cmos[0x100]; required_device<nvram_device> m_nvram; - emu_timer *m_timer; + emu_timer *m_timer = nullptr; }; DECLARE_DEVICE_TYPE(GLUKRS, glukrs_device) diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h index 0126dac306f..c2be80af604 100644 --- a/src/devices/machine/gt64xxx.h +++ b/src/devices/machine/gt64xxx.h @@ -95,7 +95,7 @@ private: { uint32_t low_addr; uint32_t high_addr; - address_space* space; + address_space* space = nullptr; galileo_addr_map() : low_addr(0xffffffff), high_addr(0x0) {} }; diff --git a/src/devices/machine/gt913_io.h b/src/devices/machine/gt913_io.h index 5bfed441c64..866d4155fca 100644 --- a/src/devices/machine/gt913_io.h +++ b/src/devices/machine/gt913_io.h @@ -56,15 +56,15 @@ private: const char *m_intc_tag; /* timers */ - uint8_t m_timer_control[2]; - uint16_t m_timer_rate[2]; - int m_timer_irq[2]; - bool m_timer_irq_pending[2]; - emu_timer *m_timer[2]; + uint8_t m_timer_control[2]{}; + uint16_t m_timer_rate[2]{}; + int m_timer_irq[2]{}; + bool m_timer_irq_pending[2]{}; + emu_timer *m_timer[2]{}; /* 2x ADC */ - bool m_adc_enable, m_adc_channel; - uint8_t m_adc_data[2]; + bool m_adc_enable = false, m_adc_channel = false; + uint8_t m_adc_data[2]{}; }; diff --git a/src/devices/machine/gt913_snd.h b/src/devices/machine/gt913_snd.h index 5e0912ae5d2..dfc5f4dcff1 100644 --- a/src/devices/machine/gt913_snd.h +++ b/src/devices/machine/gt913_snd.h @@ -44,7 +44,7 @@ protected: virtual void rom_bank_updated() override; private: - sound_stream *m_stream; + sound_stream *m_stream = nullptr; u8 m_gain; u16 m_data[3]; diff --git a/src/devices/machine/i82439hx.h b/src/devices/machine/i82439hx.h index e6a833c6cfb..e620b5e308b 100644 --- a/src/devices/machine/i82439hx.h +++ b/src/devices/machine/i82439hx.h @@ -38,15 +38,15 @@ protected: virtual void config_map(address_map &map) override; private: - int ram_size; + int ram_size = 0; required_device<device_memory_interface> cpu; std::vector<uint32_t> ram; - uint8_t latency_timer, bist; - uint8_t acon, pcon, cc, dramec, dramc, dramt; - uint8_t pam[7], drb[8]; - uint8_t drt, drat, smram, errcmd, errsts, errsyn; - int smiact_n; + uint8_t latency_timer = 0, bist = 0; + uint8_t acon = 0, pcon = 0, cc = 0, dramec = 0, dramc = 0, dramt = 0; + uint8_t pam[7]{}, drb[8]{}; + uint8_t drt = 0, drat = 0, smram = 0, errcmd = 0, errsts = 0, errsyn = 0; + int smiact_n = 0; virtual uint8_t header_type_r() override; void status_w(offs_t offset, uint16_t data, uint16_t mem_mask); diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h index 2bda850958e..60dcb6c0c7d 100644 --- a/src/devices/machine/i8251.h +++ b/src/devices/machine/i8251.h @@ -109,44 +109,44 @@ private: bool calc_parity(u8 ch); /* flags controlling how i8251_control_w operates */ - uint8_t m_flags; + uint8_t m_flags = 0; /* number of sync bytes programmed for sync mode (1 or 2) ; 0 = async mode */ - uint8_t m_sync_byte_count; + uint8_t m_sync_byte_count = 0; /* the sync bytes written */ - u8 m_sync1; - u16 m_sync2; + u8 m_sync1 = 0; + u16 m_sync2 = 0; /* status of i8251 */ - uint8_t m_status; - uint8_t m_command; + uint8_t m_status = 0; + uint8_t m_command = 0; /* mode byte - bit definitions depend on mode - e.g. synchronous, asynchronous */ - uint8_t m_mode_byte; - bool m_delayed_tx_en; + uint8_t m_mode_byte = 0; + bool m_delayed_tx_en = false; bool m_cts; bool m_dsr; bool m_rxd; bool m_rxc; bool m_txc; - int m_rxc_count; - int m_txc_count; - int m_br_factor; + int m_rxc_count = 0; + int m_txc_count = 0; + int m_br_factor = 0; /* data being received */ - uint8_t m_rx_data; + uint8_t m_rx_data = 0; /* tx buffer */ - uint8_t m_tx_data; + uint8_t m_tx_data = 0; void sync1_w(uint8_t data); void sync2_w(uint8_t data); - uint8_t m_sync8; - uint16_t m_sync16; + uint8_t m_sync8 = 0; + uint16_t m_sync16 = 0; // 1 = ext sync enabled via command - bool m_syndet_pin; - bool m_hunt_on; + bool m_syndet_pin = false; + bool m_hunt_on = false; // 1 = ext syndet pin has been set high; 0 = hunt mode activated - bool m_ext_syn_set; + bool m_ext_syn_set = false; // count of rxd bits - u8 m_rxd_bits; - u8 m_data_bits_count; + u8 m_rxd_bits = 0; + u8 m_data_bits_count = 0; }; class v5x_scu_device : public i8251_device @@ -167,7 +167,7 @@ protected: void simk_w(u8 data) { m_simk = data; } private: - u8 m_simk; + u8 m_simk = 0; }; diff --git a/src/devices/machine/i82586.h b/src/devices/machine/i82586.h index 65ecff63329..63615f1de5d 100644 --- a/src/devices/machine/i82586.h +++ b/src/devices/machine/i82586.h @@ -296,7 +296,7 @@ private: virtual void cfg_set(int offset, u8 data) override { m_cfg_bytes[offset] = data; } u8 m_cfg_bytes[CFG_SIZE]; - u16 m_rbd_offset; // next available receive buffer descriptor + u16 m_rbd_offset = 0; // next available receive buffer descriptor }; class i82596_device : public i82586_base_device @@ -362,10 +362,10 @@ private: inline sysbus_mode mode() const { return (sysbus_mode)(m_sysbus & SYSBUS_M); } u8 m_cfg_bytes[CFG_SIZE]; - u8 m_sysbus; + u8 m_sysbus = 0; - u32 m_rbd_address; // next available receive buffer descriptor - u64 m_mac_multi_ia; // multi-ia address hash table + u32 m_rbd_address = 0; // next available receive buffer descriptor + u64 m_mac_multi_ia = 0; // multi-ia address hash table }; class i82596_le16_device : public i82596_device diff --git a/src/devices/machine/i82875p.h b/src/devices/machine/i82875p.h index ecd252b35ef..f782f4daaaf 100644 --- a/src/devices/machine/i82875p.h +++ b/src/devices/machine/i82875p.h @@ -41,14 +41,14 @@ protected: private: void agp_translation_map(address_map &map); - int ram_size; + int ram_size = 0; required_device<device_memory_interface> cpu; std::vector<uint32_t> ram; - uint8_t agpm, fpllcont, pam[8], smram, esmramc; - uint8_t apsize, amtt, lptt; - uint16_t toud, mchcfg, errcmd, smicmd, scicmd, skpd; - uint32_t agpctrl, attbase; + uint8_t agpm = 0, fpllcont = 0, pam[8]{}, smram = 0, esmramc = 0; + uint8_t apsize = 0, amtt = 0, lptt = 0; + uint16_t toud = 0, mchcfg = 0, errcmd = 0, smicmd = 0, scicmd = 0, skpd = 0; + uint32_t agpctrl = 0, attbase = 0; uint8_t agpm_r(); void agpm_w(uint8_t data); @@ -130,8 +130,8 @@ protected: private: void overflow_map(address_map &map); - uint8_t dram_row_boundary[8], dram_row_attribute[4]; - uint32_t dram_timing, dram_controller_mode; + uint8_t dram_row_boundary[8]{}, dram_row_attribute[4]{}; + uint32_t dram_timing = 0, dram_controller_mode = 0; }; DECLARE_DEVICE_TYPE(I82875P_HOST, i82875p_host_device) diff --git a/src/devices/machine/ie15.h b/src/devices/machine/ie15.h index 496874c5a86..be24c980d16 100644 --- a/src/devices/machine/ie15.h +++ b/src/devices/machine/ie15.h @@ -106,32 +106,32 @@ private: std::unique_ptr<uint32_t[]> m_tmpbmp; - emu_timer *m_hblank_timer; + emu_timer *m_hblank_timer = nullptr; - uint8_t m_long_beep; - uint8_t m_kb_control; - uint8_t m_kb_data; - uint8_t m_kb_flag0; - uint8_t m_kb_flag; - uint8_t m_kb_ruslat; - uint8_t m_latch; + uint8_t m_long_beep = 0; + uint8_t m_kb_control = 0; + uint8_t m_kb_data = 0; + uint8_t m_kb_flag0 = 0; + uint8_t m_kb_flag = 0; + uint8_t m_kb_ruslat = 0; + uint8_t m_latch = 0; struct { - uint8_t cursor; - uint8_t enable; - uint8_t line25; - uint32_t ptr1; - uint32_t ptr2; + uint8_t cursor = 0; + uint8_t enable = 0; + uint8_t line25 = 0; + uint32_t ptr1 = 0; + uint32_t ptr2 = 0; } m_video; - uint8_t m_serial_rx_ready; - uint8_t m_serial_rx_char; - uint8_t m_serial_tx_ready; - int m_hblank; - int m_vpos; - int m_marker_scanline; - bool m_kbd_sdv; + uint8_t m_serial_rx_ready = 0; + uint8_t m_serial_rx_char = 0; + uint8_t m_serial_tx_ready = 0; + int m_hblank = 0; + int m_vpos = 0; + int m_marker_scanline = 0; + bool m_kbd_sdv = false; required_device<cpu_device> m_maincpu; required_region_ptr<u8> m_p_videoram; diff --git a/src/devices/machine/ie15_kbd.h b/src/devices/machine/ie15_kbd.h index 3302bbda8a2..6e6e5e8ecb0 100644 --- a/src/devices/machine/ie15_kbd.h +++ b/src/devices/machine/ie15_kbd.h @@ -52,8 +52,8 @@ protected: required_ioport m_io_kbdc; private: - bool m_ruslat; - uint8_t *m_rom; + bool m_ruslat = false; + uint8_t *m_rom = nullptr; devcb_write16 m_keyboard_cb; devcb_write_line m_sdv_cb; diff --git a/src/devices/machine/im6402.h b/src/devices/machine/im6402.h index d36853353c2..80210f4a3fe 100644 --- a/src/devices/machine/im6402.h +++ b/src/devices/machine/im6402.h @@ -110,28 +110,28 @@ private: devcb_write_line m_write_tre; // status - int m_dr; - int m_tbre; - int m_tre; - int m_pe; - int m_fe; - int m_oe; + int m_dr = 0; + int m_tbre = 0; + int m_tre = 0; + int m_pe = 0; + int m_fe = 0; + int m_oe = 0; // control - int m_cls1; - int m_cls2; - int m_sbs; - int m_sfd; - int m_epe; - int m_pi; + int m_cls1 = 0; + int m_cls2 = 0; + int m_sbs = 0; + int m_sfd = 0; + int m_epe = 0; + int m_pi = 0; // receiver - uint8_t m_rbr; + uint8_t m_rbr = 0; int m_rrc; int m_rrc_count; // transmitter - uint8_t m_tbr; + uint8_t m_tbr = 0; int m_trc; int m_trc_count; }; diff --git a/src/devices/machine/ins8250.h b/src/devices/machine/ins8250.h index b40ff23ef65..59e5ab717ad 100644 --- a/src/devices/machine/ins8250.h +++ b/src/devices/machine/ins8250.h @@ -125,13 +125,13 @@ protected: virtual u8 pop_rx() override; private: void set_timer() { m_timeout->adjust(attotime::from_hz((clock()*4*8)/(m_regs.dl*16))); } - int m_rintlvl; - u8 m_rfifo[16]; - u8 m_efifo[16]; - u8 m_tfifo[16]; - int m_rhead, m_rtail, m_rnum; - int m_thead, m_ttail; - emu_timer *m_timeout; + int m_rintlvl = 0; + u8 m_rfifo[16]{}; + u8 m_efifo[16]{}; + u8 m_tfifo[16]{}; + int m_rhead = 0, m_rtail = 0, m_rnum = 0; + int m_thead = 0, m_ttail = 0; + emu_timer *m_timeout = nullptr; }; class pc16552_device : public device_t @@ -146,8 +146,8 @@ protected: virtual void device_start() override; private: - ns16550_device *m_chan0; - ns16550_device *m_chan1; + ns16550_device *m_chan0 = nullptr; + ns16550_device *m_chan1 = nullptr; }; DECLARE_DEVICE_TYPE(PC16552D, pc16552_device) diff --git a/src/devices/machine/iopcdvd.h b/src/devices/machine/iopcdvd.h index 194933eb3d9..c19cb063f83 100644 --- a/src/devices/machine/iopcdvd.h +++ b/src/devices/machine/iopcdvd.h @@ -55,12 +55,12 @@ protected: struct drive_channel_t { - uint8_t m_buffer[0x10]; // Buffer size is a total guess - uint8_t m_curr; - uint8_t m_end; + uint8_t m_buffer[0x10]{}; // Buffer size is a total guess + uint8_t m_curr = 0; + uint8_t m_end = 0; - uint8_t m_status; - uint8_t m_command; + uint8_t m_status = 0; + uint8_t m_command = 0; }; drive_channel_t m_channel[2]; diff --git a/src/devices/machine/iopdma.h b/src/devices/machine/iopdma.h index 2e84ec44aaa..c531b11e5b4 100644 --- a/src/devices/machine/iopdma.h +++ b/src/devices/machine/iopdma.h @@ -64,9 +64,9 @@ public: protected: struct intctrl_t { - uint8_t m_mask; - uint8_t m_status; - bool m_enabled; + uint8_t m_mask = 0; + uint8_t m_status = 0; + bool m_enabled = false; }; class channel_t @@ -155,8 +155,8 @@ protected: channel_t m_channels[16]; intctrl_t m_int_ctrl[2]; - uint32_t m_running_mask; - uint32_t m_last_serviced; + uint32_t m_running_mask = 0; + uint32_t m_last_serviced = 0; }; DECLARE_DEVICE_TYPE(SONYIOP_DMA, iop_dma_device) diff --git a/src/devices/machine/iopintc.h b/src/devices/machine/iopintc.h index 5ead2c505fe..2c5499ff225 100644 --- a/src/devices/machine/iopintc.h +++ b/src/devices/machine/iopintc.h @@ -51,9 +51,9 @@ protected: void update_interrupts(); required_device<iop_device> m_iop; - uint32_t m_status; - uint32_t m_mask; - bool m_enabled; + uint32_t m_status = 0; + uint32_t m_mask = 0; + bool m_enabled = false; }; DECLARE_DEVICE_TYPE(SONYIOP_INTC, iop_intc_device) diff --git a/src/devices/machine/iopsio2.h b/src/devices/machine/iopsio2.h index 67fc395b6f3..219e7c5cbc9 100644 --- a/src/devices/machine/iopsio2.h +++ b/src/devices/machine/iopsio2.h @@ -63,24 +63,24 @@ protected: required_device<ps2_mc_device> m_mc0; // HACK: Buffer size is a guess. - uint8_t m_buffer[512]; - uint32_t m_curr_byte; - uint32_t m_end_byte; - uint32_t m_ctrl; + uint8_t m_buffer[512]{}; + uint32_t m_curr_byte = 0; + uint32_t m_end_byte = 0; + uint32_t m_ctrl = 0; - uint32_t m_unknown_0x6c; // Device status? - uint32_t m_unknown_0x70; - uint32_t m_unknown_0x74; + uint32_t m_unknown_0x6c = 0; // Device status? + uint32_t m_unknown_0x70 = 0; + uint32_t m_unknown_0x74 = 0; - uint32_t m_cmdbuf[16]; - uint32_t m_curr_port; - uint32_t m_cmd_size; - uint32_t m_cmd_length; - uint32_t m_databuf[4][2]; + uint32_t m_cmdbuf[16]{}; + uint32_t m_curr_port = 0; + uint32_t m_cmd_size = 0; + uint32_t m_cmd_length = 0; + uint32_t m_databuf[4][2]{}; - uint32_t m_target_device; + uint32_t m_target_device = 0; - emu_timer *m_response_timer; + emu_timer *m_response_timer = nullptr; static const size_t BUFFER_SIZE; }; diff --git a/src/devices/machine/iwm.h b/src/devices/machine/iwm.h index 5bae4443791..1c8fed9190f 100644 --- a/src/devices/machine/iwm.h +++ b/src/devices/machine/iwm.h @@ -58,17 +58,17 @@ private: }; floppy_image_device *m_floppy; - emu_timer *m_timer; + emu_timer *m_timer = nullptr; double m_q3_fclk_ratio, m_fclk_q3_ratio; - u64 m_last_sync, m_next_state_change, m_sync_update, m_async_update; - u64 m_flux_write_start; + u64 m_last_sync = 0, m_next_state_change = 0, m_sync_update = 0, m_async_update = 0; + u64 m_flux_write_start = 0; std::array<u64, 16> m_flux_write; - u32 m_flux_write_count; - u32 m_q3_clock; - int m_active, m_rw, m_rw_state; - u8 m_data, m_whd, m_mode, m_status, m_control, m_rw_bit_count; - u8 m_rsh, m_wsh; - u8 m_devsel; + u32 m_flux_write_count = 0; + u32 m_q3_clock = 0; + int m_active = 0, m_rw = 0, m_rw_state = 0; + u8 m_data = 0, m_whd = 0, m_mode = 0, m_status = 0, m_control = 0, m_rw_bit_count = 0; + u8 m_rsh = 0, m_wsh = 0; + u8 m_devsel = 0; u8 control(int offset, u8 data); u64 time_to_cycles(const attotime &tm) const; |