ReactOS  0.4.15-dev-1619-g69dffed
pc98video.c
Go to the documentation of this file.
1 /*
2  * PROJECT: FreeLoader
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Video support for NEC PC-98 series
5  * COPYRIGHT: Copyright 2020 Dmitry Borisov (di.sean@protonmail.com)
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include <freeldr.h>
11 #include <drivers/pc98/video.h>
12 
13 extern UCHAR BitmapFont8x16[];
14 extern BOOLEAN HiResoMachine;
15 
16 /* GLOBALS ********************************************************************/
17 
18 #define VGA_CHAR_SIZE 2
19 
20 #define TEXT_CHAR_SIZE 2
23 
24 #define CHAR_WIDTH 8
25 #define CHAR_HEIGHT 16
26 
27 #define SCREEN_WIDTH 640
28 #define SCREEN_HEIGHT 400
29 #define BYTES_PER_SCANLINE (SCREEN_WIDTH / 8)
30 
31 /* Use BIOS font; set to FALSE for built-in VGA font. */
33 /* Hardware accelerated text drawing; set to FALSE for non-accelerated
34  * self-drawing, which will allow more than 8 colors for text though.
35  * This option is possible only with BIOS fonts enabled. */
37 
39 
45 
46 static const PALETTE_ENTRY CgaPalette[] =
47 {
48  {0x00, 0x00, 0x00},
49  {0x00, 0x00, 0x0A},
50  {0x00, 0x0A, 0x00},
51  {0x00, 0x0A, 0x0A},
52  {0x0A, 0x00, 0x00},
53  {0x0A, 0x00, 0x0A},
54  {0x0A, 0x05, 0x00},
55  {0x0A, 0x0A, 0x0A},
56  {0x05, 0x05, 0x05},
57  {0x05, 0x05, 0x0F},
58  {0x05, 0x0F, 0x05},
59  {0x05, 0x0F, 0x0F},
60  {0x0F, 0x05, 0x05},
61  {0x0F, 0x05, 0x0F},
62  {0x0F, 0x0F, 0x05},
63  {0x0F, 0x0F, 0x0F}
64 };
65 
66 /* FUNCTIONS ******************************************************************/
67 
68 VOID
70 {
71  REGS Regs;
72  USHORT i;
73 
74  if (HiResoMachine)
75  {
81  TextCols = 80;
82  TextLines = 31;
83  }
84  else
85  {
91  TextCols = 80;
92  TextLines = 25;
93  }
94 
95  for (i = 0; i < VRAM_ATTR_SIZE; i += TEXT_CHAR_SIZE)
97 
98  /* Int 18h AH=41h
99  * CRT BIOS - Stop displaying graphics
100  */
101  Regs.b.ah = 0x41;
102  Int386(0x18, &Regs, &Regs);
103 
104  /* Int 18h AH=42h
105  * CRT BIOS - Set display area
106  *
107  * CH0-CH3 - always zero
108  * CH4 - video page
109  * CH5 - CRT display mode
110  * 0 - color
111  * 1 - monochrome
112  * CH6-CH7 - VRAM area
113  * 01 - Upper-half (16-32 kB), 640x200
114  * 10 - Lower-half (0-16 kB), 640x200
115  * 11 - All (0-32 kB), 640x400
116  */
117  Regs.b.ah = 0x42;
118  Regs.b.ch = 0xC0;
119  Int386(0x18, &Regs, &Regs); /* 640x400 */
120 
124 
125  Pc98VideoSync();
126  for (i = 0; i < RTL_NUMBER_OF(CgaPalette); i++)
128 
129  /* Int 18h AH=0Ah
130  * CRT BIOS - Set text screen mode
131  *
132  * AL0 - text rows
133  * 0 - 25
134  * 1 - 20
135  * AL1 - text cols
136  * 0 - 80
137  * 1 - 40
138  * AL2 - text attribute
139  * 0 - with vertical line
140  * 1 - normal
141  * AL3 - KCG access mode
142  * 0 - code
143  * 1 - bitmap
144  * AL4-AL7 - always zero
145  *
146  * High-resolution machine:
147  * AL4 - text rows, AL3 - KCG access mode
148  */
149  Regs.b.ah = 0x0A;
150  Regs.b.al = HiResoMachine ? 0x10 : 0x00;
151  Int386(0x18, &Regs, &Regs); /* 80x25(31) */
152 
153  /* Int 18h AH=0Ch
154  * CRT BIOS - Start displaying text
155  */
156  Regs.b.ah = 0x0C;
157  Int386(0x18, &Regs, &Regs);
158 
159  /* Int 18h AH=40h
160  * CRT BIOS - Start displaying graphics
161  */
162  Regs.b.ah = 0x40;
163  Int386(0x18, &Regs, &Regs);
164 }
165 
166 VOID
168 {
169  USHORT i;
170  USHORT B = (Attr & 0x10) ? 0xFFFF : 0;
171  USHORT G = (Attr & 0x20) ? 0xFFFF : 0;
172  USHORT R = (Attr & 0x40) ? 0xFFFF : 0;
173  USHORT I = (Attr & 0x80) ? 0xFFFF : 0;
174 
175  for (i = 0; i < VRAM_TEXT_SIZE; i += TEXT_CHAR_SIZE)
176  *(PUSHORT)(VramText + i) = ' ';
177 
178  for (i = 0; i < BYTES_PER_SCANLINE * SCREEN_HEIGHT; i += sizeof(USHORT))
179  {
180  *(PUSHORT)(VramPlaneB + i) = B;
181  *(PUSHORT)(VramPlaneG + i) = G;
182  *(PUSHORT)(VramPlaneR + i) = R;
183  *(PUSHORT)(VramPlaneI + i) = I;
184  }
185 }
186 
188 Pc98VideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
189 {
190  /* Not supported by hardware */
191  return VideoTextMode;
192 }
193 
194 VOID
196 {
197  *Width = SCREEN_WIDTH / CHAR_WIDTH;
198  *Height = SCREEN_HEIGHT / CHAR_HEIGHT;
199  *Depth = 0;
200 }
201 
202 ULONG
204 {
206 }
207 
208 VOID
210 {
211  *RomFontPointers = VramText + 0x4000;
212 }
213 
214 VOID
216 {
217  CSRWPARAM CursorParameters;
218 
219  RtlZeroMemory(&CursorParameters, sizeof(CSRWPARAM));
220  CursorParameters.CursorAddress = X + Y * TextCols;
221  CursorParameters.DotAddress = 0;
222 
224  WRITE_GDC_CSRW((PUCHAR)GDC1_IO_o_PARAM, &CursorParameters);
225 }
226 
227 VOID
229 {
230  CSRFORMPARAM CursorParameters;
231 
232  RtlZeroMemory(&CursorParameters, sizeof(CSRFORMPARAM));
233  CursorParameters.Show = Show;
234  CursorParameters.Blink = TRUE;
235  CursorParameters.BlinkRate = 12;
236  CursorParameters.LinesPerRow = 16;
237  CursorParameters.StartScanLine = 12;
238  CursorParameters.EndScanLine = 15;
239 
241  WRITE_GDC_CSRFORM((PUCHAR)GDC1_IO_o_PARAM, &CursorParameters);
242 }
243 
244 static
245 UCHAR
247 {
248  switch (Attr & 0xF)
249  {
250  case COLOR_BLACK:
251  return GDC_ATTR_BLACK;
252  case COLOR_BLUE:
253  return GDC_ATTR_BLUE;
254  case COLOR_GREEN:
255  case COLOR_LIGHTGREEN:
256  return GDC_ATTR_GREEN;
257  case COLOR_CYAN:
258  case COLOR_GRAY:
259  case COLOR_DARKGRAY:
260  case COLOR_WHITE:
261  return GDC_ATTR_WHITE;
262  case COLOR_RED:
263  case COLOR_LIGHTRED:
264  return GDC_ATTR_RED;
265  case COLOR_MAGENTA:
266  case COLOR_LIGHTMAGENTA:
267  return GDC_ATTR_PURPLE;
268  case COLOR_BROWN:
269  case COLOR_YELLOW:
270  return GDC_ATTR_YELLOW;
271  case COLOR_LIGHTBLUE:
272  case COLOR_LIGHTCYAN:
273  return GDC_ATTR_LIGHTBLUE;
274  default:
275  return GDC_ATTR_BLACK;
276  }
277 }
278 
279 static
280 USHORT
282 {
283  switch (Ch)
284  {
285  /* Only characters required for pseudographic are handled here */
286  case 0x18: return 0x1E;
287  case 0x19: return 0x1F;
288  case 0xB3: return 0x260B;
289  case 0xB6: return 0x4C0B;
290  case 0xBA: return 0x270B;
291  case 0xBB: return 0x370B;
292  case 0xBC: return 0x3F0B;
293  case 0xBF: return 0x340B;
294  case 0xC0: return 0x380B;
295  case 0xC4: return 0x240B;
296  case 0xC7: return 0x440B;
297  case 0xC8: return 0x3B0B;
298  case 0xC9: return 0x330B;
299  case 0xCD: return 0x250B;
300  case 0xD9: return 0x3C0B;
301  case 0xDA: return 0x300B;
302  case 0xDB: return 0x87;
303  default: return Ch;
304  }
305 }
306 
307 static
308 VOID
309 Pc98VideoTextRamPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
310 {
311  *(PUSHORT)(VramText + (X + Y * TextCols) * TEXT_CHAR_SIZE) = Ch;
313 }
314 
315 VOID
316 Pc98VideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
317 {
318  UCHAR Line;
319  UCHAR B = (Attr & 0x10) ? 0xFF : 0;
320  UCHAR G = (Attr & 0x20) ? 0xFF : 0;
321  UCHAR R = (Attr & 0x40) ? 0xFF : 0;
322  UCHAR I = (Attr & 0x80) ? 0xFF : 0;
323  ULONG VramOffset = X + (Y * CHAR_HEIGHT) * BYTES_PER_SCANLINE;
324  PUCHAR FontPtr = BitmapFont8x16 + Ch * 16;
325  BOOLEAN CGFont = UseCGFont && (Ch != LIGHT_FILL && Ch != MEDIUM_FILL && Ch != DARK_FILL);
326 
327  if (CGFont)
328  {
329  Ch = Pc98AsciiToJisX(Ch);
330 
331  if (CGAccelDraw)
332  {
333  Pc98VideoTextRamPutChar(Ch, Attr, X, Y);
334  }
335  else
336  {
337  /* Set needed character code to obtain glyph from CG Window */
340  }
341  }
342  else if (UseCGFont && CGAccelDraw)
343  {
344  /* Clear character at this place in Text RAM */
345  Pc98VideoTextRamPutChar(' ', Attr, X, Y);
346  }
347 
348  for (Line = 0; Line < CHAR_HEIGHT; Line++)
349  {
350  if (CGFont)
351  {
352  if (CGAccelDraw)
353  {
354  /* Character is already displayed by GDC (Text RAM),
355  * so display only background for it. */
356  FontPtr[Line] = 0;
357  }
358  else
359  {
360  /* Obtain glyph data from CG Window */
363  }
364  }
365  if (Attr & 0x0F)
366  {
367  *(PUCHAR)(VramPlaneB + VramOffset + Line * BYTES_PER_SCANLINE) = B | ((Attr & 0x01) ? FontPtr[Line] : 0);
368  *(PUCHAR)(VramPlaneG + VramOffset + Line * BYTES_PER_SCANLINE) = G | ((Attr & 0x02) ? FontPtr[Line] : 0);
369  *(PUCHAR)(VramPlaneR + VramOffset + Line * BYTES_PER_SCANLINE) = R | ((Attr & 0x04) ? FontPtr[Line] : 0);
370  *(PUCHAR)(VramPlaneI + VramOffset + Line * BYTES_PER_SCANLINE) = I | ((Attr & 0x08) ? FontPtr[Line] : 0);
371  }
372  else
373  {
374  *(PUCHAR)(VramPlaneB + VramOffset + Line * BYTES_PER_SCANLINE) = B & ~FontPtr[Line];
375  *(PUCHAR)(VramPlaneG + VramOffset + Line * BYTES_PER_SCANLINE) = G & ~FontPtr[Line];
376  *(PUCHAR)(VramPlaneR + VramOffset + Line * BYTES_PER_SCANLINE) = R & ~FontPtr[Line];
377  *(PUCHAR)(VramPlaneI + VramOffset + Line * BYTES_PER_SCANLINE) = I & ~FontPtr[Line];
378  }
379  }
380 }
381 
382 VOID
384 {
385  PUCHAR OffScreenBuffer = (PUCHAR)Buffer;
386  USHORT X, Y;
387 
388  for (Y = 0; Y < SCREEN_HEIGHT / CHAR_HEIGHT; Y++)
389  {
390  for (X = 0; X < SCREEN_WIDTH / CHAR_WIDTH; X++)
391  {
392  Pc98VideoPutChar(OffScreenBuffer[0], OffScreenBuffer[1], X, Y);
393  OffScreenBuffer += VGA_CHAR_SIZE;
394  }
395  }
396 }
397 
398 BOOLEAN
400 {
401  return FALSE;
402 }
403 
404 VOID
406 {
407  if (Color < 16)
408  {
413  }
414 }
415 
416 VOID
418 {
419  if (Color < 16)
420  {
425  }
426  else
427  {
428  *Red = 0;
429  *Green = 0;
430  *Blue = 0;
431  }
432 }
433 
434 VOID
436 {
438  NOTHING;
439 
441  NOTHING;
442 }
443 
444 VOID
446 {
447  REGS Regs;
448 
449  /* Int 18h AH=41h
450  * CRT BIOS - Stop displaying graphics
451  */
452  Regs.b.ah = 0x41;
453  Int386(0x18, &Regs, &Regs);
454 
456 
457  if (UseCGFont && CGAccelDraw)
458  {
459  /* Clear the text screen, resetting to default attributes */
460  for (USHORT i = 0; i < VRAM_TEXT_SIZE; i += TEXT_CHAR_SIZE)
461  {
462  *(PUSHORT)(VramText + i) = ' ';
464  }
465  }
466 }
VOID Pc98VideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: pc98video.c:383
#define GDC_COMMAND_CSRFORM
Definition: video.h:173
VOID Pc98VideoSync(VOID)
Definition: pc98video.c:435
UCHAR TextCols
Definition: pc98video.c:21
Definition: bl.h:202
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:814
#define R(b, x)
Definition: sha2.c:134
VOID Pc98VideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: pc98video.c:195
Definition: ehthrow.cxx:53
#define GDC2_IO_o_RED
Definition: video.h:277
#define DARK_FILL
Definition: ui.h:199
#define VRAM_HI_RESO_PLANE_G
Definition: video.h:29
#define COLOR_YELLOW
Definition: ui.h:219
#define COLOR_BLACK
Definition: ui.h:204
#define Y(I)
#define VRAM_NORMAL_PLANE_G
Definition: video.h:13
#define GDC_ATTR_PURPLE
Definition: video.h:54
UCHAR StartScanLine
Definition: video.h:180
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:22
#define VRAM_ATTR_SIZE
Definition: video.h:20
#define GDC2_IO_i_BLUE
Definition: video.h:267
#define TRUE
Definition: types.h:120
static ULONG VramPlaneB
Definition: pc98video.c:41
#define GDC2_IO_o_BLUE
Definition: video.h:278
#define COLOR_LIGHTBLUE
Definition: ui.h:214
#define VRAM_HI_RESO_TEXT
Definition: video.h:32
unsigned char * PUCHAR
Definition: retypes.h:3
BOOLEAN Pc98VideoIsPaletteFixed(VOID)
Definition: pc98video.c:399
#define KCG_IO_i_PATTERN
Definition: video.h:404
UCHAR BitmapFont8x16[]
Definition: vgafont.c:12
#define SCREEN_WIDTH
Definition: pc98video.c:27
static ULONG VramPlaneR
Definition: pc98video.c:43
unsigned char ah
Definition: pcbios.h:126
#define COLOR_LIGHTMAGENTA
Definition: ui.h:218
VOID Pc98VideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: pc98video.c:215
VOID Pc98VideoInit(VOID)
Definition: pc98video.c:69
Definition: bl.h:199
#define GDC2_IO_o_VIDEO_PAGE_ACCESS
Definition: video.h:274
ULONG G
Definition: xcpt4u.c:549
#define Ch(x, y, z)
Definition: sha2.c:141
#define GDC2_IO_o_VIDEO_PAGE
Definition: video.h:273
VOID Pc98VideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: pc98video.c:405
#define VRAM_NORMAL_PLANE_R
Definition: video.h:14
#define GDC_ATTR_GREEN
Definition: video.h:55
#define GDC2_IO_o_MODE_FLIPFLOP2
Definition: video.h:280
#define LIGHT_FILL
Definition: ui.h:197
int __cdecl Int386(int ivec, REGS *in, REGS *out)
#define TEXT_CHAR_SIZE
Definition: pc98video.c:20
struct Line Line
Definition: wdfdevice.h:4081
ULONG VramText
Definition: pc98video.c:40
VOID Pc98VideoHideShowTextCursor(BOOLEAN Show)
Definition: pc98video.c:228
#define VRAM_TEXT_ATTR_OFFSET
Definition: video.h:18
#define FALSE
Definition: types.h:117
VOID Pc98VideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: pc98video.c:209
#define VRAM_HI_RESO_PLANE_B
Definition: video.h:28
#define COLOR_DARKGRAY
Definition: ui.h:213
FORCEINLINE VOID WRITE_GDC_CSRFORM(PUCHAR Port, PCSRFORMPARAM CursorParameters)
Definition: video.h:186
VOID Pc98VideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: pc98video.c:316
#define CHAR_HEIGHT
Definition: pc98video.c:25
unsigned char BOOLEAN
UCHAR MachDefaultTextColor
Definition: pc98video.c:38
Definition: video.h:11
Definition: bufpool.h:45
#define COLOR_RED
Definition: ui.h:208
UCHAR EndScanLine
Definition: video.h:181
VOID Pc98VideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: pc98video.c:417
#define BYTES_PER_SCANLINE
Definition: pc98video.c:29
#define GDC2_IO_i_RED
Definition: video.h:266
#define SCREEN_HEIGHT
Definition: pc98video.c:28
#define VGA_CHAR_SIZE
Definition: pc98video.c:18
ULONG CursorAddress
Definition: video.h:154
#define VRAM_TEXT_SIZE
Definition: video.h:19
#define VRAM_NORMAL_PLANE_I
Definition: video.h:15
#define GDC_ATTR_YELLOW
Definition: video.h:57
#define KCG_IO_o_CHARCODE_HIGH
Definition: video.h:399
#define COLOR_BROWN
Definition: ui.h:210
static BOOLEAN CGAccelDraw
Definition: pc98video.c:36
#define COLOR_CYAN
Definition: ui.h:207
unsigned char ch
Definition: pcbios.h:132
#define COLOR_BLUE
Definition: ui.h:205
#define COLOR_LIGHTCYAN
Definition: ui.h:216
Definition: ncftp.h:79
#define GDC2_IO_o_PALETTE_INDEX
Definition: video.h:275
BOOLEAN HiResoMachine
Definition: machpc98.c:17
Definition: bl.h:200
unsigned char UCHAR
Definition: xmlstorage.h:181
#define VRAM_NORMAL_PLANE_B
Definition: video.h:12
#define COLOR_GREEN
Definition: ui.h:206
static BOOLEAN UseCGFont
Definition: pc98video.c:32
BYTEREGS b
Definition: pcbios.h:157
#define GDC2_IO_o_GREEN
Definition: video.h:276
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define COLOR_LIGHTRED
Definition: ui.h:217
#define GDC_ATTR_BLUE
Definition: video.h:52
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
#define I(s)
#define VRAM_NORMAL_TEXT
Definition: video.h:17
#define GDC_ATTR_WHITE
Definition: video.h:58
#define NOTHING
Definition: env_spec_w32.h:461
#define COLOR_WHITE
Definition: ui.h:220
unsigned char al
Definition: pcbios.h:125
static ULONG VramPlaneI
Definition: pc98video.c:44
#define KCG_IO_o_CHARCODE_LOW
Definition: video.h:400
static VOID Pc98VideoTextRamPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: pc98video.c:309
#define GDC_COMMAND_CSRW
Definition: video.h:151
BOOLEAN Show
Definition: video.h:176
FORCEINLINE VOID WRITE_GDC_CSRW(PUCHAR Port, PCSRWPARAM CursorParameters)
Definition: video.h:160
#define RomFontPointers
Definition: winldr.c:422
#define CHAR_WIDTH
Definition: pc98video.c:24
#define VRAM_HI_RESO_PLANE_I
Definition: video.h:31
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
#define VRAM_HI_RESO_PLANE_R
Definition: video.h:30
unsigned short USHORT
Definition: pedump.c:61
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define GDC_ATTR_RED
Definition: video.h:53
#define COLOR_MAGENTA
Definition: ui.h:209
#define GDC_STATUS_VSYNC
Definition: video.h:41
#define GDC_ATTR_BLACK
Definition: video.h:51
unsigned int * PULONG
Definition: retypes.h:1
#define B(row, col)
VOID Pc98VideoPrepareForReactOS(VOID)
Definition: pc98video.c:445
#define GDC2_IO_i_GREEN
Definition: video.h:265
UCHAR DotAddress
Definition: video.h:155
unsigned int ULONG
Definition: retypes.h:1
ULONG Pc98VideoGetBufferSize(VOID)
Definition: pc98video.c:203
Definition: pcbios.h:152
UCHAR BlinkRate
Definition: video.h:178
BOOLEAN Blink
Definition: video.h:177
#define GDC1_IO_o_PARAM
Definition: video.h:234
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
VIDEODISPLAYMODE Pc98VideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
Definition: pc98video.c:188
#define KCG_IO_o_LINE
Definition: video.h:401
static const PALETTE_ENTRY CgaPalette[]
Definition: pc98video.c:46
static USHORT Pc98AsciiToJisX(int Ch)
Definition: pc98video.c:281
#define GDC_ATTR_VISIBLE
Definition: video.h:45
static UCHAR Pc98VideoAttrToGdcAttr(UCHAR Attr)
Definition: pc98video.c:246
#define GDC1_IO_o_COMMAND
Definition: video.h:235
static ULONG VramPlaneG
Definition: pc98video.c:42
unsigned short * PUSHORT
Definition: retypes.h:2
#define MEDIUM_FILL
Definition: ui.h:198
UCHAR TextLines
Definition: pc98video.c:22
#define COLOR_LIGHTGREEN
Definition: ui.h:215
#define X(b, s)
#define GDC_ATTR_LIGHTBLUE
Definition: video.h:56
#define GDC2_IO_i_STATUS
Definition: video.h:260
UCHAR LinesPerRow
Definition: video.h:179
#define GDC2_MODE_COLORS_16
Definition: video.h:282
VOID Pc98VideoClearScreen(UCHAR Attr)
Definition: pc98video.c:167