CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Duke on 00:30, 02 February 19

Title: USB game controllers and mice
Post by: Duke on 00:30, 02 February 19

Had a bit of encouragement to work on my dust collecting USB to joyport board project, in bad need of a proper mouse for my Atari ST and Amiga (oups).
CPC is first of course, here is a quick video of the first testing with a USB gamepad:

https://youtu.be/CpNEHrwhOzg (https://youtu.be/CpNEHrwhOzg)

Will add HID mouse driver next and hope to do a fairly generic hid parser for game controllers, otherwise atleast add the most common like PS4 & PS3 pads.



EDIT:
The device is now being sold.

Ordering procedure:
Send me a PM (with your email address) or an email and let me know what you need and for which computer, then I  will confirm and add you to my list.
And when it is ready, I will email you with Paypal details and ask for your shipping address.

Current pricing is:
Imperium Solo with DC Y splitter cable for regular CPC, 16.5 euro
Imperium Solo with DC Y splitter cable and adapter for CPC plus, 16.5 euro
Shipping worldwide (unregistered) up to 100 grams, 4 euro
+ Paypal fee which is 1 euro or pay as friend (but you loose the ability to make a claim to Paypal afaik. if you are not happy with the product etc, so up to you!)

Short instructions/information here (click on a specific game controller in the database to learn button mappings):
https://www.spinpoint.org/imperium (https://www.spinpoint.org/imperium)
Title: Re: USB game controllers and mice
Post by: mr_lou on 08:28, 02 February 19
Nice! So this allows us to use USB gamepads for the CPC?

Like PlayStation 3/4 controllers too? And Logitech F310 / F510 / F710? Does it require firmware flashing depending on controller then?

Funnily enough, I'm involved in a minor project to do the opposite these days: Make it possible to use an Amstrad CPC joystick / gamepad for Blu-ray games.  :)
The creator of this adapter (https://www.retronicdesign.com/en/) is currently writing the firmware for it that should make this possible. Then you need to flash the adapter with this firmware. If successful you should be able to play any Blu-ray game, such as Bolt's Be-Awesome Mission (https://www.youtube.com/watch?v=hQ4QUlbM6_c) on your standard Blu-ray player using your Amstrad joystick.   :)
Very niche of course.
My interest in this spawned from my interest in Blu-ray homebrew games (http://www.blu-play.com) - code games in Java, and run them on PS3 + PS4 + XB1 from the very same disc.
Title: Re: USB game controllers and mice
Post by: Duke on 09:20, 02 February 19
Quote from: mr_lou on 08:28, 02 February 19
Nice! So this allows us to use USB gamepads for the CPC?
Yes, and mice too.
Quote
Like PlayStation 3/4 controllers too? And Logitech F310 / F510 / F710? Does it require firmware flashing depending on controller then?
It's the plan to add as many as I can get my hands on, PS3 & 4 for sure.
It will be possible to update the firmware, when more are added to it (thumb drive required).

Quote
Funnily enough, I'm involved in a minor project to do the opposite these days: Make it possible to use an Amstrad CPC joystick / gamepad for Blu-ray games.  :)
The creator of this adapter (https://www.retronicdesign.com/en/) is currently writing the firmware for it that should make this possible. Then you need to flash the adapter with this firmware. If successful you should be able to play any Blu-ray game, such as Bolt's Be-Awesome Mission (https://www.youtube.com/watch?v=hQ4QUlbM6_c) on your standard Blu-ray player using your Amstrad joystick.   :)
Sounds cool :) - yeah quite the opposite. I am finding good joysticks hard to find these days. I only have 1 left, rest are garbage (non microswitches, yuck!).
Quote
Very niche of course.
My interest in this spawned from my interest in Blu-ray homebrew games (http://www.blu-play.com) - code games in Java, and run them on PS3 + PS4 + XB1 from the very same disc.
I am sure many will find it cool! - Good luck with it.
Title: Re: USB game controllers and mice
Post by: VincentGR on 13:13, 02 February 19
Hey Duke, will the mouse work normally or will need a kick to scroll like a joystick?
Seen this to another adapter I have.
Title: Re: USB game controllers and mice
Post by: HAL6128 on 16:23, 02 February 19
Yeah... same question. It would be good to test it on OCP Art Studio to get a smooth and proper movement.
Title: Re: USB game controllers and mice
Post by: Duke on 11:52, 03 February 19
Quote from: VincentGR on 13:13, 02 February 19
Hey Duke, will the mouse work normally or will need a kick to scroll like a joystick?
Seen this to another adapter I have.
Quote from: HAL 6128 on 16:23, 02 February 19
Yeah... same question. It would be good to test it on OCP Art Studio to get a smooth and proper movement.

Still working on the mouse driver. I cannot remember how good ie. AMX mouse was.
Was it able to be used smoothly in ie. OCP Art Studio? or was it a chunky affair?
And @VincentGR (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1053) what do you mean with needing a kick?  Like set the mouse of in one direction and pull it again to stop going?
Title: Re: USB game controllers and mice
Post by: GUNHED on 15:20, 03 February 19
Just an idea... There are Adaptors for f.e. Atari ST mice for the CPC. They transfer proportional data instead of joystick-compatible data.

Here an example:
http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter (http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter)

Would it be possible to have a small switch, for joy-mode / proportional mode? So we can get proportional data from such an USB mouse? There is already some well software for it (including G-Paint!). That would be awesome!  :) :) :)   
Title: Re: USB game controllers and mice
Post by: Duke on 18:06, 03 February 19
Quote from: GUNHED on 15:20, 03 February 19
Just an idea... There are Adaptors for f.e. Atari ST mice for the CPC. They transfer proportional data instead of joystick-compatible data.

Here an example:
http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter (http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter)

Would it be possible to have a small switch, for joy-mode / proportional mode? So we can get proportional data from such an USB mouse? There is already some well software for it (including G-Paint!). That would be awesome!  :) :) :)
It may be :)
How would I test it in FutureOS - I mean quick guide to enable ST / Amiga Mouse mode in FutureOS (don't have one for my ST :) but I think it is just to swap x,y iirc).. Thanks.
Title: Re: USB game controllers and mice
Post by: VincentGR on 19:34, 03 February 19
My adapter works like a joystick scroll at the beginning and later moves like a mouse until I stop it.
I can't draw like this.
Title: Re: USB game controllers and mice
Post by: Duke on 21:05, 03 February 19
Current progress of mouse implementation:
https://www.youtube.com/watch?v=5fA4fb1rmYQ

It's hard to get it good in regular "joystick" mode. I wonder how it compares to AMX mouse atm.
Title: Re: USB game controllers and mice
Post by: HAL6128 on 23:00, 03 February 19
Yes. It would be good to have some kind of adjustments (speed, acceleration) from software side.
Title: Re: USB game controllers and mice
Post by: Duke on 23:33, 03 February 19
Quote from: HAL 6128 on 23:00, 03 February 19
Yes. It would be good to have some kind of adjustments (speed, acceleration) from software side.
Yes, finetuning it now. I can do some averaging & keep  moving for repeated frames until new direction or the mouse move (steps) count out.
But at the end of the day, software like Art Studio reads the joystick port only 50 times per second, so technically that is 50 pixels per second in either direction, but of course it also does its own acceleration when a direction is continuously pressed, so this is where I can adjust the mouse driver a bit to simulate the move like a joystick.
Ideally I add a secondary mode, ie. something like @GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029) suggested for proper accelleration.
Title: Re: USB game controllers and mice
Post by: TotO on 10:34, 04 February 19
Quote from: HAL 6128 on 23:00, 03 February 19
Yes. It would be good to have some kind of adjustments (speed, acceleration) from software side.
The adapter should embed some counters to handle the mouse ballistic to produce usable values, to not have extra computing into the softwares.
Title: Re: USB game controllers and mice
Post by: Duke on 11:39, 04 February 19
Quote from: TotO on 10:34, 04 February 19
The adapter should embed some counters to handle the mouse ballistic to produce usable values, to not have extra computing into the softwares.
As for a custom defined mode, yes.
USB mouses use delta offset from last position, so if you send this value to CPC you already have ballistics as CPC then has the movement over time.
One way to do it would be to have two consecutive reads of the joyport (key scan row) per frame, where first value read is delta X (say 5 bits) and 2nd value is delta Y . Remaining bits for ID (ΔX or ΔY) & buttons (3).
Using 5 bits you will acheive a max. speed of 31 pixels per frame or 50 * 31 = 1550 pixels per second, so you can like on PC move quickly from one side of the screen to the other.

Edit: actually it would need a sign bit for the direction changes, but still sufficiently fast at approx 800 pixels per second.
Title: Re: USB game controllers and mice
Post by: Bryce on 12:15, 04 February 19
The problem with custom methods is that it then makes the device non-compatible with all software with mouse support from back then.

Bryce.
Title: Re: USB game controllers and mice
Post by: Duke on 12:23, 04 February 19
Quote from: Bryce on 12:15, 04 February 19
The problem with custom methods is that it then makes the device non-compatible with all software with mouse support from back then.
Yes, agreed. It would need to support the old "AMX" method too. But if someone wants to implement a better way in their software the "new" method could be used.
Title: Re: USB game controllers and mice
Post by: GUNHED on 12:47, 04 February 19
Quote from: Duke on 18:06, 03 February 19
It may be :)
How would I test it in FutureOS - I mean quick guide to enable ST / Amiga Mouse mode in FutureOS (don't have one for my ST :) but I think it is just to swap x,y iirc).. Thanks.

Just plug it in and it will work. The mouse-adapter will set the spare pin on the joystick port to indicate the proportional mouse.  :) :) :)

Oh, this does not work for 6128 Plus, because it lacks the spare signal.
Title: Re: USB game controllers and mice
Post by: TotO on 13:23, 04 February 19
AMX is a poor joystick on a ball... A pure shit to use for few old softwares that have better to be patched to be able to properly use them instead of the keyboard or that.
Title: Re: USB game controllers and mice
Post by: TotO on 13:58, 04 February 19
Quote from: Duke on 11:39, 04 February 19One way to do it would be to have two consecutive reads of the joyport (key scan row) per frame, where first value read is delta X (say 5 bits) and 2nd value is delta Y. Remaining bits for ID (ΔX or ΔY) & buttons (3). Using 5 bits you will acheive a max. speed of 31 pixels per frame or 50 * 31 = 1550 pixels per second, so you can like on PC move quickly from one side of the screen to the other. Edit: actually it would need a sign bit for the direction changes, but still sufficiently fast at approx 800 pixels per second.
Should be 4bit with up to 300Hz interrup. But sure, 5/6bit is great. Unused bits to set the actions.
Title: Re: USB game controllers and mice
Post by: Duke on 19:33, 05 February 19

Tried to experiment with a custom mode, for those interested below is a video of the result.
It's sending 5 bits of delta X and Y + sign bit, so 6 bits total for each delta coordinate and 1 bit to indicate if its X or Y.
The program I wrote quickly to test, is in mode 2 and only reads  the mouse once per frame.

https://youtu.be/4Rm1psdePbg (https://youtu.be/4Rm1psdePbg)

The result is much better than my AMX mode test, also beware I am no artist ;)

Here is the code to read the DX/DY values:

    ld a,0x49
    call key_scan

    bit 5,a        ; 0 = delta X, 1 = delta Y
    jr    nz,isDeltaY
   
    ld hl,(xpos)
    bit 6,a        ; check sign bit
    jr nz, dx_not_signed
    and 0x1F        ; keep lower 5 bits
    ld e,a
    ld d,0
    or a
    sbc hl,de
    ld (xpos),hl
    jr    delta_done
dx_not_signed:       
    and 0x1F        ; keep lower 5 bits
    ld e,a
    ld d,0
    add hl,de
    ld (xpos),hl
    jr    delta_done
isDeltaY:
    ld a,0x49
    call key_scan
    ...
    ; same stuff as for DX
delta_done:   
    ...
   
xpos: dw 0
ypos: dw 0



