Class library for a Topway LM6029ACW graphics LCD.
LM6029ACW.cpp@0:79ef6ebe51ae, 2016-02-08 (annotated)
- Committer:
- grantphillips
- Date:
- Mon Feb 08 14:53:03 2016 +0000
- Revision:
- 0:79ef6ebe51ae
v1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
grantphillips | 0:79ef6ebe51ae | 1 | #include "LM6029ACW.h" |
grantphillips | 0:79ef6ebe51ae | 2 | #include "mbed.h" |
grantphillips | 0:79ef6ebe51ae | 3 | |
grantphillips | 0:79ef6ebe51ae | 4 | |
grantphillips | 0:79ef6ebe51ae | 5 | /* ***************************************** Public Functions ***************************************** */ |
grantphillips | 0:79ef6ebe51ae | 6 | |
grantphillips | 0:79ef6ebe51ae | 7 | LM6029ACW::LM6029ACW(PinName CS1, PinName RES, PinName RS, PinName WR, PinName RD, PinName DB7, PinName DB6, PinName DB5, PinName DB4, PinName DB3, PinName DB2, PinName DB1, PinName DB0) |
grantphillips | 0:79ef6ebe51ae | 8 | : CS1pin(CS1), RESpin(RES), RSpin(RS), WRpin(WR), RDpin(RD), DATApins(DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7) { |
grantphillips | 0:79ef6ebe51ae | 9 | character_x = 0; |
grantphillips | 0:79ef6ebe51ae | 10 | character_y = 0; |
grantphillips | 0:79ef6ebe51ae | 11 | Init(); |
grantphillips | 0:79ef6ebe51ae | 12 | } |
grantphillips | 0:79ef6ebe51ae | 13 | |
grantphillips | 0:79ef6ebe51ae | 14 | |
grantphillips | 0:79ef6ebe51ae | 15 | void LM6029ACW::ClrScr(unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 16 | { |
grantphillips | 0:79ef6ebe51ae | 17 | unsigned char i, j, x=0; |
grantphillips | 0:79ef6ebe51ae | 18 | |
grantphillips | 0:79ef6ebe51ae | 19 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 20 | for(i=0; i<8; i++) |
grantphillips | 0:79ef6ebe51ae | 21 | { |
grantphillips | 0:79ef6ebe51ae | 22 | x=0; |
grantphillips | 0:79ef6ebe51ae | 23 | SetColumn(0); |
grantphillips | 0:79ef6ebe51ae | 24 | SetPage(i); |
grantphillips | 0:79ef6ebe51ae | 25 | for(j=0; j<128; j++) |
grantphillips | 0:79ef6ebe51ae | 26 | if(color==0) |
grantphillips | 0:79ef6ebe51ae | 27 | { |
grantphillips | 0:79ef6ebe51ae | 28 | WriteData(0x00); |
grantphillips | 0:79ef6ebe51ae | 29 | DisplayRAM[x][i] = 0x00; |
grantphillips | 0:79ef6ebe51ae | 30 | x++; |
grantphillips | 0:79ef6ebe51ae | 31 | } |
grantphillips | 0:79ef6ebe51ae | 32 | else |
grantphillips | 0:79ef6ebe51ae | 33 | { |
grantphillips | 0:79ef6ebe51ae | 34 | WriteData(0xff); |
grantphillips | 0:79ef6ebe51ae | 35 | DisplayRAM[x][i] = 0xff; |
grantphillips | 0:79ef6ebe51ae | 36 | x++; |
grantphillips | 0:79ef6ebe51ae | 37 | } |
grantphillips | 0:79ef6ebe51ae | 38 | } |
grantphillips | 0:79ef6ebe51ae | 39 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 40 | } |
grantphillips | 0:79ef6ebe51ae | 41 | |
grantphillips | 0:79ef6ebe51ae | 42 | |
grantphillips | 0:79ef6ebe51ae | 43 | void LM6029ACW::PowerSave(void) |
grantphillips | 0:79ef6ebe51ae | 44 | { |
grantphillips | 0:79ef6ebe51ae | 45 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 46 | WriteCommand(0xae); |
grantphillips | 0:79ef6ebe51ae | 47 | WriteCommand(0xa5); |
grantphillips | 0:79ef6ebe51ae | 48 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 49 | } |
grantphillips | 0:79ef6ebe51ae | 50 | |
grantphillips | 0:79ef6ebe51ae | 51 | |
grantphillips | 0:79ef6ebe51ae | 52 | void LM6029ACW::PowerActive(void) |
grantphillips | 0:79ef6ebe51ae | 53 | { |
grantphillips | 0:79ef6ebe51ae | 54 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 55 | WriteCommand(0xa4); |
grantphillips | 0:79ef6ebe51ae | 56 | WriteCommand(0xaf); |
grantphillips | 0:79ef6ebe51ae | 57 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 58 | } |
grantphillips | 0:79ef6ebe51ae | 59 | |
grantphillips | 0:79ef6ebe51ae | 60 | |
grantphillips | 0:79ef6ebe51ae | 61 | void LM6029ACW::DrawPixel(unsigned char x, unsigned char y, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 62 | { |
grantphillips | 0:79ef6ebe51ae | 63 | unsigned char page, temp1, temp2; |
grantphillips | 0:79ef6ebe51ae | 64 | |
grantphillips | 0:79ef6ebe51ae | 65 | page = y >> 3; |
grantphillips | 0:79ef6ebe51ae | 66 | y = y & 0x07; |
grantphillips | 0:79ef6ebe51ae | 67 | temp1 = DisplayRAM[x][page]; |
grantphillips | 0:79ef6ebe51ae | 68 | temp2 = 1 << y; |
grantphillips | 0:79ef6ebe51ae | 69 | switch(color) |
grantphillips | 0:79ef6ebe51ae | 70 | { |
grantphillips | 0:79ef6ebe51ae | 71 | case 0: temp1 = temp1 & ~temp2; |
grantphillips | 0:79ef6ebe51ae | 72 | break; |
grantphillips | 0:79ef6ebe51ae | 73 | case 1: temp1 = temp1 | temp2; |
grantphillips | 0:79ef6ebe51ae | 74 | break; |
grantphillips | 0:79ef6ebe51ae | 75 | case 2: temp1 = temp1 ^ temp2; |
grantphillips | 0:79ef6ebe51ae | 76 | break; |
grantphillips | 0:79ef6ebe51ae | 77 | } |
grantphillips | 0:79ef6ebe51ae | 78 | DisplayRAM[x][page] = temp1; |
grantphillips | 0:79ef6ebe51ae | 79 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 80 | SetColumn(x); |
grantphillips | 0:79ef6ebe51ae | 81 | SetPage(page); |
grantphillips | 0:79ef6ebe51ae | 82 | WriteData((unsigned char)(temp1)); |
grantphillips | 0:79ef6ebe51ae | 83 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 84 | } |
grantphillips | 0:79ef6ebe51ae | 85 | |
grantphillips | 0:79ef6ebe51ae | 86 | |
grantphillips | 0:79ef6ebe51ae | 87 | void LM6029ACW::DrawLine(int x1, int y1, int x2, int y2, unsigned int color) |
grantphillips | 0:79ef6ebe51ae | 88 | { |
grantphillips | 0:79ef6ebe51ae | 89 | int dy, dx; |
grantphillips | 0:79ef6ebe51ae | 90 | signed char addx=1, addy=1; |
grantphillips | 0:79ef6ebe51ae | 91 | signed int P, diff; |
grantphillips | 0:79ef6ebe51ae | 92 | |
grantphillips | 0:79ef6ebe51ae | 93 | int i=0; |
grantphillips | 0:79ef6ebe51ae | 94 | dx = abs((signed int)(x2 - x1)); |
grantphillips | 0:79ef6ebe51ae | 95 | dy = abs((signed int)(y2 - y1)); |
grantphillips | 0:79ef6ebe51ae | 96 | |
grantphillips | 0:79ef6ebe51ae | 97 | if(x1 > x2) |
grantphillips | 0:79ef6ebe51ae | 98 | addx = -1; |
grantphillips | 0:79ef6ebe51ae | 99 | if(y1 > y2) |
grantphillips | 0:79ef6ebe51ae | 100 | addy = -1; |
grantphillips | 0:79ef6ebe51ae | 101 | |
grantphillips | 0:79ef6ebe51ae | 102 | if(dx >= dy) |
grantphillips | 0:79ef6ebe51ae | 103 | { |
grantphillips | 0:79ef6ebe51ae | 104 | dy *= 2; |
grantphillips | 0:79ef6ebe51ae | 105 | P = dy - dx; |
grantphillips | 0:79ef6ebe51ae | 106 | diff = P - dx; |
grantphillips | 0:79ef6ebe51ae | 107 | |
grantphillips | 0:79ef6ebe51ae | 108 | for(; i<=dx; ++i) |
grantphillips | 0:79ef6ebe51ae | 109 | { |
grantphillips | 0:79ef6ebe51ae | 110 | DrawPixel(x1, y1, color); |
grantphillips | 0:79ef6ebe51ae | 111 | |
grantphillips | 0:79ef6ebe51ae | 112 | if(P < 0) |
grantphillips | 0:79ef6ebe51ae | 113 | { |
grantphillips | 0:79ef6ebe51ae | 114 | P += dy; |
grantphillips | 0:79ef6ebe51ae | 115 | x1 += addx; |
grantphillips | 0:79ef6ebe51ae | 116 | } |
grantphillips | 0:79ef6ebe51ae | 117 | else |
grantphillips | 0:79ef6ebe51ae | 118 | { |
grantphillips | 0:79ef6ebe51ae | 119 | P += diff; |
grantphillips | 0:79ef6ebe51ae | 120 | x1 += addx; |
grantphillips | 0:79ef6ebe51ae | 121 | y1 += addy; |
grantphillips | 0:79ef6ebe51ae | 122 | } |
grantphillips | 0:79ef6ebe51ae | 123 | } |
grantphillips | 0:79ef6ebe51ae | 124 | } |
grantphillips | 0:79ef6ebe51ae | 125 | else |
grantphillips | 0:79ef6ebe51ae | 126 | { |
grantphillips | 0:79ef6ebe51ae | 127 | dx *= 2; |
grantphillips | 0:79ef6ebe51ae | 128 | P = dx - dy; |
grantphillips | 0:79ef6ebe51ae | 129 | diff = P - dy; |
grantphillips | 0:79ef6ebe51ae | 130 | |
grantphillips | 0:79ef6ebe51ae | 131 | for(; i<=dy; ++i) |
grantphillips | 0:79ef6ebe51ae | 132 | { |
grantphillips | 0:79ef6ebe51ae | 133 | DrawPixel(x1, y1, color); |
grantphillips | 0:79ef6ebe51ae | 134 | |
grantphillips | 0:79ef6ebe51ae | 135 | if(P < 0) |
grantphillips | 0:79ef6ebe51ae | 136 | { |
grantphillips | 0:79ef6ebe51ae | 137 | P += dx; |
grantphillips | 0:79ef6ebe51ae | 138 | y1 += addy; |
grantphillips | 0:79ef6ebe51ae | 139 | } |
grantphillips | 0:79ef6ebe51ae | 140 | else |
grantphillips | 0:79ef6ebe51ae | 141 | { |
grantphillips | 0:79ef6ebe51ae | 142 | P += diff; |
grantphillips | 0:79ef6ebe51ae | 143 | x1 += addx; |
grantphillips | 0:79ef6ebe51ae | 144 | y1 += addy; |
grantphillips | 0:79ef6ebe51ae | 145 | } |
grantphillips | 0:79ef6ebe51ae | 146 | } |
grantphillips | 0:79ef6ebe51ae | 147 | } |
grantphillips | 0:79ef6ebe51ae | 148 | } |
grantphillips | 0:79ef6ebe51ae | 149 | |
grantphillips | 0:79ef6ebe51ae | 150 | |
grantphillips | 0:79ef6ebe51ae | 151 | void LM6029ACW::DrawCircle(unsigned char x, unsigned char y, unsigned char radius, unsigned char fill, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 152 | { |
grantphillips | 0:79ef6ebe51ae | 153 | signed char a, b, P; |
grantphillips | 0:79ef6ebe51ae | 154 | |
grantphillips | 0:79ef6ebe51ae | 155 | a = 0; |
grantphillips | 0:79ef6ebe51ae | 156 | b = radius; |
grantphillips | 0:79ef6ebe51ae | 157 | P = 1 - radius; |
grantphillips | 0:79ef6ebe51ae | 158 | |
grantphillips | 0:79ef6ebe51ae | 159 | do |
grantphillips | 0:79ef6ebe51ae | 160 | { |
grantphillips | 0:79ef6ebe51ae | 161 | if(fill) |
grantphillips | 0:79ef6ebe51ae | 162 | { |
grantphillips | 0:79ef6ebe51ae | 163 | DrawLine(x-a, y+b, x+a, y+b, color); |
grantphillips | 0:79ef6ebe51ae | 164 | DrawLine(x-a, y-b, x+a, y-b, color); |
grantphillips | 0:79ef6ebe51ae | 165 | DrawLine(x-b, y+a, x+b, y+a, color); |
grantphillips | 0:79ef6ebe51ae | 166 | DrawLine(x-b, y-a, x+b, y-a, color); |
grantphillips | 0:79ef6ebe51ae | 167 | } |
grantphillips | 0:79ef6ebe51ae | 168 | else |
grantphillips | 0:79ef6ebe51ae | 169 | { |
grantphillips | 0:79ef6ebe51ae | 170 | DrawPixel(a+x, b+y, color); |
grantphillips | 0:79ef6ebe51ae | 171 | DrawPixel(b+x, a+y, color); |
grantphillips | 0:79ef6ebe51ae | 172 | DrawPixel(x-a, b+y, color); |
grantphillips | 0:79ef6ebe51ae | 173 | DrawPixel(x-b, a+y, color); |
grantphillips | 0:79ef6ebe51ae | 174 | DrawPixel(b+x, y-a, color); |
grantphillips | 0:79ef6ebe51ae | 175 | DrawPixel(a+x, y-b, color); |
grantphillips | 0:79ef6ebe51ae | 176 | DrawPixel(x-a, y-b, color); |
grantphillips | 0:79ef6ebe51ae | 177 | DrawPixel(x-b, y-a, color); |
grantphillips | 0:79ef6ebe51ae | 178 | } |
grantphillips | 0:79ef6ebe51ae | 179 | |
grantphillips | 0:79ef6ebe51ae | 180 | if(P < 0) |
grantphillips | 0:79ef6ebe51ae | 181 | P += 3 + 2 * a++; |
grantphillips | 0:79ef6ebe51ae | 182 | else |
grantphillips | 0:79ef6ebe51ae | 183 | P += 5 + 2 * (a++ - b--); |
grantphillips | 0:79ef6ebe51ae | 184 | } while(a <= b); |
grantphillips | 0:79ef6ebe51ae | 185 | } |
grantphillips | 0:79ef6ebe51ae | 186 | |
grantphillips | 0:79ef6ebe51ae | 187 | |
grantphillips | 0:79ef6ebe51ae | 188 | void LM6029ACW::GotoXY(unsigned char x, unsigned char y) |
grantphillips | 0:79ef6ebe51ae | 189 | { |
grantphillips | 0:79ef6ebe51ae | 190 | if(x<=20) |
grantphillips | 0:79ef6ebe51ae | 191 | character_x = x; |
grantphillips | 0:79ef6ebe51ae | 192 | else |
grantphillips | 0:79ef6ebe51ae | 193 | character_x = 0; |
grantphillips | 0:79ef6ebe51ae | 194 | |
grantphillips | 0:79ef6ebe51ae | 195 | if(y<=7) |
grantphillips | 0:79ef6ebe51ae | 196 | character_y = y; |
grantphillips | 0:79ef6ebe51ae | 197 | else |
grantphillips | 0:79ef6ebe51ae | 198 | character_y = 0; |
grantphillips | 0:79ef6ebe51ae | 199 | } |
grantphillips | 0:79ef6ebe51ae | 200 | |
grantphillips | 0:79ef6ebe51ae | 201 | |
grantphillips | 0:79ef6ebe51ae | 202 | void LM6029ACW::PutStr(char *str, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 203 | { |
grantphillips | 0:79ef6ebe51ae | 204 | unsigned int i=0; |
grantphillips | 0:79ef6ebe51ae | 205 | |
grantphillips | 0:79ef6ebe51ae | 206 | do |
grantphillips | 0:79ef6ebe51ae | 207 | { |
grantphillips | 0:79ef6ebe51ae | 208 | PutChar(str[i], color); |
grantphillips | 0:79ef6ebe51ae | 209 | i++; |
grantphillips | 0:79ef6ebe51ae | 210 | }while(str[i]!='\0'); |
grantphillips | 0:79ef6ebe51ae | 211 | } |
grantphillips | 0:79ef6ebe51ae | 212 | |
grantphillips | 0:79ef6ebe51ae | 213 | |
grantphillips | 0:79ef6ebe51ae | 214 | void LM6029ACW::PutChar(unsigned char c, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 215 | { |
grantphillips | 0:79ef6ebe51ae | 216 | unsigned char x, page; |
grantphillips | 0:79ef6ebe51ae | 217 | |
grantphillips | 0:79ef6ebe51ae | 218 | x = character_x * 6 + 1; |
grantphillips | 0:79ef6ebe51ae | 219 | page = character_y; |
grantphillips | 0:79ef6ebe51ae | 220 | |
grantphillips | 0:79ef6ebe51ae | 221 | DrawChar(c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 222 | if(character_x == 20) |
grantphillips | 0:79ef6ebe51ae | 223 | { |
grantphillips | 0:79ef6ebe51ae | 224 | character_x=0; |
grantphillips | 0:79ef6ebe51ae | 225 | if(character_y==7) |
grantphillips | 0:79ef6ebe51ae | 226 | character_y=0; |
grantphillips | 0:79ef6ebe51ae | 227 | else |
grantphillips | 0:79ef6ebe51ae | 228 | character_y++; |
grantphillips | 0:79ef6ebe51ae | 229 | } |
grantphillips | 0:79ef6ebe51ae | 230 | else |
grantphillips | 0:79ef6ebe51ae | 231 | character_x++; |
grantphillips | 0:79ef6ebe51ae | 232 | } |
grantphillips | 0:79ef6ebe51ae | 233 | |
grantphillips | 0:79ef6ebe51ae | 234 | |
grantphillips | 0:79ef6ebe51ae | 235 | |
grantphillips | 0:79ef6ebe51ae | 236 | |
grantphillips | 0:79ef6ebe51ae | 237 | |
grantphillips | 0:79ef6ebe51ae | 238 | |
grantphillips | 0:79ef6ebe51ae | 239 | |
grantphillips | 0:79ef6ebe51ae | 240 | |
grantphillips | 0:79ef6ebe51ae | 241 | |
grantphillips | 0:79ef6ebe51ae | 242 | |
grantphillips | 0:79ef6ebe51ae | 243 | |
grantphillips | 0:79ef6ebe51ae | 244 | |
grantphillips | 0:79ef6ebe51ae | 245 | /* ***************************************** Private Functions ***************************************** */ |
grantphillips | 0:79ef6ebe51ae | 246 | |
grantphillips | 0:79ef6ebe51ae | 247 | void LM6029ACW::Delay(unsigned int del) |
grantphillips | 0:79ef6ebe51ae | 248 | { |
grantphillips | 0:79ef6ebe51ae | 249 | unsigned int i=0; |
grantphillips | 0:79ef6ebe51ae | 250 | |
grantphillips | 0:79ef6ebe51ae | 251 | while(i<del) |
grantphillips | 0:79ef6ebe51ae | 252 | i++; |
grantphillips | 0:79ef6ebe51ae | 253 | } |
grantphillips | 0:79ef6ebe51ae | 254 | |
grantphillips | 0:79ef6ebe51ae | 255 | |
grantphillips | 0:79ef6ebe51ae | 256 | void LM6029ACW::WriteCommand(unsigned char cmd) |
grantphillips | 0:79ef6ebe51ae | 257 | { |
grantphillips | 0:79ef6ebe51ae | 258 | RSpin = 0; |
grantphillips | 0:79ef6ebe51ae | 259 | |
grantphillips | 0:79ef6ebe51ae | 260 | DATApins = cmd; |
grantphillips | 0:79ef6ebe51ae | 261 | wait(lcd_delayx); |
grantphillips | 0:79ef6ebe51ae | 262 | WRpin = 0; |
grantphillips | 0:79ef6ebe51ae | 263 | wait(lcd_delayx); |
grantphillips | 0:79ef6ebe51ae | 264 | WRpin = 1; |
grantphillips | 0:79ef6ebe51ae | 265 | } |
grantphillips | 0:79ef6ebe51ae | 266 | |
grantphillips | 0:79ef6ebe51ae | 267 | |
grantphillips | 0:79ef6ebe51ae | 268 | void LM6029ACW::WriteData(unsigned char dat) |
grantphillips | 0:79ef6ebe51ae | 269 | { |
grantphillips | 0:79ef6ebe51ae | 270 | RSpin = 1; |
grantphillips | 0:79ef6ebe51ae | 271 | |
grantphillips | 0:79ef6ebe51ae | 272 | DATApins = dat; |
grantphillips | 0:79ef6ebe51ae | 273 | wait(lcd_delayx); |
grantphillips | 0:79ef6ebe51ae | 274 | WRpin = 0; |
grantphillips | 0:79ef6ebe51ae | 275 | wait(lcd_delayx); |
grantphillips | 0:79ef6ebe51ae | 276 | WRpin = 1; |
grantphillips | 0:79ef6ebe51ae | 277 | } |
grantphillips | 0:79ef6ebe51ae | 278 | |
grantphillips | 0:79ef6ebe51ae | 279 | |
grantphillips | 0:79ef6ebe51ae | 280 | void LM6029ACW::SetPage(unsigned char Page) |
grantphillips | 0:79ef6ebe51ae | 281 | { |
grantphillips | 0:79ef6ebe51ae | 282 | Page = Page & 0x0f; |
grantphillips | 0:79ef6ebe51ae | 283 | Page = Page | 0xb0; |
grantphillips | 0:79ef6ebe51ae | 284 | WriteCommand(Page); |
grantphillips | 0:79ef6ebe51ae | 285 | } |
grantphillips | 0:79ef6ebe51ae | 286 | |
grantphillips | 0:79ef6ebe51ae | 287 | |
grantphillips | 0:79ef6ebe51ae | 288 | void LM6029ACW::SetColumn(unsigned char Col) |
grantphillips | 0:79ef6ebe51ae | 289 | { |
grantphillips | 0:79ef6ebe51ae | 290 | unsigned char temp; |
grantphillips | 0:79ef6ebe51ae | 291 | |
grantphillips | 0:79ef6ebe51ae | 292 | temp = Col; |
grantphillips | 0:79ef6ebe51ae | 293 | Col = Col & 0x0f; |
grantphillips | 0:79ef6ebe51ae | 294 | Col = Col | 0x00; |
grantphillips | 0:79ef6ebe51ae | 295 | WriteCommand(Col); |
grantphillips | 0:79ef6ebe51ae | 296 | temp = temp >> 4; |
grantphillips | 0:79ef6ebe51ae | 297 | Col = temp & 0x0f; |
grantphillips | 0:79ef6ebe51ae | 298 | Col = Col | 0x10; |
grantphillips | 0:79ef6ebe51ae | 299 | WriteCommand(Col); |
grantphillips | 0:79ef6ebe51ae | 300 | } |
grantphillips | 0:79ef6ebe51ae | 301 | |
grantphillips | 0:79ef6ebe51ae | 302 | |
grantphillips | 0:79ef6ebe51ae | 303 | void LM6029ACW::Init(void) |
grantphillips | 0:79ef6ebe51ae | 304 | { |
grantphillips | 0:79ef6ebe51ae | 305 | unsigned char i,j; |
grantphillips | 0:79ef6ebe51ae | 306 | |
grantphillips | 0:79ef6ebe51ae | 307 | RDpin = 1; |
grantphillips | 0:79ef6ebe51ae | 308 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 309 | RESpin = 0; |
grantphillips | 0:79ef6ebe51ae | 310 | wait(lcd_init_delay); |
grantphillips | 0:79ef6ebe51ae | 311 | RESpin = 1; |
grantphillips | 0:79ef6ebe51ae | 312 | |
grantphillips | 0:79ef6ebe51ae | 313 | WriteCommand(0xa0); //ADC=0 Normal |
grantphillips | 0:79ef6ebe51ae | 314 | WriteCommand(0xc8); //SHL=1 flipped in y-direction |
grantphillips | 0:79ef6ebe51ae | 315 | WriteCommand(0xa2); //Bias=0; 1/9 Bias |
grantphillips | 0:79ef6ebe51ae | 316 | WriteCommand(0x2f); //Power Control VF, VR, VC |
grantphillips | 0:79ef6ebe51ae | 317 | WriteCommand(0xae); //Display OFF |
grantphillips | 0:79ef6ebe51ae | 318 | WriteCommand(0x81); //Set voltage reference mode |
grantphillips | 0:79ef6ebe51ae | 319 | WriteCommand(0x29); //Power Control VF |
grantphillips | 0:79ef6ebe51ae | 320 | WriteCommand(0x40); //Set display start line |
grantphillips | 0:79ef6ebe51ae | 321 | WriteCommand(0xaf); //Display ON |
grantphillips | 0:79ef6ebe51ae | 322 | |
grantphillips | 0:79ef6ebe51ae | 323 | for(i=0;i<128;i++) |
grantphillips | 0:79ef6ebe51ae | 324 | for(j=0;j<8;j++) |
grantphillips | 0:79ef6ebe51ae | 325 | DisplayRAM[i][j]=0x00; |
grantphillips | 0:79ef6ebe51ae | 326 | |
grantphillips | 0:79ef6ebe51ae | 327 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 328 | |
grantphillips | 0:79ef6ebe51ae | 329 | ClrScr(0); |
grantphillips | 0:79ef6ebe51ae | 330 | } |
grantphillips | 0:79ef6ebe51ae | 331 | |
grantphillips | 0:79ef6ebe51ae | 332 | |
grantphillips | 0:79ef6ebe51ae | 333 | void LM6029ACW::WriteCharCol(unsigned char v, unsigned char x, unsigned char page, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 334 | { |
grantphillips | 0:79ef6ebe51ae | 335 | if(color==0) |
grantphillips | 0:79ef6ebe51ae | 336 | { |
grantphillips | 0:79ef6ebe51ae | 337 | WriteData(~v); |
grantphillips | 0:79ef6ebe51ae | 338 | DisplayRAM[x][page] = ~v; |
grantphillips | 0:79ef6ebe51ae | 339 | } |
grantphillips | 0:79ef6ebe51ae | 340 | else |
grantphillips | 0:79ef6ebe51ae | 341 | { |
grantphillips | 0:79ef6ebe51ae | 342 | WriteData(v); |
grantphillips | 0:79ef6ebe51ae | 343 | DisplayRAM[x][page] = v; |
grantphillips | 0:79ef6ebe51ae | 344 | } |
grantphillips | 0:79ef6ebe51ae | 345 | } |
grantphillips | 0:79ef6ebe51ae | 346 | |
grantphillips | 0:79ef6ebe51ae | 347 | |
grantphillips | 0:79ef6ebe51ae | 348 | |
grantphillips | 0:79ef6ebe51ae | 349 | void LM6029ACW::DrawChar(unsigned char c, unsigned char x, unsigned char page, unsigned char color) |
grantphillips | 0:79ef6ebe51ae | 350 | { |
grantphillips | 0:79ef6ebe51ae | 351 | CS1pin = 0; |
grantphillips | 0:79ef6ebe51ae | 352 | SetColumn(x); |
grantphillips | 0:79ef6ebe51ae | 353 | SetPage(page); |
grantphillips | 0:79ef6ebe51ae | 354 | |
grantphillips | 0:79ef6ebe51ae | 355 | switch(c) |
grantphillips | 0:79ef6ebe51ae | 356 | { |
grantphillips | 0:79ef6ebe51ae | 357 | case 32: // 'SPACE' |
grantphillips | 0:79ef6ebe51ae | 358 | { |
grantphillips | 0:79ef6ebe51ae | 359 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 360 | WriteCharCol(0x00, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 361 | WriteCharCol(0x00, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 362 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 363 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 364 | }break; |
grantphillips | 0:79ef6ebe51ae | 365 | |
grantphillips | 0:79ef6ebe51ae | 366 | case 33: // '!' |
grantphillips | 0:79ef6ebe51ae | 367 | { |
grantphillips | 0:79ef6ebe51ae | 368 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 369 | WriteCharCol(0x00, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 370 | WriteCharCol(0x9e, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 371 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 372 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 373 | }break; |
grantphillips | 0:79ef6ebe51ae | 374 | |
grantphillips | 0:79ef6ebe51ae | 375 | case 34: // '"' |
grantphillips | 0:79ef6ebe51ae | 376 | { |
grantphillips | 0:79ef6ebe51ae | 377 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 378 | WriteCharCol(0x0e, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 379 | WriteCharCol(0x00, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 380 | WriteCharCol(0x0e, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 381 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 382 | }break; |
grantphillips | 0:79ef6ebe51ae | 383 | |
grantphillips | 0:79ef6ebe51ae | 384 | case 35: // '#' |
grantphillips | 0:79ef6ebe51ae | 385 | { |
grantphillips | 0:79ef6ebe51ae | 386 | WriteCharCol(0x28, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 387 | WriteCharCol(0xfe, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 388 | WriteCharCol(0x28, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 389 | WriteCharCol(0xfe, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 390 | WriteCharCol(0x28, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 391 | }break; |
grantphillips | 0:79ef6ebe51ae | 392 | |
grantphillips | 0:79ef6ebe51ae | 393 | case 36: // '$' |
grantphillips | 0:79ef6ebe51ae | 394 | { |
grantphillips | 0:79ef6ebe51ae | 395 | WriteCharCol(0x48, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 396 | WriteCharCol(0x54, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 397 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 398 | WriteCharCol(0x54, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 399 | WriteCharCol(0x24, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 400 | }break; |
grantphillips | 0:79ef6ebe51ae | 401 | |
grantphillips | 0:79ef6ebe51ae | 402 | case 37: // '%' |
grantphillips | 0:79ef6ebe51ae | 403 | { |
grantphillips | 0:79ef6ebe51ae | 404 | WriteCharCol(0x46, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 405 | WriteCharCol(0x26, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 406 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 407 | WriteCharCol(0xc8, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 408 | WriteCharCol(0xc4, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 409 | }break; |
grantphillips | 0:79ef6ebe51ae | 410 | |
grantphillips | 0:79ef6ebe51ae | 411 | case 38: // '&' |
grantphillips | 0:79ef6ebe51ae | 412 | { |
grantphillips | 0:79ef6ebe51ae | 413 | WriteCharCol(0x6c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 414 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 415 | WriteCharCol(0xaa, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 416 | WriteCharCol(0x44, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 417 | WriteCharCol(0xa0, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 418 | }break; |
grantphillips | 0:79ef6ebe51ae | 419 | |
grantphillips | 0:79ef6ebe51ae | 420 | case 39: // ''' |
grantphillips | 0:79ef6ebe51ae | 421 | { |
grantphillips | 0:79ef6ebe51ae | 422 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 423 | WriteCharCol(0x0a, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 424 | WriteCharCol(0x06, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 425 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 426 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 427 | }break; |
grantphillips | 0:79ef6ebe51ae | 428 | |
grantphillips | 0:79ef6ebe51ae | 429 | case 40: // '(' |
grantphillips | 0:79ef6ebe51ae | 430 | { |
grantphillips | 0:79ef6ebe51ae | 431 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 432 | WriteCharCol(0x38, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 433 | WriteCharCol(0x44, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 434 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 435 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 436 | }break; |
grantphillips | 0:79ef6ebe51ae | 437 | |
grantphillips | 0:79ef6ebe51ae | 438 | case 41: // ')' |
grantphillips | 0:79ef6ebe51ae | 439 | { |
grantphillips | 0:79ef6ebe51ae | 440 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 441 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 442 | WriteCharCol(0x44, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 443 | WriteCharCol(0x38, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 444 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 445 | }break; |
grantphillips | 0:79ef6ebe51ae | 446 | |
grantphillips | 0:79ef6ebe51ae | 447 | case 42: // '*' |
grantphillips | 0:79ef6ebe51ae | 448 | { |
grantphillips | 0:79ef6ebe51ae | 449 | WriteCharCol(0x28, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 450 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 451 | WriteCharCol(0x7c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 452 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 453 | WriteCharCol(0x28, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 454 | }break; |
grantphillips | 0:79ef6ebe51ae | 455 | |
grantphillips | 0:79ef6ebe51ae | 456 | case 43: // '+' |
grantphillips | 0:79ef6ebe51ae | 457 | { |
grantphillips | 0:79ef6ebe51ae | 458 | WriteCharCol(0x10, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 459 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 460 | WriteCharCol(0x7c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 461 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 462 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 463 | }break; |
grantphillips | 0:79ef6ebe51ae | 464 | |
grantphillips | 0:79ef6ebe51ae | 465 | case 44: // ',' |
grantphillips | 0:79ef6ebe51ae | 466 | { |
grantphillips | 0:79ef6ebe51ae | 467 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 468 | WriteCharCol(0xa0, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 469 | WriteCharCol(0x60, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 470 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 471 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 472 | }break; |
grantphillips | 0:79ef6ebe51ae | 473 | |
grantphillips | 0:79ef6ebe51ae | 474 | case 45: // '-' |
grantphillips | 0:79ef6ebe51ae | 475 | { |
grantphillips | 0:79ef6ebe51ae | 476 | WriteCharCol(0x10, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 477 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 478 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 479 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 480 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 481 | }break; |
grantphillips | 0:79ef6ebe51ae | 482 | |
grantphillips | 0:79ef6ebe51ae | 483 | case 46: // '.' |
grantphillips | 0:79ef6ebe51ae | 484 | { |
grantphillips | 0:79ef6ebe51ae | 485 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 486 | WriteCharCol(0xc0, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 487 | WriteCharCol(0xc0, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 488 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 489 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 490 | }break; |
grantphillips | 0:79ef6ebe51ae | 491 | |
grantphillips | 0:79ef6ebe51ae | 492 | case 47: // '/' |
grantphillips | 0:79ef6ebe51ae | 493 | { |
grantphillips | 0:79ef6ebe51ae | 494 | WriteCharCol(0x40, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 495 | WriteCharCol(0x20, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 496 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 497 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 498 | WriteCharCol(0x04, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 499 | }break; |
grantphillips | 0:79ef6ebe51ae | 500 | |
grantphillips | 0:79ef6ebe51ae | 501 | case 48: // '0' |
grantphillips | 0:79ef6ebe51ae | 502 | { |
grantphillips | 0:79ef6ebe51ae | 503 | WriteCharCol(0x7c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 504 | WriteCharCol(0xa2, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 505 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 506 | WriteCharCol(0x8a, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 507 | WriteCharCol(0x7c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 508 | }break; |
grantphillips | 0:79ef6ebe51ae | 509 | |
grantphillips | 0:79ef6ebe51ae | 510 | case 49: // '1' |
grantphillips | 0:79ef6ebe51ae | 511 | { |
grantphillips | 0:79ef6ebe51ae | 512 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 513 | WriteCharCol(0x84, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 514 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 515 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 516 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 517 | }break; |
grantphillips | 0:79ef6ebe51ae | 518 | |
grantphillips | 0:79ef6ebe51ae | 519 | case 50: // '2' |
grantphillips | 0:79ef6ebe51ae | 520 | { |
grantphillips | 0:79ef6ebe51ae | 521 | WriteCharCol(0x84, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 522 | WriteCharCol(0xc2, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 523 | WriteCharCol(0xa2, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 524 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 525 | WriteCharCol(0x8c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 526 | }break; |
grantphillips | 0:79ef6ebe51ae | 527 | |
grantphillips | 0:79ef6ebe51ae | 528 | case 51: // '3' |
grantphillips | 0:79ef6ebe51ae | 529 | { |
grantphillips | 0:79ef6ebe51ae | 530 | WriteCharCol(0x42, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 531 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 532 | WriteCharCol(0x8a, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 533 | WriteCharCol(0x96, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 534 | WriteCharCol(0x62, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 535 | }break; |
grantphillips | 0:79ef6ebe51ae | 536 | |
grantphillips | 0:79ef6ebe51ae | 537 | case 52: // '4' |
grantphillips | 0:79ef6ebe51ae | 538 | { |
grantphillips | 0:79ef6ebe51ae | 539 | WriteCharCol(0x30, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 540 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 541 | WriteCharCol(0x24, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 542 | WriteCharCol(0xfe, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 543 | WriteCharCol(0x20, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 544 | }break; |
grantphillips | 0:79ef6ebe51ae | 545 | |
grantphillips | 0:79ef6ebe51ae | 546 | case 53: // '5' |
grantphillips | 0:79ef6ebe51ae | 547 | { |
grantphillips | 0:79ef6ebe51ae | 548 | WriteCharCol(0x4e, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 549 | WriteCharCol(0x8a, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 550 | WriteCharCol(0x8a, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 551 | WriteCharCol(0x8a, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 552 | WriteCharCol(0x72, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 553 | }break; |
grantphillips | 0:79ef6ebe51ae | 554 | |
grantphillips | 0:79ef6ebe51ae | 555 | case 54: // '6' |
grantphillips | 0:79ef6ebe51ae | 556 | { |
grantphillips | 0:79ef6ebe51ae | 557 | WriteCharCol(0x78, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 558 | WriteCharCol(0x94, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 559 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 560 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 561 | WriteCharCol(0x60, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 562 | }break; |
grantphillips | 0:79ef6ebe51ae | 563 | |
grantphillips | 0:79ef6ebe51ae | 564 | case 55: // '7' |
grantphillips | 0:79ef6ebe51ae | 565 | { |
grantphillips | 0:79ef6ebe51ae | 566 | WriteCharCol(0x02, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 567 | WriteCharCol(0xe2, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 568 | WriteCharCol(0x12, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 569 | WriteCharCol(0x0a, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 570 | WriteCharCol(0x06, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 571 | }break; |
grantphillips | 0:79ef6ebe51ae | 572 | |
grantphillips | 0:79ef6ebe51ae | 573 | case 56: // '8' |
grantphillips | 0:79ef6ebe51ae | 574 | { |
grantphillips | 0:79ef6ebe51ae | 575 | WriteCharCol(0x6c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 576 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 577 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 578 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 579 | WriteCharCol(0x6c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 580 | }break; |
grantphillips | 0:79ef6ebe51ae | 581 | |
grantphillips | 0:79ef6ebe51ae | 582 | case 57: // '9' |
grantphillips | 0:79ef6ebe51ae | 583 | { |
grantphillips | 0:79ef6ebe51ae | 584 | WriteCharCol(0x0c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 585 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 586 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 587 | WriteCharCol(0x52, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 588 | WriteCharCol(0x3c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 589 | }break; |
grantphillips | 0:79ef6ebe51ae | 590 | |
grantphillips | 0:79ef6ebe51ae | 591 | case 58: // ':' |
grantphillips | 0:79ef6ebe51ae | 592 | { |
grantphillips | 0:79ef6ebe51ae | 593 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 594 | WriteCharCol(0x6c, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 595 | WriteCharCol(0x6c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 596 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 597 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 598 | }break; |
grantphillips | 0:79ef6ebe51ae | 599 | |
grantphillips | 0:79ef6ebe51ae | 600 | case 59: // ';' |
grantphillips | 0:79ef6ebe51ae | 601 | { |
grantphillips | 0:79ef6ebe51ae | 602 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 603 | WriteCharCol(0xac, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 604 | WriteCharCol(0x6c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 605 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 606 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 607 | }break; |
grantphillips | 0:79ef6ebe51ae | 608 | |
grantphillips | 0:79ef6ebe51ae | 609 | case 60: // '<' |
grantphillips | 0:79ef6ebe51ae | 610 | { |
grantphillips | 0:79ef6ebe51ae | 611 | WriteCharCol(0x10, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 612 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 613 | WriteCharCol(0x44, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 614 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 615 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 616 | }break; |
grantphillips | 0:79ef6ebe51ae | 617 | |
grantphillips | 0:79ef6ebe51ae | 618 | case 61: // '=' |
grantphillips | 0:79ef6ebe51ae | 619 | { |
grantphillips | 0:79ef6ebe51ae | 620 | WriteCharCol(0x28, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 621 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 622 | WriteCharCol(0x28, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 623 | WriteCharCol(0x28, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 624 | WriteCharCol(0x28, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 625 | }break; |
grantphillips | 0:79ef6ebe51ae | 626 | |
grantphillips | 0:79ef6ebe51ae | 627 | case 62: // '>' |
grantphillips | 0:79ef6ebe51ae | 628 | { |
grantphillips | 0:79ef6ebe51ae | 629 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 630 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 631 | WriteCharCol(0x44, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 632 | WriteCharCol(0x28, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 633 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 634 | }break; |
grantphillips | 0:79ef6ebe51ae | 635 | |
grantphillips | 0:79ef6ebe51ae | 636 | case 63: // '?' |
grantphillips | 0:79ef6ebe51ae | 637 | { |
grantphillips | 0:79ef6ebe51ae | 638 | WriteCharCol(0x04, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 639 | WriteCharCol(0x02, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 640 | WriteCharCol(0xa2, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 641 | WriteCharCol(0x12, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 642 | WriteCharCol(0x0c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 643 | }break; |
grantphillips | 0:79ef6ebe51ae | 644 | |
grantphillips | 0:79ef6ebe51ae | 645 | case 64: // '@' |
grantphillips | 0:79ef6ebe51ae | 646 | { |
grantphillips | 0:79ef6ebe51ae | 647 | WriteCharCol(0x64, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 648 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 649 | WriteCharCol(0xf2, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 650 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 651 | WriteCharCol(0x7c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 652 | }break; |
grantphillips | 0:79ef6ebe51ae | 653 | |
grantphillips | 0:79ef6ebe51ae | 654 | case 65: // 'A' |
grantphillips | 0:79ef6ebe51ae | 655 | { |
grantphillips | 0:79ef6ebe51ae | 656 | WriteCharCol(0xfc, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 657 | WriteCharCol(0x22, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 658 | WriteCharCol(0x22, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 659 | WriteCharCol(0x22, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 660 | WriteCharCol(0xfc, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 661 | }break; |
grantphillips | 0:79ef6ebe51ae | 662 | |
grantphillips | 0:79ef6ebe51ae | 663 | case 66: // 'B' |
grantphillips | 0:79ef6ebe51ae | 664 | { |
grantphillips | 0:79ef6ebe51ae | 665 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 666 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 667 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 668 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 669 | WriteCharCol(0x6c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 670 | }break; |
grantphillips | 0:79ef6ebe51ae | 671 | |
grantphillips | 0:79ef6ebe51ae | 672 | case 67: // 'C' |
grantphillips | 0:79ef6ebe51ae | 673 | { |
grantphillips | 0:79ef6ebe51ae | 674 | WriteCharCol(0x7c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 675 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 676 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 677 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 678 | WriteCharCol(0x44, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 679 | }break; |
grantphillips | 0:79ef6ebe51ae | 680 | |
grantphillips | 0:79ef6ebe51ae | 681 | case 68: // 'D' |
grantphillips | 0:79ef6ebe51ae | 682 | { |
grantphillips | 0:79ef6ebe51ae | 683 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 684 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 685 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 686 | WriteCharCol(0x44, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 687 | WriteCharCol(0x38, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 688 | }break; |
grantphillips | 0:79ef6ebe51ae | 689 | |
grantphillips | 0:79ef6ebe51ae | 690 | case 69: // 'E' |
grantphillips | 0:79ef6ebe51ae | 691 | { |
grantphillips | 0:79ef6ebe51ae | 692 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 693 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 694 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 695 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 696 | WriteCharCol(0x82, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 697 | }break; |
grantphillips | 0:79ef6ebe51ae | 698 | |
grantphillips | 0:79ef6ebe51ae | 699 | case 70: // 'F' |
grantphillips | 0:79ef6ebe51ae | 700 | { |
grantphillips | 0:79ef6ebe51ae | 701 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 702 | WriteCharCol(0x12, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 703 | WriteCharCol(0x12, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 704 | WriteCharCol(0x12, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 705 | WriteCharCol(0x02, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 706 | }break; |
grantphillips | 0:79ef6ebe51ae | 707 | |
grantphillips | 0:79ef6ebe51ae | 708 | case 71: // 'G' |
grantphillips | 0:79ef6ebe51ae | 709 | { |
grantphillips | 0:79ef6ebe51ae | 710 | WriteCharCol(0x7c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 711 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 712 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 713 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 714 | WriteCharCol(0xf4, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 715 | }break; |
grantphillips | 0:79ef6ebe51ae | 716 | |
grantphillips | 0:79ef6ebe51ae | 717 | case 72: // 'H' |
grantphillips | 0:79ef6ebe51ae | 718 | { |
grantphillips | 0:79ef6ebe51ae | 719 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 720 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 721 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 722 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 723 | WriteCharCol(0xfe, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 724 | }break; |
grantphillips | 0:79ef6ebe51ae | 725 | |
grantphillips | 0:79ef6ebe51ae | 726 | case 73: // 'I' |
grantphillips | 0:79ef6ebe51ae | 727 | { |
grantphillips | 0:79ef6ebe51ae | 728 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 729 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 730 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 731 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 732 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 733 | }break; |
grantphillips | 0:79ef6ebe51ae | 734 | |
grantphillips | 0:79ef6ebe51ae | 735 | case 74: // 'J' |
grantphillips | 0:79ef6ebe51ae | 736 | { |
grantphillips | 0:79ef6ebe51ae | 737 | WriteCharCol(0x40, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 738 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 739 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 740 | WriteCharCol(0x7e, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 741 | WriteCharCol(0x02, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 742 | }break; |
grantphillips | 0:79ef6ebe51ae | 743 | |
grantphillips | 0:79ef6ebe51ae | 744 | case 75: // 'K' |
grantphillips | 0:79ef6ebe51ae | 745 | { |
grantphillips | 0:79ef6ebe51ae | 746 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 747 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 748 | WriteCharCol(0x28, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 749 | WriteCharCol(0x44, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 750 | WriteCharCol(0x82, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 751 | }break; |
grantphillips | 0:79ef6ebe51ae | 752 | |
grantphillips | 0:79ef6ebe51ae | 753 | case 76: // 'L' |
grantphillips | 0:79ef6ebe51ae | 754 | { |
grantphillips | 0:79ef6ebe51ae | 755 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 756 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 757 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 758 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 759 | WriteCharCol(0x80, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 760 | }break; |
grantphillips | 0:79ef6ebe51ae | 761 | |
grantphillips | 0:79ef6ebe51ae | 762 | case 77: // 'M' |
grantphillips | 0:79ef6ebe51ae | 763 | { |
grantphillips | 0:79ef6ebe51ae | 764 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 765 | WriteCharCol(0x04, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 766 | WriteCharCol(0x18, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 767 | WriteCharCol(0x04, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 768 | WriteCharCol(0xfe, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 769 | }break; |
grantphillips | 0:79ef6ebe51ae | 770 | |
grantphillips | 0:79ef6ebe51ae | 771 | case 78: // 'N' |
grantphillips | 0:79ef6ebe51ae | 772 | { |
grantphillips | 0:79ef6ebe51ae | 773 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 774 | WriteCharCol(0x08, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 775 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 776 | WriteCharCol(0x20, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 777 | WriteCharCol(0xfe, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 778 | }break; |
grantphillips | 0:79ef6ebe51ae | 779 | |
grantphillips | 0:79ef6ebe51ae | 780 | case 79: // 'O' |
grantphillips | 0:79ef6ebe51ae | 781 | { |
grantphillips | 0:79ef6ebe51ae | 782 | WriteCharCol(0x7c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 783 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 784 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 785 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 786 | WriteCharCol(0x7c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 787 | }break; |
grantphillips | 0:79ef6ebe51ae | 788 | |
grantphillips | 0:79ef6ebe51ae | 789 | case 80: // 'P' |
grantphillips | 0:79ef6ebe51ae | 790 | { |
grantphillips | 0:79ef6ebe51ae | 791 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 792 | WriteCharCol(0x12, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 793 | WriteCharCol(0x12, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 794 | WriteCharCol(0x12, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 795 | WriteCharCol(0x0c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 796 | }break; |
grantphillips | 0:79ef6ebe51ae | 797 | |
grantphillips | 0:79ef6ebe51ae | 798 | case 81: // 'Q' |
grantphillips | 0:79ef6ebe51ae | 799 | { |
grantphillips | 0:79ef6ebe51ae | 800 | WriteCharCol(0x7c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 801 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 802 | WriteCharCol(0xa2, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 803 | WriteCharCol(0x42, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 804 | WriteCharCol(0xbc, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 805 | }break; |
grantphillips | 0:79ef6ebe51ae | 806 | |
grantphillips | 0:79ef6ebe51ae | 807 | case 82: // 'R' |
grantphillips | 0:79ef6ebe51ae | 808 | { |
grantphillips | 0:79ef6ebe51ae | 809 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 810 | WriteCharCol(0x12, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 811 | WriteCharCol(0x32, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 812 | WriteCharCol(0x52, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 813 | WriteCharCol(0x8c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 814 | }break; |
grantphillips | 0:79ef6ebe51ae | 815 | |
grantphillips | 0:79ef6ebe51ae | 816 | case 83: // 'S' |
grantphillips | 0:79ef6ebe51ae | 817 | { |
grantphillips | 0:79ef6ebe51ae | 818 | WriteCharCol(0x8c, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 819 | WriteCharCol(0x92, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 820 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 821 | WriteCharCol(0x92, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 822 | WriteCharCol(0x62, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 823 | }break; |
grantphillips | 0:79ef6ebe51ae | 824 | |
grantphillips | 0:79ef6ebe51ae | 825 | case 84: // 'T' |
grantphillips | 0:79ef6ebe51ae | 826 | { |
grantphillips | 0:79ef6ebe51ae | 827 | WriteCharCol(0x02, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 828 | WriteCharCol(0x02, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 829 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 830 | WriteCharCol(0x02, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 831 | WriteCharCol(0x02, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 832 | }break; |
grantphillips | 0:79ef6ebe51ae | 833 | |
grantphillips | 0:79ef6ebe51ae | 834 | case 85: // 'U' |
grantphillips | 0:79ef6ebe51ae | 835 | { |
grantphillips | 0:79ef6ebe51ae | 836 | WriteCharCol(0x7e, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 837 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 838 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 839 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 840 | WriteCharCol(0x7e, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 841 | }break; |
grantphillips | 0:79ef6ebe51ae | 842 | |
grantphillips | 0:79ef6ebe51ae | 843 | case 86: // 'V' |
grantphillips | 0:79ef6ebe51ae | 844 | { |
grantphillips | 0:79ef6ebe51ae | 845 | WriteCharCol(0x3e, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 846 | WriteCharCol(0x40, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 847 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 848 | WriteCharCol(0x40, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 849 | WriteCharCol(0x3e, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 850 | }break; |
grantphillips | 0:79ef6ebe51ae | 851 | |
grantphillips | 0:79ef6ebe51ae | 852 | case 87: // 'W' |
grantphillips | 0:79ef6ebe51ae | 853 | { |
grantphillips | 0:79ef6ebe51ae | 854 | WriteCharCol(0x7e, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 855 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 856 | WriteCharCol(0x70, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 857 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 858 | WriteCharCol(0x7e, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 859 | }break; |
grantphillips | 0:79ef6ebe51ae | 860 | |
grantphillips | 0:79ef6ebe51ae | 861 | case 88: // 'X' |
grantphillips | 0:79ef6ebe51ae | 862 | { |
grantphillips | 0:79ef6ebe51ae | 863 | WriteCharCol(0xc6, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 864 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 865 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 866 | WriteCharCol(0x28, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 867 | WriteCharCol(0xc6, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 868 | }break; |
grantphillips | 0:79ef6ebe51ae | 869 | |
grantphillips | 0:79ef6ebe51ae | 870 | case 89: // 'Y' |
grantphillips | 0:79ef6ebe51ae | 871 | { |
grantphillips | 0:79ef6ebe51ae | 872 | WriteCharCol(0x0e, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 873 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 874 | WriteCharCol(0xe0, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 875 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 876 | WriteCharCol(0x0e, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 877 | }break; |
grantphillips | 0:79ef6ebe51ae | 878 | |
grantphillips | 0:79ef6ebe51ae | 879 | case 90: // 'Z' |
grantphillips | 0:79ef6ebe51ae | 880 | { |
grantphillips | 0:79ef6ebe51ae | 881 | WriteCharCol(0xc2, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 882 | WriteCharCol(0xa2, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 883 | WriteCharCol(0x92, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 884 | WriteCharCol(0x8a, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 885 | WriteCharCol(0x86, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 886 | }break; |
grantphillips | 0:79ef6ebe51ae | 887 | |
grantphillips | 0:79ef6ebe51ae | 888 | case 91: // '[' |
grantphillips | 0:79ef6ebe51ae | 889 | { |
grantphillips | 0:79ef6ebe51ae | 890 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 891 | WriteCharCol(0xfe, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 892 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 893 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 894 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 895 | }break; |
grantphillips | 0:79ef6ebe51ae | 896 | |
grantphillips | 0:79ef6ebe51ae | 897 | case 92: // '\' |
grantphillips | 0:79ef6ebe51ae | 898 | { |
grantphillips | 0:79ef6ebe51ae | 899 | WriteCharCol(0x04, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 900 | WriteCharCol(0x08, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 901 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 902 | WriteCharCol(0x20, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 903 | WriteCharCol(0x40, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 904 | }break; |
grantphillips | 0:79ef6ebe51ae | 905 | |
grantphillips | 0:79ef6ebe51ae | 906 | case 93: // ']' |
grantphillips | 0:79ef6ebe51ae | 907 | { |
grantphillips | 0:79ef6ebe51ae | 908 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 909 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 910 | WriteCharCol(0x82, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 911 | WriteCharCol(0xfe, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 912 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 913 | }break; |
grantphillips | 0:79ef6ebe51ae | 914 | |
grantphillips | 0:79ef6ebe51ae | 915 | case 94: // '^' |
grantphillips | 0:79ef6ebe51ae | 916 | { |
grantphillips | 0:79ef6ebe51ae | 917 | WriteCharCol(0x08, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 918 | WriteCharCol(0x04, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 919 | WriteCharCol(0x02, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 920 | WriteCharCol(0x04, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 921 | WriteCharCol(0x08, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 922 | }break; |
grantphillips | 0:79ef6ebe51ae | 923 | |
grantphillips | 0:79ef6ebe51ae | 924 | case 95: // '_' |
grantphillips | 0:79ef6ebe51ae | 925 | { |
grantphillips | 0:79ef6ebe51ae | 926 | WriteCharCol(0x80, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 927 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 928 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 929 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 930 | WriteCharCol(0x80, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 931 | }break; |
grantphillips | 0:79ef6ebe51ae | 932 | |
grantphillips | 0:79ef6ebe51ae | 933 | case 96: // '`' |
grantphillips | 0:79ef6ebe51ae | 934 | { |
grantphillips | 0:79ef6ebe51ae | 935 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 936 | WriteCharCol(0x02, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 937 | WriteCharCol(0x04, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 938 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 939 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 940 | }break; |
grantphillips | 0:79ef6ebe51ae | 941 | |
grantphillips | 0:79ef6ebe51ae | 942 | case 97: // 'a' |
grantphillips | 0:79ef6ebe51ae | 943 | { |
grantphillips | 0:79ef6ebe51ae | 944 | WriteCharCol(0x40, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 945 | WriteCharCol(0xa8, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 946 | WriteCharCol(0xa8, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 947 | WriteCharCol(0xa8, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 948 | WriteCharCol(0xf0, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 949 | }break; |
grantphillips | 0:79ef6ebe51ae | 950 | |
grantphillips | 0:79ef6ebe51ae | 951 | case 98: // 'b' |
grantphillips | 0:79ef6ebe51ae | 952 | { |
grantphillips | 0:79ef6ebe51ae | 953 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 954 | WriteCharCol(0x90, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 955 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 956 | WriteCharCol(0x88, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 957 | WriteCharCol(0x70, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 958 | }break; |
grantphillips | 0:79ef6ebe51ae | 959 | |
grantphillips | 0:79ef6ebe51ae | 960 | case 99: // 'c' |
grantphillips | 0:79ef6ebe51ae | 961 | { |
grantphillips | 0:79ef6ebe51ae | 962 | WriteCharCol(0x70, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 963 | WriteCharCol(0x88, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 964 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 965 | WriteCharCol(0x88, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 966 | WriteCharCol(0x40, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 967 | }break; |
grantphillips | 0:79ef6ebe51ae | 968 | |
grantphillips | 0:79ef6ebe51ae | 969 | case 100: // 'd' |
grantphillips | 0:79ef6ebe51ae | 970 | { |
grantphillips | 0:79ef6ebe51ae | 971 | WriteCharCol(0x70, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 972 | WriteCharCol(0x88, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 973 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 974 | WriteCharCol(0x90, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 975 | WriteCharCol(0xfe, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 976 | }break; |
grantphillips | 0:79ef6ebe51ae | 977 | |
grantphillips | 0:79ef6ebe51ae | 978 | case 101: // 'e' |
grantphillips | 0:79ef6ebe51ae | 979 | { |
grantphillips | 0:79ef6ebe51ae | 980 | WriteCharCol(0x70, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 981 | WriteCharCol(0xa8, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 982 | WriteCharCol(0xa8, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 983 | WriteCharCol(0xa8, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 984 | WriteCharCol(0x30, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 985 | }break; |
grantphillips | 0:79ef6ebe51ae | 986 | |
grantphillips | 0:79ef6ebe51ae | 987 | case 102: // 'f' |
grantphillips | 0:79ef6ebe51ae | 988 | { |
grantphillips | 0:79ef6ebe51ae | 989 | WriteCharCol(0x10, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 990 | WriteCharCol(0xfc, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 991 | WriteCharCol(0x12, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 992 | WriteCharCol(0x02, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 993 | WriteCharCol(0x04, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 994 | }break; |
grantphillips | 0:79ef6ebe51ae | 995 | |
grantphillips | 0:79ef6ebe51ae | 996 | case 103: // 'g' |
grantphillips | 0:79ef6ebe51ae | 997 | { |
grantphillips | 0:79ef6ebe51ae | 998 | WriteCharCol(0x18, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 999 | WriteCharCol(0xa4, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1000 | WriteCharCol(0xa4, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1001 | WriteCharCol(0xa4, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1002 | WriteCharCol(0x7c, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1003 | }break; |
grantphillips | 0:79ef6ebe51ae | 1004 | |
grantphillips | 0:79ef6ebe51ae | 1005 | case 104: // 'h' |
grantphillips | 0:79ef6ebe51ae | 1006 | { |
grantphillips | 0:79ef6ebe51ae | 1007 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1008 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1009 | WriteCharCol(0x08, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1010 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1011 | WriteCharCol(0xf0, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1012 | }break; |
grantphillips | 0:79ef6ebe51ae | 1013 | |
grantphillips | 0:79ef6ebe51ae | 1014 | case 105: // 'i' |
grantphillips | 0:79ef6ebe51ae | 1015 | { |
grantphillips | 0:79ef6ebe51ae | 1016 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1017 | WriteCharCol(0x88, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1018 | WriteCharCol(0xfa, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1019 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1020 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1021 | }break; |
grantphillips | 0:79ef6ebe51ae | 1022 | |
grantphillips | 0:79ef6ebe51ae | 1023 | case 106: // 'j' |
grantphillips | 0:79ef6ebe51ae | 1024 | { |
grantphillips | 0:79ef6ebe51ae | 1025 | WriteCharCol(0x40, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1026 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1027 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1028 | WriteCharCol(0x7a, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1029 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1030 | }break; |
grantphillips | 0:79ef6ebe51ae | 1031 | |
grantphillips | 0:79ef6ebe51ae | 1032 | case 107: // 'k' |
grantphillips | 0:79ef6ebe51ae | 1033 | { |
grantphillips | 0:79ef6ebe51ae | 1034 | WriteCharCol(0xfe, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1035 | WriteCharCol(0x20, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1036 | WriteCharCol(0x50, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1037 | WriteCharCol(0x88, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1038 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1039 | }break; |
grantphillips | 0:79ef6ebe51ae | 1040 | |
grantphillips | 0:79ef6ebe51ae | 1041 | case 108: // 'l' |
grantphillips | 0:79ef6ebe51ae | 1042 | { |
grantphillips | 0:79ef6ebe51ae | 1043 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1044 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1045 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1046 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1047 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1048 | }break; |
grantphillips | 0:79ef6ebe51ae | 1049 | |
grantphillips | 0:79ef6ebe51ae | 1050 | case 109: // 'm' |
grantphillips | 0:79ef6ebe51ae | 1051 | { |
grantphillips | 0:79ef6ebe51ae | 1052 | WriteCharCol(0xf8, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1053 | WriteCharCol(0x08, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1054 | WriteCharCol(0x30, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1055 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1056 | WriteCharCol(0xf0, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1057 | }break; |
grantphillips | 0:79ef6ebe51ae | 1058 | |
grantphillips | 0:79ef6ebe51ae | 1059 | case 110: // 'n' |
grantphillips | 0:79ef6ebe51ae | 1060 | { |
grantphillips | 0:79ef6ebe51ae | 1061 | WriteCharCol(0xf8, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1062 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1063 | WriteCharCol(0x08, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1064 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1065 | WriteCharCol(0xf0, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1066 | }break; |
grantphillips | 0:79ef6ebe51ae | 1067 | |
grantphillips | 0:79ef6ebe51ae | 1068 | case 111: // 'o' |
grantphillips | 0:79ef6ebe51ae | 1069 | { |
grantphillips | 0:79ef6ebe51ae | 1070 | WriteCharCol(0x70, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1071 | WriteCharCol(0x88, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1072 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1073 | WriteCharCol(0x88, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1074 | WriteCharCol(0x70, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1075 | }break; |
grantphillips | 0:79ef6ebe51ae | 1076 | |
grantphillips | 0:79ef6ebe51ae | 1077 | case 112: // 'p' |
grantphillips | 0:79ef6ebe51ae | 1078 | { |
grantphillips | 0:79ef6ebe51ae | 1079 | WriteCharCol(0xf8, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1080 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1081 | WriteCharCol(0x28, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1082 | WriteCharCol(0x28, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1083 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1084 | }break; |
grantphillips | 0:79ef6ebe51ae | 1085 | |
grantphillips | 0:79ef6ebe51ae | 1086 | case 113: // 'q' |
grantphillips | 0:79ef6ebe51ae | 1087 | { |
grantphillips | 0:79ef6ebe51ae | 1088 | WriteCharCol(0x10, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1089 | WriteCharCol(0x28, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1090 | WriteCharCol(0x28, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1091 | WriteCharCol(0x30, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1092 | WriteCharCol(0xf8, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1093 | }break; |
grantphillips | 0:79ef6ebe51ae | 1094 | |
grantphillips | 0:79ef6ebe51ae | 1095 | case 114: // 'r' |
grantphillips | 0:79ef6ebe51ae | 1096 | { |
grantphillips | 0:79ef6ebe51ae | 1097 | WriteCharCol(0xf8, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1098 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1099 | WriteCharCol(0x08, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1100 | WriteCharCol(0x08, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1101 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1102 | }break; |
grantphillips | 0:79ef6ebe51ae | 1103 | |
grantphillips | 0:79ef6ebe51ae | 1104 | case 115: // 's' |
grantphillips | 0:79ef6ebe51ae | 1105 | { |
grantphillips | 0:79ef6ebe51ae | 1106 | WriteCharCol(0x90, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1107 | WriteCharCol(0xa8, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1108 | WriteCharCol(0xa8, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1109 | WriteCharCol(0xa8, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1110 | WriteCharCol(0x40, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1111 | }break; |
grantphillips | 0:79ef6ebe51ae | 1112 | |
grantphillips | 0:79ef6ebe51ae | 1113 | case 116: // 't' |
grantphillips | 0:79ef6ebe51ae | 1114 | { |
grantphillips | 0:79ef6ebe51ae | 1115 | WriteCharCol(0x08, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1116 | WriteCharCol(0x7e, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1117 | WriteCharCol(0x88, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1118 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1119 | WriteCharCol(0x40, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1120 | }break; |
grantphillips | 0:79ef6ebe51ae | 1121 | |
grantphillips | 0:79ef6ebe51ae | 1122 | case 117: // 'u' |
grantphillips | 0:79ef6ebe51ae | 1123 | { |
grantphillips | 0:79ef6ebe51ae | 1124 | WriteCharCol(0x78, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1125 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1126 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1127 | WriteCharCol(0x40, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1128 | WriteCharCol(0xf8, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1129 | }break; |
grantphillips | 0:79ef6ebe51ae | 1130 | |
grantphillips | 0:79ef6ebe51ae | 1131 | case 118: // 'v' |
grantphillips | 0:79ef6ebe51ae | 1132 | { |
grantphillips | 0:79ef6ebe51ae | 1133 | WriteCharCol(0x38, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1134 | WriteCharCol(0x40, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1135 | WriteCharCol(0x80, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1136 | WriteCharCol(0x40, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1137 | WriteCharCol(0x38, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1138 | }break; |
grantphillips | 0:79ef6ebe51ae | 1139 | |
grantphillips | 0:79ef6ebe51ae | 1140 | case 119: // 'w' |
grantphillips | 0:79ef6ebe51ae | 1141 | { |
grantphillips | 0:79ef6ebe51ae | 1142 | WriteCharCol(0x78, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1143 | WriteCharCol(0x80, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1144 | WriteCharCol(0x60, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1145 | WriteCharCol(0x80, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1146 | WriteCharCol(0x78, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1147 | }break; |
grantphillips | 0:79ef6ebe51ae | 1148 | |
grantphillips | 0:79ef6ebe51ae | 1149 | case 120: // 'x' |
grantphillips | 0:79ef6ebe51ae | 1150 | { |
grantphillips | 0:79ef6ebe51ae | 1151 | WriteCharCol(0x88, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1152 | WriteCharCol(0x50, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1153 | WriteCharCol(0x20, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1154 | WriteCharCol(0x50, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1155 | WriteCharCol(0x88, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1156 | }break; |
grantphillips | 0:79ef6ebe51ae | 1157 | |
grantphillips | 0:79ef6ebe51ae | 1158 | case 121: // 'y' |
grantphillips | 0:79ef6ebe51ae | 1159 | { |
grantphillips | 0:79ef6ebe51ae | 1160 | WriteCharCol(0x18, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1161 | WriteCharCol(0xa0, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1162 | WriteCharCol(0xa0, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1163 | WriteCharCol(0xa0, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1164 | WriteCharCol(0x78, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1165 | }break; |
grantphillips | 0:79ef6ebe51ae | 1166 | |
grantphillips | 0:79ef6ebe51ae | 1167 | case 122: // 'z' |
grantphillips | 0:79ef6ebe51ae | 1168 | { |
grantphillips | 0:79ef6ebe51ae | 1169 | WriteCharCol(0x88, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1170 | WriteCharCol(0xc8, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1171 | WriteCharCol(0xa8, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1172 | WriteCharCol(0x98, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1173 | WriteCharCol(0x88, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1174 | }break; |
grantphillips | 0:79ef6ebe51ae | 1175 | |
grantphillips | 0:79ef6ebe51ae | 1176 | case 123: // '{' |
grantphillips | 0:79ef6ebe51ae | 1177 | { |
grantphillips | 0:79ef6ebe51ae | 1178 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1179 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1180 | WriteCharCol(0x6c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1181 | WriteCharCol(0x82, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1182 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1183 | }break; |
grantphillips | 0:79ef6ebe51ae | 1184 | |
grantphillips | 0:79ef6ebe51ae | 1185 | case 124: // '|' |
grantphillips | 0:79ef6ebe51ae | 1186 | { |
grantphillips | 0:79ef6ebe51ae | 1187 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1188 | WriteCharCol(0x00, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1189 | WriteCharCol(0xfe, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1190 | WriteCharCol(0x00, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1191 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1192 | }break; |
grantphillips | 0:79ef6ebe51ae | 1193 | |
grantphillips | 0:79ef6ebe51ae | 1194 | case 125: // '}' |
grantphillips | 0:79ef6ebe51ae | 1195 | { |
grantphillips | 0:79ef6ebe51ae | 1196 | WriteCharCol(0x00, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1197 | WriteCharCol(0x82, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1198 | WriteCharCol(0x6c, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1199 | WriteCharCol(0x10, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1200 | WriteCharCol(0x00, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1201 | }break; |
grantphillips | 0:79ef6ebe51ae | 1202 | |
grantphillips | 0:79ef6ebe51ae | 1203 | case 126: // '~' |
grantphillips | 0:79ef6ebe51ae | 1204 | { |
grantphillips | 0:79ef6ebe51ae | 1205 | WriteCharCol(0x20, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1206 | WriteCharCol(0x10, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1207 | WriteCharCol(0x10, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1208 | WriteCharCol(0x20, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1209 | WriteCharCol(0x10, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1210 | }break; |
grantphillips | 0:79ef6ebe51ae | 1211 | /* |
grantphillips | 0:79ef6ebe51ae | 1212 | |
grantphillips | 0:79ef6ebe51ae | 1213 | case : // '' |
grantphillips | 0:79ef6ebe51ae | 1214 | { |
grantphillips | 0:79ef6ebe51ae | 1215 | WriteCharCol(0x, x, page, color); |
grantphillips | 0:79ef6ebe51ae | 1216 | WriteCharCol(0x, x+1, page, color); |
grantphillips | 0:79ef6ebe51ae | 1217 | WriteCharCol(0x, x+2, page, color); |
grantphillips | 0:79ef6ebe51ae | 1218 | WriteCharCol(0x, x+3, page, color); |
grantphillips | 0:79ef6ebe51ae | 1219 | WriteCharCol(0x, x+4, page, color); |
grantphillips | 0:79ef6ebe51ae | 1220 | }break; |
grantphillips | 0:79ef6ebe51ae | 1221 | */ |
grantphillips | 0:79ef6ebe51ae | 1222 | |
grantphillips | 0:79ef6ebe51ae | 1223 | default: // not supported, print box |
grantphillips | 0:79ef6ebe51ae | 1224 | { |
grantphillips | 0:79ef6ebe51ae | 1225 | WriteData(0xfe); |
grantphillips | 0:79ef6ebe51ae | 1226 | WriteData(0xfe); |
grantphillips | 0:79ef6ebe51ae | 1227 | WriteData(0xfe); |
grantphillips | 0:79ef6ebe51ae | 1228 | WriteData(0xfe); |
grantphillips | 0:79ef6ebe51ae | 1229 | WriteData(0xfe); |
grantphillips | 0:79ef6ebe51ae | 1230 | } |
grantphillips | 0:79ef6ebe51ae | 1231 | } |
grantphillips | 0:79ef6ebe51ae | 1232 | WriteCharCol(0x00, x+5, page, color); //default last blank column of 6 x 8 character |
grantphillips | 0:79ef6ebe51ae | 1233 | |
grantphillips | 0:79ef6ebe51ae | 1234 | CS1pin = 1; |
grantphillips | 0:79ef6ebe51ae | 1235 | } |
grantphillips | 0:79ef6ebe51ae | 1236 |