diff --git a/src/emu/video/ef9340_1.c b/src/emu/video/ef9340_1.c index d68ddbf0084..b5c0581ca80 100644 --- a/src/emu/video/ef9340_1.c +++ b/src/emu/video/ef9340_1.c @@ -61,6 +61,9 @@ void ef9340_1_device::device_start() void ef9340_1_device::device_reset() { + memset(m_ef934x_ram_a, 0, sizeof(m_ef934x_ram_a)); + memset(m_ef934x_ram_b, 0, sizeof(m_ef934x_ram_b)); + m_ef9340.X = 0; m_ef9340.Y = 0; m_ef9340.Y0 = 0; diff --git a/src/mame/machine/3do.c b/src/mame/machine/3do.c index f54d97461e8..90c329e6e04 100644 --- a/src/mame/machine/3do.c +++ b/src/mame/machine/3do.c @@ -1114,6 +1114,10 @@ void _3do_state::m_3do_clio_init( screen_device *screen ) m_dspp.EI = auto_alloc_array(machine(), UINT16, 0x400 ); m_dspp.EO = auto_alloc_array(machine(), UINT16, 0x400 ); + memset(m_dspp.N, 0, sizeof(UINT16) * 0x400); + memset(m_dspp.EI, 0, sizeof(UINT16) * 0x400); + memset(m_dspp.EO, 0, sizeof(UINT16) * 0x400); + state_save_register_global_pointer(machine(), m_dspp.N, 0x800); state_save_register_global_pointer(machine(), m_dspp.EI, 0x400); state_save_register_global_pointer(machine(), m_dspp.EO, 0x400); diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c index 620bd404eab..757ac818f2f 100644 --- a/src/mess/drivers/fmtowns.c +++ b/src/mess/drivers/fmtowns.c @@ -2555,6 +2555,7 @@ void towns_state::driver_start() m_towns_vram = auto_alloc_array(machine(),UINT32,0x20000); m_towns_gfxvram = auto_alloc_array(machine(),UINT8,0x80000); m_towns_txtvram = auto_alloc_array(machine(),UINT8,0x20000); + memset(m_towns_txtvram, 0, sizeof(UINT8)*0x20000); //towns_sprram = auto_alloc_array(machine(),UINT8,0x20000); m_towns_serial_rom = auto_alloc_array(machine(),UINT8,256/8); init_serial_rom(machine()); diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index 3d845ebb62c..a2d3d177318 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -236,6 +236,7 @@ void vboy_state::video_start() m_font = auto_alloc_array_clear(machine(), UINT16, (0x8000 >> 1)*4 * 2); m_bgmap = auto_alloc_array(machine(), UINT16, 0x20000 >> 1); + memset(m_bgmap, 0, sizeof(UINT16) * (0x20000 >> 1)); } void vboy_state::put_obj(bitmap_ind16 &bitmap, const rectangle &cliprect, int x, int y, UINT16 code, UINT8 pal) diff --git a/src/mess/machine/apple2.c b/src/mess/machine/apple2.c index 8e428d77bee..1971bef1a8e 100644 --- a/src/mess/machine/apple2.c +++ b/src/mess/machine/apple2.c @@ -2138,8 +2138,10 @@ MACHINE_START_MEMBER(apple2_state,apple2) /* there appears to be some hidden RAM that is swapped in on the Apple * IIc plus; I have not found any official documentation but the BIOS * clearly uses this area as writeable memory */ - if (!strcmp(machine().system().name, "apple2cp")) + if (!strcmp(machine().system().name, "apple2cp")) { apple2cp_ce00_ram = auto_alloc_array(machine(), UINT8, 0x200); + memset(apple2cp_ce00_ram, 0, sizeof(UINT8) * 0x200); + } m_machinetype = APPLE_IIEPLUS; @@ -2163,8 +2165,10 @@ MACHINE_START_MEMBER(apple2_state,apple2e) /* there appears to be some hidden RAM that is swapped in on the Apple * IIc plus; I have not found any official documentation but the BIOS * clearly uses this area as writeable memory */ - if (!strcmp(machine().system().name, "apple2cp")) + if (!strcmp(machine().system().name, "apple2cp")) { apple2cp_ce00_ram = auto_alloc_array(machine(), UINT8, 0x200); + memset(apple2cp_ce00_ram, 0, sizeof(UINT8) * 0x200); + } m_machinetype = APPLE_IIE; diff --git a/src/mess/machine/docg3.c b/src/mess/machine/docg3.c index 5138d3caf7e..308643aa7aa 100644 --- a/src/mess/machine/docg3.c +++ b/src/mess/machine/docg3.c @@ -776,8 +776,11 @@ void diskonchip_g3_device::device_start() memset(m_sec_2, 0, sizeof(m_sec_2)); m_data[0] = auto_alloc_array( machine(), UINT8, m_data_size[0]); + memset(m_data[0], 0, sizeof(UINT8) * m_data_size[0]); m_data[1] = auto_alloc_array( machine(), UINT8, m_data_size[1]); + memset(m_data[1], 0, sizeof(UINT8) * m_data_size[1]); m_data[2] = auto_alloc_array( machine(), UINT8, m_data_size[2]); + memset(m_data[2], 0, sizeof(UINT8) * m_data_size[2]); // diskonchip_load( device, "diskonchip"); diff --git a/src/mess/machine/i82371ab.c b/src/mess/machine/i82371ab.c index 53b12a2f43f..7de8f198e03 100644 --- a/src/mess/machine/i82371ab.c +++ b/src/mess/machine/i82371ab.c @@ -226,6 +226,7 @@ void i82371ab_device::device_start() void i82371ab_device::device_reset() { southbridge_device::device_reset(); + memset(m_regs, 0, sizeof(m_regs)); UINT32 (*regs32)[64] = (UINT32 (*)[64])(m_regs); /* isa */ diff --git a/src/mess/machine/i82439tx.c b/src/mess/machine/i82439tx.c index 514528629e7..78b9ce98141 100644 --- a/src/mess/machine/i82439tx.c +++ b/src/mess/machine/i82439tx.c @@ -314,6 +314,8 @@ void i82439tx_device::device_reset() m_regs[0x06] = 0x00000000; m_regs[0x07] = 0x00000000; + memset(m_bios_ram, 0, sizeof(m_bios_ram)); + /* configure initial memory state */ i82439tx_configure_memory(0, 0xf0000, 0xfffff); i82439tx_configure_memory(0, 0xc0000, 0xc3fff); diff --git a/src/mess/machine/thomflop.c b/src/mess/machine/thomflop.c index ecc1b1bdaa1..bbcc47d0ba4 100644 --- a/src/mess/machine/thomflop.c +++ b/src/mess/machine/thomflop.c @@ -1550,6 +1550,7 @@ void thomson_state::thmfc_floppy_init() LOG(( "thmfc_floppy_init: THMFC1 controller\n" )); thmfc1 = auto_alloc(machine(), thmfc1_t); + memset(thmfc1, 0, sizeof(thmfc1_t)); thmfc_floppy_cmd = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::thmfc_floppy_cmd_complete_cb),this)); diff --git a/src/mess/video/isa_ega.c b/src/mess/video/isa_ega.c index 1be94bbd77a..5bffba4f148 100644 --- a/src/mess/video/isa_ega.c +++ b/src/mess/video/isa_ega.c @@ -612,9 +612,13 @@ void isa8_ega_device::device_start() m_videoram = m_vram->base(); m_plane[0] = m_videoram + 0x00000; + memset(m_plane[0], 0, sizeof(UINT8) * 0x10000); m_plane[1] = m_videoram + 0x10000; + memset(m_plane[1], 0, sizeof(UINT8) * 0x10000); m_plane[2] = m_videoram + 0x20000; + memset(m_plane[2], 0, sizeof(UINT8) * 0x10000); m_plane[3] = m_videoram + 0x30000; + memset(m_plane[3], 0, sizeof(UINT8) * 0x10000); m_crtc_ega = subdevice(EGA_CRTC_NAME);