feat: initial version

This commit is contained in:
Zoëy Noort 2025-05-05 18:50:56 +02:00
parent 0a67fb21d1
commit ee790e99d6
12 changed files with 798 additions and 0 deletions

23
hdrs/cpu.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef CPU_H
# define CPU_H
#include "./chip8.h"
#include <stdint.h>
typedef struct s_instruction
{
uint16_t opcode;
uint8_t type;
uint8_t x;
uint8_t y;
uint8_t n;
uint8_t nn;
uint16_t nnn;
} t_instruction;
uint16_t cpu_fetch(t_chip8 *emu);
t_instruction cpu_decode(uint16_t opcode);
void cpu_execute(t_chip8 *emu, t_instruction instruction);
#endif