Initial commit

This commit is contained in:
Lauchmelder 2021-10-20 22:39:29 +02:00
commit 5aa8a64871
11 changed files with 243 additions and 0 deletions

38
NES Emulator/cpu.h Normal file
View file

@ -0,0 +1,38 @@
#ifndef _CPU_H_
#define _CPU_H_
#include "types.h"
struct Bus;
struct CPU
{
Byte acc;
Byte x, y;
Byte sp;
union
{
struct
{
Byte carry : 1;
Byte zero : 1;
Byte id : 1;
Byte decimal : 1;
Byte unused : 2;
Byte overflow : 1;
Byte negative : 1;
};
Byte raw;
} status;
Word pc;
struct Bus* bus;
};
struct CPU* createCPU(struct Bus* parent);
void destroyCPU(struct CPU* cpu);
#endif // _CPU_H_