Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:41

0001 /**
0002  * @file
0003  *
0004  * @ingroup RTEMSBSPsI386
0005  *
0006  * @brief CRT controller definitions.
0007  */
0008 
0009 /*
0010  * crt.h  - This file contains definitions for constants related to PC console.
0011  *          More information can be found at
0012  *  <http://millenium.atcg.com/~taco/helppc/tables.html>
0013  *
0014  * Copyright (C) 1998  Eric Valette (valette@crf.canon.fr)
0015  *                     Canon Centre Recherche France.
0016  *
0017  *  The license and distribution terms for this file may be
0018  *  found in the file LICENSE in this distribution or at
0019  *  http://www.rtems.org/license/LICENSE.
0020  */
0021 
0022 #ifndef _CRT_H
0023 #define _CRT_H
0024 
0025 /*
0026  * Bitmap video origins in text mode.
0027  */
0028 
0029     /* In monochrome */
0030 #define V_MONO  0xb0000
0031     /* In color  */
0032 #define V_COLOR 0xb8000
0033 
0034 /*
0035  * Video Option Byte location. It must be maintained
0036  * by the BIOS.
0037  */
0038 #define VIDEO_MODE_ADDR             0x449
0039 /*
0040  * Video controller base IO address location in
0041  * BIOS data area
0042  */
0043 #define DISPLAY_CRT_BASE_IO_ADDR    0x463
0044 /*
0045  * Number of collums and lines locations for the
0046  * actual video Configuration
0047  */
0048 #define NB_MAX_COL_ADDR         0x44a
0049 #define NB_MAX_ROW_ADDR         0x484
0050 
0051     /*
0052      * Miscellaneous information set by the BIOS in offset video_mode,
0053      */
0054 
0055 #   define VGAMODE7 0x7 /* VGA mode 7 */
0056 
0057     /* Color codes in text mode for background and foreground. */
0058 #define BLACK       0x0
0059 #define BLUE        0x1
0060 #define GREEN       0x2
0061 #define CYAN        0x3
0062 #define RED     0x4
0063 #define MAGENTA     0x5
0064 #define BROWN       0x6
0065 #define WHITE       0x7
0066 
0067 #define GRAY        0x8
0068 #define LT_BLUE     0x9
0069 #define LT_GREEN    0xa
0070 #define LT_CYAN     0xb
0071 #define LT_RED      0xc
0072 #define LT_MAGENTA  0xd
0073 #define YELLOW      0xe
0074 #define LT_WHITE    0xf
0075 
0076 #define BLINK           0x8 /* Mask used to determine blinking */
0077 #define OFF             0
0078 #define ON              1
0079 
0080 /*
0081  * CRT Controller register offset definitions
0082  */
0083 
0084 #   define CC_CURSSTART 0x0a    /* Cursor start scan line */
0085 #   define CC_CURSEND   0x0b    /* Cursor end scan line */
0086 #   define CC_STARTADDRHI 0x0c  /* start video ram addr msb */
0087 #   define CC_STARTADDRLO 0x0d  /* start video ram lsb */
0088 #   define CC_CURSHIGH  0x0e    /* Cursor high location (8 msb) */
0089 #   define CC_CURSLOW   0x0f    /* Cursor low location (8 msb) */
0090 #   define CC_VRETSTART 0x10    /* vertical synchro start lsb */
0091 #   define CC_VRETEND   0x11    /* vertical syn end (also it control) */
0092 #   define CC_VDISPEND  0x12    /* vertical display end lsb register */
0093 
0094 #endif /* _CRT_H */