I will have to up the format to two more packet, as I don't have room for buttons in this mode when compatible with CPC plus (no fire3), the ID bit to be 2 bits (00, 01, 10)
So like this:
ID DATA
00 XXXX
01 XXBB
10 YYYY
11 YYBB

Also Basic wont like my packet sending when its scanning the keyboard, so need to figure out how to "enable" enhanced mode.. Maybe just a button on the PCB (yeah sucks) or press both mouse buttons when inserting (otherwise AMX mode).

Let me know what the you think.
Title: Re: USB game controllers and mice
Post by: GUNHED on 20:26, 05 February 19
Of course it would be nice to have something super fancy, but somebody needs to patch soft then.
IMHO it's great to have something compatible which does run with already existing software. I like this project.  :) :) :)
Title: Re: USB game controllers and mice
Post by: TotO on 21:08, 05 February 19
How many softwares will require to be patcked? 1, 2, 5 ?  ;D
Probably less work that doing a special adapter... And they will be better after that.
Title: Re: USB game controllers and mice
Post by: GUNHED on 21:08, 05 February 19
Quote from: TotO on 21:08, 05 February 19
How many softwares will require to be patcked? 1, 2, 5 ?  ;D


For something new? 99%  ;)
Title: Re: USB game controllers and mice
Post by: HAL6128 on 19:13, 10 February 19
How about the idea to integrate an AD-converter on the stick which reads out a analog signal (AD571 > 10 Bits in 0,000015 sec.)?
Title: Re: USB game controllers and mice
Post by: Duke on 21:01, 10 February 19
Quote from: HAL 6128 on 19:13, 10 February 19
How about the idea to integrate an AD-converter on the stick which reads out a analog signal (AD571 > 10 Bits in 0,000015 sec.)?
Not sure for what advantage?
The USB readings are all digital, although they can contain analog readings.
Fwiw. I have pretty good success with a 5 bit resolution for mouse movement, I did try to patch Art Studio to read my 4 packet format and all goes swell until I pick up some paint tool, where the screen updating starts to lag for some reason I have not found why yet.
Otherwise the mouse can accelerate very nicely across the screen with effortless movement. Which imo. is impossible with AMX mouse, regardless of sensitivity level, as it will take several seconds moving from one side of screen to the other (even with a constant direction for every reading).
Spent a bit too much time on patching Adv. Art Studio :/ - Rather than writing the device firmware.
Anyway, I will try to finish it up, in the next weekend or two.

Main usage will be USB gamepads as plain joysticks and USB mouse as AMX mouse  (sucky as it is, but compatible with whatever there is).
Enhanced 5 bit resolution mode for USB mouse and enhanced gamepad mode, will be available too, but not as default setting.
The board will be upgradable via USB thumb-drive.
Title: Re: USB game controllers and mice
Post by: HAL6128 on 22:40, 10 February 19
Not sure myself. Just a quick thought about reading old hardware (like a ST Trackball plugged onto the joystick port). But that's totally different to your project.
Title: Re: USB game controllers and mice
Post by: GUNHED on 20:00, 12 February 19
Still dreaming of ST-Mouse Adapter compatibility...  :-X :-X :-X :)
Title: Re: USB game controllers and mice
Post by: Duke on 13:17, 07 March 19

A little progress, now support for Dualshock 3 & 4 controllers.

https://youtu.be/KO3-AH6rpYk

(Nice game @PuzCPC (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2821))

Unfortunately I made another mistake or two on the revision 2 PCB, so I will have to order another batch before I can produce any.
Upgrading via USB stick is now also possible. Need to still add some stuff before I am happy with the code.
Title: Re: USB game controllers and mice
Post by: Maniac on 20:59, 07 March 19
Would love one of these please! Will it support both joystick ports on the Plus? If so would it be possible to use one in each port for 2 player games? If that's the case I might want 2 please.
Title: Re: USB game controllers and mice
Post by: Phantomz on 21:35, 07 March 19

@Duke (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1624)


How many fire buttons do these support, 2 or 3?
Title: Re: USB game controllers and mice
Post by: Duke on 08:10, 08 March 19
Quote from: Maniac on 20:59, 07 March 19
Will it support both joystick ports on the Plus? If so would it be possible to use one in each port for 2 player games? If that's the case I might want 2 please.
Yes it should be possible to use one in each of the CPC plus ports. Will test when I have two working modules :)

Quote from: Phantomz on 21:35, 07 March 19
How many fire buttons do these support, 2 or 3?
3 for regular Amstrads
2 for Amstrad CPC plus
Title: Re: USB game controllers and mice
Post by: Phantomz on 15:32, 08 March 19
Quote from: Duke on 08:10, 08 March 19
3 for regular Amstrads
2 for Amstrad CPC plus


Nice, it's a shame that the plus hardware doesn't support 3 buttons.  :doh:


At least the original CPC range support 3 buttons, I'll have to remap controls in Renegade & 1943.  ;D
Title: Re: USB game controllers and mice
Post by: TotO on 15:45, 08 March 19
Because pin5 is not Fire3 but spare on CPC. Not kept on PLUS, while mostly 1 button was used on computers controllers (2 are on the analog port too).
Title: Re: USB game controllers and mice
Post by: PuzCPC on 16:03, 08 March 19
Quote from: Duke on 13:17, 07 March 19
A little progress, now support for Dualshock 3 & 4 controllers.

https://youtu.be/KO3-AH6rpYk (https://youtu.be/KO3-AH6rpYk)

(Nice game @PuzCPC (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2821))

Unfortunately I made another mistake or two on the revision 2 PCB, so I will have to order another batch before I can produce any.
Upgrading via USB stick is now also possible. Need to still add some stuff before I am happy with the code.



Hi,
I see it for the first time on the real CPC. :D
What's really so smooth scrolling?  :o
PuzCPC
Title: Re: USB game controllers and mice
Post by: Phantomz on 17:36, 08 March 19
@Duke


I've remapped the controls in " Renegade ".


I've made it Joystick only, I've mapped the attacks to the 3 joystick buttons, I've made button 1 and 3 attack, with button 2 jump.


It's here if you want to give it a test.  ;D
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 00:24, 09 March 19
Duke,

Great stuff as always.

The support for multiple fire buttons is a killer feature.  I love my monster joystick but its a shame to only have 1 fire button.

Will be an instant purchase from me.

Mark
Title: Re: USB game controllers and mice
Post by: Duke on 08:27, 09 March 19
Quote from: Phantomz on 17:36, 08 March 19
@Duke


I've remapped the controls in " Renegade ".


I've made it Joystick only, I've mapped the attacks to the 3 joystick buttons, I've made button 1 and 3 attack, with button 2 jump.


It's here if you want to give it a test.  ;D

The archieve is damaged, can you re-attach it? - It's nice to have a game with 3 buttons to test, thanks.
Title: Re: USB game controllers and mice
Post by: Phantomz on 18:47, 10 March 19
Quote from: Duke on 08:27, 09 March 19
The archieve is damaged, can you re-attach it? - It's nice to have a game with 3 buttons to test, thanks.


Odd, it works for me, I used the latest version of winrar (trial version) as on a new laptop.


I'll have to look for another program to use to compress the disc.
Title: Re: USB game controllers and mice
Post by: Audronic on 23:16, 10 March 19
Quote from: Duke on 08:27, 09 March 19
The archieve is damaged, can you re-attach it? - It's nice to have a game with 3 buttons to test, thanks.


I was able to open the Renegade (3 Button Joy).rar file with  " iZip Unarchiver " On my MAC


Ray



Title: Re: USB game controllers and mice
Post by: Duke on 07:27, 11 March 19
Yes, got it working using the latest winrar, thanks (Appearently something changed from the old one I was using).
I guess it's better to use .zip as that atleast is freely available.
Title: Re: USB game controllers and mice
Post by: Phantomz on 14:23, 11 March 19
Quote from: Duke on 07:27, 11 March 19
Yes, got it working using the latest winrar, thanks (Appearently something changed from the old one I was using).
I guess it's better to use .zip as that atleast is freely available.

@Duke (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1624)

I'm glad you managed to get it working, I'll download winzip later.

I've remapped the controls in " 1943 " to make it use 3 buttons by default for both players, you might like this also.  ;)

Button 1 = Fire, Button 2 = Rolling, Button 3 = Smart Bomb
Title: Re: USB game controllers and mice
Post by: Duke on 13:43, 05 April 19
Final PCB arrived, tested and OK  8)

Hope to wrap up the bootloader and initial firmware over the weekend.
Still missing some female DC connectors before I can ship any.
Title: Re: USB game controllers and mice
Post by: GUNHED on 13:51, 05 April 19
Like usually excellent and professional work!  :) :) :)
Since we discussed some idea, Duke, can can please in brief explain how they work?
Are they compatible to digital joysticks or can they provide proportional data?

They definitely win the price for the smallest adapter in CPC world ever.  :laugh:
Title: Re: USB game controllers and mice
Post by: Duke on 14:05, 05 April 19
Quote from: GUNHED on 13:51, 05 April 19
Like usually excellent and professional work!  :) :) :)
Since we discussed some idea, Duke, can can please in brief explain how they work?
Are they compatible to digital joysticks or can they provide proportional data?

Thanks.
As for initial firmware release I think I will just provide plain digital joystick conversion.
However I already have my custom 5 bit proportional data mode working fine for USB mouses, but of course no real use for special modes yet.
The beauty is that it can be easily upgraded, if one has a USB stick laying around (just plug it into the USB port of the adapter and powercycle it).
So I can implement whatever I want, if there is a demand for it.

With other firmwares I will try to support ZX, C64, Amiga and Atari ST too (although the last 3 require different "jumper" setting via smd resistors). As I am in lack of proper mouses for the 16 bits and joysticks for the others.

Quote
They definitely win the price for the smallest adapter in CPC world ever.  :laugh:
Thanks for noticing, I did my best to make it as small as possible, I could probably still squeeze another couple of mm off, maybe for another revision.
Title: Re: USB game controllers and mice
Post by: GUNHED on 14:19, 05 April 19
No, no, please don't make it smaller. One just felt between two keys and disappeared.  :laugh:

Fun at side. I still do have the Atari ST mouse here, so if some day maybe the proportional firmware for the following adapter will be available, I volunteer for testing intensively. That's the one I mean:
http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter (http://www.cpcwiki.eu/index.php/Atari-ST_mouse_adapter)

Do you already support three buttons? Like for the AMX mouse? If not, this could be a first firmware update.  :)

Cool project, please add me to the "I want to buy" list.  :)
Title: Re: USB game controllers and mice
Post by: Duke on 14:34, 05 April 19
@GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029)
Thanks, will consider it all later. It much more fun to make features if they are not just for myself (I am quite simple!).


Forgot to include a picture of the transparent enclosure... yea, it's heatshrink tube, but it will protect well against accidental shorts. I will need to practice it a bit more.
Also not sure if it will accumulate too much heat, to be tested!

Pricing for the initial run is 14 euro + shipping (4 euro) and this time PLUS paypal cost (but I consider you my friends). It will include a Y splitter cable for routing the powersupply to the adapter.
Price may change later if more is built etc.

EDIT: Initial batch sold out. Price going forward is now 15 euro with Y splitter cable.
Title: Re: USB game controllers and mice
Post by: GUNHED on 14:42, 05 April 19
This short cut protection is awesome, more often cables fall around a computer... oh well, we sometimes payed our price for this before. Shouldn't get hot IMHO.
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 18:45, 05 April 19
Hi Duke !!!

Do you already accept orders from the usb adapter?  :o
Title: Re: USB game controllers and mice
Post by: Duke on 19:09, 05 April 19
Quote from: XeNoMoRPH on 18:45, 05 April 19
Do you already accept orders from the usb adapter?  :o

Yes, I take orders for the first batch. Which will be 10-15 pcs, and should be ship able within the next 1-3 weeks (todo finish bootloader and initial firmware over the weekend and await female DC sockets).


