-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathega.h
45 lines (37 loc) · 786 Bytes
/
ega.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
45
/*
* ega.h
*
* Created on: Jan 3, 2019
* Author: pedward
*/
#ifndef EGA_H_
#define EGA_H_
#define GDCi 0x3CE
#define ATCi 0x3C0
#define SCi 0x3C4
#include "image.h"
#include "adapter.h"
class ega : public adapter
{
protected:
static const adapter::video_mode video_modes[];
Mode _savedvmode;
protected:
void write_crtc(unsigned int port, unsigned char reg, unsigned char val);
bool x16mode(void);
public:
ega(void);
~ega(void);
bool setup(void);
bool setpalette(palette::pal_type pal);
bool setpalette(palette::pal_t *pal, int palette_entries);
bool graphmode(Mode mode);
adapter::Mode getmode(void);
bool textmode(void);
void setmode(Mode mode);
void cls(void);
void update(void);
void vsync(void);
void translate(ptr_t src);
};
#endif /* EGA_H_ */