ReactOS  0.4.15-dev-5137-g826bd41
font.c File Reference
#include "blue.h"
Include dependency graph for font.c:

Go to the source code of this file.

Functions

VOID OpenBitPlane (VOID)
 
VOID CloseBitPlane (VOID)
 
VOID LoadFont (_In_ PUCHAR Bitplane, _In_ PUCHAR FontBitfield)
 
VOID ScrSetFont (_In_ PUCHAR FontBitfield)
 

Function Documentation

◆ CloseBitPlane()

VOID CloseBitPlane ( VOID  )

Definition at line 71 of file font.c.

72 {
73  /* disable interrupts */
74  _disable();
75 
76  /* sequence reg */
81 
82  /* graphic reg */
86 
87  /* enable interrupts */
88  _enable();
89 }
void __cdecl _enable(void)
Definition: intrin_arm.h:373
#define SEQ_COMMAND
Definition: blue.h:88
#define SEQ_DATA
Definition: blue.h:89
#define SEQ_MEM_MODE
Definition: blue.h:97
#define SEQ_ENABLE_WRT_PLANE
Definition: blue.h:96
#define SEQ_RESET
Definition: blue.h:95
#define GCT_DATA
Definition: blue.h:92
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define GCT_RW_MODES
Definition: blue.h:101
#define GCT_GRAPH_MODE
Definition: blue.h:102
void __cdecl _disable(void)
Definition: intrin_arm.h:365
#define GCT_COMMAND
Definition: blue.h:91
#define GCT_READ_PLANE
Definition: blue.h:100

Referenced by ScrSetFont().

◆ LoadFont()

VOID LoadFont ( _In_ PUCHAR  Bitplane,
_In_ PUCHAR  FontBitfield 
)

Definition at line 92 of file font.c.

95 {
96  UINT32 i, j;
97 
98  for (i = 0; i < 256; i++)
99  {
100  for (j = 0; j < 8; j++)
101  {
102  *Bitplane = FontBitfield[i * 8 + j];
103  Bitplane++;
104  }
105 
106  // padding
107  for (j = 8; j < 32; j++)
108  {
109  *Bitplane = 0;
110  Bitplane++;
111  }
112  }
113 }
unsigned int UINT32
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
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

Referenced by ScrSetFont().

◆ OpenBitPlane()

VOID OpenBitPlane ( VOID  )

Definition at line 50 of file font.c.

51 {
52  /* disable interrupts */
53  _disable();
54 
55  /* sequence reg */
60 
61  /* graphic reg */
65 
66  /* enable interrupts */
67  _enable();
68 }
void __cdecl _enable(void)
Definition: intrin_arm.h:373
#define SEQ_COMMAND
Definition: blue.h:88
#define SEQ_DATA
Definition: blue.h:89
#define SEQ_MEM_MODE
Definition: blue.h:97
#define SEQ_ENABLE_WRT_PLANE
Definition: blue.h:96
#define SEQ_RESET
Definition: blue.h:95
#define GCT_DATA
Definition: blue.h:92
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define GCT_RW_MODES
Definition: blue.h:101
#define GCT_GRAPH_MODE
Definition: blue.h:102
void __cdecl _disable(void)
Definition: intrin_arm.h:365
#define GCT_COMMAND
Definition: blue.h:91
#define GCT_READ_PLANE
Definition: blue.h:100

Referenced by ScrSetFont().

◆ ScrSetFont()

VOID ScrSetFont ( _In_ PUCHAR  FontBitfield)

Definition at line 25 of file font.c.

27 {
29  PUCHAR Bitplane;
30 
31  /* open bit plane for font table access */
32  OpenBitPlane();
33 
34  /* get pointer to video memory */
35  BaseAddress.QuadPart = BITPLANE_BASE;
36  Bitplane = (PUCHAR)MmMapIoSpace(BaseAddress, 0xFFFF, MmNonCached);
37 
38  LoadFont(Bitplane, FontBitfield);
39 
40  MmUnmapIoSpace(Bitplane, 0xFFFF);
41 
42  /* close bit plane */
43  CloseBitPlane();
44 }
VOID CloseBitPlane(VOID)
Definition: font.c:71
unsigned char * PUCHAR
Definition: retypes.h:3
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
VOID LoadFont(_In_ PUCHAR Bitplane, _In_ PUCHAR FontBitfield)
Definition: font.c:92
#define BITPLANE_BASE
Definition: blue.h:74
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193
VOID OpenBitPlane(VOID)
Definition: font.c:50

Referenced by ScrAcquireOwnership(), and ScrIoControl().