So in short if you want one, send me a PM. Currently I only have Y-split power cables suitable for regular CPC, so if you have a CPC plus, you will need some sort of DC plug adapter.
It's important for the CPC that the USB adapter is powered together with the CPC (sharing same ground, which is not available on the joystick port). For other computers (except ZX +2/+3) it can be port powered or powered by seperate psu.

Picture of Y split cable I currently have, they will fit regular CPC (5.5x2.1mm plugs)
Title: Re: USB game controllers and mice
Post by: Maniac on 22:54, 05 April 19
Quote from: Duke on 19:09, 05 April 19
Yes, I take orders for the first batch. Which will be 10-15 pcs, and should be ship able within the next 1-3 weeks (todo finish bootloader and initial firmware over the weekend and await female DC sockets).


So in short if you want one, send me a PM. Currently I only have Y-split power cables suitable for regular CPC, so if you have a CPC plus, you will need some sort of DC plug adapter.
It's important for the CPC that the USB adapter is powered together with the CPC (sharing same ground, which is not available on the joystick port). For other computers (except ZX +2/+3) it can be port powered or powered by seperate psu.

Picture of Y split cable I currently have, they will fit regular CPC (5.5x2.1mm plugs)
Have PM'd you for one of the devices at the mo. A while ago I asked about a second device on the Plus given its 2 joystick ports but given the power requirements you mention in this post would this even be possible?
Title: Re: USB game controllers and mice
Post by: Duke on 01:50, 06 April 19
Quote from: Maniac on 22:54, 05 April 19
Have PM'd you for one of the devices at the mo. A while ago I asked about a second device on the Plus given its 2 joystick ports but given the power requirements you mention in this post would this even be possible?
Yes it will be possible. Only problem right now is I don't have Y splitter cable that fits into the CPC plus DC power socket, which afair. has 2.5 mm inside diameter instead of  the 2.1mm used on regular CPC.
So I would either need to get some Y splitter cable with right dimension DC plugs (not found), use some DC to DC converters or make it myself (yuck).

Anyway, when using two adapters on a CPC plus, one would have to use 2x  2-1 y-splitter cables or get a 3-1 y-splitter for the power. Then two or one (depending on powersupply used) DC-2-DC plug converters.
A smoother option for CPC plus would be to take the power from the Analog joystick port.


Title: Re: USB game controllers and mice
Post by: Maniac on 07:56, 06 April 19
Quote from: Duke on 01:50, 06 April 19
Yes it will be possible. Only problem right now is I don't have Y splitter cable that fits into the CPC plus DC power socket, which afair. has 2.5 mm inside diameter instead of  the 2.1mm used on regular CPC.
So I would either need to get some Y splitter cable with right dimension DC plugs (not found), use some DC to DC converters or make it myself (yuck).

Anyway, when using two adapters on a CPC plus, one would have to use 2x  2-1 y-splitter cables or get a 3-1 y-splitter for the power. Then two or one (depending on powersupply used) DC-2-DC plug converters.
A smoother option for CPC plus would be to take the power from the Analog joystick port.
I had had a similar idea re the analog port but I guess that would also need a custom cable to be made. Given how often I might play 2 player games this isn't a scenario I'd use very often. Where have you sourced your DC-2-DC plug converter please?
Title: Re: USB game controllers and mice
Post by: Duke on 10:34, 06 April 19
Quote from: Maniac on 07:56, 06 April 19
Where have you sourced your DC-2-DC plug converter please?
Ebay has lots of them, but you need one for the monitor plug and the one that goes into the CPC plus.
Ie.
https://www.ebay.com/itm/2-1x5-5mm-Female-to-2-5x5-5mm-Male-DC-Power-Adapter-Converter-for-CCTV-Camera/132690461014 (https://www.ebay.com/itm/2-1x5-5mm-Female-to-2-5x5-5mm-Male-DC-Power-Adapter-Converter-for-CCTV-Camera/132690461014)
https://www.ebay.com/itm/DC-Power-Connector-5-5mm-x-2-1mm-Male-to-Female-Coupler-Adapter-Converter-5Pcs/323738120293 (https://www.ebay.com/itm/DC-Power-Connector-5-5mm-x-2-1mm-Male-to-Female-Coupler-Adapter-Converter-5Pcs/323738120293)

I guess one of each should do the trick (maybe).
Title: Re: USB game controllers and mice
Post by: Duke on 14:43, 06 April 19

Today I added support for XBOX One controller, it seems like a nice controller - Yeah I should've focused on finishing stuff, oh well...

Thanks at @Phantomz (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1308) for the 3 button version of 1943 used in this video. Unfortunately I don't really get to pick up any smartbombs, though it seems I blew one at some point using FIRE 3.

https://youtu.be/4uqGCEa9UUw
Title: Re: USB game controllers and mice
Post by: TotO on 15:59, 06 April 19
Instead of a "5v hack" cable, should it be powered through the USB, using the X-Box controller battery?
Title: Re: USB game controllers and mice
Post by: Duke on 06:36, 07 April 19
Quote from: TotO on 15:59, 06 April 19
Instead of a "5v hack" cable, should it be powered through the USB, using the X-Box controller battery?
Unfortunately not. It wont supply power on the USB (it is device, not host). And my design requires the PCB has same ground as the Amstrad (and not only the COMMON pulse).


Edit: found almost perfect cable for CPC plus  -> https://www.aliexpress.com/item/1pcs-CCTV-DC-Power-5-5x-2-5mm-Female-to-5-5-x-2-5mm-5/32866117718.html (https://www.aliexpress.com/item/1pcs-CCTV-DC-Power-5-5x-2-5mm-Female-to-5-5-x-2-5mm-5/32866117718.html)
Unfortunately it's quite pricey (and a tad long). If someone with better search skills can find a cheaper one, much appreciated ;)
Title: Re: USB game controllers and mice
Post by: TotO on 12:37, 07 April 19
OK! (or a little lithium battery to power your MCU)

Is your design can fit into a DB9 shell?

(https://showmecables-static.scdn3.secure.raxcdn.com/media/catalog/product/cache/e4d64343b1bc593f1c5348fe05efa4a6/d/b/db9-hood-grey-plastic-374-9-1.jpg)
Title: Re: USB game controllers and mice
Post by: Duke on 02:29, 08 April 19

As it is, I don't think it would fit, due to the USB port being right angle, so it sticks up and not centered over the PCB as the DB9.
I have been going over the various DB9 shells and not really found one that was ideal.
Shrink tube feels good though ;)

Quote from: TotO on 12:37, 07 April 19
Is your design can fit into a DB9 shell?
Title: Re: USB game controllers and mice
Post by: Duke on 09:16, 08 April 19
Attached a picture of suggested button mapping.

This would apply to:
DualShock 3
DualShock 4
Xbox One controller

And ie. SNES usb controllers I have.

For other USB controllers, that I don't own, I cannot make such specific mapping.

Let me know if anyone think mapping should be different, I am not much of a gamer, so this is just what occurred to me.
Title: Re: USB game controllers and mice
Post by: TotO on 11:03, 08 April 19
Most used buttons are "cross" (cancel) and "round" (valid) on Playstation controllers.
On XBOX controllers, it match with "A" and "B" respectively.

As already spoke, the SPARE (fire3) will be nice to allow to extend extra button usages.

A / "cross" = CPC FIRE 2
B / "circle" = CPC FIRE 1
X / "square" = CPC FIRE 1 + FIRE 2
Y / "triangle" = CPC FIRE 3

RT1 = CPC AUTOFIRE 1
LT1 = CPC AUTOFIRE 2

RT2 = CPC FIRE 3 + FIRE 1
LT2 = CPC FIRE 3 + FIRE 2

"START" (or other function) = CPC UP+DOWN
"SELECT" (or other function) = CPC LEFT+RIGHT


Quote from: DukeShrink tube feels good though ;)
Sure, but using a standard DB9 shell allow to have enough space to add a little removable "CR lithium battery" to directly power your MCU and avoid to add an extra power cable and electronic. ;D
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 13:48, 13 April 19
https://youtu.be/Ur3wE34Ghug (https://youtu.be/Ur3wE34Ghug)


What about ms input lag ?
Title: Re: USB game controllers and mice
Post by: Duke on 14:07, 13 April 19
Thanks @XeNoMoRPH (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1952)

Was going to post it here too :)

Quote from: XeNoMoRPH on 13:48, 13 April 19
https://youtu.be/Ur3wE34Ghug (https://youtu.be/Ur3wE34Ghug)


What about ms input lag ?

There should be no lag (well maybe 4 ms!).

Anyway in short I am happy with the bootloader and initial firmware now.
So I will start finishing and shipping out the preordered units.

Also need to write some documentation on it soon ;)

But for short info look at http://www.spinpoint.org/2019/04/13/imperium-solo/ (http://www.spinpoint.org/2019/04/13/imperium-solo/)  and watch the video above.

EDIT:
Button mapping is as suggested by @TotO (http://www.cpcwiki.eu/forum/index.php?action=profile;u=290) for the known gamepads.
For mouses, 3 buttons are supported. Left Button is Fire 2, Right is Fire 1 and Wheel / middle button is Fire 3. The mouse works best in AMX "mode", so in ie. Adv. Art Studio, go to input devices and select AMX mouse.

Picture of some ready to ship units...
Title: Re: USB game controllers and mice
Post by: shifters74 on 09:31, 14 April 19
Hi Duke,
does it work with symbos as a mouse with a microsoft intellimouse for example?
Another day, another duke post and me going "oooh oooh i want one, or two!"  ;D ;D
cheers
Shifters
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 10:42, 14 April 19
Quote from: shifters74 on 09:31, 14 April 19
Hi Duke,
does it work with symbos as a mouse with a microsoft intellimouse for example?
Another day, another duke post and me going "oooh oooh i want one, or two!"  ;D ;D
cheers
Shifters
Same question ,
I want to use this mouse in symbos .. will it work?

(https://i.ibb.co/fQK75yJ/photo-2019-04-14-11-41-03.png)
And .. another question ...
Is it possible to use the CPC floppy disk at the same time as the USB Adapter ?
Title: Re: USB game controllers and mice
Post by: Duke on 12:37, 14 April 19
Quote from: shifters74 on 09:31, 14 April 19
does it work with symbos as a mouse with a microsoft intellimouse for example?

It works in SymbOS yes, similar as if it was a joystick or a AMX mouse.

Quote from: XeNoMoRPH on 10:42, 14 April 19
I want to use this mouse in symbos .. will it work?

As for specific mouse, I cannot say if they will work or not. I tested logitech unified (M525 best mouse on the market! really ;) ) and 4 different "China" mice.

Ideally any REAL USB mouse will work, but I guess there may be some that dont work because of my HID descriptor parser.
I will try to write up a procedure so users can send me info on a specific mouse or gamepad so that it can be added to the firmware, if it fails to work by default.

Quote
Is it possible to use the CPC floppy disk at the same time as the USB Adapter ?
Yes.

Title: Re: USB game controllers and mice
Post by: shifters74 on 13:32, 14 April 19
Does the cool device have a name???   8)
The J4??  :P
cheers
shifters

Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 14:24, 14 April 19
Quote from: shifters74 on 13:32, 14 April 19
Does the cool device have a name???   8)
The J4??  :P
cheers
shifters
(https://i.ibb.co/ph7zqz4/cooltext321308184284857.png)
Title: Re: USB game controllers and mice
Post by: zhulien on 19:05, 14 April 19
This is a cool project.  Will it work with PS2 Dual Shock also?  I am curious... if the CPC usually uses Atari compatible joysticks, why would this require a firmware update to work on other computers that work with Atari compatible joysticks?  like an Atari 2600?
Title: Re: USB game controllers and mice
Post by: Duke on 20:06, 14 April 19
Quote from: zhulien on 19:05, 14 April 19
This is a cool project.  Will it work with PS2 Dual Shock also?
Thanks.
PS2 Dualshock doesn't use USB so no go.
Quote
I am curious... if the CPC usually uses Atari compatible joysticks, why would this require a firmware update to work on other computers that work with Atari compatible joysticks?  like an Atari 2600?
Apart from the missing VCC on the joystick port, there is another major difference.
It's "invisible" when you just use a wired switch.
Joystick signals are invoked by pulling signals (left/right/up/down/fire etc) low (to ground).
However on CPC the "ground" pin 8 is only grounded when the PPI is scanning the keyboard matrix for which the joystick signals are connected. If signals were constantly grounded the keyboard scanning would give all kinds of wrong characters.
This means to simplify my circuit, I watch for pin 8 to go low, before I can invoke the signals for left/right/up/down etc...

Obviously its not a big deal to change this (in fact much easier not having to watch for the pin to go low/high) to make it compatible with ie. C64.
ZX spectrum +2/+3 beside having an obscure layout on the joystick port, seems to use similar approach as the CPC, so will need a relayout in the firmware.
Amiga and Atari ST have specific signals for mouses that need to be "emulated".
Fire 1 / 3 are also different among various systems.

Beside software changes, I need to connect pin 8 to ground on the PCB (done via 0 ohm SMD resistor) and connect pin 7 (also 0 ohm SMD resistor) to VCC of the PCB (now powered via joystick port) for ST/AMIGA/C64 etc.
Title: Re: USB game controllers and mice
Post by: Duke on 19:42, 16 April 19

Now also working with C64 (probably nobody gives a... in here). Do not expect to share the hardware between the C64 (or similar) and the Amstrad, as it needs to have SMD jumpers moved, beside the firmware changed.

https://youtu.be/qFVo_Y_V64U (https://youtu.be/qFVo_Y_V64U)

Fwiw. I should have done my homework better on the ZX Spectrum +2/+3, it does work in another way, and likely no firmware will make my board work with the built-in joystick interface.
Title: Re: USB game controllers and mice
Post by: shifters74 on 19:44, 16 April 19
Hi all,
While it may be seen as heresy here   :P   - this commodore 64 fan loves the video Duke just posted on his spinpoint website.  8) 8)
Love the idea of PS3 and Ps4 controller on C64!!!  Uridium with mouse - hmmmm nice!!  ;D ;D
Another day and another reason to buy more stuff from Duke lol!
cheers
Shifters

