ReactOS  0.4.14-dev-342-gdc047f9
vgavideo.h
Go to the documentation of this file.
1 // FIXME: Make these variables so we can also use modes like 800x600
2 #define SCREEN_X 640
3 #define SCREEN_Y 480
4 
5 #define SCREEN_STRIDE 80
6 
7 #define VGA_NORMAL 0
8 #define VGA_AND 8
9 #define VGA_OR 16
10 #define VGA_XOR 24
11 
12 //This is in mingw standard headers
13 //typedef struct { int quot, rem; } div_t;
14 
15 extern int maskbit[640];
16 extern int y80[480];
17 extern int xconv[640];
18 extern int bit8[640];
19 extern int startmasks[8];
20 extern int endmasks[8];
21 
22 extern UCHAR PreCalcReverseByte[256];
23 
24 extern PBYTE vidmem;
25 
26 #define MISC 0x3c2
27 #define SEQ 0x3c4
28 #define CRTC 0x3d4
29 #define GRAPHICS 0x3ce
30 #define FEATURE 0x3da
31 #define ATTRIB 0x3c0
32 #define STATUS 0x3da
33 
34 typedef struct _VideoMode {
35  unsigned short VidSeg;
36  unsigned char Misc;
37  unsigned char Feature;
38  unsigned char Seq[5];
39  unsigned char Crtc[25];
40  unsigned char Gfx[9];
41  unsigned char Attrib[21];
42 } VideoMode;
43 
48  UCHAR *b, UCHAR *g,
49  UCHAR *r, UCHAR *i);
53 INT __cdecl abs(INT nm);
54 BOOL VGADDIIntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2);
55 
56 #define SEQ_I 0x3C4 /* Sequencer Index */
57 #define SEQ_D 0x3C5 /* Sequencer Data Register */
58 
59 #define GRA_I 0x3CE /* Graphics Controller Index */
60 #define GRA_D 0x3CF /* Graphics Controller Data Register */
61 
62 #define LowByte(w) (*((unsigned char *)&(w) + 0))
63 #define HighByte(w) (*((unsigned char *)&(w) + 1))
64 
65 #define ASSIGNVP4(x, y, vp) vp = vidmem /* VBUF */ + (((x) + (y)*SCREEN_X) >> 3);
66 #define ASSIGNMK4(x, y, mask) mask = 0x80 >> ((x) & 7);
67 
68 void get_masks(int x, int w);
69 
70 #define mod8(n) ((n)&7)
71 #define mod2(n) ((n)&1)
72 void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta);
73 void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod);
74 void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ* Xlate);
75 void DIB_TransparentBltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, ULONG trans);
PBYTE vidmem
Definition: vgavideo.c:18
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define __cdecl
Definition: accygwin.h:79
int xconv[640]
Definition: vgavideo.c:14
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int bit8[640]
Definition: vgavideo.c:15
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
Definition: vgavideo.c:447
GLintptr offset
Definition: glext.h:5920
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void get_masks(int x, int w)
Definition: vgavideo.c:133
INT __cdecl abs(INT nm)
int32_t INT
Definition: typedefs.h:56
VOID vgaPreCalc(VOID)
VOID vgaPutPixel(INT x, INT y, UCHAR c)
Definition: vgavideo.c:163
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned char Feature
Definition: vgavideo.h:37
BOOL vgaVLine(INT x, INT y, INT len, UCHAR c)
Definition: vgavideo.c:308
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID vgaGetByte(ULONG offset, UCHAR *b, UCHAR *g, UCHAR *r, UCHAR *i)
int endmasks[8]
Definition: vgavideo.c:17
UCHAR PreCalcReverseByte[256]
Definition: vgavideo.c:11
struct _VideoMode VideoMode
INT vgaGetPixel(INT x, INT y)
BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
Definition: vgavideo.c:231
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ *Xlate)
Definition: vgavideo.c:491
VOID vgaPutByte(INT x, INT y, UCHAR c)
Definition: vgavideo.c:176
GLboolean GLboolean g
Definition: glext.h:6204
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
const GLubyte * c
Definition: glext.h:8905
unsigned char Gfx[9]
Definition: vgavideo.h:40
unsigned short VidSeg
Definition: vgavideo.h:35
int y80[480]
Definition: vgavideo.c:13
unsigned char UCHAR
Definition: xmlstorage.h:181
GLenum GLsizei len
Definition: glext.h:6722
int maskbit[640]
Definition: vgavideo.c:12
void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
Definition: vgavideo.c:352
unsigned char Attrib[21]
Definition: vgavideo.h:41
BOOL VGADDIIntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2)
Definition: vgavideo.c:333
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
unsigned char Crtc[25]
Definition: vgavideo.h:39
unsigned int ULONG
Definition: retypes.h:1
unsigned char Misc
Definition: vgavideo.h:36
BYTE * PBYTE
Definition: pedump.c:66
unsigned char Seq[5]
Definition: vgavideo.h:38
void DIB_TransparentBltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, ULONG trans)
Definition: vgavideo.c:536
int startmasks[8]
Definition: vgavideo.c:16