mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
stvvdp1.cpp: fixed potential crash (nw)
This commit is contained in:
parent
2a3bb94399
commit
5d6fa5152e
@ -247,7 +247,7 @@ void sega_scu_device::device_start()
|
||||
save_item(NAME(m_dma[2].rup));
|
||||
save_item(NAME(m_dma[2].wup));
|
||||
|
||||
m_hostcpu = machine().device<sh2_device>(m_hostcpu_tag);//machine().device(m_hostcpu_tag);
|
||||
m_hostcpu = machine().device<sh2_device>(m_hostcpu_tag);
|
||||
m_hostspace = &m_hostcpu->space(AS_PROGRAM);
|
||||
|
||||
m_dma_timer[0] = timer_alloc(DMALV0_ID);
|
||||
|
@ -904,6 +904,9 @@ void saturn_state::drawpixel_generic(int x, int y, int patterndata, int offsetcn
|
||||
return;
|
||||
}
|
||||
|
||||
if(x >= 1024 || y >= 512)
|
||||
return;
|
||||
|
||||
if ( stv2_current_sprite.ispoly )
|
||||
{
|
||||
pix = stv2_current_sprite.CMDCOLR&0xffff;
|
||||
@ -2001,6 +2004,8 @@ void saturn_state::stv_vdp1_process_list( void )
|
||||
m_vdp1.copr = (position * 0x20) >> 3;
|
||||
|
||||
/* TODO: what's the exact formula? Guess it should be a mix between number of pixels written and actual command data fetched. */
|
||||
// if spritecount = 10000 don't send a vdp1 draw end
|
||||
if(spritecount < 10000)
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(spritecount*16), timer_expired_delegate(FUNC(saturn_state::vdp1_draw_end),this));
|
||||
|
||||
if (VDP1_LOG) logerror ("End of list processing!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user