SmallyMouse2 - Universal USB to Quadrature mouse converter

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
TheCorfiot
Posts: 648
Joined: Mon Jan 08, 2007 5:22 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby TheCorfiot » Fri Sep 15, 2017 11:07 pm

VincentVega wrote:
simoni wrote:Any single-row female 2.54mm pitch connector should work. Just be aware that, with an ST, you may need to provide a 5V supply. Take a look at the project page on my website for cabling details (and all the rest of the documentation) around the project:

http://www.waitingforfriday.com/?p=827


Thanks, Simon, much appreciated.

Very, very impressed with SmallyMouse2, by the way.


I have the Parts to knock up a cable for you very easily if you need one my friend

B ;)

alienkidmj12
Posts: 7
Joined: Sat Aug 26, 2017 8:30 am

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby alienkidmj12 » Wed Nov 22, 2017 1:54 pm

can i get one for 35 ? is it cased and will it fit and acorn archimedes a3000

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Wed Nov 22, 2017 2:15 pm

Hi -=> you either need to pop one together yourself using the stuff that's available on the website (expensive for a one off), or approach someone who's producing them. Our very own TheCorfiot has produced some - I don't know if he's producing any more or still has any. I'll point him at this thread. Additionally CJE Micro's are selling them, cased:

http://www.cjemicros.co.uk/micros/indiv ... SM2-RISCOS

d.

User avatar
TheCorfiot
Posts: 648
Joined: Mon Jan 08, 2007 5:22 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby TheCorfiot » Wed Nov 22, 2017 2:25 pm

Hello alienkidmj12

I have one left ready to ship, (more to follow in a few weeks)

I have sent you a PM, Thanks for supporting the smaller business

Regards
:)

alienkidmj12
Posts: 7
Joined: Sat Aug 26, 2017 8:30 am

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby alienkidmj12 » Wed Nov 22, 2017 2:29 pm

paid up :)

User avatar
TheCorfiot
Posts: 648
Joined: Mon Jan 08, 2007 5:22 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby TheCorfiot » Wed Nov 22, 2017 2:34 pm

Thank you Very Much indeed

Will be posted 1st class to sign for Friday Morning

;)

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Wed Nov 22, 2017 2:45 pm

I love it when a requirement is met =D>

d.

alienkidmj12
Posts: 7
Joined: Sat Aug 26, 2017 8:30 am

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby alienkidmj12 » Thu Nov 23, 2017 3:56 pm

:) i love these gadgets, for retro gear :)

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 9:29 am

So, strange behaviour with SmallyMouse 2 and a Teknet wireless USB mouse on my Master running GEM:

Up and down are reversed, left and right don't work, and a button click sends the cursor off to the right. This is the latest firmware together with the jumper on the slow pins. Works fine with another USB mouse of mine.

Checking the mouse on the PC, it works fine - installs the generic "HID Compatible Mouse" driver.

Very perplexing :?

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 9:44 am

So, strange behaviour with SmallyMouse 2 and a Teknet wireless USB mouse on my Master running GEM


Weird :) But if it works with other USB mice I can immediately rule out a hardware issue. So here's where it gets more complex :)

Most people think there is just one USB mouse protocol, the USB HID mouse protocol, but that's not the case, there are in fact two.

When a PC first boots basic mouse functionality is needed before the OS can load the specific mouse drivers. Therefore there is another protocol called 'boot protocol' which provides basic mouse movement and button reporting. This is used by the PC BIOS (if it support mice). Once the OS is loaded the primary driver takes over - and this might not even be HID compatible... Examples are things like the Logitech Unity mice which have a completely custom driver.

