ReactOS  0.4.13-dev-479-gec9c8fd
hercules.c File Reference
#include "remods.h"
#include "precomp.h"
#include "charset.h"
#include "logo.h"
Include dependency graph for hercules.c:

Go to the source code of this file.

Classes

struct  _attr
 

Functions

void SetForegroundColorHercules (ECOLORS col)
 
void SetBackgroundColorHercules (ECOLORS col)
 
void PrintGrafHercules (ULONG x, ULONG y, UCHAR c)
 
void FlushHercules (void)
 
void ShowCursorHercules (void)
 
void HideCursorHercules (void)
 
void CopyLineToHercules (USHORT dest, USHORT src)
 
void InvertLineHercules (ULONG line)
 
void HatchLineHercules (ULONG line)
 
void ClrLineHercules (ULONG line)
 
void PrintLogoHercules (BOOLEAN bShow)
 
void PrintCursorHercules (BOOLEAN bForce)
 
void SaveGraphicsStateHercules (void)
 
void RestoreGraphicsStateHercules (void)
 
BOOLEAN ConsoleInitHercules (void)
 
void ConsoleShutdownHercules (void)
 

Variables

BOOLEAN bRev =FALSE
 
UCHAR MGATable43 [] ={53,45,46, 7,96, 2,91,91, 2, 3, 0, 0, 0, 0, 0, 0}
 
PUCHAR pVgaOffset [4]
 
WINDOW wWindowHercGraph [4]
 
WINDOW wWindowHerc [4]
 
PUCHAR pScreenBufferHercules
 
struct _attr attr
 

Function Documentation

◆ ClrLineHercules()

void ClrLineHercules ( ULONG  line)

Definition at line 272 of file hercules.c.

273 {
274  ULONG j;
275  BOOLEAN bTemplateLine=( (USHORT)line==wWindow[DATA_WINDOW].y-1 ||
278  0);
279  ULONG _line = line<<3;
280  ULONG cc=0;
281  PUCHAR p;
282 
283 // ENTER_FUNC();
284 
286  {
287  DPRINT((0,"ClrLineHercules(): line %u is out of screen\n",line));
288  //LEAVE_FUNC();
289  return;
290  }
291 
292  if(attr.u.bits.bkcol == COLOR_CAPTION && attr.u.bits.fgcol == COLOR_TEXT )
293  cc=~cc;
294 
295  if(bTemplateLine)
296  {
297  for(j=0;j<8;j++,_line++)
298  {
299  p = (PUCHAR)(pVgaOffset[_line&3] + (90*(_line>>2)) );
300 
301 /*
302  if(j==2 || j==5)cc=0xFF;
303  else if(j==3)cc=0xaa;
304  else if(j==4)cc=0x55;
305  else cc = 0;*/
306  if(j==2 || j==5)cc=0xFF;
307  else cc = 0;
308 
310  }
311  }
312  else
313  {
314  for(j=0;j<8;j++,_line++)
315  {
316  p = (PUCHAR)(pVgaOffset[_line&3] + (90*(_line>>2)) );
317 
319  }
320  }
321  //LEAVE_FUNC();
322 }
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG GLOBAL_SCREEN_HEIGHT
Definition: hardware.c:62
unsigned char BOOLEAN
#define COLOR_TEXT
Definition: hardware.h:158
Definition: parser.c:48
void DPRINT(...)
Definition: polytest.cpp:61
WINDOW wWindow[4]
Definition: hardware.c:59
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 GLint GLint j
Definition: glfuncs.h:250
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
Definition: cookie.c:170
unsigned char UCHAR
Definition: xmlstorage.h:181
USHORT y
Definition: hardware.h:33
uint32_t cc
Definition: isohybrid.c:75
unsigned short USHORT
Definition: pedump.c:61
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
unsigned int ULONG
Definition: retypes.h:1
GLfloat GLfloat p
Definition: glext.h:8902
#define COLOR_CAPTION
Definition: hardware.h:156
void PICE_memset(void *p, unsigned char c, int sz)
Definition: utils.c:228

Referenced by ConsoleInitHercules().

◆ ConsoleInitHercules()

BOOLEAN ConsoleInitHercules ( void  )

Definition at line 398 of file hercules.c.

