Re: [hatari-devel] Many changes to MFP

[ Thread Index | Date Index | More Archives ]

On 14/03/2013 10:10, Eero Tamminen wrote:

On torstai 14 maaliskuu 2013, Nicolas Pomarède wrote:
For now, MachineClocks.CPU_Freq is not really used, it's just
informative. You also need to check if cpu freq is 8,16 or 32 (using the

  >> operator to divide cycles by 2 or 4). No clean solution for now, it

can be solved latter as it doesn't impact emulation itself. Add a
special case for the TT if you need in your code.

Do you mean that CPU cycles are always counted using 8Mhz clock,
not the one at which the CPU is running at?

Yes, in a all cores/all cpu, cpu freq is always assumed to be 8 MHz (this is required to keep a constant ratio with other component like FDC, ACIA, ...). The effective 16 or 32 MHz freq is obtained by dividing each instruction's cycles by 2 or 4 :

static inline void M68000_AddCycles(int cycles)
        cycles = (cycles + 3) & ~3;
        cycles = cycles >> nCpuFreqShift;

Mail converted by MHonArc 2.6.19+