2

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?

user3840170
  • 23,072
  • 4
  • 91
  • 150
Digerkam
  • 311
  • 1
  • 9

1 Answers1

7

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

user3840170
  • 23,072
  • 4
  • 91
  • 150
Eight-Bit Guru
  • 1,083
  • 7
  • 16
  • Sounds good, but Vice needs to be recompile??? But how? – Digerkam Apr 13 '22 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. – Eight-Bit Guru Apr 13 '22 at 14:16
  • I am very confused where to find it: https://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 Apr 14 '22 at 02: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 (https://sourceforge.net/projects/vice-emu/files/) and see if any development/experimental binaries have been compiled with --enable-cpuhistory. – Eight-Bit Guru Apr 14 '22 at 12:26
  • Are you from c64 scene? Just wondering :) – Digerkam Apr 14 '22 at 23:05
  • I've been coding on Commodore 8-bit machines since 1980, so technically I'm from the PET/VIC/C64/C16/+4 scenes ;) – Eight-Bit Guru Apr 15 '22 at 09:55