isa_gus: Fixed audio streaming in the Windows GUS drivers, and added a hacky workaround for WIn95 setting invalid IRQ settings. (no whatsnew)

This commit is contained in:
mahlemiut 2013-02-07 09:36:29 +00:00
parent c00cb4defc
commit 3272789264
2 changed files with 17 additions and 16 deletions

View File

@ -257,15 +257,16 @@ void gf1_device::sound_stream_update(sound_stream &stream, stream_sample_t **inp
if(!(m_voice[x].voice_ctrl & 0x08))
{
m_voice[x].voice_ctrl |= 0x01;
// m_voice[x].current_addr = m_voice[x].end_addr;
// m_voice[x].current_addr = m_voice[x].end_addr;
}
}
// looping is not supposed to happen when rollover is active, but the Windows drivers have other ideas...
if(m_voice[x].voice_ctrl & 0x08)
{
if(m_voice[x].voice_ctrl & 0x10)
m_voice[x].voice_ctrl |= 0x40; // change direction
else
{
if(m_voice[x].voice_ctrl & 0x10)
m_voice[x].voice_ctrl |= 0x40; // change direction
else
m_voice[x].current_addr = m_voice[x].start_addr; // start sample again
}
m_voice[x].current_addr = m_voice[x].start_addr; // start sample again
}
}
if((m_voice[x].voice_ctrl & 0x40) && (m_voice[x].current_addr <= m_voice[x].start_addr) && !m_voice[x].rollover && !(m_voice[x].voice_ctrl & 0x01))
@ -287,13 +288,14 @@ void gf1_device::sound_stream_update(sound_stream &stream, stream_sample_t **inp
m_voice[x].voice_ctrl |= 0x01;
// m_voice[x].current_addr = m_voice[x].start_addr;
}
}
// looping is not supposed to happen when rollover is active, but the Windows drivers have other ideas...
if(m_voice[x].voice_ctrl & 0x08)
{
if(m_voice[x].voice_ctrl & 0x10)
m_voice[x].voice_ctrl &= ~0x40; // change direction
else
{
if(m_voice[x].voice_ctrl & 0x10)
m_voice[x].voice_ctrl &= ~0x40; // change direction
else
m_voice[x].current_addr = m_voice[x].end_addr; // start sample again
}
m_voice[x].current_addr = m_voice[x].end_addr; // start sample again
}
}
if(!(m_voice[x].voice_ctrl & 0x01))
@ -922,6 +924,7 @@ WRITE8_MEMBER(gf1_device::adlib_cmd_w)
m_gf1_irq = 15;
break;
default:
m_gf1_irq = 0;
logerror("GUS: Invalid GF1 IRQ set! [%02x]\n",data);
}
switch((data >> 3) & 0x07)
@ -1697,8 +1700,6 @@ WRITE_LINE_MEMBER( isa16_gus_device::midi_irq )
UINT8 irq_type;
UINT8 st = m_midi->get_status();
logerror("GUS: MIDI IRQ: state: %i Status: %02x\n",state,st);
if(state == ASSERT_LINE)
{
if(st & 0x01) // receive

View File

@ -105,7 +105,7 @@ public:
gf1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// current IRQ/DMA channel getters
UINT8 gf1_irq() { return m_gf1_irq; }
UINT8 gf1_irq() { if(m_gf1_irq != 0) return m_gf1_irq; else return m_midi_irq; } // workaround for win95 loading dumb values
UINT8 midi_irq() { if(m_irq_combine == 0) return m_midi_irq; else return m_gf1_irq; }
UINT8 dma_channel1() { return m_dma_channel1; }
UINT8 dma_channel2() { if(m_dma_combine == 0) return m_dma_channel2; else return m_dma_channel1; }