[hatari-devel] I'm lucky ;) K.prg is working
Laurent Sallafranque
laurent.sallafranque at free.fr
Thu Feb 25 12:59:22 CET 2010
Yes, but actually, in main.h, there's already a define for CPU_FREQUENCE :
/* The 8 MHz CPU frequency */
#define CPU_FREQ 8012800
That's the value I use for the crossbar.
Which one should I take into account ?
And for 32 MHZ ?
regards,
Laurent
npomarede at corp.free.fr a écrit :
> On Thu, 25 Feb 2010, Laurent Sallafranque wrote:
>
>> OK, I understand my problem ;)
>>
>> I've just uploaded a patch in DSP.C to take into account correctly
>> the 8 -> 32 Mhz conversion.
>>
>
> Just a detail, but I think you could change :
>
> Sint32 i = nHostCycles * 4 - save_cycles + 1;
>
> into :
> #define DSP_FREQ 32000000
> #define CPU_FREQ 8000000
> Sint32 i = nHostCycles * ( DSP_FREQ / CPU_FREQ ) - save_cycles + 1;
>
> It would make clearer where "*4" comes from and if one day we support
> native 16 MHz freq for the cpu it will be less likely that we forget
> to change this "*4' :)
>
>
> Nicolas
>
>
More information about the hatari-devel
mailing list