Solved

Detect force feed back effects

Posted on 2006-11-28
3
279 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
select query - oracle 16 100
Convert MS Word document to a PDF file 9 91
Firemonkey webbrowser scrollbars ? 1 50
CheckListBox usage 3 71
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 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