Article View: comp.sys.atari.st
Article #30619Mouse info from a-line
From: Dale Schumacher
Date: Mon, 15 Feb 1988 13:31
Date: Mon, 15 Feb 1988 13:31
26 lines
1678 bytes
1678 bytes
<Thomas_E_Zerucha@cup.portal.com> writes...
> Arkanoid uses a series of locations where GEM stores the current mouse
> X,Y, and button state, somewhere in 0x00002000 - 0x00002fff range, and
> you can find the locations easily and patch them. I have the new ROMs
> and a copy of ARKANOIDS that runs on them. When will programmers use
> the documented methods of doing these things <groan>?
I picked up some information a while ago about these values actually being
referencable as an offset from the a-line base address (like lots of other
information posted in Bammi's ALINE2.H). I haven't tested these values on
the Megas, but they should work. Perhaps someone could substantiate their
usefulness (or failure) on the Mega ROMs.
#define MOUSEX *((WORD *)((char *)aline + (char *)-344L))
#define MOUSEY *((WORD *)((char *)aline + (char *)-342L))
#define MOUSESTATE *((BYTE *)((char *)aline + (char *)-348L))
The mouse buttons appear to be (MOUSESTATE & 1) for left and (MOUSESTATE & 2)
for right. The higher order bits of MOUSESTATE seem to hacve something to
do with the mouse being moved. If anyone can expand on this information,
(or make corrections) please do.
Dale Schumacher
..ihnp4!meccts!stag!syntel!dal
(alias: Dalnefre')
Technical Details
Message-ID:
<338@stag.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!oddjob!uwvax!umn-d-ub!umn-cs!ems!nis!stag!daemonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!oddjob!uwvax!umn-d-ub!umn-cs!ems!nis!stag!daemon From: syntel!dal@stag.UUCP (Dale Schumacher) Newsgroups: comp.sys.atari.st Subject: Mouse info from a-line Message-ID: <338@stag.UUCP> Date: 15 Feb 88 13:31:58 GMT Sender: daemon@stag.UUCP Lines: 26 Posted: Mon Feb 15 07:31:58 1988