ps ah Duke got post in while i was typing!!  Please post on Lemon64 Duke!!
Title: Re: USB game controllers and mice
Post by: VincentGR on 20:00, 16 April 19
I need one for my C64, just for the mouse option.
Title: Re: USB game controllers and mice
Post by: Shining on 15:19, 17 April 19
- Will it work with 8Bitdo USB to wireless adapter ?- Are you planning a version for two joysticks ?

Title: Re: USB game controllers and mice
Post by: Duke on 16:40, 17 April 19
Quote from: Shining on 15:19, 17 April 19
- Will it work with 8Bitdo USB to wireless adapter ?- Are you planning a version for two joysticks ?
Most likely. I have ordered this :
https://www.ebay.com/itm/Wireless-USB-SNES-Retro-Controller-Gamepad-for-PC-MAC-Raspberry-Pi-US-SHIP/153413332769 (https://www.ebay.com/itm/Wireless-USB-SNES-Retro-Controller-Gamepad-for-PC-MAC-Raspberry-Pi-US-SHIP/153413332769)

And I expect to add support for it. Don't have the 8bitdo one, but I think its quite similar (if not the same).

And maybe ;) - for the CPC, if I added USB hub support it could in theory deal with 2 joysticks already.. Lets see...
Title: Re: USB game controllers and mice
Post by: zhulien on 10:41, 18 April 19
Hi Duke, just a thought. Would it be viable for you to make a PLUS variant with the board oriented sideways to fit both joystick ports at once (and not stick out so much), but with 2 USB plugs? The Imperium Skywalker?
Title: Re: USB game controllers and mice
Post by: Maniac on 13:06, 18 April 19
Hi Duke,

Received my Imperium Solo this morning. Have to say I'm so impressed with this. Plugged it in to my Plus with a DualShock 3 and fired up Burnin Rubber using the triggers for accelerator and brake. Actually managed a lap and a half and felt so responsive.

Excellent stuff and highly recommended as always!

Also thank you so much for sourcing the y cable/adapter specifically for the Plus!

Kind regards
Maniac
Title: Re: USB game controllers and mice
Post by: GUNHED on 14:29, 18 April 19
WoW! This is retroactive! Means shipping goes backwards in time. Tomorrow I will order and it already arrived. The main thing is: It works really well! I just used an USB mouse for testing:


https://youtu.be/emGJvcisVsI
Title: Re: USB game controllers and mice
Post by: slugman on 00:06, 19 April 19
Received it also today  :D
Tested with a Xbox One controller, and that works great! using modern controller really improve the gameplay.  Also enjoyed playing Shufflepuck Café with a mouse  :) . Thanks Duke for this new great device!
Title: Re: USB game controllers and mice
Post by: George Schizas on 12:16, 19 April 19
Damn it, I was so close to making something similar by using a Raspberry Pi (obviously when the adapter has more processing power than the computer, I was doing something wrong  :)  - but I intended to do this as a prototype)


I'll be PM'ing for the next batch.
Title: Re: USB game controllers and mice
Post by: Bruce101 on 12:56, 19 April 19
Hi Duke!
First of all congratulations for the good work!!!
Im a CPC enthusiats from 1986, with a CPC464 still working... I bought your WIFI / SD M4 board some time ago (maybe 2 or 3 years... I don´t remember) its a cool stuff!!!
Im interested on two usb adapters for regular CPC, is it still possible to buy them?
Thanks in advance!!!
Title: Re: USB game controllers and mice
Post by: Maniac on 13:23, 19 April 19
Having stayed up late playing with this last night I've just had thought of an idea.

If at all possible it would be really cool if the planned button mapping feature could support button sequences. For example a jump, followed by a direction then maybe something else. Would be v useful in Navy Seals for example where some of the moves are tricky to do every time!
Title: Re: USB game controllers and mice
Post by: Duke on 13:24, 19 April 19

Quote from: Bruce101 on 12:56, 19 April 19
Hi Duke!
First of all congratulations for the good work!!!
Im a CPC enthusiats from 1986, with a CPC464 still working... I bought your WIFI / SD M4 board some time ago (maybe 2 or 3 years... I don´t remember) its a cool stuff!!!
Im interested on two usb adapters for regular CPC, is it still possible to buy them?
Thanks in advance!!!

Thanks. Yes it's possible to buy them. Currently there is a lead time of some weeks.

Ordering procedure:
Send me a PM (with your email address) or an email and let me know what you need and for which computer, then I  will confirm and add you to my list.
And when it is ready, I will email you with Paypal details and ask for your shipping address.

Current pricing is:
Imperium Solo with DC Y splitter cable for regular CPC, 15 euro
Imperium Solo with DC Y splitter cable and adapter for CPC plus, 16 euro
Shipping worldwide (unregistered) up to 100 grams, 4 euro
+ Paypal fee which is 1 euro or pay as friend (but you loose the ability to make a claim to Paypal afaik. if you are not happy with the product etc, so up to you!)
Title: Re: USB game controllers and mice
Post by: Duke on 13:25, 19 April 19
Quote from: Maniac on 13:23, 19 April 19
Having stayed up late playing with this last night I've just had thought of an idea.

If at all possible it would be really cool if the planned button mapping feature could support button sequences. For example a jump, followed by a direction then maybe something else. Would be v useful in Navy Seals for example where some of the moves are tricky to do every time!
Not impossible...Record sequence, Playback.
Title: Re: USB game controllers and mice
Post by: Bruce101 on 13:52, 19 April 19
Hi Duke!
You have an MP (and an email by mistake, are the same, sorry).
Title: Re: USB game controllers and mice
Post by: zhulien on 06:29, 21 April 19
Hi Duke, I am interested in this more from the mouse support point of view, how is the mouse support currently? is it there or coming soon?
Title: Re: USB game controllers and mice
Post by: Duke on 09:26, 21 April 19
Quote from: zhulien on 06:29, 21 April 19
Hi Duke, I am interested in this more from the mouse support point of view, how is the mouse support currently? is it there or coming soon?
Mouses are supported, but only as AMX mouse. I guess it's just as good or crap as existing interfaces, maybe someone who has both can tell. As I don't have AMX or  Bryce PS/2 interface.
My custom proportional  mode is not added to the release firmware, as there is no point since no software supports it.
Title: Re: USB game controllers and mice
Post by: VincentGR on 16:33, 21 April 19
As I think the mouse is working like that because the lacks of analog input, right?
What about the plus machines?
I think it has an analog port  :-X
Title: Re: USB game controllers and mice
Post by: Duke on 20:56, 21 April 19
Quote from: VincentGR on 16:33, 21 April 19
As I think the mouse is working like that because the lacks of analog input, right?
It only works like that because its how software is reading AMX mouse (as a joystick).
Proportional mouse support is easily possible through the digital port, just not with the current software support (patches needed).
Title: Re: USB game controllers and mice
Post by: LambdaMikel on 01:40, 22 April 19
Quote from: Duke on 20:56, 21 April 19
It only works like that because its how software is reading AMX mouse (as a joystick).
Proportional mouse support is easily possible through the digital port, just not with the current software support (patches needed).
I'd be interested in getting one when the next software version is out  :)
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 14:42, 22 April 19
adapter received:

This Chinese mouse is not detected:

