DosBox; Mapping mouse to PS3 Analog Stick
-
@dudleydes
You rock. Thank you. I will give this a try!One thing I don't know is if ppsspp will register the gamepad input and the keyboard input. Like say I map X on the ds3 to key z... will it register both the x on the gamepad AND z from keyboard? Since the control mapping is hardcoded... I suspect I might be hooped.
This might be a failure... but we shall see.
-
@dudleydes
It works!!!! Haha, you have no idea how stoked I am. I literally ran from my pi to my pc to type this :) I'm not getting any double inputs registering, I can navigate in the ppsspp menu AND I can control the game. Your instructions and code were spot on.I have spent HOURS googling this issue and trying everything... the Linux Joystick Mapper was my last kick at it.
-
@dudleydes
I may have spoke too soon... PPSSPP uses key commands for the analog, so I tried mapping the axes to those keys:axis vendor=0x054c product=0x0268 src=0 target=kbd plus="k" minus="i" axis vendor=0x054c product=0x0268 src=1 target=kbd plus="l" minus="j"
But it doesn't work well. I found this suggestion on the Linux Joystick Mapper wiki. It seems the lack of a deadzone built into the mapper causes havoc. It just keeps scrolling up in the menu no matter where the analog stick is pointed.
-
Please advice, it fails to map the mouse to left analog PS3 gamepad, mouse cursor is still in the upper left corner. The mouse buttons work well.
# Map Mouse axis vendor=0x054c product=0x0268 src=0 target=mouse axis=0 axis vendor=0x054c product=0x0268 src=1 target=mouse axis=1 button vendor=0x054c product=0x0268 src=14 target=mouse button=0 button vendor=0x054c product=0x0268 src=15 target=mouse button=1
-
@Mayki
Are you mapping the mouse for dosbox, or PPSSPP? During my own troubleshooting, I tested for PPSSPP and the mouse didn't work either. -
Mapping mouse for DosBox. Tested in the game Albion, Abuse and directly in DOSBox, the mouse cursor will automatically move into the upper left corner and not move him.
-
@Mayki
That might be due to a poor deadzone on the analog stick. I think this is my issue as well. I know you can write additional scripts in the mapper, and the developer made reference to creating one for a deadzone of sorts on his wiki. I'm not sure I know how to do it properly... was hoping @dudleydes would help troublehsoot :) -
@Mayki To use the mouse, DOSBox needs to capture it. This can be done by pressing CTRL+F10 or left-clicking, which, if using the mapping above, you can do by pressing X on your PS3 controller.
@Concat I've not had any luck mapping keys to the analogue stick. All I would suggest is leave a message for the developer at the sourceforge page, which you have already done.
-
Not problem with capture, problem is analog axis. The left analog stick in the middle : constantly sends the cursor to the upper left corner, analog stick in the right down position : the cursor stops at the zero position.
-
@dudleydes
Just thought I'd ask what version of joymap you are using... -
@Concat I'm using version 0.3.1.
-
Hmmm... well I'm at a loss. I can't get the mouse to map properly in Dosbox either. Cursor just sits in the top left corner like Mayki.
Do you launch Albion from the command line? I suppose I could try that. Right now I have it set up to load the map in the .emulators.cfg file, much the same way you suggested I do it for PPSSPP. Perhaps there is some confliction with emulationstation(?)
-
-
hi, i'm trying to do this config with sorr (Streets of rage remake) but i'm struggling to make this work, can you help me on this?
nvm, sorted it out :)
-
@Mayki said in DosBox; Mapping mouse to PS3 Analog Stick:
Mapping mouse for DosBox. Tested in the game Albion, Abuse and directly in DOSBox, the mouse cursor will automatically move into the upper left corner and not move him.
The linuxjoystickmapper dev released a new version which fixed this issue for me. Give it a try.
Unfortunately, I still have issue mapping keys to axes. It doesn't release the key press when the axis returns to neutral no matter what I try. Oh well. At least the mouse is working.
-
Yes, I noticed it. We're currently investigating a problem with the PC, then I try it likes. Thank you for the warning.
-
I've successfully created all the necessary files etc. (and it somewhat works in dosbox) but how do you figure out which button id comes from which button?
I've used Kodi's logging before to get id's etc but the dpad returns a hat value and I can't find anything in the joymap docs about hat values.
Also the buttons id's from Kodi's log aren't the same as what joymap recognizes.
i.e button id 10 is my startbutton in kodi, but when I map
button vendor=0x045e product=0x028e src=10 target=kbd button="enter"
it doesn't work -
@GetKeyOpenDoor You can use jstest. From the command line, run:
jstest /dev/input/js0
-
That works, thank you.
so dpad left is -32767 and dpad right is 32767 on axis 4
same for dpad up/down. up = -32767 and down is 32767 on axis 5
and the same for the thumbs. but on axes 0-3
No idea how to map this in joymap, I don't understand how
src=0 target=mouse axis=0
interprets the axes valuesbecause how does this work when dpad up and down is both on axis 5
axis vendor=0x045e product=0x028e src=5 target=kbd button="up"
axis vendor=0x045e product=0x028e src=5 target=kbd button="down"
EDIT: read something in the docs about
plus
andminus
but no explanation on how to use it.
I've triedaxis vendor=0x045e product=0x028e src=5 minus target=kbd button="up"
but that doesn't seem to do anything :EDITAlso did you guys already figure out how to use the extra values like
deadzone
andspeed
?
Do you just paste that on the same line as the button config? -
Ok, so I just tested this with the game Abuse after getting all the values from
jstest
button vendor=0x045e product=0x028e src=2 target=mouse button=0
button vendor=0x045e product=0x028e src=0 target=mouse button=1
Using a 360wired, I've mapped X to mousebutton 0 (left?) and a to button 1 (right?)
nothing happens in game when pressedI'm about to give up lol, i've been at it for 2 days already and it's proven to be way to difficult.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.