From: yogi@cs.ubc.ca (Yossi Gil)
Subject: Re: Bug in DV screen shadowing?
Keywords: DV, Shadowing
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Tue, 28 Jul 92 17:24:20 GMT

cornet@zen.et.tudelft.nl (Jan-Pieter Cornet) writes:


>I have encountered a strange phenomenon regarding the shadow screen
>buffer in DV. When I set "Writes text directly to screen" to Y, then the
>(hardware) cursor won't move in that window as soon as some DV- aware
>program has started shadowing via the AX=2B02/INT 21h call, unless via
>a DV-specific cursor motion (ie. sending a window stream with opcode C0
>in it). Note that the setting of "Virtualize text" makes no difference
>at all, because I'm using a 286.

>I mentioned this "hanging cursor" problem before in this group, but
>nobody knew an answer at that time. To cure the problem while on the
>command line, I've written a small program that does nothing more than
>issuing a "stop shadowing" call (ie. AX=2B05h, CXDX="DESQ", INT 21h,
>see Ralf's interrupt list for more info), but this of course is not a
>decent solution. (In case anyone is interested in this 16 byte program
>I could easily mail it or post it or ftp it or /dcc it, whatever...)

>The funny thing is that when I set "Writes directly" to N, that the
>same DESQview aware-program does function correctly (the cursor moves).
>Is this a bug in DV or is it a bug in the DV-aware program?  What I
>suspect what happens is: DV expects a "writes directly to screen" program
>to be accompanied by a "virtualize" set to Y (taken care of by QEMM
>which won't run on a 286), and then just waits for the OUTs to the video
>chip registers to be trapped... on my 286, this gives the effect that
>I occasionally see the cursor flash for a very short while on the correct
>position (the OUTs do update the hardware cursor), but then immediately
>DV resets screen and cursor to the state it believes is right...

>Another shadowing-related problem is, that just after the "start
>shadowing" call, DV apparently assumes that the screen is blank.
>Writing spaces to the shadow buffer does not necessarily clear the
>corresponding screen location, because DV thought the screen was already
>blank at that point, and subsequently doesn't update the screen. Is this
>another bug or a feature?

>{Now the story about Terse and VB's LIST, which you might skip} I noticed
>this behaviour in Yossi Gil's Terse. I didn't test this on 386 machines,
>but I believe that setting "writes directly"=Y, and "virtualize video"=N
>in DV/386 will show the same problems. Terse also leaves the shadowing
>on, resulting in a "hanging" cursor even if you exit Terse. You can

Is it required to turn shadowing off when a program is exited?  I would
expect this to be done automatically! Perhaps this is a clue to this
mystery.

>also easily witness the "ghosting" of other text with this program.
>The screen just won't be empty when you start the editor!

I am not a regular user of DV. In fact, the only copy of DV I have is
a dusty one supplied with a computer I bought 4 years ago. (I suspect
that this copy is illegal, since the docs looked kind of xeroxed.)
From what I remember of my testings, I didn't see anything like this.

From what I understand from the above report, the problem has more to
do with DV then with LIST/TERSE. Perhaps the problem is related to 
the screen adapter used.

Anyway, I will dig out my copy of DV and try it out. 
 
>If anyone can give me some hints or tips as to work around these problems,
>I'd be very grateful. I was thinking that some of the problems might be
>solved by installing a TSR that intercepts the "start shadowing" call,
>then clears the screen, and starts updating the cursor regularly (from
>INT 8 or INT 29h perhaps?). Does this seem feasable?

Let me join Jan-Pieter in this plea.

>Thanks,

>-- Jan-Pieter
>cornet@duteca.et.tudelft.nl

Yossi
--
Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
Newsgroups: comp.os.msdos.desqview