A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / about module replayers and audio interrupt

 

Author Message
bigJz
Member
#1 - Posted: 26 Jan 2008 15:17 - Edited
Reply Quote
hi

I started to use some module replayers (st,nt,pt) and also oldschool replayers like FC...
I seen that some player use an audio interruption (vector $70 or via audio device) and call play into VBL/VBI.

for example, I'm on Ben Daglish player :
the audio interrupt is initialized at the start :
init:...
 lea autioint(pc),a0
 move.l a0,$70.w
 move.w #$780,$9c(a6)
 move.w #$780,$9a(a6)
 move.w #$c000,$9a(a6)
 ...


here is interruption:
intaudio:
 move.w	d0,(sp)
 move.w	$DFF01E,d0
 andi.w	#$780,d0
 and.w	$DFF01C,d0
 move.w	d0,$DFF09A
 move.w	d0,$DFF09C
 lsr.w	#7,d0
 move.w	d0,$DFF096
 move.w	(sp)+,d0
 rte


If I don't want to use the audio interrupt and only call play at vbl, the music is playing but crash after a moment (always at the same note).
I think in others replay routine which don't use interruption, the audio interruptions are managed in another way or not managed ?
what is my question : how are managed audio interruptions in replayer without audio device or audio interrupt vector.
how/where is it implemented ?
why ben daglish crash without ? I think it's because the dma is busy when program try to write new data?

sorry for all these questions, I try to understand how works replayers.

thanks
bigJz
Member
#2 - Posted: 26 Jan 2008 22:19 - Edited
Reply Quote
I fixed the crash : I added DMAwait where dmacon is modified.
but now, it's a sound bug. I think it's on the sample loop sub routine : not the dmacon modified, but intreq and intena to start the interruption. (I test with SwitchBlade module)

loc_0_293BC:
 subq.w  #1,6(a3)
 beq.s   loc_0_293CE
 move.w  (a3),d0
 ori.w   #$8000,d0
 move.w  d0,$96(a6)
 rts
loc_0_293CE:
 not.w   6(a3)
 move.w  2(a3),d0
 move.w  d0,$9C(a6)
 ori.w   #$8000,d0
 move.w  d0,$9A(a6)
 rts


I dont know by what replace the lines after not.w 6(a3)
edit: I tried to set an empty sample in the current channel. Seems to work (but I dont know yet the size max)
z5_
Member
#3 - Posted: 29 Jan 2008 01:12
Reply Quote
Bump for BigJz

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0