[941f6f3] | 1 | /* |
---|
| 2 | * crt.h - This file contains definitions for constants related to PC console. |
---|
| 3 | * More information can be found at |
---|
| 4 | * <http://millenium.atcg.com/~taco/helppc/tables.html> |
---|
| 5 | * |
---|
| 6 | * Copyright (C) 1998 valette@crf.canon.fr |
---|
| 7 | * |
---|
| 8 | * Canon Centre Recherche France. |
---|
| 9 | * |
---|
| 10 | * This code is free software; you can redistribute it and/or |
---|
| 11 | * modify it under the terms of the GNU Library General Public |
---|
| 12 | * License as published by the Free Software Foundation; either |
---|
| 13 | * version 2 of the License, or (at your option) any later version. |
---|
| 14 | * |
---|
| 15 | * This code is distributed in the hope that it will be useful, |
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 18 | * Library General Public License for more details. |
---|
| 19 | * |
---|
| 20 | * You should have received a copy of the GNU Library General Public |
---|
| 21 | * License along with this library; if not, write to the Free Software |
---|
| 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
| 23 | * |
---|
| 24 | * $Header$ |
---|
| 25 | */ |
---|
| 26 | |
---|
| 27 | #ifndef _CRT_H |
---|
| 28 | #define _CRT_H |
---|
| 29 | |
---|
| 30 | /* |
---|
| 31 | * Bitmap video origins in text mode. |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | /* In monochrome */ |
---|
| 35 | #define V_MONO 0xb0000 |
---|
| 36 | /* In color */ |
---|
| 37 | #define V_COLOR 0xb8000 |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | /* |
---|
| 41 | * Video Option Byte location. It must be maintained |
---|
| 42 | * by the BIOS. |
---|
| 43 | */ |
---|
| 44 | #define VIDEO_MODE_ADDR 0x449 |
---|
| 45 | /* |
---|
| 46 | * Video controller base IO address location in |
---|
| 47 | * BIOS data area |
---|
| 48 | */ |
---|
| 49 | #define DISPLAY_CRT_BASE_IO_ADDR 0x463 |
---|
| 50 | /* |
---|
| 51 | * Number of collums and lines locations for the |
---|
| 52 | * actual video Configuration |
---|
| 53 | */ |
---|
| 54 | #define NB_MAX_COL_ADDR 0x44a |
---|
| 55 | #define NB_MAX_ROW_ADDR 0x484 |
---|
| 56 | |
---|
| 57 | /* |
---|
| 58 | * Miscellaneous information set by the BIOS in offset video_mode, |
---|
| 59 | */ |
---|
| 60 | |
---|
| 61 | # define VGAMODE7 0x7 /* VGA mode 7 */ |
---|
| 62 | |
---|
| 63 | /* Color codes in text mode for background and foreground. */ |
---|
| 64 | #define BLACK 0x0 |
---|
| 65 | #define BLUE 0x1 |
---|
| 66 | #define GREEN 0x2 |
---|
| 67 | #define CYAN 0x3 |
---|
| 68 | #define RED 0x4 |
---|
| 69 | #define MAGENTA 0x5 |
---|
| 70 | #define BROWN 0x6 |
---|
| 71 | #define WHITE 0x7 |
---|
| 72 | |
---|
| 73 | #define GRAY 0x8 |
---|
| 74 | #define LT_BLUE 0x9 |
---|
| 75 | #define LT_GREEN 0xa |
---|
| 76 | #define LT_CYAN 0xb |
---|
| 77 | #define LT_RED 0xc |
---|
| 78 | #define LT_MAGENTA 0xd |
---|
| 79 | #define YELLOW 0xe |
---|
| 80 | #define LT_WHITE 0xf |
---|
| 81 | |
---|
| 82 | #define BLINK 0x8 /* Mask used to determine blinking */ |
---|
| 83 | #define OFF 0 |
---|
| 84 | #define ON 1 |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | /* |
---|
| 88 | * CRT Controller register offset definitions |
---|
| 89 | */ |
---|
| 90 | |
---|
| 91 | # define CC_CURSSTART 0x0a /* Cursor start scan line */ |
---|
| 92 | # define CC_CURSEND 0x0b /* Cursor end scan line */ |
---|
| 93 | # define CC_STARTADDRHI 0x0c /* start video ram addr msb */ |
---|
| 94 | # define CC_STARTADDRLO 0x0d /* start video ram lsb */ |
---|
| 95 | # define CC_CURSHIGH 0x0e /* Cursor high location (8 msb) */ |
---|
| 96 | # define CC_CURSLOW 0x0f /* Cursor low location (8 msb) */ |
---|
| 97 | # define CC_VRETSTART 0x10 /* vertical synchro start lsb */ |
---|
| 98 | # define CC_VRETEND 0x11 /* vertical syn end (also it control) */ |
---|
| 99 | # define CC_VDISPEND 0x12 /* vertical display end lsb register */ |
---|
| 100 | |
---|
| 101 | #endif /* _CRT_H */ |
---|