1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-06-01 20:41:32 +00:00

Add structs representing current emulator state.

This commit is contained in:
Radosław Kujawa 2017-01-17 11:28:42 +01:00
parent d515954f44
commit aa362b81fd

View File

@ -18,6 +18,12 @@ typedef enum {
IABSOLUTEX
} addressing_t;
typedef enum {
STOPPED,
RUNNIG,
STEPPING
} emu_state_t;
struct reg_state {
uint8_t A; /* accumulator */
uint8_t X; /* index X */
@ -48,6 +54,14 @@ struct instruction {
typedef struct instruction instruction_t;
struct rk65c02emu {
emu_state_t state;
bus_t bus;
reg_state_t regs;
}
typedef struct rk65c02emu rk65c02emu_t;
#define OP_BRK 0x00
#define OP_TSB_ZP 0x04
#define OP_JSR 0x20