Re: [hatari-devel] Sample frame buffer is incorrectly restarted

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


On Sun, 4 Feb 2024 at 21:40, Nicolas Pomarède <npomarede@xxxxxxxxxxxx>
wrote:

> Maybe these docs are wrong when they say timer A is triggered at the end
> of the buffer ? Because on STE/TT timer A is triggered when the new
> address is loaded into internal DMA register, ie when the sample starts
> playing, not at the end.
>
Hmm, looking at my results below I'd say the timer is definitely triggered
while setting the frame address. I even have this note in my ancient source
code:
https://sourceforge.net/p/mxplay/code/HEAD/tree/trunk/plugins/audio/asap/asap.c#l307
hinting
that I confirmed this more than 10 years ago.

line 68 :  Setbuffer(SR_PLAY, phys, phys + sampleBufferSize);
> add after : printf ( "setbuffer init %p %d\n" , phys , (volatile
> unsigned long *)0x454) );
>
> line 82 : Setbuffer(SR_PLAY, phys, phys + sampleBufferSize);
> add after  : printf ( "setbuffer loop %p %d\n" , phys , (volatile
> unsigned long *)0x454) );
>
> line 31, before the end of timerA(void) function, add :
>
> printf ( "timerA %p %d\n" , frameAddr , (volatile unsigned long *)0x454) );
>
I guess you meant 0x466 (frclock) and not 0x454 (nvbls). :) Anyway, on
Hatari it shows:

setbuffer init 0xfc74 229
setbuffer loop 0x73c74 243
timerA 0x73c74 439
timerA 0x73c74 647
timerA 0x73c74 647
setbuffer loop 0xfc74 757
timerA 0xfc74 966
timerA 0xfc74 1174
timerA 0xfc74 1174
setbuffer loop 0x73c74 1270
timerA 0x73c74 1479
timerA 0x73c74 1687
timerA 0x73c74 1687
setbuffer loop 0xfc74 1783
timerA 0xfc74 1992
....



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