399 {
400  BOOLEAN bResult = FALSE;
401  PUCHAR pMGATable = MGATable43;
402  UCHAR i,reg,data;
404 
405  ENTER_FUNC();
406 
421 
424 
425  // init HERCULES adapter
426  outb_p(0,0x3b8);
427  outb_p(0x03,0x3bf);
428  for(i=0;i<sizeof(MGATable43);i++)
429  {
430  reg=i;
431  outb_p(reg,0x3b4);
432  data=pMGATable[i];
433  outb_p(data,0x3b5);
434  }
435  outb_p(0x0a,0x3b8);
436 
438 
439  GLOBAL_SCREEN_WIDTH = 90;
441 
442  attr.u.Asuchar = 0x07;
443  FrameBuffer.u.LowPart = 0xb0000;
445 
446  DPRINT((0,"VGA memory phys. 0xb0000 mapped to virt. 0x%x\n",pScreenBufferHercules));
447 
449  {
450  for(i=0;i<4;i++)
451  {
453  DPRINT((0,"VGA offset %u = 0x%.8X\n",i,pVgaOffset[i]));
454  }
455  bResult = TRUE;
456 
458 
459  EmptyRingBuffer();
460 
461  DPRINT((0,"ConsoleInitHercules() SUCCESS!\n"));
462  }
463 
464  LEAVE_FUNC();
465 
466  return bResult;
467 }
void(* PrintLogo)(BOOLEAN bShow)
Definition: hardware.h:47
void KeyboardFlushKeyboardQueue(void)
Definition: utils.c:1455
PUCHAR pScreenBufferHercules
Definition: hercules.c:79
#define TRUE
Definition: types.h:120
void InvertLineHercules(ULONG line)
Definition: hercules.c:213
void SetWindowGeometry(PVOID pWindow)
Definition: hardware.c:915
GLint x0
Definition: linetemp.h:95
void EmptyRingBuffer(void)
Definition: hardware.c:104
void(* FlushKeyboardQueue)(void)
Definition: hardware.h:61
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG GLOBAL_SCREEN_HEIGHT
Definition: hardware.c:62
void(* HideCursor)(void)
Definition: hardware.h:52
void CopyLineToHercules(USHORT dest, USHORT src)
Definition: hercules.c:186
void SetBackgroundColorHercules(ECOLORS col)
Definition: hercules.c:110
#define LEAVE_FUNC()
Definition: debug.h:43
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
WINDOW wWindowHercGraph[4]
Definition: hercules.c:63
#define FRAMEBUFFER_SIZE
Definition: precomp.h:31
void(* SetBackgroundColor)(ECOLORS)
Definition: hardware.h:54
void PrintGrafHercules(ULONG x, ULONG y, UCHAR c)
Definition: hercules.c:120
void(* SetForegroundColor)(ECOLORS)
Definition: hardware.h:53
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
void outb_p(UCHAR data, PUCHAR port)
Definition: utils.c:2159
void PrintCursorHercules(BOOLEAN bForce)
Definition: hercules.c:350
void(* ClrLine)(ULONG line)
Definition: hardware.h:44
void(* RestoreGraphicsState)(void)
Definition: hardware.h:50
unsigned char BOOLEAN
void PrintLogoHercules(BOOLEAN bShow)
Definition: hercules.c:328
void DPRINT(...)
Definition: polytest.cpp:61
void ShowCursorHercules(void)
Definition: hercules.c:158
void HideCursorHercules(void)
Definition: hercules.c:172
OUTPUT_HANDLERS ohandlers
Definition: hardware.c:65
UCHAR(* GetKeyPolled)(void)
Definition: hardware.h:60
void(* PrintGraf)(ULONG x, ULONG y, UCHAR c)
Definition: hardware.h:42
INPUT_HANDLERS ihandlers
Definition: hardware.c:66
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
void(* PrintCursor)(BOOLEAN bForce)
Definition: hardware.h:48
void(* ShowCursor)(void)
Definition: hardware.h:51
Definition: cookie.c:170
void SetForegroundColorHercules(ECOLORS col)
Definition: hercules.c:100
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
unsigned char UCHAR
Definition: xmlstorage.h:181
void SaveGraphicsStateHercules(void)
Definition: hercules.c:379
void(* Flush)(void)
Definition: hardware.h:43
void(* SaveGraphicsState)(void)
Definition: hardware.h:49
void(* HatchLine)(ULONG line)
Definition: hardware.h:46
static PVOID FrameBuffer
Definition: xboxvideo.c:24
void RestoreGraphicsStateHercules(void)
Definition: hercules.c:388
void(* CopyLineTo)(USHORT dest, USHORT src)
Definition: hardware.h:41
static int reg
Definition: i386-dis.c:1275
void(* InvertLine)(ULONG line)
Definition: hardware.h:45
UCHAR MGATable43[]
Definition: hercules.c:57
#define ENTER_FUNC()
Definition: debug.h:42
UCHAR KeyboardGetKeyPolled(void)
Definition: utils.c:1375
void ClrLineHercules(ULONG line)
Definition: hercules.c:272
void HatchLineHercules(ULONG line)
Definition: hercules.c:239
void FlushHercules(void)
Definition: hercules.c:149
void PICE_memset(void *p, unsigned char c, int sz)
Definition: utils.c:228

