Previous 199869 Revisions Next

r20793 Thursday 7th February, 2013 at 09:36:29 UTC by Barry Rodewald
isa_gus: Fixed audio streaming in the Windows GUS drivers, and added a hacky workaround for WIn95 setting invalid IRQ settings. (no whatsnew)
[src/mess/machine]isa_gus.c isa_gus.h

trunk/src/mess/machine/isa_gus.c
r20792r20793
257257               if(!(m_voice[x].voice_ctrl & 0x08))
258258               {
259259                  m_voice[x].voice_ctrl |= 0x01;
260//                          m_voice[x].current_addr = m_voice[x].end_addr;
260//                        m_voice[x].current_addr = m_voice[x].end_addr;
261261               }
262            }
263            // looping is not supposed to happen when rollover is active, but the Windows drivers have other ideas...
264            if(m_voice[x].voice_ctrl & 0x08)
265            {
266               if(m_voice[x].voice_ctrl & 0x10)
267                  m_voice[x].voice_ctrl |= 0x40; // change direction
262268               else
263               {
264                  if(m_voice[x].voice_ctrl & 0x10)
265                     m_voice[x].voice_ctrl |= 0x40; // change direction
266                  else
267                     m_voice[x].current_addr = m_voice[x].start_addr; // start sample again
268               }
269                  m_voice[x].current_addr = m_voice[x].start_addr; // start sample again
269270            }
270271         }
271272         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))
r20792r20793
287288                  m_voice[x].voice_ctrl |= 0x01;
288289//                          m_voice[x].current_addr = m_voice[x].start_addr;
289290               }
291            }
292            // looping is not supposed to happen when rollover is active, but the Windows drivers have other ideas...
293            if(m_voice[x].voice_ctrl & 0x08)
294            {
295               if(m_voice[x].voice_ctrl & 0x10)
296                  m_voice[x].voice_ctrl &= ~0x40; // change direction
290297               else
291               {
292                  if(m_voice[x].voice_ctrl & 0x10)
293                     m_voice[x].voice_ctrl &= ~0x40; // change direction
294                  else
295                     m_voice[x].current_addr = m_voice[x].end_addr; // start sample again
296               }
298                  m_voice[x].current_addr = m_voice[x].end_addr; // start sample again
297299            }
298300         }
299301         if(!(m_voice[x].voice_ctrl & 0x01))
r20792r20793
922924               m_gf1_irq = 15;
923925               break;
924926            default:
927               m_gf1_irq = 0;
925928               logerror("GUS: Invalid GF1 IRQ set! [%02x]\n",data);
926929            }
927930            switch((data >> 3) & 0x07)
r20792r20793
16971700   UINT8 irq_type;
16981701   UINT8 st = m_midi->get_status();
16991702
1700   logerror("GUS: MIDI IRQ: state: %i Status: %02x\n",state,st);
1701
17021703   if(state == ASSERT_LINE)
17031704   {
17041705      if(st & 0x01) // receive
trunk/src/mess/machine/isa_gus.h
r20792r20793
105105      gf1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
106106
107107      // current IRQ/DMA channel getters
108      UINT8 gf1_irq() { return m_gf1_irq; }
108      UINT8 gf1_irq() { if(m_gf1_irq != 0) return m_gf1_irq; else return m_midi_irq; }  // workaround for win95 loading dumb values
109109      UINT8 midi_irq() { if(m_irq_combine == 0) return m_midi_irq; else return m_gf1_irq; }
110110      UINT8 dma_channel1() { return m_dma_channel1; }
111111      UINT8 dma_channel2() { if(m_dma_combine == 0) return m_dma_channel2; else return m_dma_channel1; }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team