PPJoyCOM virtual joystick
PPJoyCOM is an application to read data from a serial port and convert it into joystick input
via the PPJoy Virtual Joystick interface. Below is a screenshot of PPJoyCOM:
Selecting a Virtual Joystick
The drop-down list next to Joystick device selects the virtual joystick to use. The list
contains all possible virtual joystick names; it does not detect which virtual joysticks are
actually configured in PPJoy. You need to configure at least one virtual joystick in PPJoy.
(See Adding a new joystick or gamepad.)
The text to the right of the drop-down list displays the status of the selected virtual joystick.
Selecting a serial port
The next drop-down list, next to Serial Port allows you to select the serial port to read.
As with the virtual joystick list, the serial port list displays preconfigured ports and does not
dynamically detect which ports are actually installed in the system.
The additional drop-down lists (below the serial port list) will be enabled or disabled depending
on whether the serial protocol prescribes fixed values for them or not.
The display to the right of the serial port list shows the status of the selected port.
Selecting a serial protocol
The final drop-down list, Serial protocol determines how PPJoyCOM interprets the data it
reads from the serial port. Currently the following protocols are supported:
- FMS PIC 9600 baud (0xF0+ sync) is the original serial PIC interface design for FMS
by Ken Hewitt and described on his web page
http://www.welwyn.demon.co.uk/fms_lead/fms_lead.htm.
- FMS PIC 9600 baud (Generic) is similar to the Ken Hewitt interface. It uses 0xF0
(or greater) as sync byte, followed by a byte for buttons and 1-8 bytes for the actual
channels. The channel values can be 0x00 to 0xEF. It should work for most 9600 baud
interfaces
- FMS PIC 19200 baud (0xFF sync) operates at 19200 baud and uses 0xFF as sync byte. The
sync bytes can be followed by 1-8 channel bytes. Each channel byte can be between 0x00 and
0xFE.
- Zhen Hua 5 byte protocol operates at 19200 baud and uses 0xF0 - 0xFF as sync byte; the
order of the received bits is swapped around. This protocol is meant to support the Zhen Hua
4 channel radio control transmitter.
The text below the protocol list will display the status of the protocol parser. If you are not
getting joystick input it should provide some clues.
Recording a log file for debugging
PPJoyCOM offers you the facility to record a log file of the serial input it reads from the COM
port. This log enables you to verify that your device is actually sending data and that the data
is in the expected format. You can user notepad, or any other text editor, to view the recorded
log file.
To enable logging click on the Record log button. This will open a dialog bog where you
enter the name for the log. Note that the file, if it exists, will be overwritten.
After logging has started the text on the Record log button changes to Close log.
Clicking on Close log will stop logging and close the log file.
Loading and saving the configuration
PPJoyCOM allows you to load and save the configuration to .INI files. You can also load an .ini
file on startup by specifying it on the command-line when starting PPJoyCOM. For example
PPJoyCOM.exe C:\Config\PPJoyCOM.ini will automatically attempt to load C:\Config\PPJoyCOM.ini
on startup. If the config file is in the current directory you need to add ".\" in front of it. For
example PPJoyCOM.ini becomes .\PPJoyCOM.ini.
Additional notes
- Each instance of PPJoyCOM reads data from single serial port and feeds the data to one
virtual joystick. You can run multiple copies of PPJoyCOM if you need to use more than one
serial port controller. You can however only use one controller per serial port.
- The PPJoyCOM application must be running while you use the virtual (COM port) joystick.
You can however minimise it to the taskbar.