Referenced by ConsoleInit().

◆ ConsoleShutdownHercules()

void ConsoleShutdownHercules ( void  )

Definition at line 474 of file hercules.c.

475 {
476  ENTER_FUNC();
477 
478  // HERC video off
479  outb_p(0,0x3b8);
480  outb_p(0,0x3bf);
481 
484 
485  LEAVE_FUNC();
486 }
PUCHAR pScreenBufferHercules
Definition: hercules.c:79
#define LEAVE_FUNC()
Definition: debug.h:43
#define FRAMEBUFFER_SIZE
Definition: precomp.h:31
void outb_p(UCHAR data, PUCHAR port)
Definition: utils.c:2159
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193
#define ENTER_FUNC()
Definition: debug.h:42

Referenced by ConsoleShutdown().

◆ CopyLineToHercules()

void CopyLineToHercules ( USHORT  dest,
USHORT  src 
)

Definition at line 186 of file hercules.c.

187 {
188  USHORT i,j;
189  PULONG pDest,pSrc;
190 
191  ENTER_FUNC();
192 
193  dest <<= 3;
194  src <<= 3;
195  for(i=0;i<8;i++)
196  {
197  (PUCHAR)pDest = (PUCHAR)pScreenBufferHercules + ( ( ( dest+i )&3) <<13 )+ 90 * ((dest+i) >> 2);
198  (PUCHAR)pSrc = (PUCHAR)pScreenBufferHercules + ( ( ( src+i )&3) <<13 )+ 90 * ((src+i) >> 2);
199  for(j=0;j<(GLOBAL_SCREEN_WIDTH>>2);j++)
200  {
201  *pDest++=*pSrc++;
202  }
203  }
204 
205  LEAVE_FUNC();
206 }
PUCHAR pScreenBufferHercules
Definition: hercules.c:79
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
unsigned char * PUCHAR
Definition: retypes.h:3
#define LEAVE_FUNC()
Definition: debug.h:43
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
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 GLint GLint j
Definition: glfuncs.h:250
GLenum src
Definition: glext.h:6340
unsigned short USHORT
Definition: pedump.c:61
unsigned int * PULONG
Definition: retypes.h:1
#define ENTER_FUNC()
Definition: debug.h:42
static char * dest
Definition: rtl.c:135

Referenced by ConsoleInitHercules().

◆ FlushHercules()

void FlushHercules ( void  )

Definition at line 149 of file hercules.c.

150 {
151 }

Referenced by ConsoleInitHercules().

◆ HatchLineHercules()

void HatchLineHercules ( ULONG  line)

Definition at line 239 of file hercules.c.

240 {
241  USHORT cc;
242  ULONG i,j;
243  ULONG _line = (line<<3) ;
244  PUSHORT p;
245  USHORT mask_odd[]={0x8888,0x2222};
246  USHORT mask_even[]={0xaaaa,0x5555};
247  PUSHORT pmask;
248 
249  ENTER_FUNC();
250 
251  pmask = (line&1)?mask_odd:mask_even;
252 
253  for(j=0;j<8;j++,_line++)
254  {
255  p=(PUSHORT)( pVgaOffset[_line&3] + (90*(_line>>2)) );
256  for(i=0;i<(GLOBAL_SCREEN_WIDTH/sizeof(USHORT));i++)
257  {
258  cc = p[i];
259 
260  p[i]=(p[i]^pmask[j&1])|cc;
261  }
262  }
263 
264  LEAVE_FUNC();
265 }
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
#define LEAVE_FUNC()
Definition: debug.h:43
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
Definition: parser.c:48
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 GLint GLint j
Definition: glfuncs.h:250
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
uint32_t cc
Definition: isohybrid.c:75
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1
#define ENTER_FUNC()
Definition: debug.h:42
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short * PUSHORT
Definition: retypes.h:2

