1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-23 23:32:45 +00:00

Really print out something useful for cpu_info

This commit is contained in:
Peter Evans 2018-02-07 00:14:38 -06:00
parent 3c1709c9b1
commit 91d2267625

View File

@ -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);
}