Solved

Detect force feed back effects

Posted on 2006-11-28
3
276 Views
Last Modified: 2010-04-04
I tried everthing mmsystem.pas, directx components delphix( I really do not like to use components because I need to study the code behind it), I do not have any more ideas so if someone could help me...
I got a sidewinder from logiteck that i would like to add some my one effects to the efects that are hapenning when I trigger in the control pannel a button I can detect the button but i can not detect the efect, there needs to be a way :)
Is there a procedure, function anything??
0
Comment
Question by:RuiGraca
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
bernani earned 500 total points
Comment Utility
Hi,

It can maybe give you some clues or infos:

PcGPE is the PC Games Programmer Encyclopedia, with info on graphics mode, mouse, joystick, effects as fire, rotations, perspectives... Most sources are Pascal, with asm routines. A 720 K zip file.
http://www.nachocabanes.com/utils/pcgpe.zip

http://krypt.dyndns.org:81/joy2midi/
http://www.koders.com/cpp/fid3F5D42E8BBBC07CC252C13511347A50C6670077D.aspx (in C++)
http://www.bsdg.org/SWAG/JOYSTICK/index.html
A compo with source http://www.delphi32.com/vcl/2778
http://www.delphi32.com/vcl/2660/download,xid,2660.asp
http://www.savagesoftware.com.au/delphi/articles/article1_1.html
http://www.obsti.se/sos/gamedev.html#Keyboard%20and

http://www.usb.org/developers/hidpage.html
and read :  Usage Tables for Physical Interface Devices
The Device Class Definition for PID 1.0 provides information for the development of Physical Interface Devices. These devices include force feedback joysticks, steering wheels, etc. It allows peripheral and driver developers to use a common set of HID report descriptors, device usages and reports to describe the characteristics of a PID class device.


0
 

Author Comment

by:RuiGraca
Comment Utility
Thanks a lot I will try it, I just hope i get my goal.. if i get it i make a release
0
 
LVL 9

Expert Comment

by:bernani
Comment Utility

Hi,

Forgot to mention  the DelphiX components

http://www.yks.ne.jp/~hori/DelphiX-e.html

In the sample folder, there is a folder called FFEffects and in the folde called Sample there is 3 demos. One of them give a sample like this:


procedure TMainForm.TimerTimer(Sender: TObject);
begin
  DXInput1.Update;
           
  if (isButton1 in DXInput1.States) and (not (isButton1 in FOldStates)) then
  begin
    DXInput1.Joystick.Effects.Find('Machine gun').Start;
  end else                                            
  if (not (isButton1 in DXInput1.States)) and (isButton1 in FOldStates) then
  begin
    DXInput1.Joystick.Effects.Find('Machine gun').Stop;
  end;                                              

  FOldStates := DXInput1.States;
end;
 
Maybe the uit DXInput can gives you more infos. It contains this:

  TForceFeedbackEffect = class;
  TForceFeedbackEffects = class;

  TForceFeedbackEffectObject = class
  private
    FAxes: array[0..1] of DWORD;
    FAxesCount: Integer;
    Feff: TDIEffect;
    FDirections: array[0..1] of DWORD;
    FEnvelope: TDIEnvelope;
    FConstantForce: TDIConstantForce;
    FCondition: TDICondition;
    FPeriodic: TDIPeriodic;
    FEffect: IDirectInputEffect;
    procedure Clear;
    procedure Init(Effect: TForceFeedbackEffect);
    procedure Release;
  public
    destructor Destroy; override;
  end;

Hope this can also help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now