Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]   Go Down

Author Topic: Mouse Problems  (Read 14866 times)

0 Members and 1 Guest are viewing this topic.

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Mouse Problems
« Reply #15 on: April 14, 2010, 04:08:16 PM »


I'll look into the workbench side of things. I'm sure it must be possible, just not easy :(
Thanks for your input anyway, SamuraiCrow.


Regards,
Lonewolf10

Logged

skateblind

  • Important 'looking' person
  • Forum Mod
  • A2000
  • *****
  • Karma: 668
  • Offline Offline
  • Gender: Male
  • Posts: 509
Re: Mouse Problems
« Reply #16 on: April 16, 2010, 12:43:19 AM »

On a similar note, has anybody ever got Mouse Click to work? I cannot get any values from it other than %00000000. Horace said he has never got it working either. I have tried testing it with BTST and printing out its values with bin$ and I still get nothing. Mouse Key works fine, but I would have to write a bunch of code to get it to operate like Mouse Click.
« Last Edit: April 16, 2010, 12:44:50 AM by skate »
Logged
What are you looking at?

BooBoo

  • Amiga Guru
  • A600
  • ****
  • Karma: 3
  • Offline Offline
  • Posts: 168
Re: Mouse Problems
« Reply #17 on: April 16, 2010, 08:03:53 PM »

Is mouse Click just for a single press?

Anyways probably not much help to you Skate

Do
M=Mouse Click
If M<>0 then Print M
Loop

Is there anyway of reading Second Fire button port 1?
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Mouse Problems
« Reply #18 on: April 16, 2010, 11:29:09 PM »

I'm not sure whether I have ever used Mouse Click or not, but here are some alternatives that I have found by a quick search of the Extension Commands file I created (it should be linked to, or mentioned on the forum somewhere):


Delta v1.4 mouse commands

 Delta Wait Double Mouse X         | Wait for double-click of left mouse button
 Delta Wait Fire                         | Wait for fire button (J0?) to be pressed
 Delta Wait Left Mouse               | Wait for left mouse button to be pressed


 GUI V2.1  has multiple mouse commands for workbench based mouse work.

Craft v1.00

=Hw Mouse Key | Returns the status of the mouse key, even when AMOS is put 'to back' (eg. Amos To Back).

JD Extension v5.9

=Jd Moff Click                   | Returns a value depending on which mouse buttons are
                                     | pressed (works even after Jd Multi Off has been used).
                                     |   0=No mouse buttons
                                     |   1=Left mouse button
                                     |   2=Right mouse button
                                     |   3=Both mouse buttons

Intuition v1.0

=Wb Mouse Key                | Returns the state of the left mouse key.
                                     |   -1  Left mouse key unpressed
                                     |    1  Left mouse key pressed


Anyway, the file is currently here:
http://www.geocities.com/aliensrcooluk/public/AMOS_ExtCommands.txt


@ SamuraiCrow: The intuition extension has mouse commands that return the exact position of the workbench mouse. I'm not sure I can use the extension with my setup, but it must be possible to retrieve the coords of the WB mouse in AMOS :)



Regards,
Lonewolf10

Logged

skateblind

  • Important 'looking' person
  • Forum Mod
  • A2000
  • *****
  • Karma: 668
  • Offline Offline
  • Gender: Male
  • Posts: 509
Re: Mouse Problems
« Reply #19 on: April 17, 2010, 01:55:52 AM »

Is mouse Click just for a single press?

Anyways probably not much help to you Skate

Do
M=Mouse Click
If M<>0 then Print M
Loop

Is there anyway of reading Second Fire button port 1?

BooBoo, did you actually try run that bit of code you posted? I tried all the bits of code in the manual and none of it worked.
You need an extension to read the second fire button. AMCAF will do the job, http://amos.condor.serverpro3.com/AMCAFguide/manual/gameadapter.html#xfire.
Joystick talk is for a different thread though.


@lonewolf10, thanks for the help, I would prefer to use MOUSE CLICK rather than installing more extensions, but it looks like I will have to do that if I want a proper single click check. Mouse Key does the job, but if you hold the mouse button down and move over the area that is checking for mouse data, then it activates it. For the purpose I intend to use it for, I would prefer a single click so that the user does not accidentally press a button.
« Last Edit: April 17, 2010, 02:02:01 AM by skate »
Logged
What are you looking at?

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Mouse Problems
« Reply #20 on: April 17, 2010, 02:07:23 AM »

i'm sure you can get around the problem by using mouse click to check for both 'on' and 'off' status, checking that both are done whilst still over the zone you require.

perhaps, only checking the click once you are on the zone you want is the way forward?
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

BooBoo

  • Amiga Guru
  • A600
  • ****
  • Karma: 3
  • Offline Offline
  • Posts: 168
Re: Mouse Problems
« Reply #21 on: April 17, 2010, 01:08:41 PM »

Yes the code worked but im using Amos Creator ???

I had a similar problem with the Joystick
http://amos.condor.serverpro3.com/index.php/topic,158.0.html
Overclocked deleted his post but im sure it worked and maybe it would work on Port 0, Im not sure I have the code he gave me anymore :(

Is there no way to read second button without an extension - Like reading the mouse in Port 1?

Ive made another scrolling Demo using offset if anyone gets a chance please could they test and maybe give me feedback on speed etc - It runs very fast on my A1200/030

Arrow keys change speed.

http://rapidshare.com/files/376923558/Scroll.zip.html
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Mouse Problems
« Reply #22 on: April 17, 2010, 02:05:13 PM »



@lonewolf10, thanks for the help, I would prefer to use MOUSE CLICK rather than installing more extensions, but it looks like I will have to do that if I want a proper single click check. Mouse Key does the job, but if you hold the mouse button down and move over the area that is checking for mouse data, then it activates it. For the purpose I intend to use it for, I would prefer a single click so that the user does not accidentally press a button.


Can't you detect and save the mouse position when the mouse button is first used? That way you don't get buttons pressed accidentally.


Quote from: BooBoo

Is there no way to read second button without an extension - Like reading the mouse in Port 1?


I have tried to look it up in the Amiga Hardware Reference Manual, but found no useful info (unless someone knows where pin 9 (button 2), or pin 5 (button 3) data is stored). The button 1 (left mouse button) data is stored in the CIAAPRA ($BFE001) - bit #6 for port 1 and bit #7 for port 2.


Regards,
Lonewolf10

Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Mouse Problems
« Reply #23 on: April 17, 2010, 02:19:32 PM »

i fixed skate's problem with the following code:

Code: [Select]
GUI:
   ' much shorter code for checking button (zone) clicks :)  (HH)

        If Mouse Key=1 and MOUSEHELD=-1 : Rem -  LMB only

            JUMPTO$="LMBZONE"+Right$(Str$(Mouse Zone+100),2)
            Gosub JUMPTO$

   Else If Mouse Key=2 and MOUSEHELD=-1 : Rem - RMB only

   Else If Mouse Key=3 and MOUSEHELD=-1 : Rem - RMB + LMB together

   End If

   ' check if we just did something, and are still holding the mouse
        If Mouse Key<>0
          MOUSEHELD=Mouse Zone
        Else
           MOUSEHELD=-1
        End If
Return

' GOSUBs for different zones (you will need empty ones for any zones)

LMBZONE00:
Return
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Mouse Problems
« Reply #24 on: April 17, 2010, 02:23:58 PM »


Ive made another scrolling Demo using offset if anyone gets a chance please could they test and maybe give me feedback on speed etc - It runs very fast on my A1200/030

Arrow keys change speed.

http://rapidshare.com/files/376923558/Scroll.zip.html

That's a neat scroll there. It going on going and going, until it ran out of data(?) and then it kept on going!! Perhaps you have it running on Energiser batteries?!!

BTW, I was running it on WinUAE 2.0.1, set for the A600.


Regards,
Lonewolf10

Logged

BooBoo

  • Amiga Guru
  • A600
  • ****
  • Karma: 3
  • Offline Offline
  • Posts: 168
Re: Mouse Problems
« Reply #25 on: April 18, 2010, 06:35:20 PM »

Thanks :) -Yeah I wanted to check if it just crawls on 68000, Im not sure WinUae will give me a true idea -ill have to drag out my A600.

Glad that everyone got there Mouse problems sorted :)
Logged
Pages: 1 [2]   Go Up
 

TinyPortal 2.2.2 © 2005-2022