diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-19 14:27:00 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-19 14:27:00 +0100 |
commit | e7038f60b8a8372ce48b58d81e166a6c7e896f04 (patch) | |
tree | 8f88af1ba77bf8676c045aee7367b6ce2c8d0491 /emulator.h | |
parent | Feature: Added basic rom loading (diff) | |
download | CHIP8-Emulator-e7038f60b8a8372ce48b58d81e166a6c7e896f04.tar.gz CHIP8-Emulator-e7038f60b8a8372ce48b58d81e166a6c7e896f04.tar.bz2 CHIP8-Emulator-e7038f60b8a8372ce48b58d81e166a6c7e896f04.zip |
Feature: Added registers
Diffstat (limited to 'emulator.h')
-rw-r--r-- | emulator.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/emulator.h b/emulator.h index edffa47..c8114cb 100644 --- a/emulator.h +++ b/emulator.h @@ -6,8 +6,30 @@ typedef struct { + // general purpose registers + uint8_t V0; + uint8_t V1; + uint8_t V2; + uint8_t V3; + uint8_t V4; + uint8_t V5; + uint8_t V6; + uint8_t V7; + uint8_t V8; + uint8_t V9; + uint8_t VA; + uint8_t VB; + uint8_t VC; + uint8_t VD; + uint8_t VE; + uint8_t VF; //flag register +} Registers; + +typedef struct +{ uint8_t is_on; uint16_t pc; + Registers regs; uint8_t memory[4096]; } Emulator; |