JacKeTUs / universal-pidff

GNU General Public License v2.0
56 stars 4 forks source link

Add Cammus C12 #21

Closed KaJe5380 closed 1 month ago

KaJe5380 commented 1 month ago

I expected that with Chinese manufacturers (Cammus & Moza), new wheels would be extremely close to each other (hardware and firmware). It seems to be so from what I've seen.

Also, from r/simracing and Cammus using old openffboard firmware as the base or something? I don't have any experience in hardware or low-level, so I'll take it with a grain of salt.

Important stuff

Cammus C12 needs its VID: 0x3416 and PID 0x0302 implemented, same no delay a7 patch, and it should act the same as the Cammus C5. I'm using the latest firmware (1.6.8) and edit wheel settings within the Android app.

I did not test this with the a7 patch removed, but I doubt it will work without it (like the C5).

I am waiting for the pull request of the Cammus C12 to SDL to add to the whitelist. I have currently been forcing it on the whitelist within Steam launch options.

SDL_JOYSTICK_WHEEL_DEVICES=0x3416/0x0302 %command%

Weirdly, issue https://github.com/JacKeTUs/universal-pidff/issues/7 seems to be fine for me. This could be caused by me using the Steam launch option for whitelisting it.

You need to define it on the Windows side last time that I saw on the Cammus discord, So I'll leave this here just in case in the future for anyone searching.

<device official="false" name="cammus_c12_base" type="wheel" id="{03023416-0000-0000-0000-504944564944}" priority="100"/>

I looked at the Moza fix and realized it's just the PID and then VID; I don't know what the other numbers mean. With this being a potential common thing, it would be nice to see it in the readme in either the universal-pidff or the linux-steering-wheels repo.

I've been forcing Steam Input to off as well. Games tested:

Steering, all buttons (joysticks, paddles, rotors), and force feedback work.

Probably would give it a silver like it's C5 on the linux-steering-wheel repo. There is no telemetry; firmware updates need Windows, a7 patch to get it working, etc.

Forza Horizon 5 should be looked into. They have a "helper" for it on Windows within Cammus software. I have no interest in the Forza series, so I couldn't test and see if this was still a thing. But this could come up in the future.

I just cloned the repo into /usr/src/, made the tiny edits, and installed it as a dkms. image

Here's my Linux system for reference ^

JacKeTUs commented 1 month ago

Hi! Thank you for the analysis and the PR!

Cammus using old openffboard firmware as the base

Yes, it has been proven by the creator of OpenFFBoard in their discord server. That version is old and heavily modified by Cammus, and probably compiled before that commit.

With this being a potential common thing, it would be nice to see it in the readme in either the universal-pidff or the linux-steering-wheels repo.

Yes, i wanted to create something like "game compatibility" chart in linux-steering-wheels repo, with common fixes for common games. Right now you need search for fixes for 'unsupported' wheels by yourself and it isn't ideal, i agree. Will do it later :D

Forza Horizon 5 should be looked into.

Forza is different... I had G923 and it worked with Forza only with G HUB launched on Windows, i had no luck detecting it on Linux with Proton. G29 on the other side - no problem at all, works without G HUB on Windows and on Linux Forza detects it and enables it. I'm afraid there is hardcoded list of the wheels inside the game, which enables one or other internal APIs (G29 'native' and G923 only with Logitech API loaded, which doesn't work without G HUB opened). Someone got their wheel working on Windows with emuwheel, but nor i nor others i know actually tested it on Linux... It could be possible that 'helper' just injects cammus' vid/pid into one of the lists

KaJe5380 commented 1 month ago

Yes, it has been proven by the creator of OpenFFBoard in their discord server. That version is old and heavily modified by Cammus, and probably compiled before that commit.

Interesting, though not surprising, to be honest.

I'm afraid there is a hardcoded list of the wheels inside the game

This would make sense from reading the FH5: Supported Wheels and Devices page

For Logitech users, especially G920 and G29, you have to install the Logitech Software from the website; this is quite important if you don’t install it, the G920 is picked up as a different vendor product identifier (VIDPID), and its functionality in the game is compromised, both for FFB and for buttons/switches.

It seems to be a similar issue to Need For Speed (Heat), though the game was initially released with no wheel support. I heard an update gave it compatibility with select wheels (G29, common ones). I can't get my G29 working with NFS Heat on Linux with Lutris through EA App. I will need more testing, as I doubt I will get the C12 working without getting the most common ones.

Though Moza also has a compatibility mode within their Pithouse software. It breaks other games and disconnects and reconnects the wheel. Injecting could also trigger anti-cheats. Could it be possible to re-list the product under a new vendor and product id?

Lawstorant commented 1 month ago

Though Moza also has a compatibility mode within their Pithouse software. It breaks other games and disconnects and reconnects the wheel. Injecting could also trigger anti-cheats. Could it be possible to re-list the product under a new vendor and product id?

Yeah, that's the most idiotic thing. FH5 compatibility mode actively BREAKS FFB on linux. I implemented compatibility mode switch in Boxflat, but I'll have to look into your suggestion, that it might be doing something funky with VID:PID

And, if you would be willing to test, I think I could add Cammus settings to Boxflat. I already have a list and how they're communicated through serial. You can open an issue for Cammus and we'll go from there https://github.com/Lawstorant/boxflat