How to use a steering wheel (Logitech G29) with RetroPie – a (beginners) guide
-
I have read a lot of contradicting statements online whether this works or not. I hope this guide will bring some clarity. The wheel works like a charm. However, I did not bother messing with force feedback, as I mainly use the wheel to play PSX racing games. Since PSX racing games don’t support force feedback, this did not make sense for me.
If anybody is interested in developing rom hacks to add force feedback to PSX games, please let me know
I love the WipEout series. Being able to literally feel the rush would be so awesome!
Alright, let’s get back to the topic on hand. I just know enough about Linux and RetroPie to be dangerous. I am sure there is still a lot of room for improvement in this little project. Any kind of feedback is highly appreciated!
So let’s dive right into it!My equipment:
- Logitech with pedals, no shifter
- Raspi 4
- RetroPie 4.7.3
Boot your RasPi, without the wheel connected, and exit Emulationstation with F4.
Typesudo apt-get install joystick
and wait for the install to finish.Power off your RasPi and hook up the wheel to any USB port. Make sure it is set to PS3 mode. Power on your RasPi.
Emulation Station should now detect a new input device. Configure it like any other controller.In my case, RetroPie recognized the D-pad, X, O, Triangle, Square, left and right paddle (L1, R1), R2, R3, L2, L3. I also configured Share to be the Start button, Options to be Select, and the PS button as the hotkey. Skip the analog sticks.
You should now be able to navigate through the menus with your wheel.So far, so good. Only one little issue: nothing happens when you turn the wheel or step on a pedal. No worries, we’ll get to that right away.
Exit Emulationstation with F4 and navigate to/opt/retropie/configs/all/retroarch/autoconfig
There you should find a file calledLogitech G29 Driving Force Racing Wheel.cfg
Create a backup of this file.
Open the original file with nano and add the following lines at the end of the file:input_l_x_minus_axis = "-0" input_l_x_plus_axis = "+0" input_r2_axis = "-2" input_l2_axis = “-3”
This maps the wheel (axis 0) to the X axis of the left analog stick, gas pedal (axis 2) to R2, and the brake to L2.
I didn’t bother to map the clutch (axis 1) since none of my racing games supports a clutch pedal.Why L2 and R2, you might ask.
Well, quite frankly, I found out this out by trial and error. And I have absolutely no idea why it works. It is especially puzzling since PSX games recognize the wheel as a Negcon. And the Negcon didn’t even have an L2/R2 button. If anybody can shed some light on this, please share your wisdom with us.
Mapping the wheel (axis 0) to the left thumb stick has a nice side effect: You can now steer your vehicle with the analog stick instead of the D-pad when using a regular controller. It works great!
Restart Emulationstation by typingemulationstation
.
Select your favorite racing game on the PSX, open Retroarch’s menu(Hotkey + Triangle) => Controls => Input Controller Port 1 => Negcon => Save game remap file
Restart the game. The wheel and the paddles should now be working.
However, that doesn’t mean the games are actually playable. I ended up with braided forearms from all the cranking.
Turns out that a 900 degree wheel is not the best option for most racing games. Since not all games allow to set the maximum rotation (e.g. 270deg), I decided to write a udev rule.A udev rule will automatically set the maximum rotation to 270 degrees every time the wheel is plugged in. This also works when the RasPi is booted with the wheel already hooked up.
How to create a udev rule
This was my first time ever doing such thing. It works but I am sure there are better ways of doing this. Any feedback is highly welcome.
Go to
cd /etc/udev/rules.d
and create the following file:
Sudo nano 99-Logi270deg
Add the following lines to the file and save it.
ACTION=="add" \ , ATTRS{idVendor}=="046d" \ , ATTRS{idProduct}=="c24f" \ , RUN+="/usr/bin/evdev-joystick --e /dev/input/by-id/usb-Logitech_G29_Driving_Force_Racing_Wheel-event-joystick --minimmum 22938 --maximum 42598 --a 0"
The steering wheel axis reports 0 at the left endstop, 32768 at the center, and 65535 at the right endstop. Therefore 22938….42598 limits the angle to 270 degree. If you prefer a different range, feel free to do the math.
You are all set and ready to go. Enjoy!
Strange Memory Card glitch and a simple workaround
I encountered one strange glitch. All games I exclusively played with the racing wheel were unable to save to Memory Card. RetroPie failed to create the .srm file.
To avoid this, play a game with a regular controller for the first time, and save your progress to Memory Card once. This will successfully create the .srm file. Then connect the wheel, and saving game data will work.
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.