That's my 1st 68k asm code

It is currently using a looping double-buffer and polling the dma registers $FFFF8909 / FFFF890B / FFFF890D to know when to refill it.
I want to improve by using interrupts to avoid the polling.
I experimented a bit, but it looks like I'm missing something about MFP interrupts on the ST. I guess I should acknowledge the interrupt, but I don't know how.
Code: Select all
; MFP interrupt
pea dmasoundcomplete ; vector
move.w #15,-(sp) ; Mono monitor detect / DMA sound complete
move.w #13,-(sp) ; Mfpint
trap #14 ; Call XBIOS
addq.l #8,sp
move.w #15,-(sp) ; Mono monitor detect / DMA sound complete
move.w #27,-(sp) ; Jenabint
trap #14 ; Call XBIOS
addq.l #4,sp
...
dmasoundcomplete:
move.w #$0F0B,$FFFF8240 ; RED / purple
rte
From what I see the interupt is called once, but then keyboard input doesn't work anymore.
I also read somewhere that DMA sound also triggers timer A interrupt. Is that when sample buffer is complete or for every sample ? It isn't very clear how both INT are working with DMA sound.
http://atari-ste.anvil-soft.com/html/devdocu4.htm