Chris Collins

Tools · retro

68000 cycle counter

Paste 68000 assembly and see the clock cycles and bus reads/writes of every instruction from Motorola's timing tables, the total for a block or loop, and how much of an Amiga or Atari ST frame it takes.

Added

How to use it

Paste 68000 assembly. Each instruction gets its execution time in clock periods with the bus cycles as (reads/writes), straight from the MC68000 User’s Manual tables, and the block gets a total — repeated as many times as you say (a loop’s iteration count) — with the time in microseconds and its share of a video frame.

  • Labels, ; and * comments, and directives (dc, ds, even, section, …) are allowed and cost nothing.

  • Branches are counted as taken, so a loop body adds up the way it runs; the range column shows the other cases (a Bcc.S not taken is 8 cycles, a DBcc whose counter runs out is 14).

  • Where the time depends on data — MULU/MULS (38+2n), shifts by a register count, the divides — the tool works it out exactly for an immediate operand and otherwise shows the range.

Machines

Machine CPU clock Cycles per frame

Amiga PAL

7.09379 MHz

454 × 313 = 142,102 (49.92 Hz)

Amiga NTSC

7.15909 MHz

455 × 263 = 119,665 (59.83 Hz)

Atari ST, 50 Hz

about 8 MHz

512 × 313 = 160,256

Atari ST, 60 Hz

about 8 MHz

508 × 263 = 133,604

The counts are for the 68000 alone. On the Amiga, code and data in chip RAM share the bus with the custom chips' DMA (bitplanes, sprites, the blitter, the copper), so real times there can be longer; fast RAM runs at full speed. On the ST every memory access is aligned to a 4-cycle slot, so instructions with an odd number of 2-cycle steps take a little longer — tick Round to 4-cycle slots to see that.

Sources

The timings are the tables in Section 8 of Motorola’s MC68000 User’s Manual, as transcribed in the Amiga MC680x0 sections: effective address calculation, MOVE, standard, immediate, single operand, shift/rotate, bit manipulation, conditional, JMP/JSR/LEA/PEA/MOVEM, multi-precision, miscellaneous, MOVEP and exception times.

Runs entirely in your browser; nothing you type leaves this page.