SmallyMouse2 uses the boot protocol for maximum compatibility (as it's mandatory that *every* USB mouse should support it). One of my future requirements is to add functionality that tries USB HID and then falls-back to boot protocol if it's not available. This would mean smallymouse could support scrollwheels and such; I couldn't just implement this instead of boot protocol though - as that would make many advanced wireless mice stop working :)

So, the most likely explanation is that your mouse doesn't support boot protocol (or has broken support) - you could test this out if you have a PC with mouse support in the BIOS. Either way, it's very naughty if they (the mouse manufacturer) didn't test this correctly!

Is it possible for you to try the BIOS idea? Otherwise the only real way to diagnose the issue is for me to get the same mouse (SmallyMouse2 supports UART debug via the expansion header, so you can dump out mouse information real-time for development).

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 9:48 am

I can try the bios thing later (not sure about whether the PC will support it), but also I can do a debug dump if you tell me what needs setting up on that front? I've got enough USB-serial donglies that it's not an issue :D

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 9:53 am

but also I can do a debug dump if you tell me what needs setting up


It would need some custom code added to dump out the contents of the mouse reports... not something simple to describe :) But, if you know some AVR GCC you are welcome to give it a go; all the source code is on github to make a custom build.

pbw72
Posts: 19
Joined: Tue Mar 14, 2017 8:38 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby pbw72 » Sat Dec 16, 2017 11:29 am

Hi guys,

I am interested in the smallymouse, being able to add a modern mouse to a retro machine is a great idea.

I have seen the unboxed version but, if I am reading correctly, do you have to provide your own pub connector and cable (dependant on the machine you are using it on?)

I have a BBC Master and am thinking of how I could mount this internally (particularly if I used the bare version) but I have also seen the boxed version and would like to know what the dimensions are of it. I like the idea of having things internal and keeping the look of the beeb as original as possible but having these modern peripherals available (a bit like trying to create a beeb as if it was made today with all the extra modern stuff ready built in :lol: )

I am wondering if the boxed version would fit internally in the space down the side of the psu (perhaps with a usb extension to get the socket to the rear of the case) I would of course need to route the ribbon cable under the mobo (similar to what you do with the datacentre) which brings me to another question, how long is the ribbon cable on the readymade boxed version?

Lastly, how can I get one and how much??? :D

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 12:56 pm

Hi pbw72

SmallyMouse2 is an open-source, open-hardware solution so you have several options of how and what to buy.

TheCorfiot (a.k.a. the mighty and wonderful Bas) sells the boards without a case and he also offers to make the cables up for you. I'm sure (if you PM'd) him that he'd agree to make a cable to any length you wanted.

CJE (a well know shop in the Acorn/RISC OS world) also sell SmallyMouse2 both boxed and unboxed - you can get them directly from their website or via ebay.

Thirdly, all of the files required to 'roll your own' are also available. There are a number of projects around on the web where people have taken the design and specialized it for one type of computer (usually due to mounting requirements).

The boards are quite small, so you could easily mount it inside a Master (with or without the case). The board has 4 mounting holes, so you could even use self-adhesive 'struts' and mount it without a case. You can find out a lot of details about the device from my website (I'm the designer of the project - but I don't personally sell them):

http://www.waitingforfriday.com/?p=827

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 1:45 pm

Hi Simon - BIOS detects it (can't do anything with it, but it sees it there and reports it as a mouse).

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 2:02 pm

BIOS detects it


I should have been clearer :) it needs to be a BIOS that lets you use the mouse. SmallyMouse2 detects it too (otherwise nothing would work)... the problem is likely to be a broken report descriptor structure (from the mouse). The idea of the test was to see if mouse control (in the BIOS) was the same as the experience when using SmallyMouse2. Does that make sense?

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 2:14 pm

Got you - no, the bios doesn't let me use mice to do anything unfortunately :?

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 5:24 pm

