Re: [hatari-devel] 8 runes of aerillion doesn't have sound |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] 8 runes of aerillion doesn't have sound
- From: Laurent Sallafranque <laurent.sallafranque@xxxxxxx>
- Date: Sat, 9 Mar 2024 11:29:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1709980142; bh=NagBkA6VzAb+Iqgl4UfhQjUrFageEUwwnm5Hk/EOF0I=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ma4DAW7RjrIlsjZqldk3KQOJCvG8Fw6aAg/yPch66x1IY5NqUz61C2uIplwRrizmw nUP7swzykeiK1FQp6nQEsKKgfQSFYIDwXVhZ+eUX6YKeutgtE8z9XbU/mxDuuSV1Bj lvw3HRu0n/6M4pwF/uUCjxLhUF6PWrCkDeQ8BXwnfDdVRSiw/eMPY+Ikl8JBNOKecb 3E7A9tDJLdMNrs6bENugpj4Gfvr0H3ryM0Df2OXf1BQ+R7Qe4UuqYeleYiQ1q/MqDx MEwlQ96Fh/nGAQUD6+SxwhcvJqyID9N2n2/VirogXur1/bpFhn5Mrae6C40Q3x0sLr ZMFMEliQGdcGg==
I was pretty sure of it, but I've bisected electric night (the problem
is certainly the same for 8 runes as it uses the same sound engine).
laurent@laurent-Gamer:~/Atari/hatari$ git bisect bad
506b673d142c57581f777c0dac9c50bb5facb2bf is the first bad commit
commit 506b673d142c57581f777c0dac9c50bb5facb2bf
Author: Nicolas Pomarede <npomarede@xxxxxxxxxxxx>
Date: Mon Mar 4 22:59:06 2024 +0100
For Falcon DMA sound, SNDINT/SOUNDINT are set to 0/LOW when playing
and 1/HIGH when idle + fix use of FF8900
This means that Timer A Input or GPIP7 can be used on the MFP to
detect/count each
time a new audio frame is starting (this is the opposite of STE/TT)
Additionally reg FF8900 can be configured to trigger an interrupt
on TAI or GPIP7
at the end of each audio frame when playing or recording
src/falcon/crossbar.c | 124
+++++++++++++++++++++++++++++++++-----------------
1 file changed, 81 insertions(+), 43 deletions(-)
There are 2 ways to interrupt the DMA sound : GPIP7 and MFP-15 IRQ-7
I use the second one.
Maybe one is set at the end of the sample and the other interrupt is set
at the beginning.
My code (if this helps)
music_start:
; Set the 1st sample adress to the DMA
lea.l music_samples_table,a0
move.l music_buffer_adr,d6
move.l d6,d7
add.l (a0)+,d6 ; Start adress of
the sample
add.l (a0),d7 ; End adress of
the sample
bsr.w music_set_sample_adress
; Next sample
addq.w #8,music_sequence_index
; Start the music
move.w #$101,$ffff8900.w ; Set a
MFP-15 IRQ-7 interruption + Start the DMA music
rts
; --------------------------------------------------------------
; MFP IRQ7 Dma sound interrupt
; --------------------------------------------------------------
; music_mfp_i7_interrupt
; The music MFP interruption
;
music_mfp_i7_interrupt:
movem.l d5-a0,-(sp)
; Get the current music sample index to play
lea.l music_samples_table,a0
move.w music_sequence_index,d5
addq.w #8,music_sequence_index
add.w d5,a0
cmp.w #70*8,d5
bge.s .demo_is_over
; Play the next sample
move.l music_buffer_adr,d6
move.l d6,d7
add.l (a0)+,d6 ; Start adress of
the sample
add.l (a0),d7 ; End adress of
the sample
bsr.w music_set_sample_adress
; Start the music
move.w #$101,$ffff8900.w ; Set a
MFP-15 IRQ-7 interruption + Start the DMA music
movem.l (sp)+,d5-a0
; Allow the interruptions again
bclr #7,$fffffa0f.w ; Interrupt
In-service A - Mono done
rte
..demo_is_over: ; The demo is over, don't reload another sample
; Stop the music
clr.w $ffff8900.w ; Stop the DMA
play
; Allow to quit the demo, to the end part
addq.w #1,demo_is_finished
movem.l (sp)+,d5-a0
; Allow the CPU interruptions again
bclr #7,$fffffa0f.w ; Interrupt
In-service A - Mono done
rte
Regards
Laurent
Le 09/03/2024 à 10:08, Thomas Huth a écrit :
Am Sat, 9 Mar 2024 09:17:11 +0100
schrieb Laurent Sallafranque <laurent.sallafranque@xxxxxxx>:
Hi,
My game "8 runes of aerillion" demo has no sound in play now.
Maybe due to the latest changes ?
Could you maybe do a "git bisect" to find out where it breaks?
Thanks,
Thomas