Some user-friendly informations...

From - Thu Oct 30 17:50:39 1997
Received: from Leon.mat.uni.torun.pl (1234@leon.mat.uni.torun.pl [158.75.2.17])
        by zeus.fh-pforzheim.de (8.8.6/8.8.6) with ESMTP id SAA09973
        for ; Thu, 7 Aug 1997 18:34:28 +0200 (METDST)
Received: (from jaskier@localhost) by Leon.mat.uni.torun.pl (8.8.6/8.7.3) id SAA16514 for nadkar@fh-pforzheim.de; Thu, 7 Aug 1997 18:35:43 +0200 (MET DST)
From: Marcin Lewandowski 
Message-Id: <199708071635.SAA16514@Leon.mat.uni.torun.pl>
Subject: Re: tqa-mega-demo
To: nadkar@fh-pforzheim.de (Nady Karoly)
Date: Thu, 7 Aug 1997 18:35:43 +0200 (MET DST)
In-Reply-To: <199707150854.KAA14850@noc.belwue.de> from "Nady Karoly" at Jul 15, 97 10:50:44 am
X-Mailer: ELM [version 2.4 PL25 PGP3 *ALPHA*]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-UIDL: 3182f7cddcc8f796b6411e3e7dae9920
Status: RO
X-Mozilla-Status: 0011
Content-Length: 1469

> 
> hi... then send me sources codes for both mouses;)
> thanx... papa
> heaven/tqa

Hi!
This is original code from my game. Driver for amiga and ST mouse.
You must call this procedure all the time. After every long break you must
call the init procedure. (Because the synchronization....)
Main proc:

 lda $d300
 lsr @
 lsr @
 lsr @
 lsr @
 pha
 and #10  (#3 in ST)
; there you check left-right move
 ldy #3
l1 cmp htab,y
 beq l2
 dey
 bne l1
l2 tya
 clc
 adc #1
 and #3
 cmp xind
 bne l3
 sty xind
 dec xcur
l3 tya
 sec
 sbc #1
 and #3
 cmp xind
 bne l4
 sty xind
 inc xcur
l4 pla
 and #5 (#12 in ST)

and there is routine for up-down. The same as left-right but:
xind is translated to yind
xcur to ycur
htab to vtab

Init proc: there you are only check actual mouse position
 lda $d300
 lsr @
 lsr @
 lsr @
 lsr @
 pha
 and #10  (#3 in ST)
 ldy #3
i1 cmp htab,y
 beq i2
 dey
 bne i1
i2 sty xind
 pla
 and #5 (#12 in ST)
 ldy #3
i3 cmp vtab,y
 beq i4
 dey
 bne i3
i4 sty yind

simpe,isn't it? 
So, for now only left tables:
htab:
Amiga: 0,2,10,8
ST: 0,2,3,1
vtab:
Amiga: 0,1,5,4
ST: 0,8,12,4
I hope it will works. As I know, Vblank interrupt is fast enough, so
after it, you needn't call the init proc.

(c) by                                                    Jaskier/Taquart
                                                     Marcin Lewandowski
                                                 (jaskier@mat.uni.torun.pl)
back to main-index

Last changes: 18 maj 1998

Amiga_logo

Feel free to contact me for any legal reason!
 HeAvEn, Member of TaquarT