# Introduction

This page provides information on the timing parameters available to tune the way PPJoy scans various controller types.

The following controller types have customisable timing parameters:

- Sega Genesis controllers
- LPT-switch controllers
- PPM R/C transmitters
- Playstation controllers
- SNES/NES controllers

# Sega Genesis controller timing parameters

The timing parameters presented below are applicable to all Genesys interfaces.

There are two protocols used to Sega Genesis controllers. The protocol used depends on the controller subtype specified when the controller was added. If you specify "A,B,C and Start" as the controller type the 3-button protocol will be used; if you specify "A,B,C,X,Y,Z, Start and Mode" the 6-button protocol is used.

- Genesis interbit delay specifies the number of microseconds delay between changing the state of the Select line and reading the joystick state when using the 3-button protocol.
- Genesis 6 button interbit delay specifies the number of microseconds delay between changing the state of the Select line and reading the joystick state when using the 6-button protocol.

# LPT-switch controller timing parameters

The timing parameters presented below are applicable to the LPT-switch interface.

The LPTswitch interface has a single timing parameter LPTswitch row select delay. This parameter specifies the delay, in microseconds, between setting the row-select line low and reading the column data from the interface.

# PPM R/C transmitter timing parameters

The timing parameters presented below are applicable to the PPM R/C transmitter interface.

The PPM R/C IRQ interface measures the durations between two consecutive low-to-high transitions of the IRQ pin. This means that PPJoy does not care whether the timing pulses are high or low. (Normal or Inverted signal)

The three applicable timing parameters are:

- PPM min servo pulse width specifies the minimum duration, in microseconds, between timing pulses. If the duration between two consecutive pulses is less than this value the corresponding joystick axis will report its minimum position.
- PPM max servo pulse width specifies the maximum duration, in microseconds, between timing pulses. If the duration between two consecutive pulses is more than this value, but less than the minimum sync pulse width, the corresponding joystick axis will report its maximum position.
- PPM min sync pulse width specifies the minimum duration, in microseconds, of the sync pulse. An inter-pulse duration greater than this value marks the beginning of a new frame.

# Playstation timing parameters

The timing parameters presented below are applicable to Playstation interfaces.

The figure above is timing for the transfer of an entire data packet. The diagram below details the transfer of a single byte between the PC and PSX controller.

There are five parameters for Playstation controllers:

- PSX Sel delay: specifies the duration, in microseconds, that the select signal will be taken low before the first byte is transferred.
- PSX Bit delay: specifies the duration, in microseconds, the delay between setting the clock signal high and writing a bit to the controller; and between setting the clock line low and reading a bit from the controller.
- PSX Ack1 delay: specifies the maximum duration, in microseconds, to wait for an ACK pulse from the controller after transferring the first byte to the controller.
- PSX AckX delay: specifies the maximum duration, in microseconds, to wait for an ACK pulse from the controller after transferring the second or later byte to the controller.
- PSX Tail delay: specifies the duration, in microseconds, that the Select signal will remain low after the packet transfer between the PC and controller is completed.

# SNES/NES timing parameters

The timing parameters presented below are applicable to all SNES/NES/Virtual Gameboy interfaces.

SNES/NES interfaces have two timing parameters:

- SNES setup delay specifies the duration, in microseconds, that the latch signal will be held high.
- SNES interbit delay specifies the duration, in microseconds, between changes in the signal. Every two bit delays an input bit will be read from the controller.