Build Your Own Arcade Controls Forum
Main => Driving & Racing Cabinets => Topic started by: retrogamer123 on May 18, 2017, 05:07:56 am
-
Hi guys, since I'm quite unhappy with the logitech profiler, since for me, it generates some input lag on my driving force gt when this thing is running in the background. I always kill it after making the wheel settings.
Thing is since running different games, arcade racers need 270 degrees, outrun 2fxt 200 degrees, battle gear 3 360 degrees, and using attract mode as a launcher, always doing that manually, is quite a pain in the ass.
Basically I was looking for a way to do this on a per rom basis via attract mode. And it is working nicely and automated in the background.
You just have to use the following script, make the modifications according to your logitech wheel model, compile it to a hidden exe with battoexe converter (to not get any popup window when launching a game) and use the attract mode plugin from the second post.
After that you can edit the romlist of an emulator or the pc game list and set custom wheel rotation degrees on a per rom basis.
Have fun!
Script:
@echo off
set arg1=%1
IF [%1] == [] set arg1=270
IF [%1] == [] echo "start the program with wheelrotation <rotationvalue>"
echo Setting wheel rotation to %arg1%
reg add "HKEY_CURRENT_USER\Software\Logitech\Gaming Software\GlobalDeviceSettings\DrivingForceGT" /v OperatingRange /t REG_DWORD /d %arg1% /f
start "" "C:\Program Files\Logitech\Gaming Software\LWEMon.exe" /noui
timeout 4
taskkill /IM LWEMon.exe /f
pause
Basically what this thing does is manually setting the wheel rotation settings to a custom value in the registry, the same value the profiler manages.
Investigating the communication with usblyzer I realized that the wheel rotation settings in the registry get transmitted to the wheel when starting the logitech profiler.
So things get done in the following order:
- Rotation is set in the registry
- Profiler is launched, rotation value is transmitted to the usb device
- Profiler is killed
You can launch the bat via wheelrotation.bat <value>
Please note you have to edit the registry key to the logitech wheel you have, when you don't use a driving force gt.
Last but not least the disclaimer:
You are using this script and the plugin at your own risk, please don't blame me if your computer explodes or your house is set on fire ;D
-
Save this file as wheelrotation.nut in the Attract Mode plugin folder.
Compile the bat to a hidden exe with battoexe converter.
Launch attract mode, go under plugins,
enable the plugin and set the full path to the executable
e.g
D:/wheelrotation
Next step, go to the generated romlist for an emulator, there should be a list of the roms with entries seperated by ;
title;romname;genre......
There is also a entry called control
Look for the line where the game is you want to edit, count the semicolons till you are in the right column for control and enter the rotation degrees.
Do this for each game you want to edit.
Now you have custom wheel rotation options on a per rom basis :)
///////////////////////////////////////////////////
//
// Attract-Mode Frontend - WheelRotation plugin
//
// For use with Logitech Wheels to set a custom rotation on a per game basis
//
///////////////////////////////////////////////////
//
// The UserConfig class identifies plugin settings that can be configured
// from Attract-Mode's configuration menu
//
class UserConfig </ help="Plugin to set custom wheel rotation on a per game basis for logitech wheels" /> {
</ label="Command", help="Path to the mapping executable", order=1 />
command="wheelrotation";
}
local config=fe.get_config(); // get user config settings corresponding to the UserConfig class above
local rotation_info=Info.Control;
fe.add_transition_callback( "wheel_plugin_transition" );
function wheel_plugin_transition( ttype, var, ttime ) {
if ( ScreenSaverActive )
return false;
switch ( ttype )
{
case Transition.ToGame:
fe.plugin_command_bg( config["command"],
fe.game_info( rotation_info ) );
break;
}
return false; // must return false
}