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

Atari demoscene BBS
 
Re: STe 8-Bit sample play routine
Posted by: Bod/STAX Jun,08.2012-19:50 

This snippet of code is how I play the sound effects in my game using the STE DMA chip:

move.b d6,$fffff8907.w
lsr.w #8,d6
move.l d6,$fffff8902.w

move.b d7,$fffff8913.w
lsr.w #8,d7
move.l d7,$fffff890e.w

move.b #%10000001,$fffff8921.w ; freq

move.b %%00000011,$fffff8901.w ; dma start

d6=start address of sample
d7=end address of sample

This code plays an 8-bit 12.5khz sample once.

See the link I posted above to change the bits to alter loop on/off and change the frequency.

Hope this is of some use to you. :)







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

Topic Posted by  Date 
STe 8-Bit sample play routine Pete Jun,08.2012-06:37
  Re: STe 8-Bit sample play routine defjam Jun,08.2012-10:52
    Re: STe 8-Bit sample play routine Bod/STAX Jun,08.2012-10:59
    Re: STe 8-Bit sample play routine Simon Sunnyboy / Paradize Jun,08.2012-15:47
      Re: STe 8-Bit sample play routine Bod/STAX Jun,08.2012-19:50
        Re: STe 8-Bit sample play routine Pete Jun,09.2012-13:14


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