Re: [hatari-devel] Lockup demo

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


Li Laurent

This looks like the code from SV version. It was replaced by version v1.3 (http://files.dhs.nu/files_demo/Lockup_v13.zip). This version has some fixes overflow in audio decoder being one of them.

This looks like the timer interrupt yes.

The "formula" is a bit tricky because I need to "lock" the timer interrupt with the SSI generated interrupts:

                    move    r7,a               ; SSI interrupt sample pointer

                    move    #>DECODED_BUFFER_SIZE,x0  (buffer size)
                    move    #>decoded_buffer,y0
                    sub     y0,a
                    cmp     x0,a  #>decoded_buffer+DECODED_BUFFER_SIZE,r0
                    .IF     <GT>
                        sub  x0,a  #>decoded_buffer,r0
                    .ENDI

                    ; calculate new timer value to sync-lock with DMA
                    lsr     a
                    lsr     a   #>640|(1<<13),b
                    sub     a,b

                    MOVEP   b,X:<<M_SCCR ;Set the interrupt rate.

With this timer stays in sync with the replay buffer. I don't remember how I came up with 640. This is probably related to the half of duration of the playback buffer.

Hope that helps
Regards
Mariusz

On 12/5/2020 2:08:18, Laurent Sallafranque <laurent.sallafranque@xxxxxxx> wrote:

Hi Mariusz,


Can you confirm me that the SCI timer interrupt runs the following code
each time the Timer triggers ?


p:002c  6e1100         (02 cyc)  move r6,y:$0011
p:002d  6e9300         (02 cyc)  move y:$0013,r6
p:002e  0aa524         (04 cyc)  bset #4,x:$ffe5
p:002f  205e00         (02 cyc)  move (r6)+,r6
p:0030  0bd669         (04 cyc)  btst #9,r6
p:0031  205600         (02 cyc)  move (r6)-,r6
p:0032  0e0038         (04 cyc)  jcc p:$0038
p:0033  0aa504         (04 cyc)  bclr #4,x:$ffe5
p:0034  085eaf         (04 cyc)  movep x:$ffef,x:(r6)+
p:0035  6e1300         (02 cyc)  move r6,y:$0013
p:0036  6e9100         (02 cyc)  move y:$0011,r6
p:0037  000004         (04 cyc)  rti


How do you compute the $fff2 value ?  ($a)  (What is the Fosc value in
the formula ?)

Regards

Laurent


Le 04/12/2020 à 22:03, Mariusz Buras a écrit :
> That's exciting!!
>
> On Fri, 4 Dec 2020 at 20:55, Laurent Sallafranque
> wrote:
>> Mariusz, no need to send me a test case for the host interface
>> interrupts, your demo is working now ;)
>>
>> Laurent
>>
>>
>>
>> Le 04/12/2020 à 21:51, Laurent Sallafranque a écrit :
>>> Hi,
>>>
>>>
>>> My version of the demo was corrupted (2 bombs).
>>>
>>> I've downloaded another one.
>>>
>>>
>>> I've fixed the DSP Host interrupts and now, I have the demo with the
>>> tridi.
>>>
>>> It was present but had never been tested before.
>>>
>>> The demo runs super well ;)
>>>
>>>
>>> Still have to give a try to the timer now to have the music.
>>>
>>>
>>> Eero, can I comit my changes into the DSP interrupts ?
>>>
>>>
>>> Regards
>>>
>>> Laurent
>>>
>>>
>>>
>>>
>>
>




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