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: Moza-Cmd software release: Adjust Moza wheel settings using the command line.  (Read 43 times)

0 Members and 3 Guests are viewing this topic.

nugarp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 305
  • Last login:Today at 01:32:03 pm
  • I want to build my own arcade controls!
Hi all,

I am in the process of selecting new wheels for my 8 player racing cabs. I was using DFGT before and just recently decided to try a Moza R5. One thing I wanted to be able to do was set settings before launching games without having to use PitHouse to apply settings. I didn't see a way to do that, so I created a program (based on the protocol published at https://github.com/Lawstorant/boxflat) to set settings via the command line.

How is this helpful?

Maybe you need to adjust your wheel angle before launching a game:
Code: [Select]
moza-cmd.bat BASE.LIMIT 270
moza-cmd.bat BASE.MAX_ANGLE 270

Or 900 degrees:
Code: [Select]
moza-cmd.bat BASE.LIMIT 900
moza-cmd.bat BASE.MAX_ANGLE 900

Or adjust ffb power:
Code: [Select]
moza-cmd.bat BASE.FFB_STRENGTH 80
Or apply a preset file of settings (via moza-load):
Code: [Select]
moza-load.bat default.json
You can also use it to read settings and feed that into your own software:
Code: [Select]
moza-cmd.bat BASE.NATURAL_DAMPER
Full Readme is below. Please ensure you follow steps #1-5 before running, and make sure that PitHouse is NOT running as that will take over the COM port and prevent moza-cmd from working. You can find the COM port by checking device manager.

Hope this helps others.

Code: [Select]
Moza-Cmd v0.1 by nugarp/spazzy, last modified 1/26/26
Get and Set MOZA racing wheel properties via command line.
Find me on Discord: https://discord.gg/wbWkusf3ny
Code adapted from API reference on Boxflat: https://github.com/Lawstorant/boxflat

Licensed under CC-BY-NC-SA-4.0:
 - You are free to distribute it
 - You are free to alter it
 - Credit must be given to the original creator
 - You may not sell the software or any derivative
 - If in doubt, ask me - nugarp on BYOAC, Discord, & github.

How to Use:
1) Requires NodeJS. Download here: https://nodejs.org/en/download
2) Run install.bat
3) Set COM port in config.json (Moza Pit House CANNOT be running)
4) Set wheelId (see bottom of Readme) or try running .\moza-cmd.bat BASE.LIMIT and it will try to identify itself.
5) Run as follows:

.\moza-cmd.bat BASE.LIMIT       // will return the wheel limit
.\moza-cmd.bat BASE.LIMIT 270   // will set the wheel limit to 270 deg
.\moza-load.bat                 // will load settings from default.json
.\moza-load.bat default.json    // will load settings from the specified file, or in this case, default.json

Supported parameters are listed below, along with valid values or ranges:

// Overall settings
MAIN.STANDBY_MODE           [0, 1] // 0 means WORK, 1 means STANDBY
MAIN.INTERPOLATION          [0-100]

// Base settings
BASE.LIMIT                  [60-65535]
BASE.MAX_ANGLE              [60-65535] // LIMIT should be set before MAX_ANGLE or it may not work properly.
BASE.SOFT_LIMIT_STRENGTH    [20-100]
BASE.SOFT_LIMIT_RETAIN      [0, 1]
BASE.FFB_STRENGTH           [0, 100]
BASE.FFB_REVERSE            [0, 1]
BASE.NATURAL_INERTIA        [100-500]
BASE.NATURAL_DAMPER         [0-100]
BASE.NATURAL_FRICTION       [0-100]
BASE.WHEEL_SPRING_STRENGTH  [0-100]
BASE.MAX_WHEEL_SPEED        [10-200]
BASE.TORQUE                 [0-100]

// Game overrides to global settings
MAIN.SPRING_GAIN            [0-100]
MAIN.DAMPER_GAIN            [0-100]
MAIN.INERTIA_GAIN           [0-100]
MAIN.FRICTION_GAIN          [0-100]

// Note: WHEEL settings require a specific WheelId.
// This wheelId can be in the range of 21-24. You can set wheelId in config.json.
// If wheelId is missing, or is set to 0, the program will attempt to auto-discover wheelId by getting STICK_MODE, BRIGHTNESS, and/or RPM_BRIGHTESS.
// The ES Wheel in the R5 bundle has id 24.
// ...But other wheels may be 23 (most common per Boxflat), 22, or 21.
// You can set the wheelId in the config.json file and test until the commands work with your wheel.
WHEEL.STICK_MODE            [0, 1] // 0 = buttons, 1 = dpad
WHEEL.CALIBRATION           [*] // use any value for the parameter (it is ignored) to mark the wheel position as recentered.
WHEEL.RPM_MODE              [1, 2, 3] // 1 = RPM indicator/blinking, 2 = off, 3 = on
WHEEL.RPM_BRIGHTNESS        [0-15]

> IF RPM_MODE and RPM_BRIGHTNESS don't work, you can try WHEEL.NEW_RPM_MODE, WHEEL.NEW_RPM_DISPLAY_MODE,
> and WHEEL.NEW_RPM_BRIGHTNESS, but I can't test them and the inputs/ouputs will be raw data.
« Last Edit: Today at 01:32:15 pm by nugarp »