diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-02-16 01:04:44 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-02-16 01:04:44 +0100 |
commit | 560bd53d0e893a91a1bbc37fdaa1207ca2952a18 (patch) | |
tree | a6126de23df09b7d30b6523511141dd3c73fd2ab /src/ahoy/emulator.h | |
parent | 8bd68f14846a7a33057d47d05b420177e89fbe85 (diff) |
Implement a working SDL GUI
Diffstat (limited to 'src/ahoy/emulator.h')
-rw-r--r-- | src/ahoy/emulator.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ahoy/emulator.h b/src/ahoy/emulator.h index e9ba11f..56b5545 100644 --- a/src/ahoy/emulator.h +++ b/src/ahoy/emulator.h @@ -3,7 +3,28 @@ #include <mbstring.h> +/* Uppercase variables represent registers. The following registers exist: + + Vx — 16 general-purpose registers + DT — delay timer + ST — sound timer + SP — stack pointer + PC — program counter + I — register to hold addresses + */ +struct chip8 { + bool needs_redraw; + bool kbd[16]; + uint8_t V[16]; + uint8_t DT, ST, SP; + uint16_t PC, I; + uint16_t callstack[16]; + uint64_t screen[32]; +}; + void emuinit(struct u8view); void emutick(void); +extern struct chip8 c8; + #endif /* !AHOY_AHOY_EMULATOR_H */ |