Init Linux Joystic Mapper for PSX emulator problem
-
Hello
Question: What is the correct location, filename & path, for the psx emu to find and run the loadmap file, created by Linux Joystic Mapper?
I have created a loadmap file but i dont know where to place it. ...
code block
#Bus=0003 vendor=081f product=e401 Version=0110 Name="USB gamepad”
#Bus=0003 Vendor=045e Product=001a Version=0100N: Name="Microsoft SideWinder Precision Racing Wheel USB version 1.0"
SteeringWheel analog
axis vendor=0x045e product=0x001a src=0 target=joyaxis axis=0 flags=trinary min=0 max=255 deadzone=127
axis vendor=0x045e product=0x001a src=1 target=joyaxis axis=1 flags=trinary min=0 max=255 deadzone=127
axis vendor=0x045e product=0x001a src=2 target=joyaxis axis=2 flags=trinary min=0 max=255 deadzone=127
#axis vendor=0x045e product=0x001a src=0 target=joyaxis axis=0 speed=100 deadzone=10
#axis vendor=0x045e product=0x001a src=1 target=mouse axis=1 min=0 max=255 speed=100 deadzone=10
#axis vendor=0x045e product=0x001a src=2 target=mouse axis=2 min=0 max=255 speed=100 deadzone=10
#Buttons
button vendor=0x045e product=0x001a src=3 target=joybtn button=4
button vendor=0x045e product=0x001a src=4 target=joybtn button=5
button vendor=0x045e product=0x001a src=5 target=joybtn button=6
button vendor=0x045e product=0x001a src=5 target=joybtn button=7
button vendor=0x045e product=0x001a src=6 target=joybtn button=8
button vendor=0x045e product=0x001a src=7 target=joybtn button=9
button vendor=0x045e product=0x001a src=8 target=joybtn button=10#D-Button
button vendor=081f product=e401 src=0 target=joybtn button=0
button vendor=081f product=e401 src=1 target=joybtn button=1
button vendor=081f product=e401 src=2 target=joybtn button=2
button vendor=081f product=e401 src=3 target=joybtn button=3
...
In recent topics, only DosBox is mentioned. I want to use the loadmap file, in order to merge a Dpad with MS SideWinder SteeringWheel to run Grand Turismo on PSX emu. I want to use the steeringwheel in analog mode. Last guess is in the runcommand folder. path for loadmap file
Any ideas where to place the loadmap file and the script to run it?Any help appreciated
-
As the Linux Joystick Mapper isn't part of the offical packages available in RetroPie, you can place the loadmap binary and mapper file whenever you wish, making sure to specify the absolute paths in the launch commands.
To implement your situation I would add an entry in the PSX
emulators.cfg
file. For example:lr-pcsx-rearmed-GT = "sudo /path/to/loadmap /path/to/mapper.map & /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-pcsx-rearmed/libretro.so --config /opt/retropie/configs/psx/retroarch.cfg %ROM%; sudo killall loadmap"
You will need to amend the paths and the name of the mapper file.
When you launch Gran Turismo, enter the Runcommand launch menu and select
lr-pcsx-rearmed-GT
. -
Hi,
Sorry for the longtime responce.
A very BIG thank you!
The script runs. The only problem now is sorting out correct src numbers in the loadmap.map file. Right now, no button work, but no error in runcommand.log
jstest
should sort it out. Trial & error. -
I broke out the champange top early..
Question: have anyone verified if the Linux Joystic Mapper can handle more axis-variabels than two?
I have gone through several loadmap configurations. The buttons work well when testing with
jstest —event /dev/input/js0 to js2
but only two of the axis give responce out when loadmap is running in psx emulator. I tried to map the d-pad to axis. The result was working d-pad but only one steering wheel axis.Have anyone got more than two axis joystic to map fully in retropie?
Thanks for any answer!
#Name="USB gamepad” Bus=0003 Vendor=045e Product=001a#Version=0100N: Name="Microsoft SideWinder Precision#Racing Wheel USB version 1.0"# SteeringWheel analog axis vendor=0x045e product=0x001a src=0 target=joyaxis axis=0 flags=trinary min=0 max=255 deadzone=10 axis vendor=0x045e product=0x001a src=1 target=joyaxis axis=1 flags=trinary min=0 max=255 deadzone=10 axis vendor=0x045e product=0x001a src=2 target=joyaxis axis=2 flags=trinary min=0 max=255 deadzone=10 button vendor=0x045e product=0x001a src=0 target=joybtn button =0 button vendor=0x045e product=0x001a src=1 target=joybtn button =1 button vendor=0x045e product=0x001a src=2 target=joybtn button =2 button vendor=0x045e product=0x001a src=3 target=joybtn button=3 button vendor=0x045e product=0x001a src=4 target=joybtn button=4 button vendor=0x045e product=0x001a src=5 target=joybtn button=5 button vendor=0x045e product=0x001a src=6 target=joybtn button=6 button vendor=0x045e product=0x001a src=7 target=joybtn button=7 button vendor=0x045e product=0x001a src=8 target=joybtn button=8 #D-Button USB gamepad button vendor=0x081f product=0xe401 src=0 target=joybtn button=10 button vendor=0x081f product=0xe401 src=1 target=joybtn button=11 button vendor=0x081f product=0xe401 src=2 target=joybtn button=12 button vendor=0x081f product=0xe401 src=3 target=joybtn button=13 ```
-
At last, i managed to get it working!
I had to use Code functionallity of the Linux Joystic Mapper as well as Device settings in order to map the analog axis to Steering Wheel. another problem was to get the Hat functions of the USB pad to be accepted by the Linux Mapper diriver. In the Linux Joystic Mapper code examples, one can read out how transform Hat-functinaillty to digital inputs. Also, the PSX emulator expects axis inputs between -32767 to 32767.axis vendor=0x00ff product=0x0000 src=0 target=joyaxis deadzone=10 axis=0 #Left analog Y-axis (Dwn>0<Up) axis vendor=0x00ff product=0x0000 src=1 target=joyaxis min=0 max=255 axis=1 #Right Analog X-axis (R>0<L) axis vendor=0x00ff product=0x0000 src=2 target=joyaxis axis=2 #Right Analog Y-axis (Dwn>0<Up) axis vendor=0x00ff product=0x0000 src=3 target=joyaxis axis=3 #L2/R2 Analog axis (L2>0<R2) #axis vendor=0x00ff product=0x0000 src=4 target=joyaxis axis=4 #Cross button button vendor=0x00ff product=0x0000 src=0 target=joybtn button=0 #Circle button button vendor=0x00ff product=0x0000 src=1 target=joybtn button=1 #Triangle button button vendor=0x00ff product=0x0000 src=3 target=joybtn button=3 #Square button button vendor=0x00ff product=0x0000 src=2 target=joybtn button=2 #L-Button button vendor=0x00ff product=0x0000 src=4 target=joybtn button=4 #R-Button button vendor=0x00ff product=0x0000 src=5 target=joybtn button=5 #L2-Button (Axis 4) button vendor=0x00ff product=0x0000 src=6 target=joybtn button=6 #R2 Button (Axis4) button vendor=0x00ff product=0x0000 src=7 target=joybtn button=7 #Select Button button vendor=0x00ff product=0x0000 src=8 target=joybtn button=8 #Start Button button vendor=0x00ff product=0x0000 src=9 target=joybtn button=9 #Up Button button vendor=0x00ff product=0x0000 src=10 target=joybtn button=10 #Down Button button vendor=0x00ff product=0x0000 src=11 target=joybtn button=11 #Left Button button vendor=0x00ff product=0x0000 src=12 target=joybtn button=12 #Right Button button vendor=0x00ff product=0x0000 src=13 target=joybtn button=13 #Left analog Button button vendor=0x00ff product=0x0000 src=14 target=joybtn button=14 #Right Analog Button button vendor=0x00ff product=0x0000 src=15 target=joybtn button=15 #L3-Button #button vendor=0x00ff product=0x0000 src=16 target=joybtn button=16 #R3 Button #button vendor=0x00ff product=0x0000 src=17 target=joybtn button=17 #Extra buttons button vendor=0x00ff product=0x0000 src=18 target=joybtn button=18 button vendor=0x00ff product=0x0000 src=19 target=joybtn button=19 button vendor=0x00ff product=0x0000 src=20 target=joybtn button=20 button vendor=0x00ff product=0x0000 src=21 target=joybtn button=21 #assign a joystick number fo script purposes script vendor=0x045e product=0x001a device=1 #"Microsoft SideWinder" script vendor=0x081f product=0xe401 device=0 #"USB gamepadad" #script vendor=0x00ff product=0x0000 device=2 #Joypad 0" #script vendor=0x06f8 product=0xa300 device=4 # Guillermo DualShock code "Cargame.code" ``` Cargamecode ``` var val; #get a positive value for acceleration # >128 indicates acceleration #js1 is Racing wheel val=js1.a[1]/2+128; #produce a brake value # <128 indicates brakes # we need to reverse the sense of the axis val-=js1.a[2]/2; a[3]=val; #note that accelerating and braking at # the same time results in no action # but cannot be resolved here #USB Button #USB Gamepad Left-Button b[10]=(js0.a[0]<128); #USB Gamepad Right-Button b[11]=(js0.a[0]>128); #USB Gamepad Up-Button b[8]=(js0.a[1]<128); #USB Gamepad Down-Button b[9]=(js0.a[1]>128); #USB Gamepad A-Button b[1]=(js0.b[0]); #USB Gamepad B-Button b[0]=(js0.b[1]); #USB Gamepad X-Button b[3]=(js0.b[2]); #USB Gamepad Y-Button b[2]=(js0.b[3]); #USB Gamepad L-Button b[4]=(js0.b[4]); #USB Gamepad R-Button b[5]=(js0.b[5]); #USB Gamepad Select-Button b[6]=(js0.b[8]); #USB Gamepad Start-Button b[7]=(js0.b[9]); #MS Sidewinder Racing Wheel #SteeringWheel axis a[0]=(js1.a[0]); #Break pedal a[1]=(js1.a[1]); #Gas Pedal a[2]=(js1.a[2]); #MS Sidewinder A-Button b[12]=(js1.b[0]); #MS Sidewinder B-Button b[13]=(js1.b[1]); #MS Sidewinder C-Button b[14]=(js1.b[2]); #MS Sidewinder X-Button b[15]=(js1.b[3]); #MS Sidewinder Y-Button b[16]=(js1.b[4]); #MS Sidewinder Z-Button b[17]=(js1.b[5]); #MS Sidewinder L-Button b[18]=(js1.b[6]); #MS Sidewinder R-Button b[19]=(js1.b[7]); ```
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.