=======================================================================
DelphiX - Modified Delphi library for PCAE for Windows
=======================================================================

This document describes the changes made to the DelphiX library while PCAEWin was being developed. The library should maintain overall compatibility with other DelphiX applications, but adds some extra functionality. The changes can be broken into two groups:

- Delphi 5.0 compatibility changes
- Changes to DXInput classes


------------------------------------------------------------
1. Delphi 5.0 compatibility changes
------------------------------------------------------------

Numerous changes involving explicit typecasting were made throughout the DelphiX library to enable it to compile without warnings in Borland Delphi 5.0 Professional. This mainly involves DWORD and LongInt typecasting to keep the compiler happy when dealing with signed and unsigned 32-bit variables.


------------------------------------------------------------
2. Changes to DXInput classes
------------------------------------------------------------

Several of the DXInput classes have been extensively redesigned. While the library should still remain compatible with existing DelphiX applications, THERE ARE NO GUARANTEES. THIS IS NOT THE OFFICIAL VERSION OF DELPHIX. There have been extensive changes regarding the TJoystick, TCustomDXInput, and TDXInput classes. Those changes are described below.


2.1 Addition of TJoystickBase and TJoystick2 classes

PCAE required a redesign of the basic usage of the TJoystick class and also some new functionality. However, there was much existing functionality that did not need to be modified, and it was desirable to keep the TJoystick class compatible with existing DelphiX applications. To this end, the TJoystickBase class has been inserted as an ancestor to TJoystick and TJoystick2, where common functionality is stored. Users should not instantiate it directly, rather, should deal with instances of TJoystick or TJoystick2.

TJoystick2 represents a departure from the traditional way of using a TJoystick class. The TJoystick class uses a tag variable to select from multiple connected controllers. In contrast, each instance of TJoystick2 corresponds to ONLY ONE connected controller. A computer with three connected joysticks would have three instances of TJoystick2. As such TJoystick2 does not have a Tag parameter (or at least one in the sense that TJoystick does).

TJoystick2 includes some extra properties, such as ProductName. It supports up to six axes: X, Y, Z, U, V, and W. It also includes better POV hat support.


2.2. Addition of TCustomDXInputBase and TCustomDXInput2 classes

The addition of the TJoystick2 class necessitates changes to the TCustomDXInput class. The TCustomDXInputBase class has been inserted as an ancestor class to TCustomDXInput, and a TCustomDXInput2 class has been added to support the TJoystick2 class. The major difference is in instantiation. Instead of a single Joystick instance, there is a list of TJoystick2 instances, one for each detected controller, and a property telling how many instances there are. Each instance of TJoystick2 is accessed by indexing an array property.


2.3 Addition of the TDXInput2 component

TDXInput2 directly corresponds to the new TCustomDXInput2 class. It will appear on the component palette with a similar icon to the TDXInput component, with a "2" in the upper right corner.


2.4 TJoystick2, TCustomDXInput2, and TDXInput2 support

These three classes are not supported in the rest of the DelphiX unit. For example, the dialog input edit class stil supports only the original classes and no new dialog class has been created to support the new classes.


2.5 Compatibility

The DXInput unit <<should>> be compatible with existing DelphiX code. None of the force feedback code was modified except to make it compile under Delphi 5 Pro, and the library was successfully tested with a DelphiX sample program. Questions regarding the modifications ONLY should be addressed to:

John Dullea
email:    johnpcae@yahoo.com
homepage: http://www.geocities.com/dwarfaxe/pcae
June 9,2000

All other questions should go to the original author:

Hiroyuki Hori	E-Mail: hori@ingjapan.ne.jp 
		Homepage: http://www.ingjapan.ne.jp/hori/

DelphiX is copyright 1998 Hiroyuki Hori.
