[comp.os.msdos.programmer] Virtual reality for the PC!

sorrow@oak.circa.ufl.edu (06/26/91)

I am working on a tiny little project to try and make my 386 act like
a VR machine....sort of.  Well, I can't afford the body suit and the
holographic display, but I do have VGA and a nintendo power glove. :-)

Anyway, I used some code posted by someone to sync the shutter speed on
a pair of Amiga Xspecs 3d glasses to my vertical retrace (whoever posted
that stuff...THANKS!).  I now have full 3d on my monitor, kind of nifty.
Rewiring is pretty easy.  All it involves is changing the 12v input of
the glasses to accept a 5v output from an RS232C (RTS or DTR high and low
toggle the glasses...high-left eye shut, low-right eye shut or something
like that).

Anyway, by synchronizing the shuttering of the two lenses with swapping pages
of screen images, each with an image slightly offset from each other, I get
3d.

This is nifty, but animatioyn is a bitch and a half (try updating two screens
of VGA in eral time in less than 1/60th of a second).  That I will worry about
later.

What I am doing now is trying to wire any and/or all of the following:

Nintendo Power Glove
Nintendo Helmet Laser Thingy (whatever it is!)

I would like to be able to hook one more to a serial port, and one to a
game port.  That would allow me to also hook up a joystick.

My question is this:  has anyone done this yet?  I want full interactive
head to head tank combat/mechwarriors from hell and am wondering if anyone
has done this.

Finally, for communicattiosn between two PCs, should I write my own ISRs or
should I use a comm package?  I hear the LiteComm package is pretty nice..
has anyone used it?

Brian

/*
Brian Hook -- Specialist in X to ANSI.SYS porting software
-----------------------------------------------------------------
"Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN
inches....better save the women and children first...but this one goes to 11!
..anymore of that plutonium nyborg?....there can be only ONE!....like a 
finger pointing to the moon....ease the seat back...one day closer to death
*/

frank@cavebbs.gen.nz (Frank van der Hulst) (06/27/91)

In article <0094AAC8.48F87280@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes:
>Anyway, I used some code posted by someone to sync the shutter speed on
>a pair of Amiga Xspecs 3d glasses to my vertical retrace (whoever posted
>that stuff...THANKS!).  I now have full 3d on my monitor, kind of nifty.

I guess that was my code (320x400 display). I'm glad you liked it.

>What I am doing now is trying to wire any and/or all of the following:
>Nintendo Power Glove
>Nintendo Helmet Laser Thingy (whatever it is!)
>
>I would like to be able to hook one more to a serial port, and one to a
>game port.  That would allow me to also hook up a joystick

We have a Nintendo Power Glove connected to a PC, as described in BYTE
magazine, July (I think) 1991, p288??, connected via the printer port.
Currently the only software we've got working is a crude MS mouse emulator.

There's also a mailing list being run: try glove-list@karazm.math.uh.edu

Frank.
.
-- 

Take a walk on the wild side, and I don't mean the Milford Track.
Kayaking: The art of appearing to want to go where your boat is taking you.

sorrow@oak.circa.ufl.edu (06/28/91)

Yeah, I guess it was you.  Thanks. :-)

On to another question....what is about the fastest method of updating 
screens?  Has anyone managed to use "chopper" glasses and do animation
at the same time?  It would entail updating 2 pages of video every 60th
second.  Is this possible?  Anything slower would be out of the question
since flicker would become tiresome.

Has anyone messed with that Nintendo head laser thingy and trying to get
it hooked to a PC?

Brian
/*
Brian Hook -- Specialist in X to ANSI.SYS porting software
-----------------------------------------------------------------
"Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN
inches....better save the women and children first...but this one goes to 11!
..anymore of that plutonium nyborg?....there can be only ONE!....like a 
finger pointing to the moon....ease the seat back...one day closer to death
*/

eegeh@marlin.jcu.edu.au (Glen Elliot Harris) (06/28/91)

In <0094AC65.E53F91C0@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes:

>On to another question....what is about the fastest method of updating 
>screens?  Has anyone managed to use "chopper" glasses and do animation
>at the same time?  It would entail updating 2 pages of video every 60th
>second.  Is this possible?  Anything slower would be out of the question
>since flicker would become tiresome.

>Brian Hook -- Specialist in X to ANSI.SYS porting software

  Well, If you used a 320x200 screen and had one screen per refresh, eg
one left/right pair per every two refresh, you would get a 30Hz
animation.  In 256 colors, that would be(get out the calculator)
320 x 200 x 60 = 3.84 million bytes.Some ET4000 cards can get up to this
video write rate, and my PowerGraph can do 5.3Mb/s.
  If you wanted to cut the animation down to 15 frame pairs per second,
you would be using the same amount of transfer, unless you played around
with the register that tells the cars where to start reading from in the
video ram. ie: write first frame, write second frame AFTER the end of
the first frame in memory, move pionter to second frame, wait, move
pointer to first frame, wait, move pointer to second frame.  While
waiting, you could be putting more frames in the video ram, ready for
display.
  This is a very memory hungry method of doing things, so an XMS memory
move directly to the screen memory, although it may be impossible to do
with the pointer method above, is _VERY_ fast, as 87 frames/s in
640x350x16 when moving 640x256 pixel screens shows.

Glen Harris
eegeh@marlin.jcu.edu.au