[hatari-devel] 68000 cycles, read and write cycles

Laurent Sallafranque laurent.sallafranque at free.fr
Thu Nov 17 23:57:43 CET 2011


For my example with clr, I looked at the 8 bits table instead of the 16 
bits table.

CLR cycles would be :

CLR (byte) (register) : 4(1/0)
CLR (word) (register) : 4(1/0)
CLR (long) (register) : 6(1/0)

CLR (byte) (memory) : 8(1/1) +
CLR (word) (memory) : 8(1/1)+
CLR (long) (memory) : 12(1/2)+

Maybe some cycles values are different from the 68000 doc and the cycles 
of a real atari, but it's really easy to change this in a table that 
contains all the instructions.
Correct values could be pick up in the old gencpu code.

Regards

Laurent


Le 17/11/2011 23:53, Laurent Sallafranque a écrit :
> Hi Nicolas,
>
> I was watching your last patch in cycles.c
>
> The aim seems to compute precise cycles for the read and the write of 
> an instruction in the 2 following functions :
>
> int Cycles_GetCounterOnReadAccess(int nId)
>
> int Cycles_GetCounterOnWriteAccess(int nId)
>
>
> Is this related to the cycles tables of the 68000 processor ?
>
> I mean when I look at the M68000UM doc, for CLR, I can read (maybe my 
> document is not the good one, but it gives the idea) :
>
> CLR (byte) (register) : 8(2/0)
> CLR (word) (register) : 8(2/0)
> CLR (long) (register) : 10(2/0)
>
> CLR (byte) (memory) : 12(2/1) +
> CLR (word) (memory) : 16(2/2)+
> CLR (long) (memory) : 24(2/4)+
>
>
> In parenthesis are given the number of read and write access to the 
> memory.
>
> Would having these values for each instruction could let us compute 
> precise values for GetCounterOnReadAccess and GetCounterOnWriteAccess ?
>
> I'm currently filling a table for each 68030 instructions with all 
> these datas.
> If having all these values for the 68000 is the good answear, I can 
> also fill a table for the Atari_St(e) processor with cycles + read + 
> write access.
>
> If yes, we could also speed up hatari a little by removing the return 
> in each instruction code and transform all instruction functions to 
> void and read the amount of cycles directly from the table.
> (we can also leave the gencpu.c code unchanged, it's no problem)
>
> Are you interrested in such a table ?
>
> Regards
>
> Laurent
>
>




More information about the hatari-devel mailing list