From 91d2267625dd94323952b79f2b0f1793cd2d71b8 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Wed, 7 Feb 2018 00:14:38 -0600 Subject: [PATCH] Really print out something useful for cpu_info --- src/apple2.reflect.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apple2.reflect.c b/src/apple2.reflect.c index 337d373..f5c6d78 100644 --- a/src/apple2.reflect.c +++ b/src/apple2.reflect.c @@ -6,9 +6,6 @@ #include "mos6502.h" #include "vm_di.h" -#define CPU(x) \ - mos6502 *x = (mos6502 *)ref->cpu - void apple2_reflect_init() { @@ -19,7 +16,10 @@ apple2_reflect_init() REFLECT(apple2_reflect_cpu_info) { -// CPU(cpu); + mos6502 *cpu = (mos6502 *)vm_di_get(VM_CPU); + FILE *out = (FILE *)vm_di_get(VM_OUTPUT); - printf("hey\n"); + fprintf(out, "REGISTERS:\n"); + fprintf(out, " A:%02x X:%02x Y:%02x P:%02x S:%02x PC:%04x\n", + cpu->A, cpu->X, cpu->Y, cpu->P, cpu->S, cpu->PC); }