1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-07-07 01:28:57 +00:00
rk65c02/src/rk65c02.h

34 lines
531 B
C
Raw Normal View History

2017-01-16 18:35:28 +00:00
#ifndef _RK6502_H_
#define _RK6502_H_
#include "bus.h"
#include "instruction.h"
typedef enum {
STOPPED,
RUNNIG,
STEPPING
} emu_state_t;
struct reg_state {
uint8_t A; /* accumulator */
uint8_t X; /* index X */
uint8_t Y; /* index Y */
uint16_t PC; /* program counter */
uint8_t SP; /* stack pointer */
uint8_t P; /* status */
};
typedef struct reg_state reg_state_t;
struct rk65c02emu {
emu_state_t state;
bus_t bus;
reg_state_t regs;
2017-01-16 18:35:28 +00:00
};
typedef struct rk65c02emu rk65c02emu_t;
2017-01-16 18:35:28 +00:00
#endif