home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / apps / 6228 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  3.0 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!news.u.washington.edu!carson.u.washington.edu!dfitts
  2. From: dfitts@carson.u.washington.edu (Douglas Fitts)
  3. Newsgroups: comp.os.msdos.apps
  4. Subject: CodeView Snafu
  5. Summary: Videomode messes with mouse, manipulates monitors
  6. Keywords: 2-monitor debug MSC7.0  CV 4.00 _setvideomode() mouse PWB
  7. Message-ID: <1jsot5INN8g7@shelley.u.washington.edu>
  8. Date: 24 Jan 93 00:46:29 GMT
  9. Article-I.D.: shelley.1jsot5INN8g7
  10. Sender: dfitts@u.washington.edu (Doug Fitts)
  11. Distribution: usa
  12. Organization: University of Washington, Seattle
  13. Lines: 50
  14. NNTP-Posting-Host: carson.u.washington.edu
  15.  
  16. While debugging a MSC 7.0 (pre Win32) DOS program with CodeView 4.00 
  17. running in a DOS box under Windows 3.1 enhanced mode with the 2-monitor 
  18. option set I get the following behavior if I exit CV immediately after 
  19. executing the MS extention _setvideomode():
  20.  
  21. _setvideomode() argument        behavior
  22.  
  23. _HRES16COLOR            Mouse works, but mouse cursor is 
  24. _VRES16COLOR                    invisible in PWB.  Shelling to DOS 
  25.                                 and resetting the video mode to 3 
  26.                                 doesn't fix it.
  27.  
  28. _XRES16COLOR            Next execution of CV reverses the
  29.                 functions of the two monitors:
  30.                                 CV comes up on SVGA and C program
  31.                                 tries to run on mono monitor.
  32.  
  33. I haven't taken the latter case all the way to the _setvideomode()
  34. function for fear it would damage my mono, but it's good
  35. I was paying attention.  The hardware is a 486/33 clone with 
  36. a ViewSonic 5+ monitor and Diamond SpeedStar SVGA with 1 MB and a
  37. Treu Bleu mono adapter and monitor and MS mouse. 
  38.  
  39. The situation when running PWB from MSDOS 5.0 is worse:  As soon as
  40. CV exits back to PWB, PWB reports an "Internal VM error PWB 3912" and
  41. exits to DOS (probably reports this under Win also, but the video flips
  42. so fast I can't read it).  Reloading PWB at this point still shows the 
  43. invisible mouse cursor error (I didn't try _XRES, all this recompiling 
  44. is a pain).  Only  ^<Alt-Del> gets the cursor back to normal.  
  45.  
  46. One solution is never to exit CV without allowing the C program to 
  47. execute the call to _setvideomode(_DEFAULTMODE) often on cleanup.
  48. Of course, this works only if the program makes it all the way to that
  49. instruction.  Even if the program works well enough to exit normally 
  50. (mine sometimes do :)) I'm often in such a hurry to fix a found
  51. bug that I exit CV ASAP instead of letting the program exit normally 
  52. first.  Frustration ensues.
  53.  
  54. Why can't CV read the state of the adapters on entry and restore them 
  55. on exit just in case the program doesn't make it all the way to the 
  56. cleanup (rhetorical question ;-( )!  What causes this behavior?  
  57. Why is it different for _XRES?  Any ideas how to correct the problems 
  58. inside PWB without exiting and reloading the program (Win) or doing the
  59. boyscoutsalute (DOS)?  I have the Win32/NT beta but don't have a CDROM
  60. yet so it's still on the disk.  Is this fixed in that version?
  61.  
  62. -- 
  63. Doug Fitts
  64. dfitts@u.washington.edu
  65. First in Thirst
  66.