[hatari-devel] CPU cycles (was: Re: Little question about SteDMA sound)
Thomas Huth
huth at users.berlios.de
Sun Sep 20 12:45:09 CEST 2009
On Sat, 19 Sep 2009 20:48:22 +0200 (CEST)
npomarede at corp.free.fr wrote:
> On Sat, 19 Sep 2009, Laurent Sallafranque wrote:
>
> > Shouldn't we use the same value as Nicolas used in int.c instead ?
> > As least, it would be the same value everywhere.
> >
> > I agree that the 8447 is not changing many things in the result,
> > it's just to use the same value everywhere.
> >
> > Could this value be written as a define in configuration.h (at
> > least, if we want to change it, it would be changed in Dmasnd.c
> > too) ?
Ok, I've added a define CPU_FREQ now which is used in dmaSnd.c and
crossbar.c
> I don't know, this is hard to decide because :
> - it's absolutly sure that a VBL in 50 Hz is 160256 cycles
> - so 50 * 160256 should give the CPU freq, which is not the case in
> int.c
>
> -> this could mean that the VBL is not exactly 50 Hz, but there's a
> small variation to adjust to the CPU freq to 8021247 Hz.
Actually the exact CPU frequency (or rather the 32MHz frequency that
is divided by four) also seems to differ between the exact machine type
like ST vs. STE and PAL vs. NTSC... But since the CPU<->MFP ratio in
int.c has been well established since several versions now, I also think
we shouldn't touch that anymore unless there is a very good reason to
do so.
Thomas
More information about the hatari-devel
mailing list