Re: [hatari-devel] 8 runes of aerillion doesn't have sound

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/