CPU registers can be accessed from outside 6502.c.
The linkage of the 'Regs' variable in 6502.c was changed from static to extern. This makes the Regs type visible (and even alterable) from the outside. This change helps tools to inspect the CPU state. In particular, it was implemented to facilitate a tool that verifies opcode functionality using the '65x02' testsuite. But the change is also potentially useful for e.g. an online debugger that wants to inspect the CPU state while the 6502 is neing simulated.
This commit is contained in:
@@ -391,7 +391,7 @@ CPUType CPU;
|
||||
typedef void (*OPFunc) (void);
|
||||
|
||||
/* The CPU registers */
|
||||
static CPURegs Regs;
|
||||
CPURegs Regs;
|
||||
|
||||
/* Cycles for the current insn */
|
||||
static unsigned Cycles;
|
||||
|
||||
Reference in New Issue
Block a user