(https://i.ibb.co/JqScKzB/photo-2019-04-14-11-41-03.png)

On my Logitech G5 mouse , symbos detects the movement of the mouse but not the buttons:

and this other wireless works fine with symbos but with lag

(https://i.ibb.co/8YhhMKY/photo-2019-04-22-15-29-25.png)

and this other snes usb chinese works fine too

(https://images-na.ssl-images-amazon.com/images/I/41XIbCHirYL._SX342_.jpg)

Title: Re: USB game controllers and mice
Post by: Duke on 17:45, 22 April 19
Quote from: XeNoMoRPH on 14:42, 22 April 19

This Chinese mouse is not detected:

On my Logitech G5 mouse , symbos detects the movement of the mouse but not the buttons
and this other wireless works fine with symbos but with lag
Thanks for the feedback.

If you have a linux PC, could you please try to use usbhid-dump and send me the reports, then I can add/fix your mice.
It's done like this:
sudo usbhid-dump | grep -v : | xxd -r -p | hidrd-convert -o spec >report_for_duke.txt

If you only have windows, you can use trial version of USBLyzer. But I cannot remember the steps needed and my trial has expired. Will try to install it on another windows PC soon and note the needed steps to dump the USB HID report descriptor, which is what I need.
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 18:47, 22 April 19
Quote from: Duke on 17:45, 22 April 19
Thanks for the feedback.

If you have a linux PC, could you please try to use usbhid-dump and send me the reports, then I can add/fix your mice.
It's done like this:
sudo usbhid-dump | grep -v : | xxd -r -p | hidrd-convert -o spec >report_for_duke.txt

If you only have windows, you can use trial version of USBLyzer. But I cannot remember the steps needed and my trial has expired. Will try to install it on another windows PC soon and note the needed steps to dump the USB HID report descriptor, which is what I need.
ok , i will try  :D thx
Title: Re: USB game controllers and mice
Post by: Maniac on 20:13, 22 April 19
Just had a chance to try out a Microsoft IntelliMouse Optical and although it lights up the Imperial Solo doesn't seem to provide any output.

(https://uploads.tapatalk-cdn.com/20190422/7db98926a6583576e51079cd8e9fa51e.jpg)


The mouse is PS/2 compatible and has the following USB HID information:



Device Descriptor
USB version: 1.10
Device class: 0x0 - (Defined at Interface level)
Device subclass: 0x0 - Unknown
Device protocol: 0x0 - Unknown
Control pipe max size: 8 bytes
Vendor ID: 0x45e (Microsoft Corp.)
Product ID: 0x39 (IntelliMouse Optical)
Product version: 1.21
Manufacturer: Microsoft
Product: Microsoft IntelliMouse® Optical
Serial Number: Not specified
Configurations: 1


descriptors[0] = "Configuration Descriptor"
bLength = 9
bDescriptorType = USB_CONFIGURATION_DESCRIPTOR_TYPE (2)
wTotalLength = 34
bNumInterfaces = 1
bConfigurationValue = 1
iConfiguration = 0
Reserved = 0
SupportsRemoteWakeup = 1
SelfPowered = 0
PoweredByBus = 1
MaxPower = 0x32 -> 100 mA
descriptors[1] = "Interface Descriptor"
bLength = 9
bDescriptorType = USB_INTERFACE_DESCRIPTOR_TYPE (4)
bInterfaceNumber = 0
bAlternateSetting = 0
bNumEndpoints = 1
bInterfaceClass = UsbHID (3)
bInterfaceSubClass = 1
bInterfaceProtocol = 2
iInterface = 0
descriptors[2] = "HID Descriptor"
bLength = 9
bDescriptorType = HID_HID_DESCRIPTOR_TYPE (33)
bcdHID = 1.00
bCountry = NotDefined (0)
bNumDescriptors = 1
reports = 
reports[0] = 
  bReportType = 34
  wReportLength = 72
  raw =  7, 5, 129, 3, 4... 

HID Descriptor
Usage Page: 1 (Generic Desktop Controls)
Usage: 2 (Mouse)
Collection
Usage: 1 (Pointer)
Collection
Usage Page: 9 (Buttons)
Usages (1-5): Button 1 (Primary), Button 2 (Secondary), Button 3 (Tertiary), Button 4, Button 5
Logical Minimum: 0
Logical Maximum: 1
Report Size: 1
Report Count: 5
Input: 2 (Data,Variable,Absolute,No Wrap,Linear,Preferred State,No Null Position)
Report Size: 3
Report Count: 1
Input: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)
Usage Page: 1 (Generic Desktop Controls)
Usage: 48 (Direction-X)
Usage: 49 (Direction-Y)
Usage: 56 (Wheel)
Logical Minimum: -127
Logical Maximum: 127
Report Size: 8
Report Count: 3
Input: 6 (Data,Variable,Relative,No Wrap,Linear,Preferred State,No Null Position)
End Collection
Usage Page: 255 (Vendor Specific)
Usage: 2 (Unknown)
Logical Minimum: 0
Logical Maximum: 1
Report Size: 1
Report Count: 1
Feature: 34 (Data,Variable,Absolute,No Wrap,Linear,No Preferred State,No Null Position)
Report Size: 7
Report Count: 1
Feature: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)
End Collection
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 21:09, 22 April 19
Hi again Duke !!! , here are these two files with the information you ask me ,  these are the 2 usb mouse that I can not work properly
with USBlyzer

https://1fichier.com/?nxqylz7of98wsixoo9nr (https://1fichier.com/?nxqylz7of98wsixoo9nr)
https://1fichier.com/?jtgayabpz73jw841rnw2 (https://1fichier.com/?jtgayabpz73jw841rnw2)
Title: Re: USB game controllers and mice
Post by: Maniac on 00:23, 23 April 19
Quote from: Duke on 17:45, 22 April 19
Thanks for the feedback.

If you have a linux PC, could you please try to use usbhid-dump and send me the reports, then I can add/fix your mice.
It's done like this:
sudo usbhid-dump | grep -v : | xxd -r -p | hidrd-convert -o spec >report_for_duke.txt

If you only have windows, you can use trial version of USBLyzer. But I cannot remember the steps needed and my trial has expired. Will try to install it on another windows PC soon and note the needed steps to dump the USB HID report descriptor, which is what I need.



I've managed to find an alternative to USBLyzer which I believe pulls out this information in Windows and remains free Free USB Analyzer Overview (https://freeusbanalyzer.com/)
Title: Re: USB game controllers and mice
Post by: Duke on 08:27, 23 April 19
Quote from: Maniac on 20:13, 22 April 19
Just had a chance to try out a Microsoft IntelliMouse Optical and although it lights up the Imperial Solo doesn't seem to provide any output.
Thanks for the report.
Checking it with my HID parser, it seems without issue.
Please notice the LED on the Imperium Solo.
When no USB device detected, it flashes: 
1 second on, 1 second off ...
When a USB device is detected it flashes:
half a second on, half a second off ...

Quote from: XeNoMoRPH on 21:09, 22 April 19
Hi again Duke !!! , here are these two files with the information you ask me ,  these are the 2 usb mouse that I can not work properly
with USBlyzer

https://1fichier.com/?nxqylz7of98wsixoo9nr (https://1fichier.com/?nxqylz7of98wsixoo9nr)
https://1fichier.com/?jtgayabpz73jw841rnw2 (https://1fichier.com/?jtgayabpz73jw841rnw2)
Thanks for the reports. However it seems they are identical and also passes my HID parser just fine. I wonder if this is the "main" mouse you have connected to your PC and not the report descriptor of the two troublesome mice?
Also please notice LED behaviour aswell.

Quote from: Maniac on 00:23, 23 April 19
I've managed to find an alternative to USBLyzer which I believe pulls out this information in Windows and remains free Free USB Analyzer Overview (https://freeusbanalyzer.com/ (https://freeusbanalyzer.com/))
Good find, thanks !
Title: USB game controllers and mice
Post by: Maniac on 09:13, 23 April 19
Quote from: Duke on 08:27, 23 April 19
Thanks for the report.
Checking it with my HID parser, it seems without issue.
Please notice the LED on the Imperium Solo.
When no USB device detected, it flashes: 
1 second on, 1 second off ...
When a USB device is detected it flashes:
half a second on, half a second off ...
I've just checked and can confirm that both the DualShock 3 and MS IntelliMouse cause USB device detection with half a second on/half off. However only the DualShock generates any output on screen. The mouse doesn't generate anything even from the buttons I'm afraid.

Power cycled the Imperium Solo and no difference. Although one time when I plugged the mouse in after the DualShock it didn't detect it. Power cycling sorted that though.

P.S. DualShock on Art Studio is very responsive but probably wouldn't want to use it for drawing!!
Title: Re: USB game controllers and mice
Post by: Duke on 18:20, 23 April 19
Imperium Solo firmware update v1.0.1
Changes:
Download:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v101.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v101.zip)

Instructions:
Unpack the file IMPERSOL.BIN to root directory of a USB stick (FAT32).
Insert it to Imperium Solo USB port and power it on. LED will be on shortly and once it starts flashing (few seconds later) firmware is updated.
Remove USB stick and insert mouse/gamepad.
File will be deleted from USB stick if succesful.
Title: Re: USB game controllers and mice
Post by: slugman on 20:32, 23 April 19
Hi Duke!
I flashed my imperium Solo with the update and it works now perfectly with MS branded mouses.  I tested successfully following Microsoft models:
.Intellimouse Explorer 3.0
.Notebook Optical Mouse
.Optical Mouse by Starck.
.Wheel Mouse Optical
.Optical Mouse blue
.Arc Touch Mouse
Probably all Microsoft models are now supported
(https://i.ibb.co/z4wWsWs/IMG-20190423-205141.jpg) (https://ibb.co/DRnP4P4)
Title: Re: USB game controllers and mice
Post by: XeNoMoRPH on 20:43, 23 April 19
Quote from: Duke on 08:27, 23 April 19
Thanks for the reports. However it seems they are identical and also passes my HID parser just fine. I wonder if this is the "main" mouse you have connected to your PC and not the report descriptor of the two troublesome mice?
Also please notice LED behaviour aswell.
Good find, thanks !
Hi Again !!! duke , this two report are about my main mouse yes ... and the other mouse that I would like to work with symbos

Title: Re: USB game controllers and mice
Post by: Maniac on 23:07, 23 April 19

Quote from: Duke on 18:20, 23 April 19
Imperium Solo firmware update v1.0.1
Changes:
Fix issue with MS mice (@Maniac)
Download:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v101.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v101.zip)
Instructions:
Unpack the file IMPERSOL.BIN to root directory of a USB stick (FAT32).
Insert it to Imperium Solo USB port and power it on. LED will be on shortly and once it starts flashing (few seconds later) firmware is updated.
Remove USB stick and insert mouse/gamepad.
File will be deleted from USB stick if succesful.
Worked a treat and the mouse now provides output. Thank you so much as always. Mouse however doesn't seem to work very well which is not down to the Imperium Solo as you will see below.
Quote from: Duke on 09:26, 21 April 19
Mouses are supported, but only as AMX mouse. I guess it's just as good or crap as existing interfaces, maybe someone who has both can tell. As I don't have AMX or  Bryce PS/2 interface.
My custom proportional  mode is not added to the release firmware, as there is no point since no software supports it.
Now that the mouse support is working I've managed to put a quick and dirty comparison video together using Advanced Art Studio as the test bed. I have an AMX mouse for my Plus which I hooked up and then did the same with the Imperium Solo and a number of USB devices. The Microsoft IntelliMouse is the worst of the lot! Hope this is useful to someone as a guide!
https://youtu.be/XLJWFB7dCBQ (https://youtu.be/XLJWFB7dCBQ)
Title: Re: USB game controllers and mice
Post by: Duke on 23:57, 23 April 19
Quote from: slugman on 20:32, 23 April 19

I flashed my imperium Solo with the update and it works now perfectly with MS branded mouses.  I tested successfully following Microsoft models:

Cool! Thanks for checking all those. Will see to add some "database" over tested mice & joypads.
Quote from: XeNoMoRPH on 20:43, 23 April 19
this two report are about my main mouse yes ... and the other mouse that I would like to work with symbos
Ok, but both reports are the same, so some mistake must have happened:
File from https://1fichier.com/?nxqylz7of98wsixoo9nr (https://1fichier.com/?nxqylz7of98wsixoo9nr) is the same as https://1fichier.com/?jtgayabpz73jw841rnw2 (https://1fichier.com/?jtgayabpz73jw841rnw2).
Can you try to email me the correct reports (the 1fichier is very annoying as you have to wait 1 hour to download the next one). Thanks.

Quote from: Maniac on 23:07, 23 April 19
Now that the mouse support is working I've managed to put a quick and dirty comparison video together using Advanced Art Studio as the test bed. I have an AMX mouse for my Plus which I hooked up and then did the same with the Imperium Solo and a number of USB devices. The Microsoft IntelliMouse is the worst of the lot! Hope this is useful to someone as a guide!
Thanks for the video, very nice to have a comparison with the original AMX mouse.
Title: Re: USB game controllers and mice
Post by: GUNHED on 01:10, 25 April 19
Quote from: Duke on 09:26, 21 April 19
Mouses are supported, but only as AMX mouse. I guess it's just as good or crap as existing interfaces, maybe someone who has both can tell. As I don't have AMX or  Bryce PS/2 interface.
My custom proportional  mode is not added to the release firmware, as there is no point since no software supports it.


You could use a proportional mode, being compatible to the AtariST mouse adapter for the CPC (see Wiki). There is some software for it, including G-Paint, IMHO even better than OCP Art Studio.  :)
Title: Re: USB game controllers and mice
Post by: Duke on 21:32, 25 April 19

I put together a small info site for Imperium Solo here:
https://www.spinpoint.org/imperium/ (https://www.spinpoint.org/imperium/)

And made the database I mentioned earlier, directly accessible here:
https://www.spinpoint.org/imperium/database.php (https://www.spinpoint.org/imperium/database.php)

