Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Detect force feed back effects

Posted on 2006-11-28
3
Medium Priority
?
291 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 1500 total points
ID: 18033547
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
ID: 18044467
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
ID: 18053756

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

916 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