diff --git a/src/sim65/6502.c b/src/sim65/6502.c index c114c0c89..cb3270185 100644 --- a/src/sim65/6502.c +++ b/src/sim65/6502.c @@ -392,7 +392,7 @@ CPUType CPU; typedef void (*OPFunc) (void); /* The CPU registers */ -static CPURegs Regs; +CPURegs Regs; /* Cycles for the current insn */ static unsigned Cycles; diff --git a/src/sim65/6502.h b/src/sim65/6502.h index cab734c6a..b6b621823 100644 --- a/src/sim65/6502.h +++ b/src/sim65/6502.h @@ -65,6 +65,9 @@ struct CPURegs { unsigned PC; /* Program counter */ }; +/* Current CPU registers */ +extern CPURegs Regs; + /* Status register bits */ #define CF 0x01 /* Carry flag */ #define ZF 0x02 /* Zero flag */