Subject: Re: Game controller port access
To: Michael Boehnisch <billy@psycho.uni-paderborn.de>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: port-amiga
Date: 02/08/1999 21:16:16
On Mon, Feb 08, 1999 at 04:26:13PM +0100, Michael Boehnisch wrote:
> Hi!
> 
> I own a DCF77 receiver for the time signal sent out at 77kHz from Braunschweig
> (Germany) and I'd like to use it under NetBSD 1.3.3/amiga.  It gets connected
> to one of the Amiga's game controller ports and works by sending pulses to the
> fire button pin.
> 
> Under AmigaOS I have written a nicely working program to read the current time
> and date and set the hardware clock accordingly. 
> 
> With NetBSD I simply do not know how to access the game ports.  Is there
> anything that helps me to get a signal every time a joystick button is pressed
> and released?   I tried to use /dev/mem and the kvm interface to read the
> memory mapped hardware registers but only get zeroes back.

BAH. Dont do this. You'll interfere with the device driver.

The /dev/mouse0 and /dev/mouse1 devices provide an event record at each
clock tick after a change, which is about the best you can get with the
hardware on a multitasking system.

try 

hexdump /dev/mouse1

for a quick demonstration. /sys/arch/amiga/dev/vuid_event.h
describes the exact packet structure.

Regards,
	Ignatios