Skip to content

Commit

Permalink
vis: clear curcount if count is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
cracyc committed Jun 21, 2021
1 parent 9c002bd commit c5f283f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mame/drivers/vis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void vis_audio_device::dack16_w(int line, uint16_t data)

void vis_audio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
if((m_samples < 2) && ((m_mode & 0x08) == 0x08))
if(((m_samples < 2) && ((m_mode & 0x08) == 0x08)) || !m_samples)
return;
switch(m_mode & 0x88)
{
Expand Down Expand Up @@ -200,9 +200,11 @@ void vis_audio_device::pcm_w(offs_t offset, uint8_t data)
return;
case 0x0c:
m_count = (m_count & 0xff00) | data;
m_curcount = 0;
break;
case 0x0e:
m_count = (m_count & 0xff) | (data << 8);
m_curcount = 0;
break;
case 0x0f:
//cdrom related?
Expand Down

0 comments on commit c5f283f

Please sign in to comment.