Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: STE & Falcon DMA sound
Posted by: Mr.Styckx Feb,06.2015-01:04 

Hi

this reminds me some similar sample playback routine we discussed with Evil/DHS about one of their demo, I think it was More Or Less 0, that required big accuracy changes in Hatari's emulation of DMA audio. This demo also used some samples played one after another IIRC.

In your case, as DML said, you should not turn dma off/on to set a new address, it will be audible and give wrong sound.
Frame start and Frame end are only read by dma when you turn it off/on or when sample is looping.

So, as in your case each sample last 8 sec, which is more than 2 VBL, I think you could do this :

- set sample start/end 1 address at VBL N
- set next sample start/end 2 address at VBL N+1 ; this won't stop the current sample, because new addresses will only be read when looping.

- on every VBL, check bit7 of IPRA in MFP is set. If yes, this means current sample has just reached its end address and dma will play the sample you set at VBL N+1. Clear bit 7 and set sample start/end 3 address at VBL M.
- at VBL M+1, set sample start/end 4 address

I hope you see the idea, by always setting next sample 1 VBL after the current one, and by monitoring bit 7 of pending int A in MFP, you should be able to have a "tempo" to load new sample addresses on a regular base.

Nicolas








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
STE & Falcon DMA sound defjam Feb,05.2015-21:31
  Re: STE & Falcon DMA sound dml Feb,06.2015-00:18
    Re: STE & Falcon DMA sound mikro Feb,06.2015-09:22
  Re: STE & Falcon DMA sound Mr.Styckx Feb,06.2015-01:04
    Re: STE & Falcon DMA sound gwEm/PHF Feb,06.2015-11:06
    Re: STE & Falcon DMA sound evil Feb,06.2015-22:36
      Re: STE & Falcon DMA sound Mr.Styckx Feb,07.2015-01:43
        Re: STE & Falcon DMA sound Laurent / Thadoss Feb,07.2015-10:40
          Re: STE & Falcon DMA sound Defjam Feb,07.2015-18:00
        Re: STE & Falcon DMA sound Abstract_f Feb,16.2015-15:56
          Re: STE & Falcon DMA sound ggn Feb,16.2015-16:55
            Re: STE & Falcon DMA sound gwEm/PHF Feb,18.2015-11:09
          Re: STE & Falcon DMA sound PeP Feb,17.2015-16:55
            Re: STE & Falcon DMA sound gwEm/PHF Feb,18.2015-11:05


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson