#ifndef CPU_CORE_H #define CPU_CORE_H typedef unsigned char byte; typedef unsigned short address; extern byte acc; extern byte X; extern byte Y; extern byte P; extern byte S; extern address PC; extern byte* Memory; extern byte* ROM; enum Addressing { eImmediate, eAccumulator, eZeroPage, eZeroPageIndexedX, eZeroPageIndexedY, eAbsolute, eAbsoluteIndexedX, eAbsoluteIndexedY, eIndexedIndirect, eIndirectIndexed, eImplied, eIndirectAbsolute, eRelative }; typedef int Addressing; typedef struct AddData { int cycles; int length; address add; byte value; } AddData; byte getMemory(address x); void setMemory(address x, byte y); extern void *current_instruction; extern AddData idata; extern void (*func)(Addressing, address); #endif