-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchip8.h
44 lines (36 loc) · 899 Bytes
/
chip8.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern uint8_t canvas_data[3][8192];
extern uint16_t opcode;
extern uint8_t memory[0x10000];
extern uint8_t SV[8];
extern uint8_t V[16];
extern uint16_t I;
extern uint16_t pc;
extern int16_t delay_timer;
extern int16_t sound_timer;
extern uint16_t stack[16];
extern uint8_t sp;
extern uint8_t keys[16];
extern bool drawFlag;
extern bool paused;
extern bool playing;
extern bool extendedScreen;
extern bool xochip;
extern uint8_t pattern[16];
extern uint8_t plane;
extern uint8_t screen_width;
extern uint8_t screen_height;
extern uint16_t pixel_number;
extern uint8_t game_data[3584];
extern uint8_t controlMap[16];
void loadFontset(void);
void initialize(void);
bool loadProgram(char *fileName);
void emulateCycle(uint8_t steps);
//void setKeys(void);