Thanks to @Maniac (http://www.cpcwiki.eu/forum/index.php?action=profile;u=930), @slugman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1808) and @XeNoMoRPH (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1952) for providing feedback. I used some of your info (and pictures) to fill into the database.
Any feedback on USB devices tested will be much appreciated, so I can enter into the database and also make fixes if not working or the button mapping is not as desired etc.
Of course the idea is that the database will help other users find what is a good mouse / controller.

Please provide "make and model" + vendor id (vid) and product id (pid) and any useful notes.
THANKS!

If your USB device is not working at all, as mentioned earlier in this thread, USB HID reports are needed.

Quote from: GUNHED on 01:10, 25 April 19

You could use a proportional mode, being compatible to the AtariST mouse adapter for the CPC (see Wiki). There is some software for it, including G-Paint, IMHO even better than OCP Art Studio.  :)
Yes I know I know... It's just my mode is better :)
Title: Re: USB game controllers and mice
Post by: Maniac on 21:44, 25 April 19
Quote from: Duke on 21:32, 25 April 19
Thanks to @Maniac (http://www.cpcwiki.eu/forum/index.php?action=profile;u=930), @slugman (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1808) and @XeNoMoRPH (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1952) for providing feedback. I used some of your info (and pictures) to fill into the database.
Any feedback on USB devices tested will be much appreciated, so I can enter into the database and also make fixes if not working or the button mapping is not as desired etc.
Please provide "make and model" + vendor id (vid) and product id (pid) and any useful notes.
THANKS!
You're most welcome. Least I could do after your contribution to the community!

One suggestion I'd like to make if I may; would it be possible to configure the speed of input per device? For instance the MS IntelliMouse is not quick in Windows until you adjust the settings so if something similar were configurable on the Imperium Solo that would great.
Title: Re: USB game controllers and mice
Post by: MiguelSky on 00:03, 26 April 19
Hi, Duke! I received my adapter, it works great with my PS4 controller. I have an old Trust Predator gamepad for PS2 that I usually use with my PC, but it doesn't work. I join the report.
Title: Re: USB game controllers and mice
Post by: Duke on 09:26, 26 April 19
Quote from: Maniac on 21:44, 25 April 19
One suggestion I'd like to make if I may; would it be possible to configure the speed of input per device? For instance the MS IntelliMouse is not quick in Windows until you adjust the settings so if something similar were configurable on the Imperium Solo that would great.
Unfortunately, the general problem is that mouses are too slow using the generic mouse as joystick method.
In software it is easy to change sensitivity, but I cannot do much from the hardware side without using variable data (ie. my 5 bit mode, where you could add a multiplier in the hardware to increase sensitivity/speed).
Right now I can only set signals UP/DOWN/LEFT/RIGHT and let the software interpret it.
I can do some smoothing and keep the signal a little longer than it actually is, but nothing that will speed it up significantly in current software.

Quote from: MiguelSky on 00:03, 26 April 19
Hi, Duke! I received my adapter, it works great with my PS4 controller. I have an old Trust Predator gamepad for PS2 that I usually use with my PC, but it doesn't work. I join the report.
Thanks. But I think the HID reports are for your mouse and not the Predator gamepad. Please select correct device and dump it again.
Title: Re: USB game controllers and mice
Post by: MiguelSky on 10:50, 26 April 19
Quote from: Duke on 09:26, 26 April 19Thanks. But I think the HID reports are for your mouse and not the Predator gamepad. Please select correct device and dump it again.
You're right! Sorry, I chose the wrong device. I join the proper one now.
Title: Re: USB game controllers and mice
Post by: GUNHED on 14:15, 27 April 19
Quote from: Duke on 21:32, 25 April 19
Yes I know I know... It's just my mode is better :)
Well, I'm pretty positive that PDT and me will support it in our projects.  :)


Of course it would be somehow a good thing to be able to "sense" if the device at the joystick port works as joystick or as proportional device.
Title: Re: USB game controllers and mice
Post by: Duke on 05:07, 28 April 19

Imperium Solo - Amstrad firmware v1.0.3 (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v103.zip)
Title: Re: USB game controllers and mice
Post by: Duke on 10:23, 28 April 19
Quote from: GUNHED on 14:15, 27 April 19
Well, I'm pretty positive that PDT and me will support it in our projects.  :)


Of course it would be somehow a good thing to be able to "sense" if the device at the joystick port works as joystick or as proportional device.

Sounds good :)

Was just having a play with entering and leaving enhanced mode (+/- 5 bit delta mode) and this seems to work well.

1. send 2xkeyscans for joystick x row, after each other to clear a comparator counter in Imperium Solo.
2. wait 3-4 ms, send keyscan for joystick x row.
3. wait 3-4 ms, send keyscan for joystick x row.
4. wait 6-7 ms, send keyscan for joystick x row.
5. wait 6-7 ms, send keyscan for joystick x row.
Return value of the read is now "JOY_UP | JOY_DOWN | JOY_LEFT | JOY_RIGHT" meaning it entered enhanced mode. (0xF0)

Repeating the sequence will return it to regular "AMX/Joystick"-mode, only the return value is different (no keys pressed, 0xFF).

Any wrong doing in the sequence, will reset an internal counter and it has to be started from 1. So accidental sequence should be very unlikely.

So that should work pretty well for enabling and detection ?
Title: Re: USB game controllers and mice
Post by: GUNHED on 18:02, 28 April 19
That's a good way to do it! Just to be sure, you're talking about milli seconds, (not micro seconds), right?
Title: Re: USB game controllers and mice
Post by: Duke on 17:53, 05 May 19
Imperium Solo firmware update v1.0.4
Changes:
Big thanks to Roxe for testing and reporting.

Download:

https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v104.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v104.zip)

Instructions:
Unpack the file IMPERSOL.BIN to root directory of a USB stick (FAT32).
Insert it to Imperium Solo USB port and power it on. LED will be on shortly and once it starts flashing (few seconds later) firmware is updated.
Remove USB stick and insert mouse/gamepad.
File will be deleted from USB stick if succesful.

--------------------------------------------
As mentioned earlier the wireless iNNEXT USB controller, I bought from ebay here: https://www.ebay.com/itm/Wireless-USB-SNES-Retro-Controller-Gamepad-for-PC-MAC-Raspberry-Pi-US-SHIP/153413332769 (https://www.ebay.com/itm/Wireless-USB-SNES-Retro-Controller-Gamepad-for-PC-MAC-Raspberry-Pi-US-SHIP/153413332769)
- It's a very slick solution for CPC I think, if you want to get rid of the wires, has a nice long reach too and I did not notice any lag playing Fruity Frank (fast mode) :)

Quote from: GUNHED on 18:02, 28 April 19
That's a good way to do it! Just to be sure, you're talking about milli seconds, (not micro seconds), right?
Yes milli-seconds - just use halts. Will add it soon.
Title: Re: USB game controllers and mice
Post by: francouai on 22:22, 30 May 19
Hi duke
I'm not surr to understand why there are two versions for the CPC?
Regular got two fire and cpc+ got 3?


I have one old and one cpc+, so I need to buy your two version?
I only need your adapter to use mouse on symbos.
Thanks!
Title: Re: USB game controllers and mice
Post by: Duke on 04:33, 31 May 19
Quote from: francouai on 22:22, 30 May 19
I'm not surr to understand why there are two versions for the CPC?
Regular got two fire and cpc+ got 3?
There is not two versions for CPC, only one version.
The difference between regular CPC & CPC plus is just the Y-Splitter powercable, since Amstrad used different DC power sockets.
Furthermore, the CPC plus is missing Fire 3 on the Joystick ports. So regular CPC gets Fire 1, Fire 2 and Fire 3. Where CPC plus only got Fire 1 and Fire 2.
Quote
I have one old and one cpc+, so I need to buy your two version?
You can buy an extra Y-splitter cable (+1 euro), so you can connect to both regular CPC and CPC plus.
Title: Re: USB game controllers and mice
Post by: francouai on 07:15, 12 August 19
I finally has spare time this weekend to use mine and tested on my 6128 CPC PLUS.
I used my Xbox One controller connected via wire to the Imperium, VERY funny to play on Burning Rubber.The instant "XY" function is very nice when playing with NAVYSEAL or ROBOCOP.. (JUMP and SHOOT on the same time)

I also used a generic cheap wired mouse with SYMBOS but I had no luck with it since the cursor did not move.  So I used another small Bluetooth LOGITECH successfully.But the cursor is moving verrrryyyy slowly so it wasn't easy but still better than the Pad controller.This interface is still not "THE" interface to use with SYMBOSS at this time with out specific driver, but this is the "best" solution at the moment. (I have another USB/DB09 interface from TALREK to compare)

The firmware upgrade has been completed but nothing happen due to last FW already in I believe.Very easy upgrade method with a USB stick connected in. (FAT16 + FW file on and BOOM...)
@Duke (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1624), how to see what FW the Imperium is running without start the upgrade process?
M4+IMPERIEUM = POWWWAAA!  :P
Title: Re: USB game controllers and mice
Post by: Duke on 10:20, 12 August 19
Quote from: francouai on 07:15, 12 August 19
This interface is still not "THE" interface to use with SYMBOSS at this time with out specific driver, but this is the "best" solution at the moment.

Thanks for the feedback :)

Extended mode is coming as well as more controller support, I am just pressed for time and energy for the time being.

Quote
@Duke (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1624), how to see what FW the Imperium is running without start the upgrade process?
There isn't a method yet, but may in a future update, the extended mode would allow for sending the version upon request.
Title: Re: USB game controllers and mice
Post by: francouai on 06:45, 13 August 19
Do you mean you are working on another Imperium interface?or just a new FW upgrade?

PS: I wrote SYMBOSS  ;D
Title: Re: USB game controllers and mice
Post by: Duke on 07:01, 13 August 19
Quote from: francouai on 06:45, 13 August 19
Do you mean you are working on another Imperium interface?or just a new FW upgrade?
Just FW upgrade.
Title: Re: USB game controllers and mice
Post by: Duke on 20:39, 18 September 19
Small update (I realize I forgot to post some here - see the other updates/changelog here: https://imperium.spinpoint.org).

Imperium Solo firmware update v1.0.7
Changes:
Other Switch and generic USB controllers with same VID/PID likely work now too.

Download:

https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v107.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v107.zip)

Instructions:
Unpack the file IMPERSOL.BIN to root directory of a USB stick (FAT32).
Insert it to Imperium Solo USB port and power it on. LED will be on shortly and once it starts flashing (few seconds later) firmware is updated.
Remove USB stick and insert mouse/gamepad.
File will be deleted from USB stick if succesful.
Title: Re: USB game controllers and mice
Post by: Duke on 14:06, 13 October 19
Another firmware update.

Imperium Solo firmware update v1.0.8
Changes:
Download:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v108.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v108.zip)

Full change log at:
https://imperium.spinpoint.org/

Title: Re: USB game controllers and mice
Post by: Arnaud on 15:56, 13 October 19
Hi Duke,
this firmware solves the compatibility problem with my generic Xbox360 pad.

Arnaud.
Title: Re: USB game controllers and mice
Post by: Duke on 17:51, 13 October 19
Quote from: Arnaud on 15:56, 13 October 19
this firmware solves the compatibility problem with my generic Xbox360 pad.
Great, thanks for reporting back.
I did get an XBOX 360 clone controller, but I still lack an original (with USB).
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 23:15, 19 October 19
Hi Duke,

Just been glancing your USB Controllers support page. I have a Thrustmaster T.Flight Hotas X!!  Whats the game experience like with that???

I notice you say the analog lever doesn't work which I assumes means the throttle?

Mark
Title: Re: USB game controllers and mice
Post by: Duke on 06:36, 20 October 19
Quote from: Syncmaster319 on 23:15, 19 October 19
Just been glancing your USB Controllers support page. I have a Thrustmaster T.Flight Hotas X!!  Whats the game experience like with that???

I notice you say the analog lever doesn't work which I assumes means the throttle?
Tbh. I only tried it briefly (borrowed it from a friend, shortly so I could add it). Probably the large movement of the stick is not ideal for quick moves, needed in many games.
Yes it is the throttle that is not used.
Title: Re: USB game controllers and mice
Post by: Duke on 12:52, 08 December 19
New firmware update.

Imperium Solo firmware update v1.0.9
Changes:
Download:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v109.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v109.zip)

In other news I have also build firmware versions for C64, Amiga, Atari ST, Sega MD/Genesis & Amiga CD32. Due to different hardware characteristics, you can not use your CPC Imperium Solo with the mentioned machines, without modifications (changing 0 ohm SMD resistors).


Title: Re: USB game controllers and mice
Post by: Duke on 15:13, 31 December 19
New firmware update.

