Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Logitech Wheel Rotation Changer Script + Attractmode Plugin (per game Basis)  (Read 1936 times)

0 Members and 1 Guest are viewing this topic.

retrogamer123

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 26
  • Last login:April 11, 2021, 04:06:23 am
  • I want to build my own arcade controls!
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:

Code: [Select]
@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
« Last Edit: May 18, 2017, 09:38:41 am by retrogamer123 »

retrogamer123

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 26
  • Last login:April 11, 2021, 04:06:23 am
  • I want to build my own arcade controls!
Re: Logitech Wheel Rotation Changer Script
« Reply #1 on: May 18, 2017, 09:31:41 am »
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 :)
Code: [Select]

///////////////////////////////////////////////////
//
// 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
}
« Last Edit: May 18, 2017, 09:36:27 am by retrogamer123 »