windows-nt/Source/XPSP1/NT/drivers/video/ms/vga/mini/oldmodes.sav
2020-09-26 16:20:57 +08:00

615 lines
23 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

VIDEOMODE ModesVGA[] = {
//
// Beginning of VGA color modes.
//
//
// Mode index 0.
// Color text mode 3, 720x400, 9x16 char cell (VGA).
//
{ VIDEO_MODE_COLOR, // flags that this mode is a color mode, but not graphics
4, // four bits of color representation = 16 colors available
80, 25, // 80x25 text resolution
720, 400, // 720x400 pixels on screen
160, 0x10000, // 160 bytes per scan line, 64K of CPU-addressable bitmap
MemMap_CGA, // the memory mapping is the standard CGA memory mapping
// of 32K at B8000
{
//
// These are the register-setting commands, in the form of REGCMD structures.
// The first entry is the action to be taken (set a register, set an
// indexed register block, or end the mode initialization). Immediately
// following is a REGDATA structure, containing the value(s) to be output
// (represented as a string for convenience, but the terminating 0 is
// ignored), followed by the first index to be written to and then the
// number of indexed registers to loaded. Note that if the command is
// SetRegCmd, to set a single non-indexed register, then the field following
// the string (the FirstEntry field) is actually the I/O address of the
// register to be written to, and the last field (NumEntries) is ignored.
//
{ BeginSyncResetCmd }, // enable synchronous reset while we change
// clocks and timing states
//
// Set the 4 Sequence Controller registers other than the Synchronous Reset
// register. Synchronous reset must be in effect while clock and timing
// state related Sequencer registers are being set.
//
{ SetSeqCmd, // set a block of Sequencer registers
{ "\x00\x03\x00\x02", // values for indexed registers 1-4
0x01, // first index to set = 1
VGA_NUM_SEQUENCER_PORTS-1 // set all but 1 indexed Sequencer register
}
},
//
// Set the Miscellaneous Output register to establish color/mono addressing
// and select clocks and sync polarities.
// Synchronous reset must be in effect while this register is being set,
// because it contains clock control bits.
//
{ SetRegCmd, // set a non-indexed register
{ "\x67", // set to 0x67
MISC_OUTPUT_REG_WRITE_PORT // set the Miscellaneous Output register
}
},
//
// Important! Never change the memory chaining state except in sync reset!
//
{ SetGraphCmd, { "\x0E", 0x06, 1 } },
{ EndSyncResetCmd }, // terminate synchronous reset; clocks changed
//
// Set CRT Controller register 0x11 to unprotect CRTC registers 0-7.
//
{ SetCrtcCmd,
{ "\x0E",
IND_VSYNC_END,
0x01
}
},
//
// Set all 25 CRT Controller registers.
//
{ SetCrtcCmd,
{ "\x5F\x4F\x50\x82\x55\x81\xBF\x1F\x0\x4F\xD\xE\x0\x0\x0\x0\x9C\x8E\x8F\x28\x1F\x96\xB9\xA3\xFF",
0x00,
VGA_NUM_CRTC_PORTS
}
},
//
// Set all 21 Attribute Controller registers.
//
{ SetAttCmd,
{ "\x00\x01\x02\x03\x04\x05\x14\x07\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x04\x00\x0F\x08\x0",
0x00,
VGA_NUM_ATTRIB_CONT_PORTS
}
},
//
// Set all 9 Graphics Controller registers.
//
{ SetGraphCmd,
{ "\x00\x00\x00\x00\x00\x10\x0E\x00\xFF",
0x00,
VGA_NUM_GRAPH_CONT_PORTS
}
},
//
// done
//
{ TerminateCmd }
}
},
//
// Mode index 1
// Color text mode 3, 640x400, 8x16 char cell (not a VGA mode; MCGA mode, can
// be used for plasma/LCD displays).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ VIDEO_MODE_COLOR, 4, 80, 25, 640, 400, 160, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x1\x3\x0\x2", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\xBF\x1F\x0\x4F\xD\xE\x0\x0\x0\x0\x9C\x8E\x8F\x28\x1F\x96\xB9\xA3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x4\x0\xF\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 2
// Color text mode 1, 360x400, 9x16 char cell.
//
{ VIDEO_MODE_COLOR, 4, 40, 25, 360, 400, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x08\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x67", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x0A0\x0BF\x1F\x00\x4F\x0D\x0E\x0\x0\x0\x0\x09C\x8E\x8F\x14\x1F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x4\x0\xF\x8\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 3
// Color text mode 1, 320x400, 8x16 char cell (not a VGA mode; MCGA mode, can
// be used for plasma/LCD displays).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ VIDEO_MODE_COLOR, 4, 40, 25, 320, 400, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x09\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x0A0\x0BF\x1F\x00\x4F\x0D\x0E\x0\x0\x0\x0\x09C\x8E\x8F\x14\x1F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x4\x0\xF\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 4
// Color text mode 3, 640x350, 8x14 char cell (EGA).
//
{ VIDEO_MODE_COLOR, 4, 80, 25, 640, 350, 160, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\xBF\x1F\x0\x4D\xB\xC\x0\x0\x0\x0\x83\x85\x5D\x28\x1F\x63\x0BA\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x00\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 5
// Color text mode 1, 320x350, 8x14 char cell (EGA).
//
{ VIDEO_MODE_COLOR, 4, 40, 25, 320, 350, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x09\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x0A0\x0BF\x1F\x00\x4D\x0B\x0C\x0\x0\x0\x0\x83\x85\x5D\x14\x1F\x63\x0BA\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x00\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 6
// Color text mode 3, 640x200 double-scanned, 8-wide char cell (CGA).
//
{ VIDEO_MODE_COLOR, 4, 80, 25, 640, 200, 160, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0BF\x1F\x00\x0C7\x06\x07\x0\x0\x0\x0\x9C\x8E\x8F\x28\x1F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x00\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 7
// Color text mode 1, 320x200 double-scanned, 80, 0x10000, 8-wide char cell (CGA).
//
{ VIDEO_MODE_COLOR, 4, 40, 25, 320, 200, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x09\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 0x06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x0A0\x0BF\x1F\x00\x0C7\x06\x07\x0\x0\x0\x0\x9C\x8E\x8F\x14\x1F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x00\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 8
// Color graphics mode 0x04, 320x200 4 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 2, 40, 25, 320, 200, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x09\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0F", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x80\xBF\x1F\x0\xC1\x0\x0\x0\x0\x0\x0\x9C\x8E\x8F\x14\x0\x96\xB9\xA2\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x13\x15\x17\x2\x4\x6\x7\x10\x11\x12\x13\x14\x15\x16\x17\x01\x0\x03\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x30\x0F\x00\x0FF ", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 9
// Color graphics mode 0x06, 640x200 2 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 1, 80, 25, 640, 200, 80, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x01\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0D", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xBF\x1F\x0\xC1\x0\x0\x0\x0\x0\x0\x9C\x8E\x8F\x28\x0\x96\xB9\xC2\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x17\x01\x0\x01\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x0D\x0\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 10
// Color graphics mode 0x0D, 320x200 16 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 4, 40, 25, 320, 200, 40, 0x10000, MemMap_VGA4Plane,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x09\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x2D\x27\x28\x90\x2B\x80\xBF\x1F\x0\xC0\x0\x0\x0\x0\x0\x0\x9C\x8E\x8F\x14\x0\x96\xB9\xE3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x6\x7\x10\x11\x12\x13\x14\x15\x16\x17\x01\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x05\x0F\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 11
// Color graphics mode 0x0E, 640x200 16 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 4, 80, 25, 640, 200, 80, 0x10000, MemMap_VGA4Plane,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xBF\x1F\x0\xC0\x0\x0\x0\x0\x0\x0\x9C\x8E\x8F\x28\x0\x96\xB9\xE3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x6\x7\x10\x11\x12\x13\x14\x15\x16\x17\x01\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x05\x0F\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 12
// Color graphics mode 0x10, 640x350 16 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 4, 80, 25, 640, 350, 80, 0x10000, MemMap_VGA4Plane,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xBF\x1F\x0\x40\x0\x0\x0\x0\x0\x0\x83\x85\x5D\x28\xF\x63\xBA\xE3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x01\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x05\x0F\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 13
// Color graphics mode 0x11, 640x480 2 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 1, 80, 30, 640, 480, 80, 0x10000, MemMap_VGALinear,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xE3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0C", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xB\x3E\x0\x40\x0\x0\x0\x0\x0\x0\xEA\x8C\xDF\x28\x0\xE7\x4\xC3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x3F\x01\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x05\x01\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 14
// Color graphics mode 0x12, 640x480 16 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 4, 80, 30, 640, 480, 80, 0x10000, MemMap_VGA4Plane,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xE3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xB\x3E\x0\x40\x0\x0\x0\x0\x0\x0\xEA\x8C\xDF\x28\x0\xE7\x4\xE3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x01\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x05\x0F\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 15
// Color graphics mode 0x13, 320x200 256 colors.
//
{ VIDEO_MODE_COLOR+VIDEO_MODE_GRAPHICS, 8, 40, 25, 320, 200, 320, 0x10000, MemMap_VGALinear,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x0E", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x63", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xBF\x1F\x0\x41\x0\x0\x0\x0\x0\x0\x9C\x8E\x8F\x28\x40\x96\xB9\xA3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\x0A\x0B\x0C\x0D\x0E\x0F\x41\x0\x0F\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x40\x05\x0F\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 16
// Color text mode 3, 720x480, 9x16 char cell (non-standard, provides 5 extra
// lines of text).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ VIDEO_MODE_COLOR, 4, 80, 30, 720, 480, 160, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x00\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xE7", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0C", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0B\x3E\x0\x4F\xD\xE\x0\x0\x0\x0\xEA\x8C\xDF\x28\x1F\xE7\x04\xA3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x4\x0\xF\x8\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 17
// Color text mode 3, 640x480, 8x16 char cell (non-standard, provides 5 extra
// lines of text, can be used for plasma/LCD displays).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ VIDEO_MODE_COLOR, 4, 80, 30, 640, 480, 160, 0x10000, MemMap_CGA,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xE3", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0E", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0C", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0B\x3E\x0\x4F\xD\xE\x0\x0\x0\x0\xEA\x8C\xDF\x28\x1F\xE7\x04\xA3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x1\x2\x3\x4\x5\x14\x7\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x4\x0\xF\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0E\x00\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Beginning of monochrome VGA modes.
//
//
// Mode index 18
// Mono text mode 7, 720x400, 9x16 char cell (VGA).
//
{ 0, 0, 80, 25, 720, 400, 160, 0x10000, MemMap_Mono,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x00\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x66", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0A", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0BF\x1F\x00\x47\x0D\x0E\x0\x0\x0\x0\x9C\x8E\x8F\x28\x0F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x8\x8\x8\x8\x8\x8\x8\x10\x18\x18\x18\x18\x18\x18\x18\x06\x0\x0F\x08\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0A\x00\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 19
// Mono text mode 7, 640x400, 8x16 char cell (non-standard, can be used for
// plasma displays).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ 0, 0, 80, 25, 640, 400, 160, 0x10000, MemMap_Mono,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\x62", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0A", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x0E", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0BF\x1F\x00\x4F\x0D\x0E\x0\x0\x0\x0\x9C\x8E\x8F\x28\x0F\x96\x0B9\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x8\x8\x8\x8\x8\x8\x8\x10\x18\x18\x18\x18\x18\x18\x18\x06\x0\x0F\x00\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0A\x00\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 20
// Mono text mode 7, 720x350, 9x14 char cell (EGA).
//
{ 0, 0, 80, 25, 720, 350, 160, 0x10000, MemMap_Mono,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x00\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA6", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0A", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0BF\x1F\x00\x4D\x0B\x0C\x0\x0\x0\x0\x83\x85\x5D\x28\x0D\x63\x0BA\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x8\x8\x8\x8\x8\x8\x8\x10\x18\x18\x18\x18\x18\x18\x18\x06\x0\x0F\x08\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0A\x00\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 21
// Mono text mode 7, 640x350, 8x14 char cell (non-standard, can be used for
// plasma displays).
// Values not checked, because this is a non-standard mode and there's nothing
// to compare it to, so it may or may not work.
//
{ 0, 0, 80, 25, 640, 350, 160, 0x10000, MemMap_Mono,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x03\x00\x02", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA2", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x0A", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x55\x81\x0BF\x1F\x00\x4D\x0B\x0C\x0\x0\x0\x0\x83\x85\x5D\x28\x0D\x63\x0BA\x0A3\x0FF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x8\x8\x8\x8\x8\x8\x8\x10\x18\x18\x18\x18\x18\x18\x18\x06\x0\x0F\x00\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x10\x0A\x00\x0FF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
},
//
// Mode index 22
// Mono graphics mode 0x0F, 640x350 4 attributes.
//
{ VIDEO_MODE_GRAPHICS, 0, 80, 25, 640, 350, 80, 0x10000, MemMap_VGA2Plane,
{
{ BeginSyncResetCmd },
{ SetSeqCmd, { "\x01\x0F\x00\x06", 0x01, VGA_NUM_SEQUENCER_PORTS-1 } },
{ SetRegCmd, { "\xA2", MISC_OUTPUT_REG_WRITE_PORT, 0x01 } },
{ SetGraphCmd,{ "\x05", 06, 1} },
{ EndSyncResetCmd },
{ SetCrtcCmd, { "\x05", IND_VSYNC_END, 0x01 } },
{ SetCrtcCmd, { "\x5F\x4F\x50\x82\x54\x80\xBF\x1F\x0\x40\x0\x0\x0\x0\x0\x0\x83\x85\x5D\x28\xF\x63\xBA\xE3\xFF", 0x00, VGA_NUM_CRTC_PORTS } },
{ SetAttCmd, { "\x0\x8\x0\x0\x18\x18\x0\x0\x0\x8\x0\x0\x0\x18\x0\x0\x3\x0\x5\x0\x0", 0x00, VGA_NUM_ATTRIB_CONT_PORTS } },
{ SetGraphCmd,{ "\x0\x0\x0\x0\x0\x0\x5\xF\xFF", 0x00, VGA_NUM_GRAPH_CONT_PORTS } },
{ TerminateCmd }
}
}
};
//
// Total # of video modes this driver supports.
//
#define NUM_VIDEO_MODES (sizeof(ModesVGA)/sizeof(VIDEOMODE))
//
// Memory map table -
//
// These memory maps are used to save and restore the physical video buffer.
//
MEMORYMAPS MemoryMaps[] = {
// planes length start
// ------ ------ -----
{0, 0x08000, 0xB0000}, // all mono text modes (7)
{0, 0x08000, 0xB8000}, // all color text modes (0, 1, 2, 3,
// standard and non-standard),
// CGA graphics modes (4, 5, 6),
{1+2+4+8, 0x20000, 0xA0000}, // all VGA 4-plane graphics modes
// (D, E, 10, 12)
{1 +4, 0x20000, 0xA0000}, // all VGA 2-plane graphics modes (F)
{0, 0x20000, 0xA0000}, // all VGA linear graphics modes
// (11, 13)
};