Previous 15994 Revisions Next

r14421 Saturday 11th February, 2012 at 11:16:10 UTC by Barry Rodewald
isa_gus: adjusted DMA speed to be closer to documented rate. (no whatsnew)
[src/mess/machine]isa_gus.c

src/mess/machine/isa_gus.c
r14420r14421
228228         for(y=samples-1; y>=0; y--)
229229         {
230230            UINT32 current = m_voice[x].current_addr >> 9;
231            // TODO: implement proper panning
232            (*left) += ((m_voice[x].sample) * (vol/65536.0));
233            (*right) += ((m_voice[x].sample) * (vol/65536.0));
234            left++;
235            right++;
231236            if((!(m_voice[x].voice_ctrl & 0x40)) && (m_voice[x].current_addr >= m_voice[x].end_addr) && !m_voice[x].rollover && !(m_voice[x].voice_ctrl & 0x01))
232237            {
233238               if(m_voice[x].vol_ramp_ctrl & 0x04)
r14420r14421
240245               {
241246                  if(!(m_voice[x].voice_ctrl & 0x08))
242247                     m_voice[x].voice_ctrl |= 0x01;
248                  else
243249                  {
244250                     if(m_voice[x].voice_ctrl & 0x10)
245251                        m_voice[x].voice_ctrl |= 0x40; // change direction
r14420r14421
263269                  // end voice, unless looping
264270                  if(!(m_voice[x].voice_ctrl & 0x08))
265271                     m_voice[x].voice_ctrl |= 0x01;
272                  else
266273                  {
267274                     if(m_voice[x].voice_ctrl & 0x10)
268275                        m_voice[x].voice_ctrl &= ~0x40; // change direction
r14420r14421
281288            {  // 8-bit PCM
282289               m_voice[x].sample = (INT16)(m_wave_ram[current & 0xfffff] << 8);
283290            }
284            // TODO: implement proper panning
285            (*left) += ((m_voice[x].sample) * (vol/65536.0));
286            (*right) += ((m_voice[x].sample) * (vol/65536.0));
287            left++;
288            right++;
289291            if(m_voice[x].voice_ctrl & 0x40)  // voice direction
290292               m_voice[x].current_addr -= (m_voice[x].freq_ctrl >> 1);
291293            else
r14420r14421
688690         m_dma_dram_ctrl = data & 0xbf;
689691         m_dma_16bit = data & 0x40;
690692         if(data & 0x01)
691            m_dmatimer->adjust(attotime::zero,0,attotime::from_nsec(500));  // a guess for now
693            m_dmatimer->adjust(attotime::zero,0,attotime::from_nsec(11489));  // based on 680Kb/sec mentioned in UltraMID docs
692694         else
693695            m_dmatimer->adjust(attotime::zero,0,attotime::never);  // stop transfer
694696      }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team