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?
Asked
Active
Viewed 365 times
2
-
4What do you mean with by "all current instructions"? The instruction that the program counter is currently pointing at? – Edders Apr 13 '22 at 11:35
-
@Edders yes, instructions that cpu handled. – Digerkam Apr 13 '22 at 11:49
-
I would rather ask what is meant by ‘collect’. – user3840170 Apr 13 '22 at 13:02
-
@user3840170 Think of Wireshark – Digerkam Apr 13 '22 at 13:12
-
dntknw asked similar questions a couple of weeks ago (like this one: https://retrocomputing.stackexchange.com/questions/24194/home-computers-of-early-80s-capable-of-saving-basic-programs-as-machine-code) – Michael Graf Apr 13 '22 at 13:43
-
3Terminology: what you're asking for is generally known as an instruction trace. – dave Apr 13 '22 at 20:24
1 Answers
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)
user3840170
- 23,072
- 4
- 91
- 150
Eight-Bit Guru
- 1,083
- 7
- 16
-
-
2The 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
-
1Hmm, 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
-
-
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