If you get the chance to 'borrow' another machine (most new laptops have mouse GUIs in the BIOS) it would be great if you could give it a try and report back. Otherwise the only way to figure it out is to buy one of the same mice - but it seems a bit extreme for a fringe-case (since this is the first report I've had of a mouse not working) :D

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 5:38 pm

Thinkpad BIOS ain't gui either - curses :( - No need to buy new mice or send things around the globe, I'm capable of bodging the firmware to output the relevant information - if you just point me in the direction of the relevant information :D

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 6:05 pm

Simply clone the project github and load the project in AVR Studio (all the project files should be there).

The code you're looking for is as follows:

https://github.com/simoninns/SmallyMouse2/blob/master/SmallyMouse2/main.c

Line 324 is where the USB report is read in from the USB mouse; that contains the motion and button status as reported by the mouse. It would be worth taking a look at that and adding some debug to see what the mouse is sending (and if the code is translating it correctly into quadrature).

If you look at line 556 you'll see an example of the serial debug output. It's already enabled and outputting things; you just need to connect a UART to USB adaptor to the board (anything Arduino compatible will work).

The documentation already has everything else you need (pin out, description, etc.):
http://www.waitingforfriday.com/?p=827#Expansion_header

Your also welcome to ping me for help; and if you spot anything fun just report back here or open a github issue for the project

/Simon

pbw72
Posts: 19
Joined: Tue Mar 14, 2017 8:38 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby pbw72 » Sat Dec 16, 2017 6:15 pm

Many thanks for the information Simon, looks like this could be my next purchase :lol:

Paul

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 6:55 pm

*cracks knuckles*
DSC_3097.JPG

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 7:04 pm

*cracks knuckles*


Serial debug in glorious technicolor too. Dunno why I did that, but I do remember thinking it looked cool at the time :lol:

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sat Dec 16, 2017 8:23 pm

So, it is as it's behaving - i.e. the quadrature control is doing the right thing, but what it's getting from the mouse is permanent button=3 (i.e. L&R button pressed), X is responding to button presses with values that would be right for "button", Y is responding to left-right movement...

Code: Select all

Button:3 X:4 Y:0
Button:3 X:0 Y:0
Button:3 X:1 Y:0
Button:3 X:0 Y:0
Button:3 X:0 Y:-2
Button:3 X:0 Y:-1
Button:3 X:0 Y:-2
Button:3 X:0 Y:0
Button:3 X:0 Y:-1
Button:3 X:0 Y:-1
Button:3 X:2 Y:0

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sat Dec 16, 2017 8:38 pm

Time to send an email to the mouse manufacturer and ask them why their mouse has a broken boot protocol then :) The idea of the boot protocol is that it is super simple (so the host USB doesn't need to 'interpret' the report format).

If you really want to use that mouse (and no other) then you could simply swap over the values to the right outputs; hacky but it would work.

On the bright side, you've cracked the ice on SmallyMouse2 development :) Feel free to add stuff and let me know if you come up with something worthy of inclusion in the next release :D

User avatar
danielj
Posts: 5367
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby danielj » Sun Dec 17, 2017 5:58 pm

I think that's pretty messy. Neater would be to do as you suggested originally and try full HID mode, dropping back to boot mode if it doesn't like it. I note that there's sample code in the LUFA library, I'll have a look at hacking that about over the next period of time and see if I can get something working :)

d.

User avatar
simoni
Posts: 332
Joined: Wed May 25, 2016 6:18 pm

Re: SmallyMouse2 - Universal USB to Quadrature mouse converter

Postby simoni » Sun Dec 17, 2017 6:04 pm

That was exactly my plan for the 'next gen' firmware for SmallyMouse2 - but the Domesday Duplicator project is simply a higher priority for me at the moment. The best thing would be scrollwheel support...

Now any retro machine would need a custom driver (since scrollwheels didn't exist back then) but... in theory you could encode the scrollwheel 'across' the mouse directions... So X is X1 and X2, Y is Y1 and Y2, scroll wheel up is X1 and Y2 and scroll wheel down is X2 and Y1 (something like that)... as for all the extra buttons, well that's what the expansion header is there for ;)

Not that I'm trying to encourage you or something!


Return to “hardware”

Who is online

Users browsing this forum: No registered users and 8 guests