added more asserts/notes for known index out-of-bounds accesses (nw)

This commit is contained in:
Oliver Stöneberg 2014-03-17 10:37:52 +00:00
parent 68f8eeda6e
commit 9964b649eb
3 changed files with 3 additions and 0 deletions

View File

@ -292,6 +292,7 @@ WRITE8_MEMBER(maygay1b_state::m1_8279_w)
}
if ( chip->write_display )
{ // Data
assert(chip->disp_address >= 0 && chip->disp_address < ARRAY_LENGTH(chip->ram));
if ( chip->ram[chip->disp_address] != data )
{
m1_draw_lamps(chip->ram[chip->disp_address],chip->disp_address, 0);

View File

@ -221,6 +221,7 @@ void atari_motion_objects_device::draw(bitmap_ind16 &bitmap, const rectangle &cl
if (m_reverse)
{
first = m_activelast - 4;
// TODO: this sets last to index m_activelist[-4]
last = m_activelist - 4;
step = -4;
}

View File

@ -556,6 +556,7 @@ void namcona1_state::draw_background(screen_device &screen, bitmap_ind16 &bitmap
gfx_element *pGfx;
pGfx = m_gfxdecode->gfx(0);
assert(which >= 0 && which < ARRAY_LENGTH(m_tilemap_palette_bank));
paldata = &m_palette->pen(pGfx->colorbase() + pGfx->granularity() * m_tilemap_palette_bank[which]);
/* draw one scanline at a time */