Referenced by ConsoleInitHercules().

◆ HideCursorHercules()

void HideCursorHercules ( void  )

Definition at line 172 of file hercules.c.

173 {
174  ENTER_FUNC();
175 
177 
178  LEAVE_FUNC();
179 }
BOOLEAN bCursorEnabled
Definition: hardware.c:51
#define LEAVE_FUNC()
Definition: debug.h:43
#define ENTER_FUNC()
Definition: debug.h:42

Referenced by ConsoleInitHercules().

◆ InvertLineHercules()

void InvertLineHercules ( ULONG  line)

Definition at line 213 of file hercules.c.

214 {
215  ULONG i,j;
216  ULONG _line = line<<3;
217  PUSHORT p;
218 
219  //ENTER_FUNC();
220 
221  for(j=0;j<8;j++)
222  {
223  p=(PUSHORT)( pVgaOffset[_line&3] + (90*(_line>>2)) );
224  for(i=0;i<(GLOBAL_SCREEN_WIDTH>>1);i++)
225  {
226  p[i]=~p[i];
227  }
228  _line++;
229  }
230 
231  //LEAVE_FUNC();
232 }
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
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
Definition: parser.c:48
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 GLint GLint j
Definition: glfuncs.h:250
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
unsigned int ULONG
Definition: retypes.h:1
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short * PUSHORT
Definition: retypes.h:2

Referenced by ConsoleInitHercules().

◆ PrintCursorHercules()

void PrintCursorHercules ( BOOLEAN  bForce)

Definition at line 350 of file hercules.c.

351 {
352  static ULONG count=0;
353 
354  if( (bForce) || ((count++>100) && bCursorEnabled) )
355  {
356  ULONG i;
357  ULONG x,y;
358  ULONG _line;
359 
362 
363  _line = y<<3;
364  for(i=0;i<8;i++,_line++)
365  {
366  *(PUCHAR)(pVgaOffset[_line & 0x3] + ( 90* (_line >> 2) ) + x) ^= 0xFF ;
367  }
368  bRev=!bRev;
369  count=0;
370  }
371 
373 }
BOOLEAN bCursorEnabled
Definition: hardware.c:51
GLuint GLuint GLsizei count
Definition: gl.h:1545
unsigned char * PUCHAR
Definition: retypes.h:3
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOLEAN bRev
Definition: hercules.c:53
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
WINDOW wWindow[4]
Definition: hardware.c:59
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
USHORT y
Definition: hardware.h:33
USHORT usCurX
Definition: hardware.h:34
USHORT usCurY
Definition: hardware.h:34
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:99

Referenced by ConsoleInitHercules().

◆ PrintGrafHercules()

void PrintGrafHercules ( ULONG  x,
ULONG  y,
UCHAR  c 
)

Definition at line 120 of file hercules.c.

121 {
122  ULONG i;
123  PUCHAR p;
124  ULONG _line = y<<3;
125 
127  return;
128 
129  p=&cGraphTable[(ULONG)c<<3];
130 
131  if((attr.u.bits.bkcol == COLOR_FOREGROUND && attr.u.bits.fgcol == COLOR_BACKGROUND) ||
132  (attr.u.bits.bkcol == COLOR_CAPTION && attr.u.bits.fgcol == COLOR_TEXT) )
133  for(i=0 ;i<8 ;i++,_line++)
134  {
135  *(PUCHAR)(pVgaOffset[_line & 0x3] + ( 90* (_line >> 2) ) + x) = ~*p++;
136  }
137  else
138  for(i=0 ;i<8 ;i++,_line++)
139  {
140  *(PUCHAR)(pVgaOffset[_line & 0x3] + ( 90* (_line >> 2) ) + x) = *p++;
141  }
142 }
PUCHAR pScreenBufferHercules
Definition: hercules.c:79
unsigned char * PUCHAR
Definition: retypes.h:3
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
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
UCHAR cGraphTable[8 *256]
Definition: charset.h:3
#define COLOR_TEXT
Definition: hardware.h:158
#define COLOR_FOREGROUND
Definition: hardware.h:160
PUCHAR pVgaOffset[4]
Definition: hercules.c:59
const GLubyte * c
Definition: glext.h:8905
Definition: cookie.c:170
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
unsigned int ULONG
Definition: retypes.h:1
#define COLOR_BACKGROUND
Definition: hardware.h:164
GLfloat GLfloat p
Definition: glext.h:8902
#define COLOR_CAPTION
Definition: hardware.h:156

