Re: [hatari-devel] Sample frame buffer is incorrectly restarted |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: Nicolas Pomarède <npomarede@xxxxxxxxxxxx>
- Subject: Re: [hatari-devel] Sample frame buffer is incorrectly restarted
- From: Miro Kropáček <miro.kropacek@xxxxxxxxx>
- Date: Mon, 5 Feb 2024 21:39:25 +0100
- Cc: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707165578; x=1707770378; darn=lists.tuxfamily.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qNAA5JTCPIAHuQTtCRYJI7kbgxRx1dQGKAJO2LQI+Rg=; b=dXzZOgL144HGsad5D5xZMROzLtHo0KzoDMRz3WVOTjSpjvmnusq9/ESonRYpkgABAs mPoQSQ8GDgw6aYi+ctHWqr/kH72K75GbScnKOv/B/HIBpNv0leV6HNfa7bHTic4f1EF8 HpgMmVxPn3Jvhw36/EWr3NIV9b/QziO/MWF1jcKjHb5oLVqbqGKUMUqeJYvprfNEc7o0 JyvARNdJT4RGVkRKCWG3ZZ4BCb0z+QaaA7i0mdznJEEl/Prmc8f5NRdWqgEx995YpjuN OyEUAjG5X+CbGVkF7x2ox+XYobmPwSQllCvIDZQi12sPYUba6FYsejTJ2Znd/5HYi7cm 5nmw==
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
....