From a267065059884f560bf722922b26408576e97015 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 9 Jan 2018 15:57:20 -0600 Subject: [PATCH] Include cycle information --- src/mos6502.dis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mos6502.dis.c b/src/mos6502.dis.c index 2028c82..e1da00a 100644 --- a/src/mos6502.dis.c +++ b/src/mos6502.dis.c @@ -304,8 +304,9 @@ mos6502_dis_opcode(mos6502 *cpu, FILE *stream, int address) // Here we just want to show a few pieces of information; one, // what the PC was at the point of this opcode sequence; two, // the opcode; - fprintf(stream, "\t; pc=$%02x%02x: %02x", - cpu->PC >> 8, cpu->PC & 0xff, opcode); + fprintf(stream, "\t; pc=$%02x%02x cy=%02d: %02x", + cpu->PC >> 8, cpu->PC & 0xff, + mos6502_cycles(cpu, opcode), opcode); // And three, the operand, if any. Remembering that the operand // should be shown in little-endian order.