need source code of one DLL of WCP

marco999

Master Chief Petty Officer
Hi,

I like to add the Force Feedback support for Wing Commander prophecy.

To do it I need the source code of any one DLL (I will do DLL injection).

No matter which one, just any one.

Someone do you known where I can found it ?

Thanks !
 
Last edited:
There's no sourcecode available for the Wing Commander games, there's already a method for DLL injection documented at hcl.solsector.net.
 
Thank you Darkmage, I have already solved the problem, do you known if there is a updated model pack for WCP ?
 
Last edited:
Hi Pedro , thank you my resolution is 1920x1080 but the game run to 1280x960 becouse this is the only way to fix all in borderless game and menu (apart the cutscene that have the border).
 
One is coming soon, with a fix for fullscreen FMV (so long as you run at your monitors native resolution)
I tried running Prophecy/Secret Ops in WINE recently. I got playback to work but yeah fullscreen video (HD Mod) was completely broken. I'd be interested in looking at the Force Feedback support in Prophecy/Secret Ops as I have a Sidewinder Force Feedback 2. What I really want to do is mod WC3/4 for force feedback. Kilrathi Saga could potentially get modded.
 
Hi Darkmake, I have the some joystick and I'am still working on Force Feedback support for Prophecy (GOG version). If you are interested I can send you a beta when will done (I hope within 1/2 weeks or earlier). I will let you known soon !!!
 
Last edited:
Hi Darkmake, this is a beta version of unofficial Force Feedback support for Wing Commander Prophecy:

https://we.tl/t-s8JlGRCEV2

I can't be sure that work I have tested it only on my PC.

The link expire within 1 week.

Please let me known if work.
 
Hi Darkmake, this is a beta version of unofficial Force Feedback support for Wing Commander Prophecy:

https://we.tl/t-s8JlGRCEV2

I can't be sure that work I have tested it only on my PC.

The link expire within 1 week.

Please let me known if work.
I've tested the patch, it's not working when I run Prophecy. I'm on a Linux PC running WINE. I have a Microsoft Sidewinder Force Feedback 2 Joystick. When I run Starlancer in WINE Force Feedback works correctly. Wing Commander Prophecy/Secret Ops work with DLL Injection mods in WINE so I'm not quite sure why this is failing, I suspect it'll be because dsound.dll is being used as the injection point.
 
it is possible, but there is another reason, your exe version of Wing Commander Prophecy is different from my.

Please edit the ffback.ini and change set LOG_ENABLE = 1.

After please send me the log file LogFile1.txt.
 
Last edited:
It's half working, the hooking is working and it is seeing/accessing the joystick. WINE is complaining about some missing functions.

This error I believe is the root problem:
0148:fixme:dinput:JoystickWImpl_SendForceFeedbackCommand No direct actuator control in linux

Every time you fire the gun (or an FF effect should play) this is writing to the console:
0024:fixme:dinput:LinuxInputEffectImpl_GetEffectStatus Not enough information to provide a status.

UPDATE: IT PARTIALLY WORKS.
I'm finding that when I change guns I get the first force feedback effect of each gun, it won't repeat but it will play an effect. If I switch to all guns then I seem to get force feedback intermittently. Like each time it's loading a new gun in the sequence of weapons it's firing an effect. e.g Mass driver (effect ), Mass driver (no effect), Mass driver (no effect), Mass driver (no effect), Laser (effect), Laser (no effect), Laser (no effect), Mass driver (effect), Mass driver (no effect) etc. This is really close to working.

Can you send me the source code to the .dll? I can also submit a bug to WINE's developer team to fix these two error messages. The Logging feature is super useful. Helped me troubleshoot the Joystick ID. on Linux it's "Microsoft SideWinder Force Feedback 2 (Event)"

Also feature request: 1) Afterburner force feedback rumble effect. 2) Yank the stick when the ship starts to take damage (e.g armor hits not shield hits).
 
Last edited:
Hi Darkimage,

It is clear that you are very expert and probably you have more experience then me :)

here the source code:

https://we.tl/t-oEBYIOI7o8

Before start to check take present these thinks:

1) You can customize every effect without change the source code (just edit files in the foìlder (FFB_Files)
2) Charging Mass (no effect) becouse is not detected by hook probably becouse fire only when you release.
3) Is possible apply the fix to SecretOps just find with IDA the equivalent function and replace it to ffback.ini (without change the source code).
4) Afterburner force feedback rumble effect, yes if possible I will do.
5) Yank the stick when the ship starts to take damage, already done when you solve the problem with wine will be work.
6) There are many log lines that are disabled and can be useful in this case.
7) When all problems will be solved and it is the moment the play, disable the log (LOG_ENABLE = 0.) because drop the framerate.

Only for my curiosity: the is one of my first program in c++, do you have experience with detours and hook in general ?
 
Hi Darkimage,

It is clear that you are very expert and probably you have more experience then me :)

here the source code:

https://we.tl/t-oEBYIOI7o8

Before start to check take present these thinks:

1) You can customize every effect without change the source code (just edit files in the foìlder (FFB_Files)
2) Charging Mass (no effect) becouse is not detected by hook probably becouse fire only when you release.
3) Is possible apply the fix to SecretOps just find with IDA the equivalent function and replace it to ffback.ini (without change the source code).
4) Afterburner force feedback rumble effect, yes if possible I will do.
5) Yank the stick when the ship starts to take damage, already done when you solve the problem with wine will be work.
6) There are many log lines that are disabled and can be useful in this case.
7) When all problems will be solved and it is the moment the play, disable the log (LOG_ENABLE = 0.) because drop the framerate.

Only for my curiosity: the is one of my first program in c++, do you have experience with detours and hook in general ?
No, I have no experience with detours/hooking code, I just have experience with C++ programming and writing a lot of Linux apps.
 
Hi Darkimage,

In the meintime I have understand that happen in your side.

Here another user with some problem:


I try to explain what do my dll and the force feedback manage in general:

//
- Initialize Force Feedback (on dll_main)
- Set Actuators On (SendForceFeedbackCommand) linux error: No direct actuator control in linux

- There is a FFB request (you shoot)
- Read the FFB status (GetEffectStatus: that on linux there is bug: Not enough information to provide a status)
- First time ?
- if Yes , create the effect.
- if not
- Restart the previous effect.
//

It is clear that actually on linux there are some limitation on force feedback:

- Is not possible manage the effect once creare (play, stop, restart , etc..)
- SendForceFeedbackCommand is limitated to only few flags.

In short work the first time because work only when the effect is created, but when the effect will restart not work becouse linux seem not support the effect managment.

Theorically is possible bypass it and cut all effect manamgent:

//
- There is a FFB request (you shoot)
- Create the effect and automatically destroy it in x milliseconds.
//

This cause a huge frame rate drop, instability, and bad feedback, but without fix these bugs can be one of the few solutions.

I hope WINE will solve this limitation.
 
I've got Visual Studio 2015 running, the DSound project is complaining about F:\Users\Async\Documents\Visual Studio 2015\Projects\DSound\FormTest;%(AdditionalLibraryDirectories) is missing.
 
apart this the dependance are:

detours.lib

// file dsound.cpp
#include "detours.h"
#include "dsound.h"

#pragma comment(lib, "detours.lib")
//



// ForceFeedback.cpp
#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")
//


detours.lib is inside the folder becouse is not part of windows.
dinput8.lib / dxguid.lib are inside windows forlder.
 
Back
Top