Solved

Detect force feed back effects

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 121
Print Graphic and Text to Epson TM-T88v 12 252
Delphi 2 59
DBCtrlGrid, Delphi, Scroll 8 11
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…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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