Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 1 | /* |
Vikram Narayanan | cc16cca | 2012-01-25 20:40:40 +0530 | [diff] [blame] | 2 | * Copyright (C) 2007-2009 Luc Verhaegen <libv@skynet.be> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it |
| 5 | * under the terms of the GNU General Public License as published by the Free |
| 6 | * Software Foundation; either version 2 of the License, or (at your option) |
| 7 | * any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 12 | * more details. |
Vikram Narayanan | cc16cca | 2012-01-25 20:40:40 +0530 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | #include "vga.h" |
| 16 | |
| 17 | /* |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 18 | * Basic palette. |
| 19 | */ |
Vikram Narayanan | cc16cca | 2012-01-25 20:40:40 +0530 | [diff] [blame] | 20 | const struct palette |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 21 | default_vga_palette[0x100] = { |
| 22 | { 0x00, 0x00, 0x00}, |
| 23 | { 0x00, 0x00, 0x2A}, |
| 24 | { 0x00, 0x2A, 0x00}, |
| 25 | { 0x00, 0x2A, 0x2A}, |
| 26 | { 0x2A, 0x00, 0x00}, |
| 27 | { 0x2A, 0x00, 0x2A}, |
| 28 | { 0x2A, 0x15, 0x00}, |
| 29 | { 0x2A, 0x2A, 0x2A}, |
| 30 | { 0x15, 0x15, 0x15}, |
| 31 | { 0x15, 0x15, 0x3F}, |
| 32 | { 0x15, 0x3F, 0x15}, |
| 33 | { 0x15, 0x3F, 0x3F}, |
| 34 | { 0x3F, 0x15, 0x15}, |
| 35 | { 0x3F, 0x15, 0x3F}, |
| 36 | { 0x3F, 0x3F, 0x15}, |
| 37 | { 0x3F, 0x3F, 0x3F}, |
| 38 | { 0x00, 0x00, 0x00}, |
| 39 | { 0x05, 0x05, 0x05}, |
| 40 | { 0x08, 0x08, 0x08}, |
| 41 | { 0x0B, 0x0B, 0x0B}, |
| 42 | { 0x0E, 0x0E, 0x0E}, |
| 43 | { 0x11, 0x11, 0x11}, |
| 44 | { 0x16, 0x16, 0x16}, |
| 45 | { 0x18, 0x18, 0x18}, |
| 46 | { 0x1C, 0x1C, 0x1C}, |
| 47 | { 0x20, 0x20, 0x20}, |
| 48 | { 0x24, 0x24, 0x24}, |
| 49 | { 0x28, 0x28, 0x28}, |
| 50 | { 0x2D, 0x2D, 0x2D}, |
| 51 | { 0x32, 0x32, 0x32}, |
| 52 | { 0x38, 0x38, 0x38}, |
| 53 | { 0x3F, 0x3F, 0x3F}, |
| 54 | { 0x00, 0x00, 0x3F}, |
| 55 | { 0x20, 0x00, 0x3F}, |
| 56 | { 0x1F, 0x00, 0x3F}, |
| 57 | { 0x2F, 0x00, 0x3F}, |
| 58 | { 0x3F, 0x00, 0x3F}, |
| 59 | { 0x3F, 0x00, 0x2F}, |
| 60 | { 0x3F, 0x00, 0x1F}, |
| 61 | { 0x3F, 0x00, 0x20}, |
| 62 | { 0x3F, 0x00, 0x00}, |
| 63 | { 0x3F, 0x20, 0x00}, |
| 64 | { 0x3F, 0x1F, 0x00}, |
| 65 | { 0x3F, 0x2F, 0x00}, |
| 66 | { 0x3F, 0x3F, 0x00}, |
| 67 | { 0x2F, 0x3F, 0x00}, |
| 68 | { 0x1F, 0x3F, 0x00}, |
| 69 | { 0x20, 0x3F, 0x00}, |
| 70 | { 0x00, 0x3F, 0x00}, |
| 71 | { 0x00, 0x3F, 0x20}, |
| 72 | { 0x00, 0x3F, 0x1F}, |
| 73 | { 0x00, 0x3F, 0x2F}, |
| 74 | { 0x00, 0x3F, 0x3F}, |
| 75 | { 0x00, 0x2F, 0x3F}, |
| 76 | { 0x00, 0x1F, 0x3F}, |
| 77 | { 0x00, 0x20, 0x3F}, |
| 78 | { 0x1F, 0x1F, 0x3F}, |
| 79 | { 0x27, 0x1F, 0x3F}, |
| 80 | { 0x2F, 0x1F, 0x3F}, |
| 81 | { 0x37, 0x1F, 0x3F}, |
| 82 | { 0x3F, 0x1F, 0x3F}, |
| 83 | { 0x3F, 0x1F, 0x37}, |
| 84 | { 0x3F, 0x1F, 0x2F}, |
| 85 | { 0x3F, 0x1F, 0x27}, |
| 86 | { 0x3F, 0x1F, 0x1F}, |
| 87 | { 0x3F, 0x27, 0x1F}, |
| 88 | { 0x3F, 0x2F, 0x1F}, |
| 89 | { 0x3F, 0x37, 0x1F}, |
| 90 | { 0x3F, 0x3F, 0x1F}, |
| 91 | { 0x37, 0x3F, 0x1F}, |
| 92 | { 0x2F, 0x3F, 0x1F}, |
| 93 | { 0x27, 0x3F, 0x1F}, |
| 94 | { 0x1F, 0x3F, 0x1F}, |
| 95 | { 0x1F, 0x3F, 0x27}, |
| 96 | { 0x1F, 0x3F, 0x2F}, |
| 97 | { 0x1F, 0x3F, 0x37}, |
| 98 | { 0x1F, 0x3F, 0x3F}, |
| 99 | { 0x1F, 0x37, 0x3F}, |
| 100 | { 0x1F, 0x2F, 0x3F}, |
| 101 | { 0x1F, 0x27, 0x3F}, |
| 102 | { 0x2D, 0x2D, 0x3F}, |
| 103 | { 0x31, 0x2D, 0x3F}, |
| 104 | { 0x36, 0x2D, 0x3F}, |
| 105 | { 0x3A, 0x2D, 0x3F}, |
| 106 | { 0x3F, 0x2D, 0x3F}, |
| 107 | { 0x3F, 0x2D, 0x3A}, |
| 108 | { 0x3F, 0x2D, 0x36}, |
| 109 | { 0x3F, 0x2D, 0x31}, |
| 110 | { 0x3F, 0x2D, 0x2D}, |
| 111 | { 0x3F, 0x31, 0x2D}, |
| 112 | { 0x3F, 0x36, 0x2D}, |
| 113 | { 0x3F, 0x3A, 0x2D}, |
| 114 | { 0x3F, 0x3F, 0x2D}, |
| 115 | { 0x3A, 0x3F, 0x2D}, |
| 116 | { 0x36, 0x3F, 0x2D}, |
| 117 | { 0x31, 0x3F, 0x2D}, |
| 118 | { 0x2D, 0x3F, 0x2D}, |
| 119 | { 0x2D, 0x3F, 0x31}, |
| 120 | { 0x2D, 0x3F, 0x36}, |
| 121 | { 0x2D, 0x3F, 0x3A}, |
| 122 | { 0x2D, 0x3F, 0x3F}, |
| 123 | { 0x2D, 0x3A, 0x3F}, |
| 124 | { 0x2D, 0x36, 0x3F}, |
| 125 | { 0x2D, 0x31, 0x3F}, |
| 126 | { 0x00, 0x00, 0x1C}, |
| 127 | { 0x07, 0x00, 0x1C}, |
| 128 | { 0x0E, 0x00, 0x1C}, |
| 129 | { 0x15, 0x00, 0x1C}, |
| 130 | { 0x1C, 0x00, 0x1C}, |
| 131 | { 0x1C, 0x00, 0x15}, |
| 132 | { 0x1C, 0x00, 0x0E}, |
| 133 | { 0x1C, 0x00, 0x07}, |
| 134 | { 0x1C, 0x00, 0x00}, |
| 135 | { 0x1C, 0x07, 0x00}, |
| 136 | { 0x1C, 0x0E, 0x00}, |
| 137 | { 0x1C, 0x15, 0x00}, |
| 138 | { 0x1C, 0x1C, 0x00}, |
| 139 | { 0x15, 0x1C, 0x00}, |
| 140 | { 0x0E, 0x1C, 0x00}, |
| 141 | { 0x07, 0x1C, 0x00}, |
| 142 | { 0x00, 0x1C, 0x00}, |
| 143 | { 0x00, 0x1C, 0x07}, |
| 144 | { 0x00, 0x1C, 0x0E}, |
| 145 | { 0x00, 0x1C, 0x15}, |
| 146 | { 0x00, 0x1C, 0x1C}, |
| 147 | { 0x00, 0x15, 0x1C}, |
| 148 | { 0x00, 0x0E, 0x1C}, |
| 149 | { 0x00, 0x07, 0x1C}, |
| 150 | { 0x0E, 0x0E, 0x1C}, |
| 151 | { 0x11, 0x0E, 0x1C}, |
| 152 | { 0x15, 0x0E, 0x1C}, |
| 153 | { 0x18, 0x0E, 0x1C}, |
| 154 | { 0x1C, 0x0E, 0x1C}, |
| 155 | { 0x1C, 0x0E, 0x18}, |
| 156 | { 0x1C, 0x0E, 0x15}, |
| 157 | { 0x1C, 0x0E, 0x11}, |
| 158 | { 0x1C, 0x0E, 0x0E}, |
| 159 | { 0x1C, 0x11, 0x0E}, |
| 160 | { 0x1C, 0x15, 0x0E}, |
| 161 | { 0x1C, 0x18, 0x0E}, |
| 162 | { 0x1C, 0x1C, 0x0E}, |
| 163 | { 0x18, 0x1C, 0x0E}, |
| 164 | { 0x15, 0x1C, 0x0E}, |
| 165 | { 0x11, 0x1C, 0x0E}, |
| 166 | { 0x0E, 0x1C, 0x0E}, |
| 167 | { 0x0E, 0x1C, 0x11}, |
| 168 | { 0x0E, 0x1C, 0x15}, |
| 169 | { 0x0E, 0x1C, 0x18}, |
| 170 | { 0x0E, 0x1C, 0x1C}, |
| 171 | { 0x0E, 0x18, 0x1C}, |
| 172 | { 0x0E, 0x15, 0x1C}, |
| 173 | { 0x0E, 0x11, 0x1C}, |
| 174 | { 0x16, 0x16, 0x1C}, |
| 175 | { 0x16, 0x16, 0x1C}, |
| 176 | { 0x18, 0x16, 0x1C}, |
| 177 | { 0x1A, 0x16, 0x1C}, |
| 178 | { 0x1C, 0x16, 0x1C}, |
| 179 | { 0x1C, 0x16, 0x1A}, |
| 180 | { 0x1C, 0x16, 0x18}, |
| 181 | { 0x1C, 0x16, 0x16}, |
| 182 | { 0x1C, 0x16, 0x16}, |
| 183 | { 0x1C, 0x16, 0x16}, |
| 184 | { 0x1C, 0x18, 0x16}, |
| 185 | { 0x1C, 0x1A, 0x16}, |
| 186 | { 0x1C, 0x1C, 0x16}, |
| 187 | { 0x1A, 0x1C, 0x16}, |
| 188 | { 0x18, 0x1C, 0x16}, |
| 189 | { 0x16, 0x1C, 0x16}, |
| 190 | { 0x16, 0x1C, 0x16}, |
| 191 | { 0x16, 0x1C, 0x16}, |
| 192 | { 0x16, 0x1C, 0x18}, |
| 193 | { 0x16, 0x1C, 0x1A}, |
| 194 | { 0x16, 0x1C, 0x1C}, |
| 195 | { 0x16, 0x1A, 0x1C}, |
| 196 | { 0x16, 0x18, 0x1C}, |
| 197 | { 0x16, 0x16, 0x1C}, |
| 198 | { 0x00, 0x00, 0x20}, |
| 199 | { 0x04, 0x00, 0x20}, |
| 200 | { 0x08, 0x00, 0x20}, |
| 201 | { 0x0C, 0x00, 0x20}, |
| 202 | { 0x20, 0x00, 0x20}, |
| 203 | { 0x20, 0x00, 0x0C}, |
| 204 | { 0x20, 0x00, 0x08}, |
| 205 | { 0x20, 0x00, 0x04}, |
| 206 | { 0x20, 0x00, 0x00}, |
| 207 | { 0x20, 0x04, 0x00}, |
| 208 | { 0x20, 0x08, 0x00}, |
| 209 | { 0x20, 0x0C, 0x00}, |
| 210 | { 0x20, 0x20, 0x00}, |
| 211 | { 0x0C, 0x20, 0x00}, |
| 212 | { 0x08, 0x20, 0x00}, |
| 213 | { 0x04, 0x20, 0x00}, |
| 214 | { 0x00, 0x20, 0x00}, |
| 215 | { 0x00, 0x20, 0x04}, |
| 216 | { 0x00, 0x20, 0x08}, |
| 217 | { 0x00, 0x20, 0x0C}, |
| 218 | { 0x00, 0x20, 0x20}, |
| 219 | { 0x00, 0x0C, 0x20}, |
| 220 | { 0x00, 0x08, 0x20}, |
| 221 | { 0x00, 0x04, 0x20}, |
| 222 | { 0x08, 0x08, 0x20}, |
| 223 | { 0x0A, 0x08, 0x20}, |
| 224 | { 0x0C, 0x08, 0x20}, |
| 225 | { 0x0E, 0x08, 0x20}, |
| 226 | { 0x20, 0x08, 0x20}, |
| 227 | { 0x20, 0x08, 0x0E}, |
| 228 | { 0x20, 0x08, 0x0C}, |
| 229 | { 0x20, 0x08, 0x0A}, |
| 230 | { 0x20, 0x08, 0x08}, |
| 231 | { 0x20, 0x0A, 0x08}, |
| 232 | { 0x20, 0x0C, 0x08}, |
| 233 | { 0x20, 0x0E, 0x08}, |
| 234 | { 0x20, 0x20, 0x08}, |
| 235 | { 0x0E, 0x20, 0x08}, |
| 236 | { 0x0C, 0x20, 0x08}, |
| 237 | { 0x0A, 0x20, 0x08}, |
| 238 | { 0x08, 0x20, 0x08}, |
| 239 | { 0x08, 0x20, 0x0A}, |
| 240 | { 0x08, 0x20, 0x0C}, |
| 241 | { 0x08, 0x20, 0x0E}, |
| 242 | { 0x08, 0x20, 0x20}, |
| 243 | { 0x08, 0x0E, 0x20}, |
| 244 | { 0x08, 0x0C, 0x20}, |
| 245 | { 0x08, 0x0A, 0x20}, |
| 246 | { 0x0B, 0x0B, 0x20}, |
| 247 | { 0x0C, 0x0B, 0x20}, |
| 248 | { 0x0D, 0x0B, 0x20}, |
| 249 | { 0x0F, 0x0B, 0x20}, |
| 250 | { 0x20, 0x0B, 0x20}, |
| 251 | { 0x20, 0x0B, 0x0F}, |
| 252 | { 0x20, 0x0B, 0x0D}, |
| 253 | { 0x20, 0x0B, 0x0C}, |
| 254 | { 0x20, 0x0B, 0x0B}, |
| 255 | { 0x20, 0x0C, 0x0B}, |
| 256 | { 0x20, 0x0D, 0x0B}, |
| 257 | { 0x20, 0x0F, 0x0B}, |
| 258 | { 0x20, 0x20, 0x0B}, |
| 259 | { 0x0F, 0x20, 0x0B}, |
| 260 | { 0x0D, 0x20, 0x0B}, |
| 261 | { 0x0C, 0x20, 0x0B}, |
| 262 | { 0x0B, 0x20, 0x0B}, |
| 263 | { 0x0B, 0x20, 0x0C}, |
| 264 | { 0x0B, 0x20, 0x0D}, |
| 265 | { 0x0B, 0x20, 0x0F}, |
| 266 | { 0x0B, 0x20, 0x20}, |
| 267 | { 0x0B, 0x0F, 0x20}, |
| 268 | { 0x0B, 0x0D, 0x20}, |
| 269 | { 0x0B, 0x0C, 0x20}, |
| 270 | /* Pad with NULL */ |
| 271 | }; |