Subject: Re: segavga program

From: [email-masked] (andrew longhorn )
Date: Fri, 28 Aug 92 10:17:46 EST

-- From [email-masked] Fri Aug 28 09:16:18 1992
-- To: [email-masked] (andrew longhorn )
-- 
-- >I got it from the
-- >
-- >plaza.aarnet.edu.au
-- >
-- >archive in directory
-- >
-- >/graphics/graphics/virtual-worlds/sega
-- >
-- >and there is an unpacked directory there too.
-- >the program comes with 2 examples mball.img and desk1.img.
-- >I only got the program to try and fix the glasses circuit,
-- >I have only been using them as a test, I haven't tried making my own.
-- >
-- >Andrew
-- 
-- Thanks much, I'll try plaza.aarnet ......
-- 
-- BTW, I got a new (my third) 4030 Quad XOR circuit running this afternoon. 
-- Tried several different caps (in the pin 11-12 to pin 3-6-8 loop) to try
-- and "minimize" the right eye bleed & shakes.  My original circuit diagram
-- (obtained from Karzam) showed a 0.01 uF cap.  I tried 0.05 uF, 0.027-,
-- 0.025-, 0.022-, and 0.0185 uF.  The problem persists but the 0.0184 uF
-- seems to be a little better than any of the others.  I begin to believe
-- that there is a problem (vertical retrace?) of some sort in rend386 but
-- ....... why don't Dave and Bernie see it?  Seems everyone else does.
--
-- ---------------------------------------------------
-- T. K. Larson, Idaho National Engineering Laboratory
-- P.O. Box 1625, M/S 2090
-- Idaho Falls, Idaho 83415-2090
-- Phone (208) 525-5334; Fax (208) 525-5996
-- INTERNET: [email-masked]
-- ---------------------------------------------------
-- 

I hope we can work this out. I have a feeling the rend386 timing is wrong.
Since (as you will see) the image is so astoundingly perfect with segavga.

BTW: compile it with the -DREVERSE flag on or your image will be inside out.
     (check the makefile).

So far I have established that the 0,1,2 & 3 are set differently with segavga
and rend386, (i think rend386 uses 1 or 2 for the right eye but segavga
uses 3) this shouldn't effect it.

I tried stealing some timing code from segavga into rend386 (version 3) to
fix the problem, swapped some orderings, inserted vsyncs() etc, but any
improvement in the right eye generally blew the left eye out of sync.

The thing is that in both v3 and 4 or rend386 the image seems to bleed through
regularly but not in every cycle, more like once every 5-10 frames.

One thing I did notice that I thought was strange was when I did put a few
vsync()s in the code just before switching the glasses, it didn't seem to do
much until I loaded in metalman.fig and ROTATED him. I found there was a
direct and re-producable correlation between the angle I rotated him and the
frequency of the bleeds. In some positions I can even make the right image
fade in and out entirely. (so metalman disappears entirely).

Lastly, segavga seems to go:

wait for vertical retrace;
black right eye;
show left page;
wait for vertical retrace;
black left eye;
show right page;

whereas rend386 goes:

if right is shown
  show leftimage
  set phase left
else
  show right image
  set phase right
end
outportb phase (meaning black out opposite eye).

which means rend386 starts to flip the image then flips the glasses
where segavga does this in the opposite order, I would think that if this
was the problem, then both eyes would have a degraded image and I flipped
the code order to check it, sure enough, it made it worse.

Can anybody tell us what's going on? and why their circuit/rend386 combo
works?

Andrew

---

From: Chris Hand <[email-masked]>
Date: Fri, 28 Aug 92 9:45:56 BST

If the problem with rend386 is because the machine has *so much* to do
as well as switching the LCD glasses, then maybe we could have a
slightly modified circuit that switches the glasses automatically (free
running).  Then we feed logic-level versions of these 2 signals (2nd is
not necessarily just the inverse of the first) into an input port and
use them to trigger two interrupt-service routines, each of which
switches the current page for display.

Would this help, or am I missing the point?

Chris