Main HW / Emulator constants (MFP/CPU/DMA sound)

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby ljbk » Tue Apr 02, 2013 7:37 pm

Steven Seagal wrote:Image

Steem will not be left behind!

Since in Steem there's no independent DMA clock, it is computed using CPU clock, it is important to have the latter right.

Sometimes the value for MFP_VBL is different, eg 8021286, the others are more stable. Could be a problem with VBI, that isn't always perfect in Steem.



Hi !

Thanks for updating STeem.
Those values are quite allright.
The values may differ as there is a 24 cycles loop. So the loop stop can differ by 24 cycles or one 60 KHz interrupt counted or not.That is why with my real STF i get either 160244 cycles or from time to time 160268 :!: VBL cycles.

You can check here:
viewtopic.php?f=15&p=229120#p229120
to get the last version 002 that now works with NTSC/60Hz and Mono/71 Hz.

Paulo.
Last edited by ljbk on Tue Apr 02, 2013 7:56 pm, edited 1 time in total.

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby ljbk » Tue Apr 02, 2013 7:52 pm

Hi Nicolas !

I have one last ( :) ) question about the STE sound DMA.

Assuming that the FIFO is only filled when the Shifter is not reading data from memory, this means that in Colour modes the FIFO will not be updated during 320 cycles while the 320 pixels data in Low resolution or 640 pixels data in Medium resolution are read, right ?
This also means that in overscan modes, the reads will happen later, after the right border bitmap has been displayed, and so in case of a 230 bytes line, only 52 cycles are left to read up to 8 bytes of sound data in stereo, right ?
This should mean that in Mono mode, the FIFO will be updated more frequently, as the Display Enable will be active for 200 cycles and inactive for 24 cycles where up to 4 bytes have to be read to the FIFO, right ?
We should also have more regular reads during the top and bottom borders as the display is not enabled, right?
FInally, this should mean that when you start the DMA to play, the sound might only really be played after up to 460 cyles in overscan mode, right ?
Does Hatari support all this ?

Thanks,
Paulo.

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby npomarede » Fri Apr 26, 2013 6:46 pm

Ooops, I didn't see your post at the time.
So yes, I think the FIFO is only filled when display is disabled, which in the "worst" case would be after cycle 460 when removing left/right border in low/med res.
From my computation, even when removing left/right border, you still have enough cycles to keep the FIFO filled at 50066 Hz stereo.

But it would be an interesting thing to test on a real STE : play a 50066 Hz stereo sound during an overscan screen and hear if sound is altered or not (maybe there's already a demo doing this, I haven't checked)

From the point of Hatari, I don't handle this with such fine-grained method as waiting for the exact cycle when display is disabled to refill the DMA FIFO ; I just refilled it on every HBL, without checking for how many cycles are still free on the display line (as I assume there will always be enough cycles to keep the FIFO filled).
When reading the DMA sound current address (and being synchronised with ff8209), this can be used to check if the machine is a real STE or Hatari, because there can be 2 bytes difference sometimes in the way this counter is updated (and when).

Nicolas

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby ljbk » Sat Apr 27, 2013 3:48 pm

Thanks for your reply.

Paulo.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby Cyprian » Tue May 07, 2013 10:50 pm

Here some my tests.

Mega STE first pass:
    VBL CYCLES: 160244 (160256 / 8 MHz)
    MFP_VBL CLOCK: 8021025 (IF CPU @ 8 MHz)
    MFPCALC CLOCK: 8020413
    TIME_LP CLOCK: 8020541
    SOUND DMA: 50067


Mega STE second pass:
    VBL CYCLES: 160244 (160256 / 8 MHz)
    MFP_VBL CLOCK: 8021025 (IF CPU @ 8 MHz)
    MFPCALC CLOCK: 8020413
    TIME_LP CLOCK: 8020566
    SOUND DMA: 50068


1040STE:
    VBL CYCLES: 160244 (160256 / 8 MHz)
    MFP_VBL CLOCK: 8020894 (IF CPU @ 8 MHz)
    MFPCALC CLOCK: 8020282
    TIME_LP CLOCK: 8020467
    SOUND DMA: 50067
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby ljbk » Wed May 08, 2013 7:14 am

Hi !

Thanks for your input.
Latest data and test tool is available here:
viewtopic.php?f=15&t=24862

Paulo.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby Cyprian » Wed May 08, 2013 7:50 am

ok, I do that new test on my STE, MSTE and TT.

what about Mega STE 8/16MHz and cache setup? does it matter?
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Main HW / Emulator constants (MFP/CPU/DMA sound)

Postby ljbk » Wed May 08, 2013 11:15 am

Cyprian wrote:ok, I do that new test on my STE, MSTE and TT.

what about Mega STE 8/16MHz and cache setup? does it matter?


8/16/32/xx MHz are not a problem.

Cache will cause an inflated CPU rate for the pure cycle count test.
For the timer / relative speed, cache will not change anything.
You can check the DarkLord "special" machines results at the HW topic.

Just test and check the results by yourself :)


Paulo.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest