[comp.sys.amiga.tech] dumb questions

collins@pnet02.cts.com (Steven Collins) (02/01/89)

I am working on a dynamics simulation that uses viewports (thanks Leo,
Wade, et al...) to create an interrupt driven double buffered display 
that is compatible with Haitex 3d-goggles. I have the rendering and 
rotational dynamics pretty well figured out but I am new to C and am 
having some bone-head problems with I/O. BTW, I am using Manx 3.6A.

How do you read a keypress? When I use getc, it echos the key to the
normal output window ( which I suppose is in the twilight zone while my
display is active...). All I want is a function that returns NULL if 
there is no key pressed and the ascii if there was. Do I really have
to figure out all that message port stuff to do this?  I am willing 
(perhaps too willing...) to sacrifice style points for the sake of 
execution speed.

In a similar vein, how does one find the mouse pointer position? All I
need is the absolute position on the screen. I want to simulate button
type gadgets in some quick and dirty way so I have time left to 
integrate my quaternions (if you know what I mean...)

I am using a home built 8 channel analog input device that uses the 
parallel port. I make special use of the POUT, BUSY and SEL lines
to address the analog channel I wish to read. Right now, I have the
code working by just hitting the hardware. Can I somehow tell the
system that I want exclusive use of the port and then reset it to
a usable state before releasing it back to the system? Also, 
how do you find the hardware registers on different machines. I know 
the absolute addresses on my A1000, but I would at least like to try
to make the code run on an A2000 as well. 

Any comments or suggestions are much appreciated...
                            
                             steve collins

UUCP: {ames!elroy, <backbone>}!gryphon!pnet02!collins
INET: collins@pnet02.cts.com