[comp.sys.apple] GS joystick port

tclark@hawk.ulowell.edu (T.C. Clark) (05/05/89)

	could someone send me the locations from which to read
	the joystick port values on a GS? It's been a while and
	I've lost my chart. 
	     (I think we all know how painful that can be!)

	thanks,

		tom  -----> tclark@hawk.ulowell.edu

cs472226@umbc5.umbc.edu (David Wood (CS472226)) (05/05/89)

In article <13141@swan.ulowell.edu> tclark@hawk.ulowell.edu (T.C. Clark) writes:
>	could someone send me the locations from which to read
>	the joystick port values on a GS? It's been a while and
>	I've lost my chart. 
>		tom  -----> tclark@hawk.ulowell.edu

   Tom, this is undoubtedly NOT the approach you were thinking of, but
it's an approach and therefore deserves mention.
   It looks as if you're looking for the actual byte locations in memory
where the joystick X and Y axes are stored. I don't know where those are
either, but there's a ROM call which returns the joystick's X (x=0) or Y
(x=1) axis by feeding the x register the appropriate value, calling the
ROM, and fetching the value from A.
   I'm not exactly sure of the address either; I only discovered it over
the last week myself. M.Fischer's book (one of the first to come out)
has it, though, so you can call it that way.
   Bad news, though: you can't call it unless you're in emulation mode.
So if you're writing in ASM65816, CC, or FORTH :^), you're going to
choke the system.
   You get around THAT by using one of the MiscTools which does that
sort of thing. You push on an A, X, Y, and the word address you want to
call, and it'll return with the stack filled as if you had called it
yourself.

   If there ARE direct addresses for them in the ROM somewhere, though,
I'd like to know them. I'm ALWAYS looking for a better way...

                                                    -David Wood
************************************************************************
*  A Mind is a Terrible Thing  ***  Sometime in June, this account     *
* to have Oozing out          ***  turn into a pumpkin. Help this poor * 
* your ears...               ***  system addict stay in touch with     *
*      -- The League of     ***  his contacts on UseNET and/or         *
*         Sadistic         ***  BitNET. All contributions will be      *
*         Telepaths       ***  generously accepted through E-MAIL.     *
************************************************************************

orcus@pro-lep.cts.com (Brian Greenstone) (05/11/89)

Network Comment: to #3218 by pnet01!crash!ames.arc.nasa.gov!haven!umbc3!umbc5.umbc.edu!cs472226

I've been using the Tool call FW_Entry to read the joystick, but if someone an
(oops).. can give me a routine that does it directly I would be very greatful.
-Brian