Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Game controller port access



On Mon, 08 Feb 1999 Ignatios Souvatzis wrote:
>On Mon, Feb 08, 1999 at 04:26:13PM +0100, Michael Boehnisch wrote:
>> 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.
[..]
>> 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?
[..]
>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.
[..]

Thanks alot, this really got me out of things and I now have a working program
to start with.  Unfortunately the sample rate of the device driver software
seems to be slightly too low to make this work.  I get stray 1-Bits from the
port.

The DCF signal bits are coded as pulses of 100ms for a 0 or 200ms for a 1, at
a rate of one bit per second.  This allows for a maximum fault of 50ms to safely
be able to differenciate between zeroes and ones.   Is NetBSD/Amiga able to take
care of this?  (If yes, I have to search for bugs in my program... :-(

I am aware Unix was not developed with real-time applications in mind but I
think reading a reasonably low-frequency signal like this should be possible.

The receiver works ok, as I can easily test with my program under AmigaOS,
even on an unexpanded A2000.  I'd really prefer to get the system time right on
boot-up with NetBSD (my hardware clock is terribly inaccurate...).

Yours,

    Michael Böhnisch



Home | Main Index | Thread Index | Old Index