implemented registers
This commit is contained in:
parent
74b997c6c7
commit
155a7f7a04
5
Readme.org
Normal file
5
Readme.org
Normal file
@ -0,0 +1,5 @@
|
||||
* Chip8 Suite
|
||||
|
||||
Emulator and assembler for the Chip8.
|
||||
|
||||
See notes taken through the development in [[file:Notes.org][Notes.org]]
|
@ -3,10 +3,12 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "mem.h"
|
||||
#include "registers.h"
|
||||
|
||||
struct chip8
|
||||
{
|
||||
struct chip8_memory memory;
|
||||
struct chip8_registers registers;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -8,4 +8,6 @@
|
||||
#define CHIP8_DISPLAY_WIDTH 63
|
||||
#define CHIP8_DISPLAY_HEIGHT 32
|
||||
|
||||
#define CHIP8_TOTAL_DATA_REGISTERS 16
|
||||
|
||||
#endif
|
||||
|
16
include/registers.h
Normal file
16
include/registers.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef __REGISTERS_H
|
||||
#define __REGISTERS_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
struct chip8_registers
|
||||
{
|
||||
unsigned char V[CHIP8_TOTAL_DATA_REGISTERS];
|
||||
unsigned short I;
|
||||
unsigned char DT; // Delay timer
|
||||
unsigned char ST; // Delay timer
|
||||
unsigned short PC; // Program counter
|
||||
unsigned char SP; // Stack pointer
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user