www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/09/03:46:00

Date: Tue, 9 Aug 94 01:00:27 -0400
From: Cotton Seed <cottons AT monolith DOT mit DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Cc: ctm AT ardi DOT com, cottons AT monolith DOT mit DOT edu
Subject: vga graphics in a MSWindows window

i have an application (called executor) which runs in standard vga
graphics modes, and i need to be able to run it in a MSWindows
windowed dos session.

executor runs in two standard vga grahics modes:

mode 0x11; 640x480x1bpp and
mode 0x12; 640x480x4bpp.

executor uses libgrx, but only to set the graphics mode.  i have
written dpmi-complaint code to write directly to screen memory.  so
executor works fine when running under dos, or under MSWindows in a
full screen dosbox in both graphics modes.

some MSWindows 3.1 video drivers (the defualt vga driver and the
800x600x4bpp svga driver) support emulating vga graphics in a
MSWindows window (from the comp.os.ms-windows faq):

5.1.8.1.  VGA graphics in a windowed DOS session
  Windows 3.1 will support VGA graphics in a windows DOS session if you have
  the correct display driver.  True Windows 3.1 display drivers (such as the
  standard SuperVGA driver) will do this, but some partial implementations
  may not.

so it is possible to hit `Alt-Enter' when executor is running under
windows in a full-screen dos box, and create a MSWindows window in
which executor runs.

when executor is running monochrome (mode 0x11) this works fine
(although MSWindows periodically flushs the virtual vga screen used by
executor, so it appears choppy but it works).

But when i try to run executor at mode 0x12 in a MSWindows window,
things are very unhappy.  as before, a MSWindows window is created,
but MSWindows refreshs the virtual vga screen incorrectly.  the
displayed image appears in only two colors (white and dark gray if i
remember correctly).  i am guessing that only a single video plane (of
four) is being flushed into the MSWindows window.

so if you have any experience running 4bpp vga graphics in a MSWindows
windowed dos session or have any suggestions, i would love to hear
them.

thanks,

	- Cotton
---
Cotton Seed (cottons AT mit DOT edu)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019