mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Addressed a few coverity concerns.
This commit is contained in:
parent
bbd0e200aa
commit
f18ec20dd5
@ -86,9 +86,9 @@ private:
|
||||
void a5105_mem(address_map &map);
|
||||
void upd7220_map(address_map &map);
|
||||
|
||||
uint8_t *m_ram_base;
|
||||
uint8_t *m_rom_base;
|
||||
uint8_t *m_char_ram;
|
||||
uint8_t *m_ram_base = 0;
|
||||
uint8_t *m_rom_base = 0;
|
||||
uint8_t *m_char_ram = 0;
|
||||
uint16_t m_pcg_addr = 0U;
|
||||
uint16_t m_pcg_internal_addr = 0U;
|
||||
uint8_t m_key_mux = 0U;
|
||||
|
@ -91,9 +91,9 @@ private:
|
||||
void kbd_put(uint8_t data);
|
||||
void kgs_memory_remap();
|
||||
|
||||
bool m_kgs_msel, m_kgs_iml;
|
||||
uint8_t m_kgs_datao, m_kgs_datai, m_kgs_ctrl;
|
||||
bool m_ifss_loopback;
|
||||
bool m_kgs_msel = 0, m_kgs_iml = 0;
|
||||
uint8_t m_kgs_datao = 0, m_kgs_datai = 0, m_kgs_ctrl = 0;
|
||||
bool m_ifss_loopback = 0;
|
||||
|
||||
uint32_t screen_update_k7072(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof(screen_device &screen, bool state);
|
||||
|
@ -53,7 +53,7 @@ private:
|
||||
u32 screen_update_ac1_32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u8 ac1_port_b_r();
|
||||
u8 ac1_port_a_r();
|
||||
bool has_lowercase;
|
||||
bool has_lowercase = 0;
|
||||
void machine_start() override;
|
||||
void ac1_port_a_w(u8 data);
|
||||
void ac1_port_b_w(u8 data);
|
||||
|
@ -73,7 +73,7 @@ private:
|
||||
uint8_t m_port09 = 0U;
|
||||
bool m_ipl = 0;
|
||||
offs_t m_curr_bank = 0;
|
||||
floppy_image_device *m_floppy;
|
||||
floppy_image_device *m_floppy = 0;
|
||||
std::unique_ptr<u8[]> m_ram; // main ram 192k
|
||||
std::unique_ptr<u8[]> m_dummy; // for wrpt
|
||||
required_device<z80_device> m_maincpu;
|
||||
|
@ -36,9 +36,9 @@ public:
|
||||
void apogee(machine_config &config);
|
||||
|
||||
private:
|
||||
uint8_t m_out0;
|
||||
uint8_t m_out1;
|
||||
uint8_t m_out2;
|
||||
uint8_t m_out0 = 0U;
|
||||
uint8_t m_out1 = 0U;
|
||||
uint8_t m_out2 = 0U;
|
||||
DECLARE_WRITE_LINE_MEMBER(pit8253_out0_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(pit8253_out1_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(pit8253_out2_changed);
|
||||
|
@ -51,11 +51,11 @@ private:
|
||||
void xor_display_w(u8 data);
|
||||
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void mem_map(address_map &map);
|
||||
bool m_tape_switch;
|
||||
u8 m_xor_display;
|
||||
u8 m_key_mux;
|
||||
u16 m_casscnt;
|
||||
bool m_cassold, m_cassbit;
|
||||
bool m_tape_switch = 0;
|
||||
u8 m_xor_display = 0U;
|
||||
u8 m_key_mux = 0U;
|
||||
u16 m_casscnt = 0U;
|
||||
bool m_cassold = 0, m_cassbit = 0;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
@ -2,21 +2,21 @@
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
|
||||
Homebrew Z80 Computer by Kun-Szabo Marton
|
||||
Homebrew Z80 Computer by Kun-Szabo Marton
|
||||
|
||||
http://digitarworld.uw.hu/z80.htm
|
||||
http://digitarworld.uw.hu/z80.htm
|
||||
|
||||
31/10/2010 Initial driver by Miodrag Milanovic
|
||||
2010-10-31 Initial driver by Miodrag Milanovic
|
||||
|
||||
All commands must be entered in uppercase, and since the capslock
|
||||
doesn't work, you need to hold the shift key down.
|
||||
All commands must be entered in uppercase, and since the capslock
|
||||
doesn't work, you need to hold the shift key down.
|
||||
|
||||
There is next to no error checking, for example the T command
|
||||
is to set the time. Entering T by itself will set the time to
|
||||
99:99:99, while G will cause a jump to 9999 and so forth. Also
|
||||
the parameter must be right next to the command, spaces will cause
|
||||
invalid input. Example M1234 will display a byte of memory at 1234,
|
||||
while M 1234 will display memory at 9123.
|
||||
There is next to no error checking, for example the T command
|
||||
is to set the time. Entering T by itself will set the time to
|
||||
99:99:99, while G will cause a jump to 9999 and so forth. Also
|
||||
the parameter must be right next to the command, spaces will cause
|
||||
invalid input. Example M1234 will display a byte of memory at 1234,
|
||||
while M 1234 will display memory at 9123.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
@ -47,7 +47,7 @@ private:
|
||||
|
||||
void mem_map(address_map &map);
|
||||
|
||||
bool m_irq;
|
||||
bool m_irq = 0;
|
||||
void machine_reset() override;
|
||||
void machine_start() override;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
@ -165,7 +165,7 @@ private:
|
||||
|
||||
void drive_w(offs_t offset, u8 data);
|
||||
|
||||
floppy_image_device *m_floppy;
|
||||
floppy_image_device *m_floppy = 0;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<z80ctc_device> m_ctc;
|
||||
required_device<i8257_device> m_dma;
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
void jupiter3_io(address_map &map);
|
||||
void jupiter3_mem(address_map &map);
|
||||
|
||||
uint8_t m_term_data;
|
||||
uint8_t m_term_data = 0U;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_shared_ptr<uint8_t> m_p_videoram;
|
||||
required_shared_ptr<uint8_t> m_p_ram;
|
||||
|
@ -54,9 +54,9 @@ private:
|
||||
void io_map(address_map &map);
|
||||
void mem_map(address_map &map);
|
||||
|
||||
uint8_t m_disp_1;
|
||||
uint8_t m_disp_2;
|
||||
u8 m_digit;
|
||||
uint8_t m_disp_1 = 0U;
|
||||
uint8_t m_disp_2 = 0U;
|
||||
u8 m_digit = 0U;
|
||||
uint8_t bit_to_dec(uint8_t val);
|
||||
void machine_start() override;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
void init_kramermc();
|
||||
|
||||
private:
|
||||
u8 m_porta;
|
||||
u8 m_porta = 0U;
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
uint32_t screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
@ -131,7 +131,7 @@ private:
|
||||
bool m_fdc_int = 0;
|
||||
bool m_allow_nmi = 0;
|
||||
u8 m_mode = 0U;
|
||||
floppy_image_device *m_floppy;
|
||||
floppy_image_device *m_floppy = 0;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
//required_region_ptr<u8> m_p_chargen;
|
||||
//required_shared_ptr<u8> m_p_vram;
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
template <int N> void bd_q_w(offs_t offset, u8 data);
|
||||
|
||||
u8 m_fdc_status = 0U;
|
||||
floppy_image_device *m_floppy;
|
||||
floppy_image_device *m_floppy = 0;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<address_map_bank_device> m_bank;
|
||||
|
@ -40,7 +40,7 @@ private:
|
||||
void mem_map(address_map &map);
|
||||
|
||||
virtual void machine_reset() override;
|
||||
uint8_t m_resetcnt;
|
||||
uint8_t m_resetcnt = 0U;
|
||||
required_device<cosmac_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
protected:
|
||||
u8 pa_r();
|
||||
u8 pb_r();
|
||||
u8 m_digit;
|
||||
u8 m_digit = 0U;
|
||||
u8 m_seg = 0U;
|
||||
void machine_reset() override;
|
||||
void machine_start() override;
|
||||
|
@ -78,9 +78,9 @@ private:
|
||||
void io_map(address_map &map);
|
||||
void mem_map(address_map &map);
|
||||
|
||||
uint16_t m_tty_data_out;
|
||||
uint8_t m_tty_data_in;
|
||||
int m_tty_cnt;
|
||||
uint16_t m_tty_data_out = 0U;
|
||||
uint8_t m_tty_data_in = 0U;
|
||||
int m_tty_cnt = 0;
|
||||
void machine_start() override;
|
||||
required_device<teleprinter_device> m_teleprinter;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
u8 m_term_data;
|
||||
u8 m_port3;
|
||||
u8 m_term_data = 0U;
|
||||
u8 m_port3 = 0U;
|
||||
virtual void machine_reset() override;
|
||||
void port3_w(u8 data);
|
||||
u8 port3_r();
|
||||
|
@ -52,8 +52,8 @@ private:
|
||||
void portc_w(uint8_t data);
|
||||
void port30_w(uint8_t data);
|
||||
|
||||
bool m_flipscreen;
|
||||
uint8_t m_last;
|
||||
bool m_flipscreen = 0;
|
||||
uint8_t m_last = 0U;
|
||||
|
||||
virtual void machine_start() override;
|
||||
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
u8 m_row = 0;
|
||||
bool m_data_ok = 0;
|
||||
u8 m_lamp_data = 0;
|
||||
emu_timer* m_irq_timer;
|
||||
emu_timer* m_irq_timer = 0;
|
||||
static const device_timer_id TIMER_IRQ = 0;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<williams_s6_sound_device> m_s6sound;
|
||||
|
@ -48,7 +48,7 @@ private:
|
||||
void portc_w(uint8_t data);
|
||||
uint8_t porta_r();
|
||||
uint8_t portc_r();
|
||||
uint8_t m_irq_state;
|
||||
uint8_t m_irq_state = 0U;
|
||||
void machine_start() override;
|
||||
void sm1800_palette(palette_device &palette) const;
|
||||
INTERRUPT_GEN_MEMBER(vblank_interrupt);
|
||||
|
@ -152,13 +152,13 @@ private:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
uint8_t keyboard_line;
|
||||
uint8_t fdc_sel0;
|
||||
uint8_t fdc_sel1;
|
||||
uint8_t keyboard_line = 0U;
|
||||
uint8_t fdc_sel0 = 0U;
|
||||
uint8_t fdc_sel1 = 0U;
|
||||
|
||||
uint8_t cart_addr_counter_inc_ck;
|
||||
uint8_t cart_addr_counter_reset;
|
||||
uint16_t cart_addr_counter;
|
||||
uint8_t cart_addr_counter_inc_ck = 0U;
|
||||
uint8_t cart_addr_counter_reset = 0U;
|
||||
uint16_t cart_addr_counter = 0U;
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(squale_scanline);
|
||||
|
||||
@ -176,7 +176,7 @@ private:
|
||||
floppy_image_device *m_floppy;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
|
||||
memory_region *m_cart_rom;
|
||||
memory_region *m_cart_rom = 0;
|
||||
};
|
||||
|
||||
/*****************************************
|
||||
|
@ -91,8 +91,8 @@ private:
|
||||
output_finder<48> m_digits;
|
||||
output_finder<96> m_io_outputs; // 64 lamps + 32 solenoids
|
||||
|
||||
emu_timer *m_irq_set_timer;
|
||||
emu_timer *m_irq_advance_timer;
|
||||
emu_timer *m_irq_set_timer = 0;
|
||||
emu_timer *m_irq_advance_timer = 0;
|
||||
|
||||
bool m_digwait = 0;
|
||||
u8 m_keyrow = 0U;
|
||||
|
@ -142,7 +142,7 @@ private:
|
||||
DECLARE_MACHINE_START(tm990_189_v);
|
||||
DECLARE_MACHINE_RESET(tm990_189_v);
|
||||
|
||||
emu_timer *m_rs232_input_timer;
|
||||
emu_timer *m_rs232_input_timer = 0;
|
||||
|
||||
void tm990_189_cru_map(address_map &map);
|
||||
void tm990_189_memmap(address_map &map);
|
||||
@ -172,15 +172,15 @@ private:
|
||||
|
||||
int m_digitsel = 0;
|
||||
int m_segment = 0;
|
||||
emu_timer *m_displayena_timer;
|
||||
emu_timer *m_displayena_timer = 0;
|
||||
uint8_t m_segment_state[10]{};
|
||||
uint8_t m_old_segment_state[10]{};
|
||||
uint8_t m_LED_state = 0U;
|
||||
emu_timer *m_joy1x_timer;
|
||||
emu_timer *m_joy1y_timer;
|
||||
emu_timer *m_joy2x_timer;
|
||||
emu_timer *m_joy2y_timer;
|
||||
device_image_interface *m_rs232_fp;
|
||||
emu_timer *m_joy1x_timer = 0;
|
||||
emu_timer *m_joy1y_timer = 0;
|
||||
emu_timer *m_joy2x_timer = 0;
|
||||
emu_timer *m_joy2y_timer = 0;
|
||||
device_image_interface *m_rs232_fp = 0;
|
||||
//uint8_t m_rs232_rts;
|
||||
uint8_t m_bogus_read_save = 0U;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user