Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 10:07 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: V5.07.00b1 - Mouse heaven

     Page 5 of 5    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 08:43pm 17 Jan 2021
Copy link to clipboard 
Print this post

  thwill said  
1. Provide an easy workflow to restore OPTIONs lost after a firmware update, e.g. OPTION LOAD <filename>. Where the file contains a list of OPTIONs and values. Possibly an OPTION SAVE <filename> counterpart too.

I have a file on the PC with my options.
Using MMUploader, it takes a few seconds to reload the options.
(and reset the clock)
I assume you could put together something similar for the RPi.

But I do think the ability to read a batch file or shell script would be handy.


Re the new mode 12.
Previously mode 12 was my best.
Now mode 12 simply cycles through the primary colours. I am not sure what my monitor is trying to tell me, but it sure doesn't like it!

Jim
VK7JH
MMedit   MMBasic Help
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 06:10am 27 Jan 2021
Copy link to clipboard 
Print this post

Well, after several hours of concentrated tinkering, my CMM2 has a new appendage!



I didn't prototype it, and went straight to soldering up the circuit with a "raw" PS/2 mouse jack and a couple of resistors, on a piece of copper-clad perf board. I can't believe how terrible my soldering skills have gotten!!

Much to my surprise, the thing worked first time, after a brief moment of panic before I reread Peter's original post and invoked the "OPTION MOUSE 0" command.

Works like a champ - file navigation and editing should be substantially more efficient from now on, and looking forward to using the new UI gestures in BASIC.

P.S. I drew up a "proper" circuit diagram -I'm pretty sure I transcribed my sketch correctly, but please let me know if I screwed it up.
Edited 2021-01-27 16:13 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
Schlowski
Newbie

Joined: 26/03/2014
Location: Germany
Posts: 29
Posted: 04:50pm 06 Feb 2021
Copy link to clipboard 
Print this post

Two questions regarding MOUSE(...) functions:

Tested with TassyJim's program and with OPTION MOUSE 2
(I'm using a USB mouse with the HT Mouse chip)

MOUSE(T, port) : What are the possible result values?

I see in TassyJim's new mouse test a test for
PRINT "Mouse found is type ",MOUSE(t,0)
if MOUSE(t,0) = 3 then PRINT "Mouse has a wheel!"

(btw. it should be "MOUSE(t, mp) instead of MOUSE(t, 0))

My mouse has a wheel and reports wheel clicks and wheel scroll values, but the returned type is 0, not 3


MOUSE(S, port) : the scroll values behaves a little erroneous
Most of the times (at least 9 out of 10) it does not stop incrementing/decrementing the values.  

This happens in the editor, too. Even if I scroll only one raster on the wheel up or down the editor scrolls until reaching top or bottom of the source.

When I click the mouse wheel the scrolling stops every time.

System:
CMM2 (Pjotr's CMM2 Deluxe) with HT Mouse chip
Firmware 5.07.00.b11
Logitech Keyboard and Mouse (Logitech MK120)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 05:27pm 06 Feb 2021
Copy link to clipboard 
Print this post

  Quote  MOUSE(T, port) : What are the possible result values?


Only works with PS2 mice

  Quote  MOUSE(S, port) : the scroll values behaves a little erroneous


You need to update the firmware in the HT chip with the latest from their site
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 04:42am 16 Feb 2021
Copy link to clipboard 
Print this post

Jim,

I was struggling today to get the HT USB mouse going and while using your test program (a couple of pages back) to test, it I found a problem. Part of the code is:
PRINT "Mouse found is type ",MOUSE(t,0)
if MOUSE(t,0) = 3 then PRINT "Mouse has a wheel!"

In both cases MOUSE(t,0) should be MOUSE(t,mp). No problem for a PS2 mouse though I guess.

It didn't tell me that my mouse has a wheel either although it worked and showed that I need to update the HT firmware.

Bill

Edit:
  Quote  MOUSE( T, 0) This tells you if a PS2 mouse has a scroll wheel (returns 3) or not (returns 0). Only works for PS2 mice (channel 0). For Hobbytronic mice will always return 0

Explains the no wheel result.
Edited 2021-02-16 15:02 by Turbo46
Keep safe. Live long and prosper.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 08:09am 16 Feb 2021
Copy link to clipboard 
Print this post

I'm still curious what "Type 1" and "Type 2" signify, if anything.

Also, I'm assuming that "Type 3" implies that the mouse scroll wheel can be clicked for a "middle mouse button" event, for apps that happen to need such a thing.

IIRC, not all scroll wheels had such a button, and I remember owning a mouse with a wheel that tilted from side to side - God knows what that gesture was supposed to be interpreted as.

Innovation is not necessarily a good thing - there's been lots of evolutionary dead ends in pointing devices, particularly on laptops.  Remember the horrible "pointing stick" on early ThinkPads, that looked and felt like a pencil eraser?
Enjoy Every Sandwich / Joe P.
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 532
Posted: 08:25am 16 Feb 2021
Copy link to clipboard 
Print this post

Maybe is the type tied somehow to MS Intellimouse extension?
https://isdaman.com/alsos/hardware/mouse/ps2interface.htm
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 04:25pm 16 Feb 2021
Copy link to clipboard 
Print this post

  Quote  IIRC, not all scroll wheels had such a button, and I remember owning a mouse with a wheel that tilted from side to side - God knows what that gesture was supposed to be interpreted as.


That tilt function defaulted for horizontal scrolling.  I have quite a few old mice with it and one rather new one that have it.  Win 10 still uses that default.  All of them also have a middle click button and I never came across one that didn't. It was first implemented on an MS mouse that I still have.  It was a cool feature for websites that did not fit well on the relatively low-res screens of the time. It was great for spreadsheets and a lot of other programs.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 05:21pm 16 Feb 2021
Copy link to clipboard 
Print this post

Indeed, widescreen monitors has made the need for horizontal scrolling a rare occurrence, plus app designers have realized that horizonal scrolling is generally a Bad Idea.

Large spreadsheets are one of the few use cases left, but the keyboard is my preferred method to navigate these.
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 08:47pm 23 May 2021
Copy link to clipboard 
Print this post

In looking for a way to add a CFunction for a PS/2 mouse to the F4, I searched the CMM2 source code available (CMM2V1.5), but couldn't recognize anything PS/2-mouse related. Can the mouse code be released? (And is there hope for my getting it to work on the F4?)
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 09:31pm 23 May 2021
Copy link to clipboard 
Print this post

While you are waiting for V5.7 to be released, you might find some inspiration from the Arduino code I used for my mouse emulator. Ignore the Hobbytronics side and look at the pS2 include
https://www.thebackshed.com/forum/ViewTopic.php?TID=12954&P=1#157201

It's not my work so should be safe.

Jim
VK7JH
MMedit   MMBasic Help
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 10:37pm 23 May 2021
Copy link to clipboard 
Print this post

Jim--Thanks--I have looked at the three arduino files: PS2Mouse.ino, PS2Mouse.cpp, and PS2Mouse.h, and they look fairly straightforward. I was just wondering what code on the CMM2 with similar functionality would look like.

I am not, of course, expecting this to work in the editor on the F4--only under a programmer's control. And I'm uncertain how interrupts could work with CFunctions. And I'm a CFunction newbie, so there's that element of hesitation.

I considered wiring up an arduino with your code, but if it could be done with a CFunction, it would be neater and might not take all that much longer if I can gather the needed information.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
     Page 5 of 5    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024