I need to collect the execution trace of all instructions executed by the 6502 on a C64. I tried C64 Debugger, but I couldn't find any option for this. Is it possible to obtain with C64 Debugger? Are there any other tools for this?

  • 4
    What do you mean with by "all current instructions"? The instruction that the program counter is currently pointing at?
    – Edders
    Commented Apr 13, 2022 at 11:35
  • @Edders yes, instructions that cpu handled.
    – Digerkam
    Commented Apr 13, 2022 at 11:49
  • I would rather ask what is meant by ‘collect’. Commented Apr 13, 2022 at 13:02
  • @user3840170 Think of Wireshark
    – Digerkam
    Commented Apr 13, 2022 at 13:12
  • 3
    Terminology: what you're asking for is generally known as an instruction trace.
    – dave
    Commented Apr 13, 2022 at 20:24

1 Answer 1


Are you using an emulator? VICE has the chis (CPU history) monitor command for analysing instruction activity.

cpuhistory [<count>] [c:] [8:] [9:] [10:] [11:]
chis [<count>] [c:] [8:] [9:] [10:] [11:]

Show <count> last executed commands on up to five devices. If no devices are specified, then the default device is shown. VICE emulation runs each CPU for a variable number of cycles before switching between them. They will be synchronized when communication between them occurs. (disabled by default; configure with --enable-cpuhistory to enable)

VICE Manual, §12.2

  • Sounds good, but Vice needs to be recompile??? But how?
    – Digerkam
    Commented Apr 13, 2022 at 13:11
  • 2
    The nightly builds have --enable-cpuhistory active. Grab one of those instead of / as well as the current RTM version. I keep two versions in my build toolchain - the RTM one for stable accuracy, and a nightly build purely for the chis feature so I can see what Commodore were smoking when they wrote some of the VIC-20 kernel. Commented Apr 13, 2022 at 14:16
  • I am very confused where to find it: vice.pokefinder.org says "This service is now cancelled and we are not planning on reviving it here.". I walked around files on SF, nothing found that seems to be nightly build. Where can I find it?
    – Digerkam
    Commented Apr 14, 2022 at 2:39
  • 1
    Hmm, the pokefinder site was where I used to go myself. Looks like no-one is doing regular nightly builds at the moment, so my suggestion would be to hit the official repo (sourceforge.net/projects/vice-emu/files) and see if any development/experimental binaries have been compiled with --enable-cpuhistory. Commented Apr 14, 2022 at 12:26
  • Are you from c64 scene? Just wondering :)
    – Digerkam
    Commented Apr 14, 2022 at 23:05

Not the answer you're looking for? Browse other questions tagged .