word i;\r
dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */\r
word CRTParms[] = {\r
-// 0x5f00, /* horizontal total */\r
-// 0x3f01, /* horizontal display enable end */\r
+// 0xe300, /* horizontal total */\r
+ 0x4f01, /* horizontal display enable end */\r
+ 0x5002, /* */\r
+ 0x5404, /* */\r
+ 0x8005, /* */\r
0x0d06, /* vertical total */\r
0x3e07, /* overflow (bit 8 of vertical counts) */\r
0x4109, /* cell height (2 to double-scan */\r
0xea10, /* v sync start */\r
0xac11, /* v sync end and protect cr0-cr7 */\r
0xdf12, /* vertical displayed */\r
-// 0x2013, /* offset/logical width */\r
+ 0x2813, /* offset/logical width */\r
0x0014, /* turn off dword mode */\r
0xe715, /* v blank start */\r
0x0616, /* v blank end */\r
/* width and height */\r
//TODO WWWW\r
\r
- /* TODO save current video mode and palette */\r
- vgaSetMode(VGA_256_COLOR_MODE);\r
-\r
/* disable chain4 mode */\r
outpw(SC_INDEX, 0x0604);\r
\r
}\r
}\r
\r
+// setBaseXMode() does the initialization to make the VGA ready to\r
+// accept any combination of configuration register settings. This\r
+// involves enabling writes to index 0 to 7 of the CRT controller (port\r
+// 0x3D4), by clearing the most significant bit (bit 7) of index 0x11.\r
+void\r
+modexsetBaseXMode(void)\r
+{\r
+ int temp;\r
+\r
+ /* TODO save current video mode and palette */\r
+ vgaSetMode(VGA_256_COLOR_MODE);\r
+\r
+ outp(CRTC_INDEX, 0x11);\r
+ temp = inp(CRTC_DATA) & 0x7F;\r
+ outp(CRTC_INDEX, 0x11);\r
+ outp(CRTC_DATA, temp);\r
+}\r
\r
void\r
modexLeave() {\r