From: allbery@NCoast.ORG (Brandon S. Allbery KF8NH)
Subject: Re: Game program hangs DesqView
Reply-To: allbery@ncoast.org (Brandon S. Allbery KF8NH)
Organization: North Coast Public Access *NIX, Cleveland, OH
Date: Wed, 29 Jul 1992 01:36:36 GMT
Followup-To: comp.os.msdos.desqview

As quoted from <757@tdat.teradata.COM> by swf@teradata.com (Stanley Friesen):
+---------------
| |>The game is Strike Eagle II from MicroProse, ...
| |>Any idea what is going on?  And what can be done about it?
| |
| |Most game programmers assume that their program will be the only software
| |running on a DOS machine (other then the OS), and tend to take a liberal
| |attitude towards any shortcuts they can devise.
| 
| Silly assumption.
| 
| |DESQview tends to rely
| |on programs following some of the "rules" of "polite" programming .
| | In particular the things these programs tend to do that are "rude" include
| |directly accessing ROMs (especially the video ROM) instead of using the
| |appropriate interrupt or BIOS call.
| 
| O.K.  Now are there any config. options I can set to at least localize this
| to the window in which the game is running?
+---------------

I don't think you understand what is happening, quite.

The problem is that, by breaking the rules, game programs do things which are
almost guaranteed to cause problems under a multitasking system.  Like
accessing BIOS and adapter ROMs directly (they aren't re-entrant, so a task
switch while such illegally-obtained access is going on can easily lead to a
crash; if DV can intercept the call it will insure that the system doesn't
switch tasks while in the BIOS).

Even worse is a program which does this while QEMM 6's Stealth is active:  the
ROMs aren't even *there*!  Guaranteed Big Red Switch time... but this will
happen outside of DV as well, so that apparrently isn't it.

+---------------
| The program locks up *immediately*, before it has displayed *anything*,
| and before I make any attempt to *do* any thing.  Could just switching
| to a hi-res mode and attempting to draw do this?  (Hmm, I seem to remember
| having problems with GIF viewers as well, but nothing quite like this).
+---------------

Depends on how it switches and what DV thinks is happening with the video
memory at the time.  And on other things:  for example, the Borland C++ IDE
will lock up Windows or DV.  (Borland gets around this by providing a Windows
PIF which turns off multitasking and puts it into direct mode... effectively
turning Windows into the world's most bloated DPMI server.  :-) (...isn't it
anyway?  :-)  I still can't figure out why, neither can Quarterdeck, and the
Windows PIF supplied by Borland suggests that Borland really isn't interested
in making their IDE compatible with multitaskers.  I'm sure many game
companies feel the same way.

Another almost-guaranteed lockup is if the program switches to a hi-res video
mode, the card maps memory into B000-B7FF to support it, but QEMM has mapped
RAM there.  The fix here is to not include B000-B7FF to QEMM (losing 32K of
high RAM).

+---------------
| This game is supposed to adapt itself to the available timer.
+---------------

This can be worse:  the timing can change dynamically depending on what other
tasks are doing and whether you open or close another window after starting
the program.

++Brandon
-- 
Brandon S. Allbery, KF8NH [44.70.4.88]: allbery@NCoast.ORG, bsa@telotech.com
Senior Programmer, Telotech, Inc. (if I may call myself that...)