It is currently Thu Jan 17, 2019 4:28 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jan 05, 2019 7:41 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7109
Location: Canada
Discovered today when doing some tests that the hyperkin SNES mouse cannot cycle its sensitivity via software. Reading the line while the strobe is up does not change its sensitivity. There is, however, a separate button on the bottom of the mouse, next to the optical sensor, that will manually cycle it (literally).

Because of this, anything that relies on this ability to detect the mouse (as currently suggested on the wiki, which I will revise shortly), will fail to recognize the hyperkin as a mouse, unfortunately.

A list of relevant NES mouse software I know of:


Top
 Profile  
 
PostPosted: Sat Jan 05, 2019 8:41 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20997
Location: NE Indiana, USA (NTSC)
I filed an issue about the Hyper Click. It's waiting on my finding enough other things to order.


Top
 Profile  
 
PostPosted: Sat Jan 05, 2019 10:44 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7109
Location: Canada
As a follow-up, my Hyperkin mouse exhibits the following sensitivity behaviours:

The reported sensitivity is always 0, and this does change if I push the sensitivity button on the bottom of the mouse.

There are actually only two sensitivity settings for this device. High sensitivity produces values from -63 to 63 on each axis. Low sensitivity produces -31 to 31. It seems like the low setting just divides the magnitude in half. Hard to measure with any accuracy, but the response seems very linear vs. the mouse's physical speed. On both sensitivities it's easy to get reports of 1 displacement by moving slowly.
(Edit: this was updated twice with better measurements after producing test ROM below, and revising it.)

I don't see any jitter when the mouse is at rest. It's a very stable 0,0 report. The sign bit for a 0 seems to hold whatever it held last before reaching 0.

Checked the fifth byte read after the end of the report, and it seems to always be $80, which is curious.

Also, when moving the mouse while connected to my Famicom, I hear a faint sound, maybe at 850 or 1700 Hz. Assuming that's indicates some sort of periodic power draw from the mouse? (Another user who tested a Hyperkin with this ROM noticed a similar sound on their AVS.)


I visualized this with a sprite at 128,128 and a second sprite at 128+x,128+y, and I could easily see the hard square edge of the report range by moving the mouse vigorously. Unless someone else gets around to it before me, I'll follow up with a better test ROM later, but I'm not ready to release the thing I'm using at the moment, sorry. (Edit: made the test ROM, see below.)


I'm curious about how the SNES' mouse differs in this respect. The information about sensitivity that I've seen is a bit vague. I'm also surprised that I can find many, many review videos for the Hyperkin mouse but none seem to notice this difference in sensitivity (did find a couple amazon reviews that seem to address it though). Maybe it's a bit of a difficult thing to notice if you're not doing something scientific with it, but I'd be interested in hearing confirmation that the Hyperkin's sensitivity does work this way on an SNES as well, e.g. going into Mario Paint with it and trying the speed settings (does it make a difference, is it stuck on turtle, etc.).


Last edited by rainwarrior on Mon Jan 07, 2019 10:15 pm, edited 7 times in total.

Top
 Profile  
 
PostPosted: Sun Jan 06, 2019 1:12 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7109
Location: Canada
I cut down my current project to make a little mouse test ROM.

Attachment:
mset.png
mset.png [ 3.92 KiB | Viewed 178 times ]

mset.txt wrote:
Plug a SNES mouse (or equivalent) into either NES port, or a Famicom expansion adatper.
On reset, this program will search for a mouse on any of the four appropriate data lines. ($4016 d0/1, $4016 d0/1)
The first one found will be selected as the mouse. (The mouse is any device whose report's second byte ends with %0001)

5 bytes are read each frame.
A record of the last 24 frames is displayed on the left hand side.

The top right displays the last report.
The first and last bytes there are raised to indicate they are less important.
(First byte should be 00, last byte is past the end of the report.)

Just beneath this are two numbers, the first is the mouse port, and the second is the current sensitivity.
Port 0: $4016 d0 (NES)
Port 1: $4017 d0
Port 2: $4016 d1 (Famicom)
Port 3: $4017 d1
Port -: No mouse found.
Click the right mouse button to cycle the sensitivity setting.

Below this are two numbers indicating the lowest and highest X displacement reported,
followed by two more numbers indicating lowest and highest Y displacement reported.
Click the left mouse button to reset the lowest and highest to 0.

In the middle is the current offset displayed visually with a circle over a cross.


Source code is in mset_src.zip

Edit: revised test to widen report to 5 bytes, cleaned up code a bit and added some documentation.


Attachments:
mset_src.zip [52.33 KiB]
Not downloaded yet
mset.nes [32.02 KiB]
Downloaded 3 times


Last edited by rainwarrior on Wed Jan 16, 2019 5:00 pm, edited 1 time in total.
Top
 Profile  
 
PostPosted: Mon Jan 07, 2019 9:35 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7109
Location: Canada
Made an update to the test ROM with better code, and a bit more info, like what's in the first byte of the report, and what's in the byte after it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group