Referenced by ConsoleInitHercules().

◆ PrintLogoHercules()

void PrintLogoHercules ( BOOLEAN  bShow)

Definition at line 328 of file hercules.c.

329 {
330  LONG x,y;
331  PUCHAR p;
332 
334  for(y=0;y<24;y++)
335  {
336  for(x=0;x<8;x++)
337  {
338  p[ ( 0x2000* (( y + 8 ) & 0x3) )+
339  ( 90* ( (y + 8 ) >> 2) )+
340  (81+x)] = cLogo[y*8+x];
341  }
342  }
343 }
PUCHAR pScreenBufferHercules
Definition: hercules.c:79
unsigned char * PUCHAR
Definition: retypes.h:3
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
long LONG
Definition: pedump.c:60
UCHAR cLogo[96]
Definition: logo.h:3
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by ConsoleInitHercules().

◆ RestoreGraphicsStateHercules()

void RestoreGraphicsStateHercules ( void  )

Definition at line 388 of file hercules.c.

389 {
390  // not implemented
391 }

Referenced by ConsoleInitHercules().

◆ SaveGraphicsStateHercules()

void SaveGraphicsStateHercules ( void  )

Definition at line 379 of file hercules.c.

380 {
381  // not implemented
382 }

Referenced by ConsoleInitHercules().

◆ SetBackgroundColorHercules()

void SetBackgroundColorHercules ( ECOLORS  col)

Definition at line 110 of file hercules.c.

111 {
112  attr.u.bits.bkcol = col;
113  attr.u.bits.blink = 0;
114 }
Definition: cookie.c:170

Referenced by ConsoleInitHercules().

◆ SetForegroundColorHercules()

void SetForegroundColorHercules ( ECOLORS  col)

Definition at line 100 of file hercules.c.

101 {
102  attr.u.bits.fgcol = col;
103  attr.u.bits.blink = 0;
104 }
Definition: cookie.c:170

Referenced by ConsoleInitHercules().

◆ ShowCursorHercules()

void ShowCursorHercules ( void  )

Definition at line 158 of file hercules.c.

159 {
160  ENTER_FUNC();
161 
163 
164  LEAVE_FUNC();
165 }
BOOLEAN bCursorEnabled
Definition: hardware.c:51
#define TRUE
Definition: types.h:120
#define LEAVE_FUNC()
Definition: debug.h:43
#define ENTER_FUNC()
Definition: debug.h:42

Referenced by ConsoleInitHercules().

Variable Documentation

◆ attr

◆ bRev

BOOLEAN bRev =FALSE

Definition at line 53 of file hercules.c.

Referenced by DebuggerShell(), and PrintCursorHercules().

◆ MGATable43

UCHAR MGATable43[] ={53,45,46, 7,96, 2,91,91, 2, 3, 0, 0, 0, 0, 0, 0}

Definition at line 57 of file hercules.c.

Referenced by ConsoleInitHercules().

◆ pScreenBufferHercules

PUCHAR pScreenBufferHercules

◆ pVgaOffset

◆ wWindowHerc

WINDOW wWindowHerc[4]
Initial value:
=
{
{1,3,1,0,FALSE},
{5,4,1,0,FALSE},
{10,9,1,0,FALSE},
{20,4,1,0,FALSE}
}

Definition at line 71 of file hercules.c.

◆ wWindowHercGraph

WINDOW wWindowHercGraph[4]
Initial value:
=
{
{1,3,1,0,FALSE},
{5,6,1,0,FALSE},
{12,19,1,0,FALSE},
{32,12,1,0,FALSE}
}

Definition at line 63 of file hercules.c.

Referenced by ConsoleInitHercules().