Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 GMode Command Running a Program on the Target Compiling and Linking with On Time RTOS-32 |
GMode CommandIf the BIOS boot code Biosboot.exe is used, the boot code can place the video hardware into a different graphics mode during the boot process using BIOS interrupt 10h. Calling int 10h at run-time is not possible, because the BIOS can only operate in real mode or virtual 8086 mode, both of which are not supported by RTTarget-32. The GMode directive has the following syntax: GMode Mode [Mode...] Up to 15 BIOS video modes may be specified. At boot time, the boot code will attempt to set each graphics mode specified until one is found which is accepted by the video hardware. At run time, the graphics mode actually set can be enquired with function RTGetGMode. The Mode parameters must be in the range 0..7Fh for standard BIOS modes or in the range 100h..17Fh for VESA BIOS modes. If the boot code successfully sets a VESA mode, it will query the VESA BIOS for the VbeInfoBlock and the ModeInfoBlock and store them in the BootData section. Both structures can be retrieved at run-time using function RTGetBIOSDataPtr The hardware configuration file Graphpc.cfg (used by all RTPEG-32 demos) defines most commonly supported VESA modes. Graphpc.cfg attempts to set graphics modes in the order 105h 103h 101h 102h 12h (256 color modes with resolutions 1024x768, 800x600, 640x480, and then 16 color modes with resolutions 800x600 and 640x480). Only VESA modes with a linear frame buffer are supported, which requires a VESA BIOS version 2.0 or higher to be present on the graphics card (see boot flag BF_NO_VESA_LFB in section BOOTFLAGS Command to change this behavior). Program Vesatest.com can be used to check which modes are supported. Vesatest can be executed under MS-DOS or a DOS Box of Windows 3.1/95/98/ME to display all available VESA graphics modes and a list of MetaWINDOW and RTPEG-32 drivers which will support the respective modes. Use this program to determine which parameters the RTLoc directive GMode will support on a specific target. If a non-text mode is set, directive VideoRAM None should be included in the same configuration file, because RTTarget-32's char out handler cannot display characters in graphics mode. Instead, all text output is then sent to the host.
|