-
Notifications
You must be signed in to change notification settings - Fork 3
/
svga.h
43 lines (30 loc) · 856 Bytes
/
svga.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
#ifndef SVGA_H
#define SVGA_H
#include <stdint.h>
#define VIDEO_WIDTH 800
#define VIDEO_HEIGHT 600
#define PIXELS_PER_BYTE 8
//==============================================================================
union VideoRAM {
union {
struct {
uint16_t offset [VIDEO_HEIGHT];
uint8_t pixels [VIDEO_HEIGHT][VIDEO_WIDTH / PIXELS_PER_BYTE];
};
uint8_t data [64 * 1024];
};
};
//==============================================================================
class SVGA
{
private:
static uint16_t hsync;
static uint16_t vsync;
static uint16_t signal;
static uint16_t line;
SVGA (void);
static void onHSync (void);
public:
static void begin (uint16_t hsync, uint16_t vsync, uint16_t signal);
};
#endif