Imperium Solo firmware update v1.1.0
Changes:
Download from:
https://imperium.spinpoint.org (https://imperium.spinpoint.org)

Both wireless controllers are very cheap.
I got the TribeRetro from the UK for 5 GBP + 3GBP shipping, now unfortunately price increased to 9 GBP + shipping, so iNNEXT (same quality) or similar from China is probably the same or cheaper.

Anyway the ebay links for these two:
TribeRetro (with buildin rechargable battery):
https://www.ebay.com/itm/TribeRetro-Wireless-Controller-for-Nintendo-Mini-SNES-PC-BRAND-NEW-with-USB/312770820440 (https://www.ebay.com/itm/TribeRetro-Wireless-Controller-for-Nintendo-Mini-SNES-PC-BRAND-NEW-with-USB/312770820440)
Smart (?) Wireless controller (needs 2x AA batteries):
https://www.ebay.com/itm/2-4G-Wireless-Game-Controller-Game-pad-Joystick-for-Android-TV-Box-Tablets-PC-BT/323065445669 (https://www.ebay.com/itm/2-4G-Wireless-Game-Controller-Game-pad-Joystick-for-Android-TV-Box-Tablets-PC-BT/323065445669)


Happy new year.
Title: Re: USB game controllers and mice
Post by: Duke on 19:37, 20 January 20
New firmware update.

Imperium Solo firmware update v1.1.1
Changes:
Download from:
https://imperium.spinpoint.org (https://imperium.spinpoint.org)

Quote
I got the TribeRetro from the UK for 5 GBP + 3GBP shipping, now unfortunately price increased to 9 GBP + shipping, so iNNEXT (same quality) or similar from China is probably the same or cheaper.
https://www.ebay.com/itm/TribeRetro-Wireless-Controller-for-Nintendo-Mini-SNES-PC-BRAND-NEW-with-USB/312770820440 (https://www.ebay.com/itm/TribeRetro-Wireless-Controller-for-Nintendo-Mini-SNES-PC-BRAND-NEW-with-USB/312770820440)
TIP: price is again down to 4.95 GBP. Imho. a very good price if you want to add wireless controller to your CPC

Some news about the Imperium Solo hardware: PCB revision 1.0.4 is now shipping.
It is more universal, as it has mini jumpers (2 mm) so it can be configured between Amstrad, Amiga, Atari ST, C64, CD32 & SEGA MD/GENESIS.
Also tested with Atari XEGS (C64 firmware) and SEGA Master System (C64 firmware).
A microUSB connector for external powersupply was added, for computers not providing enough power for certain (rechargable) gamepads (AMIGA!). Setable via jumper.
However it also means I had to increase the price slightly for version to be used with AMSTRAD (sorry!), as I have to include microUSB to DC socket + DC Y-splitter cable. (and 2.1MM <-> 2.5mm adapter for CPC plus). First post was updated to reflect that.
Manual and configuration details can be found here:
https://www.spinpoint.org/files/ImperiumSolo_v104_manual.pdf (https://www.spinpoint.org/files/ImperiumSolo_v104_manual.pdf)
Title: Re: USB game controllers and mice
Post by: GUNHED on 18:53, 21 January 20
Quote from: Duke on 19:37, 20 January 20
Some news about the Imperium Solo hardware: PCB revision 1.0.4 is now shipping.
It is more universal, as it has mini jumpers (2 mm) so it can be configured between Amstrad, Amiga, Atari ST, C64, CD32 & SEGA MD/GENESIS.
Would be great if you continue to produce the Amstrad-only version too.  :)
Title: Re: USB game controllers and mice
Post by: Duke on 18:38, 22 January 20
Quote from: GUNHED on 18:53, 21 January 20
Would be great if you continue to produce the Amstrad-only version too.  :)
It was always configurable, just via 0 ohm smd resistors instead of jumpers, due to wanting to keep it as small as possible. 2 mm jumpers and some re-arranging helped succeding that, infact new pcb is a couple of mm shorter.
If someone wants the DC cable permanently soldered on like the first versions, no problem. I will sell these 1 euro cheaper (since I still have 30 of these cables with DC socket).
Title: Re: USB game controllers and mice
Post by: dxs on 21:05, 13 March 20
Hi @Duke (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1624) and anyone enjoying the Imperium Solo!

I guess I could find something with a g00gle search, however maybe explaining in this this thread how to get the HID report (?) to include new compatible hardware in future firmware updates would be nice?

Anyway this is a great peace of hardware, as usual  ;)
Title: Re: USB game controllers and mice
Post by: Duke on 08:51, 14 March 20
Quote from: dxs on 21:05, 13 March 20
I guess I could find something with a g00gle search, however maybe explaining in this this thread how to get the HID report (?) to include new compatible hardware in future firmware updates would be nice?

If using Windows, I recommend using "Device Monitor Studio" (free) to get the DEVICE DESCRIPTOR, and HID Descriptor. Link https://www.hhdsoftware.com/Downloads/device-monitoring-studio (https://www.hhdsoftware.com/Downloads/device-monitoring-studio)

See the attached photo for usage.

If using Linux, it is much easier.
Just plugin the USB mouse or gamepad and type:
sudo usbhid-dump > report.txt

And send me the report.  Thanks

EDIT: please notice that there may be a bug in v1.1.1 firmware that prevents mice from working at all (afaik), so please use v1.1.0.  I will fix it soonish.
Title: Re: USB game controllers and mice
Post by: dxs on 14:43, 14 March 20
Thank you!


I couldn't get any of my my mice to work so that is possibly related to that firmware bug. I'll look into it.

In the meantime I prepared the text reports (and pictures for the database) of what I was trying to get running with my Imperium Solo. A random Logitech optical mouse, a nicely feeling Microsoft wired pad, and a cheap wireless ps3 style chinese pad.
Title: Re: USB game controllers and mice
Post by: Duke on 12:15, 22 March 20
I have fixed the bug in v1.1.1 that prevented all mouses from working aswell as generic HID pads for whom I have not written specific drivers.

@dxs (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1074) thanks for the reports. Please try your gamepads now. I have added them, but they may need to have the buttons re-arranged.

Download:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v112.zip (https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v112.zip)

For other computers visit https://imperium.spinpoint.org/ (https://imperium.spinpoint.org/) find the needed firmware for the fix.
Title: Re: USB game controllers and mice
Post by: dxs on 15:20, 23 March 20
Hi @Duke (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1624) !


Thanks for your work especially in those troubled times.


Here is my report, the update process went smoothly. However here is what I found:


  - the mouse is "workish", meaning that testing with AMX Art the pointer somewhat moves in the right direction, however it is not usable (minimum mouse speed required unless no movement - then it goes out of control - movement continues after mouse has stopped moving - etc). I compared with another ps/2 ---> CPC interface and a ball mouse, vintage AMX compliant too, and this is totally another world.


  - the wireless pad doesn't work, but something is going on as I get strange character strings when using some keyboard combined key-presses (can provide details if needed)


  - the wired pad when plugged gives a continuous arrow press, then only 2 buttons work the way they should. Directions give unconsistent results.


If there's anything I can check / provide details / so that you can make it work don't hesitate. Of course there's no hurry at all! (and no vital need either)
If you have to make only one working then I'd choose the wireless pad.
Title: Re: USB game controllers and mice
Post by: GUNHED on 17:57, 23 March 20
Well, the AMX Art is... very "special" in the way it recognized the "mouse". Can you give it a try with FutureOS and compare it to joystick? Probably the mouse is slower, but it must move in the right directions.
Title: Re: USB game controllers and mice
Post by: dxs on 11:22, 27 March 20
Well I gave it a shot and it's marginally better with F-OS. The problem is the mouse pointer will only move in each direction at a unique speed, effectively rendering it hard to control.
Title: Re: USB game controllers and mice
Post by: GUNHED on 02:08, 28 March 20
Quote from: dxs on 11:22, 27 March 20
Well I gave it a shot and it's marginally better with F-OS. The problem is the mouse pointer will only move in each direction at a unique speed, effectively rendering it hard to control.
Yes, that's the limitation of using joystick ports.  :(
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 17:41, 23 May 20
Hi Duke,

I have a problem with a Microsoft Basic 2.0 mouse.  It detects fine but the pointer has an initial phase of dead zone then just zooms across the screen really fast

Same in OCP Art Studio and the AMX software

Thanks
Mark
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 19:02, 23 May 20
Something else.... I have noticed if I redefine the keys in Dragon Ninja and BB4CPC so i can map a jump button both games exit back to the menu screen after a few seconds of playing.


Doing this with both a PS3 and Xbox One controller



Title: Re: USB game controllers and mice
Post by: Duke on 19:23, 24 May 20
Quote from: Syncmaster319 on 19:02, 23 May 20
Something else.... I have noticed if I redefine the keys in Dragon Ninja and BB4CPC so i can map a jump button both games exit back to the menu screen after a few seconds of playing.


Doing this with both a PS3 and Xbox One controller
Have you tried this with a regular Joystick, to see if the same issue appears? If not I will check into it.
As for the mouse, not sure exactly what the problem is. Is it too sensitive or ?
Title: Re: USB game controllers and mice
Post by: Duke on 19:47, 24 May 20
New firmware update.

Imperium Solo firmware update v1.1.4
Changes:
Download from:
https://imperium.spinpoint.org (https://imperium.spinpoint.org)



And the previous one I forgot to mention in this thread:

Imperium Solo firmware update v1.1.3
Changes:
Download from:
https://imperium.spinpoint.org (https://imperium.spinpoint.org)

Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 18:26, 28 May 20
Hi Duke,


I have done some testing of the various firmware as downgrading firmware fixes the MS Basic mouse and PS3 pad issues I'm having.


Amstrad firmware v1.0.1 - All good
Amstrad firmware v1.0.7 - All good - blue light flashing at all times, redefine keys in BB4CPC works well
Amstrad firmware v1.0.8 - Mouse good, blue light flashing at all times, difficult to redefine keys in BB4CPC as double input can happen, BB4CPC resets back to menu on level 1
Amstrad firmware v1.0.9 - Mouse too fast in Advanced Art Studio, difficult to redefine keys in BB4CPC as double input can happen, BB4CPC resets back to menu on level 1, Solid blue light for Mouse and PS3 pad.
Amstrad firmware v1.1.4 - Same as v1.0.9


Hope that helps!
Mark
Title: Re: USB game controllers and mice
Post by: GUNHED on 22:24, 28 May 20
For some software the mouse will be too fast, but this is the trade off to have the mouse quick enough for most software / games. Personally I'm fine with the speed. Maybe it's possible to have two softwares: One for quick moving and one for slow moving. But that's additional work of course. On the other hand there may be a byte you can patch to influence the speed.
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 22:57, 28 May 20
Hi Gunhead,

I'm seeing the the speed change significantly between between v1.0.8 and v1.0.9 to the point you cant click on the menus as it moves too fast in Advanced Art Studio.

A gentle move of the mouse sends the pointer half way across the screen.  Feels like a bug.

Mark
Title: Re: USB game controllers and mice
Post by: GUNHED on 10:26, 29 May 20
Quote from: Syncmaster319 on 22:57, 28 May 20
Hi Gunhead,
I'm seeing the the speed change significantly between between v1.0.8 and v1.0.9 to the point you cant click on the menus as it moves too fast in Advanced Art Studio.
A gentle move of the mouse sends the pointer half way across the screen.  Feels like a bug.
Mark

Well, you're right. It IS a bug. Just updated the firmware in the ImpSolo and used a regular USB mouse. I can't use FutureOS or Space Chicken any longer in a proper way.

EDIT: Stepped back to 1.0.7 - works way better. Usable again.

Therefore I investigated what happens: If the mouse gets moved (or a button is pressed), then the signal stays active way too long. You can easily watch this by pressing fire 2 when using FutureOS with a background picture. The signal stays on for about 0.1 seconds so the wallpaper gets redrawn about 5 times or so.

