[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4074.0. "Mouse Joy from C hw example" by BIGIST::SYSTEM () Mon Sep 03 1990 07:52

    
    I want to read port Joystick and Mouse ports from C. I have two
    dismantled josticks plugged into the back which gives me an array
    of 10 microswitches to experiment with.
    
    Having read a few good amiga programming books, I have some example
    C for reading the ports. Cant I simply read some port addresses to 
    get this device data (I know its meant to be all polite mtasking code
    through a device etc. But Im the only one on my Amy and I like to get
    some things a little quick if by being a little naughty)
                                                            
    I did see some example code somewhere to do this in C, with thingies
    included like <hardware/custom.h> and CIAxxx defines, but now that
    I want it! You know how it is.
    
    
    Anyone seen such an example??
    
    Marc.
    
    
T.RTitleUserPersonal
Name
DateLines
4074.1WJG::GUINEAUMon Sep 03 1990 08:4110
I think you need to use the POTGO resources to get at them in a multi-tasking
way.

Look in the 

WJG::AMIGA:EXAMPLES.ZOO, GURUS.ZOO 

files. There are lots of examples there. One may have joy stick port stuff...

john
4074.2I remember the source...BIGIST::SYSTEMMon Sep 03 1990 12:3215
    
    Thanks for the pointer, but they dont seem to contain exactly what Im
    looking for.
    
    However, I do remember where I saw the example. It was in an Amiga
    magazine available here in UK. Amiga Format it might have been,but
    the series it runs is called "The Code Clinic" Does somebody out
    there, get this mag with the code clinic?? It normally has a PD disk
    stuck on the front (hopefully with the actual source I am after)
    I knew I should have bought it at the time! If anyone has this disk
    Ill swap them a knackered old game for it ;-)
    
    Marc.
    
    
4074.3September Amiga Computing.TAGART::ATHOMSONC&#039;mon, git aff! /The Kelty ClippieTue Sep 04 1990 08:265
    The mag that runs the code clinic is Amiga Computing, and the September
    issue disk has a joy.c in it.
    Mail me if you want it.
    
    				Alan T.
4074.4FF344WELLIN::FINNISTue Sep 04 1990 18:409
    
    Check out Fred Fish #344 on TAPE:: 
    
    This contains the RKM_Companion Source files..
    
    I believe this is what you require..
    
    
    			- Pete -    ( The Node Hopper )
4074.5Great but documentation??BIGIST::SYSTEMWed Sep 05 1990 11:0615
    
    Thanks, the FF disk in.-1 has exactly what Im after and much much
    besides!
    
    	However having compiled and run the example I have a number of
    questions.
    
    Where is this potgo.resource documented??
    
    Can anyone who has used it post a listing of what bits get masked for
    what, in the call to AllocPotBits? ie. Its a ULONG mask defining which
    bits you want to allocate, but which bits relate to which pins,buttons
    etc. 
    
    Marc.