ficed several occurances of uninitialized memory (nw)

This commit is contained in:
Oliver Stöneberg 2013-03-09 01:01:50 +00:00
parent e8c09156cc
commit 4bbf6267e5
10 changed files with 26 additions and 2 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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());

View File

@ -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)

View File

@ -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;

View File

@ -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");

View File

@ -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 */

View File

@ -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);

View File

@ -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));

View File

@ -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<crtc_ega_device>(EGA_CRTC_NAME);