Solution: @Duke (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1624) please reduce the time for which a signal is switched on back to the old value.
Title: Re: USB game controllers and mice
Post by: Syncmaster319 on 21:15, 29 May 20
Thanks for taking the time to investigate GUNHED! Amazing :)


I would imagine the same fix will solve my controller issues too? I press a button and results in too many inputs so redefining keys to the PS Pad is very tricky?
Title: Re: USB game controllers and mice
Post by: Duke on 07:41, 30 May 20
Thanks for the bug reporting @Syncmaster319 (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2146) and @GUNHED (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2029). I will fix it soon (probably next week).
Title: Re: USB game controllers and mice
Post by: Duke on 21:28, 04 July 20
While I did not get to fix the reported bug yet (sorry!), I did make another small update allowing you to swap buttons UP and FIRE2 (1) as many have asked for. Good for platformers I reckon.

Get latest firmware v1.1.5 from https://imperium.spinpoint.org (https://imperium.spinpoint.org)
Press "↑↓" + "←→"  (see which two buttons that is on your controller in the database, most likely it is start + select) to toggle the button mapping.

https://youtu.be/4zwXxx_kthU (https://youtu.be/4zwXxx_kthU)
Title: Re: USB game controllers and mice
Post by: Duke on 23:08, 13 July 20
Quote from: Duke on 07:41, 30 May 20
Thanks for the bug reporting @Syncmaster319 (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2146) and @GUNHED (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2029). I will fix it soon (probably next week).

This should now be fixed in v1.1.6 beta 1. Took a bit longer than expected to find, the interrupt serving the Amstrad COM pulse, was conflicting with the usb control parser - bah!:
https://www.spinpoint.org/files/ImperiumSolo_Amstrad_v116b1.zip

Please report back if it is not as expected, thanks.



Title: Re: USB game controllers and mice
Post by: GUNHED on 14:26, 14 July 20
Sorry, but the signals stay switched on for a time still way too long (1 second).


Please load FutureOS into your M4 card and move the mouse arrow. Then compare to version 1.0.6 (or more early). It's easy to see. Good luck!

Title: Re: USB game controllers and mice
Post by: genesis8 on 20:54, 19 July 20
A french site was talking about another electronic device to do the same thing than the imperium, so I wrote a message about this cpcwiki thread.
https://www.minimachines.net/actu/mouster-91143/ (https://www.minimachines.net/actu/mouster-91143/)
Title: Re: USB game controllers and mice
Post by: Gryzor on 12:46, 20 July 20
Quote from: genesis8 on 20:54, 19 July 20
A french site was talking about another electronic device to do the same thing than the imperium, so I wrote a message about this cpcwiki thread.
https://www.minimachines.net/actu/mouster-91143/ (https://www.minimachines.net/actu/mouster-91143/)

MouSTer looks nice, but aren't there USB solutions for the ST and the Amiga already?
Title: Re: USB game controllers and mice
Post by: Duke on 13:02, 20 July 20
Quote from: Gryzor on 12:46, 20 July 20
MouSTer looks nice, but aren't there USB solutions for the ST and the Amiga already?

I think there is lots of PS/2 "USB" adapters, but true USB only recently.
Title: Re: USB game controllers and mice
Post by: Gryzor on 13:06, 20 July 20
Ah, ok. Is there an advantage though?
Title: Re: USB game controllers and mice
Post by: Duke on 13:08, 20 July 20
Quote from: Gryzor on 13:06, 20 July 20
Ah, ok. Is there an advantage though?
Yes, many modern USB mouse do not support PS/2 mode. And of course you cant use USB gamepads either when you only have PS/2 interface.
Title: Re: USB game controllers and mice
Post by: Gryzor on 13:12, 20 July 20
Learn something new every day! Thanks! :)
Title: Re: USB game controllers and mice
Post by: Duke on 21:33, 20 July 20
Quote from: GUNHED on 14:26, 14 July 20
Sorry, but the signals stay switched on for a time still way too long (1 second).


Please load FutureOS into your M4 card and move the mouse arrow. Then compare to version 1.0.6 (or more early). It's easy to see. Good luck!

Thanks @GUNHED (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2029) , tested and working as it should again !

For anyone using mouse mode, please upgrade to v1.1.6 from here:
https://imperium.spinpoint.org (https://imperium.spinpoint.org)

Look under "Firmware Downloads"
Title: Re: USB game controllers and mice
Post by: GUNHED on 08:59, 22 July 20
Good news: It works.

Addition: If I move the mouse slowly, then the device doesn't send a signal, so no move on screen.
Title: Re: USB game controllers and mice
Post by: Duke on 15:39, 31 December 20
No update, just some showing off..

Whenever I managed to build an Imperium Solo (non debug version) for myself, it wouldn't be many days before it was shipped out to a customer (build new one or send out existing? - it's like not doing your homework!).
Today I decided to spoil myself and integrated 2 Imperium Solos to my 6128 Plus, so I cannot (easily) ship them to a customer :)

A few pics if anyone is interested.

My 6128+ had a "tape" socket mod when I purchased it many moons ago, this was removed (I don't like tapes!), but there was a DIN socket hole in the case from this, which I re-used for the dual USB connector, that's why the hole is not a perfect fit square!

There is room for pinheaders next to each joystick port, the pinout, if not documented elsewhere:
PIN
JP01
JP02
1
GND
GND
2
UP
UP
3
FIRE 2
FIRE 2
4
DOWN
DOWN
5
FIRE 1
FIRE 1
6
LEFT
LEFT
7
COM
COM2
8
RIGHT
RIGHT
9
COM2
N/C

Happy new year.
Title: Re: USB game controllers and mice
Post by: Gryzor on 17:03, 31 December 20
Oh, can you sell me a 6128+ with two Solo integrated? 😀
Title: Re: USB game controllers and mice
Post by: Duke on 21:20, 31 December 20
Quote from: Gryzor on 17:03, 31 December 20
Oh, can you sell me a 6128+ with two Solo integrated? 😀
Noooooooo!  >:(     :D
Title: Re: USB game controllers and mice
Post by: Kristof on 16:24, 09 January 21
Hi Duke,
Nice piece of hardware. I'm looking for one for my CD32.
Title: Re: USB game controllers and mice
Post by: genesis8 on 18:36, 09 January 21
Can I use the photos on my web site ?
Title: Re: USB game controllers and mice
Post by: Skunkfish on 19:56, 09 January 21
First CPC with USB ports built-in?!  :o
So are the regular joystick ports still usable with this mod? (I mean, not at the same time as a USB controller/mouse - that would be mad!)
Title: Re: USB game controllers and mice
Post by: Duke on 07:30, 10 January 21
Quote from: genesis8 on 18:36, 09 January 21
Can I use the photos on my web site ?
Of course.
I attached another one with two wireless pads connected if any use.

Quote from: Skunkfish on 19:56, 09 January 21First CPC with USB ports built-in?!  :o So are the regular joystick ports still usable with this mod? (I mean, not at the same time as a USB controller/mouse - that would be mad!)
The regular Joystick ports still work yes and they also work simultaneously with the USB controllers.
Title: Re: USB game controllers and mice
Post by: GUNHED on 13:45, 10 January 21
Nice! That's a real plus  ;)
Title: Re: USB game controllers and mice
Post by: ajcasado on 14:12, 02 February 21
Hi Duke,
I'm very happy with the pair of imperiums solos you sold me, they work great with a custom 14 diodes Y cable (http://www.cpcwiki.eu/index.php/File:Joystick.jpg).

I have a suggestion, may be someone else or you have also think about it, but it could be useful to have a mode in which the readings from the analog sticks or triggers are converted in a proportional PWM pulse sequence to drive the CPC joystick port to achieve some kind of pseudo analog response in games that can take profit from this kind of control (i.e. simulation games or driving games,).

Sometimes I play this kind of games using "manual PWM :P "  and it work well.

Title: Re: USB game controllers and mice
Post by: Hammer on 09:50, 23 January 23
Quote from: genesis8 on 20:54, 19 July 20A french site was talking about another electronic device to do the same thing than the imperium, so I wrote a message about this cpcwiki thread.
https://www.minimachines.net/actu/mouster-91143/ (https://www.minimachines.net/actu/mouster-91143/)

I just bought the MouSTer. It's availabel here (https://retrohax.net/shop/modulesandparts/mouster/). But it doesn't work on the Amstrad CPC, because it uses power supply provides by the joystick port itself. Which is no problem on the Commodore C64. But the device stays dead on the Amstrad due to it's lack of voltage. So question to the @Duke: is there a way to wire power supply to the joystick port?
Title: Re: USB game controllers and mice
Post by: Duke on 12:17, 23 January 23
Quote from: Hammer on 09:50, 23 January 23
Quote from: genesis8 on 20:54, 19 July 20A french site was talking about another electronic device to do the same thing than the imperium, so I wrote a message about this cpcwiki thread.
https://www.minimachines.net/actu/mouster-91143/ (https://www.minimachines.net/actu/mouster-91143/)

I just bought the MouSTer. It's availabel here (https://retrohax.net/shop/modulesandparts/mouster/). But it doesn't work on the Amstrad CPC, because it uses power supply provides by the joystick port itself. Which is no problem on the Commodore C64. But the device stays dead on the Amstrad due to it's lack of voltage. So question to the @Duke: is there a way to wire power supply to the joystick port?
You could make a bypass adapter and connect it to the PSU of the Amstrad as well.
Unless they have specific mode for the Amstrad, I doubt it will work though. Signals should only be driven when COMx is low.
So Amstrad CPC requires some more effort than other computers.
Title: Re: USB game controllers and mice
Post by: MiguelSky on 17:09, 17 January 24
Quote from: Duke on 19:33, 05 February 19Tried to experiment with a custom mode, for those interested below is a video of the result.
It's sending 5 bits of delta X and Y + sign bit, so 6 bits total for each delta coordinate and 1 bit to indicate if its X or Y.
The program I wrote quickly to test, is in mode 2 and only reads  the mouse once per frame.

https://youtu.be/4Rm1psdePbg (https://youtu.be/4Rm1psdePbg)

The result is much better than my AMX mode test, also beware I am no artist ;)

Here is the code to read the DX/DY values:
    ld a,0x49
    call key_scan

    bit 5,a        ; 0 = delta X, 1 = delta Y
    jr    nz,isDeltaY
   
    ld hl,(xpos)
    bit 6,a        ; check sign bit
    jr nz, dx_not_signed
    and 0x1F        ; keep lower 5 bits
    ld e,a
    ld d,0
    or a
    sbc hl,de
    ld (xpos),hl
    jr    delta_done
dx_not_signed:       
    and 0x1F        ; keep lower 5 bits
    ld e,a
    ld d,0
    add hl,de
    ld (xpos),hl
    jr    delta_done
isDeltaY:
    ld a,0x49
    call key_scan
    ...
    ; same stuff as for DX
delta_done:   
    ...
   
xpos: dw 0
ypos: dw 0


I will have to up the format to two more packet, as I don't have room for buttons in this mode when compatible with CPC plus (no fire3), the ID bit to be 2 bits (00, 01, 10)
So like this:
ID DATA
00 XXXX
01 XXBB
10 YYYY
11 YYBB

Also Basic wont like my packet sending when its scanning the keyboard, so need to figure out how to "enable" enhanced mode.. Maybe just a button on the PCB (yeah sucks) or press both mouse buttons when inserting (otherwise AMX mode).

Let me know what the you think.
@Duke:What happened with this? I tried today a bunch of games Syx patched to work with Amiga mice but they are not working with my Imperium Solo 😩

I asked SyX if would be possible also to patch to use with it and he says the solution needs to have that feature working, he could do the required fixing in those games patch.

Did you finally found any way to implement delta axis and buttons reading?

Greetings
Title: Re: USB game controllers and mice
Post by: GUNHED on 18:35, 18 January 24
There are solutions for the CPC Joystick-Port to read proportional values (f.e. the AtariST mouse adapter). It would be great if the 'new feature' could be compatible to something already existing.  :)
Powered by SMFPacks Menu Editor Mod