@@ 66,6 66,7 @@ struct VGAmode
uchar attribute[0x15];
};
+#ifdef ORIGINALSAFARI
/*
* 640x480 display, 16 bit color
*/
@@ 88,10 89,35 @@ VGAmode mode12 =
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x01, 0x00, 0x0f, 0x00, 0x00,
};
+#else
+/*
+ * 640x480 display, 16 bit color - attempt at SVGA version...ches
+ */
+VGAmode mode12 =
+{
+ /* general */
+ 0xe7, 0x00, 0x70, 0x04,
+ /* sequence */
+ 0x03, 0x01, 0x0f, 0x00, 0x06,
+ /* crt */
+ 0x65, 0x4f, 0x50, 0x88, 0x55, 0x9a, 0x09, 0x3e,
+ 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe8, 0x8b, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3,
+ 0xff,
+ /* graphics */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f,
+ 0xff,
+ /* attribute */
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
+ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x01, 0x00, 0x0f, 0x00, 0x00,
+};
+#endif
void
genout(int reg, int val)
{
+delay(1000);
if(reg == 0)
outb(EMISCW, val);
else if (reg == 1)
@@ 100,6 126,10 @@ genout(int reg, int val)
void
srout(int reg, int val)
{
+ /*
+ * needed or the screen goes blank on an ultra VGA card
+ */
+ delay(1000);
outb(SRX, reg);
outb(SR, val);
}
@@ 112,6 142,10 @@ grout(int reg, int val)
void
arout(int reg, int val)
{
+ /*
+ * if this print is missing, we are left with a blank white screen.
+ */
+ print("arout %d %2x\n", reg, val);
inb(0x3DA);
outb(ARW, reg | 0x20);
outb(ARW, val);
@@ 119,6 153,7 @@ arout(int reg, int val)
void
crout(int reg, int val)
{
+ delay(1000); /* needed for 16bit VGA path on Ultra SVGA */
outb(CRX, reg);
outb(CR, val);
}