1
0
mirror of https://github.com/jborza/emu6502.git synced 2024-11-30 20:49:26 +00:00
emu6502/state.h

14 lines
348 B
C
Raw Normal View History

2019-04-13 08:02:18 +00:00
#pragma once
#include "flags.h"
2019-04-13 08:28:57 +00:00
#include "types.h"
2019-04-13 08:02:18 +00:00
typedef struct State6502 {
2019-04-13 08:28:57 +00:00
byte a; //accumulator
2019-04-13 21:59:48 +00:00
byte x; //x index
byte y; //y index
2019-04-13 08:28:57 +00:00
byte sp; //stack pointer, 256 byte stack between $0100 and $01FF
word pc; //program counter, points to the next instruction to be executed
byte* memory;
Flags flags; //CPU flags
2019-04-13 21:59:48 +00:00
int running;
2019-04-13 08:02:18 +00:00
} State6502;