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

Atari coding BBS
 
Re: DMA sound + timer A
Posted by: Laurent / Thadoss Dec,17.2013-17:22 

Hi,

> I think you want to set $401, not $41?

Thanks Thomas, you're right. It should work better. But it still doesn't.

I'd like to play a first sample, then at the end, play another sample in loop mode. For this, I want to use the Timer_A interrupt at the end of the first sample.

My first sample plays well, but I never hear the second one (it seems I never jump to the timer_a routine)

Here is what I do :



; Init TIMER_A part :


bclr #3,$fffffa17.w ; Automatic End-Interrupt ON

; Save the Timer_A vector address ($134)
lea.l save_timer_a(pc),a0
move.l $134.w,(a0)

and.b #$df,$fffffa13.w ; Timer-A Interrupt Mask A
and.b #$df,$fffffa0f.w ; Timer-A Interrupt in service
and.b #$df,$fffffa0b.w ; Timer-A Interrupt pending
and.b #$df,$fffffa07.w ; Timer-A Interrupt Enable
lea.l intro_timer_a(pc),a0
move.l a0,$134.w ; Set the new Timer-A vector on our Timer-A interrupt code
move.b #$08,$fffffa19.w ; Timer-A Event count mode
or.b #$20,$fffffa07.w ; Timer-A Interrupt Enable
or.b #$20,$fffffa13.w ; Timer-A Interrupt Mask A


; Play the sound
; Play the Start engine sound ; Timer_A int at end of sample
move.w #$401,$ffff8900.w




; The Timer_A interrupt routine

intro_timer_a: movem.l d6-d7,-(sp)
clr.w $ffff8900.w
[...]
; Set the new sound
move.w #$03,$ffff8900.w ; Play ronron sound + loop (no timer-A interrupt)
movem.l (sp)+,d6-d7
rte



Thanks in advance for the help.
Regards
Laurent








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

Topic Posted by  Date 
DMA sound + timer A Laurent / Thadoss Dec,16.2013-02:13
  Re: DMA sound + timer A Thomas / New Beat Dec,17.2013-10:32
    Re: DMA sound + timer A Laurent / Thadoss Dec,17.2013-17:22
      Re: DMA sound + timer A Thomas / New Beat Dec,18.2013-11:19
        Re: DMA sound + timer A Laurent / Thadoss Dec,18.2013-18:08
          Re: DMA sound + timer A Laurent / Thadoss Dec,21.2013-00:06
            Re: DMA sound + timer A Thomas / New Beat Dec,27.2013-23:37
      Re: DMA sound + timer A mikro Dec,18.2013-12:51


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