PSP Gamepad Mod

Klesk has developed a mod that, at this stage, allows 2 Master System Gamepads on the psp via the IR port. His plans for the future include support for Genesis gamepads and C64 joysticks, as well as 4 gamepad support and better portablilty. Here is what he had to say about the mod and how it was created:

The interface consists of an ATMega8 microcontroller, an IR diode and some resistors. Basically the microcontroller handles any changes of the Button states of the Gamepads and sends them immediatly to the PSP. A basic protocol was developed which can handle a 16 Buttons each for a maximum of 4 Gamepads.

The first step to be done for this Project was to send data to the PSP with the IR diode. Data transmission over infrared is very similar to transmission over the serial port. Each frame has a start- and a stop-bit, and the standard baud rate of the PSP is set to 9200. The difference to the standard serial protocol is that bits are determined as short pulses, and the byte to send has to be inverted.

For more accurate timing, a 16 Mhz crystal oscillator was used as clock source (lower frequencies will work too, you just have to recalculate the software delays. For calculating the delays i used the AVR Delay Generator. The routine for sending Data works like this:

Send start bit
Send the current data bit
Shift right the data byte (goto the step above until the whole byte is sent)
Send the stop bit

These 10 Bytes are called Frame. For a baud rate of 9200 bps, as one Frame contains 10 Bits with only 8 of them containing data, we get a resulting Bandwidth of 920 Bps, the duration of one Frame is therefore 1/920s. The rest of the timing calculations can be found in the assembler source.

The protocol used for updating the button states is fairly simple. Each Byte sent contains the adress of a button register stored in the upper 4 Bytes, with the register data in the lower 4 Bytes. This results in a total of 16 different 4-Bit Registers, 16 Bit for each gamepad.

Klesk has also released the source codes for this mod.

You can get it in our PSP Download section [here].

Klesk has developed a mod that, at this stage, allows 2 Master System Gamepads on the psp via the IR port. His plans for the future include support for Genesis gamepads and C64 joysticks, as well as 4 gamepad support and better portablilty. Here is what he had to say about the mod and how it was created:

The interface consists of an ATMega8 microcontroller, an IR diode and some resistors. Basically the microcontroller handles any changes of the Button states of the Gamepads and sends them immediatly to the PSP. A basic protocol was developed which can handle a 16 Buttons each for a maximum of 4 Gamepads.

The first step to be done for this Project was to send data to the PSP with the IR diode. Data transmission over infrared is very similar to transmission over the serial port. Each frame has a start- and a stop-bit, and the standard baud rate of the PSP is set to 9200. The difference to the standard serial protocol is that bits are determined as short pulses, and the byte to send has to be inverted.

For more accurate timing, a 16 Mhz crystal oscillator was used as clock source (lower frequencies will work too, you just have to recalculate the software delays. For calculating the delays i used the AVR Delay Generator. The routine for sending Data works like this:

Send start bit
Send the current data bit
Shift right the data byte (goto the step above until the whole byte is sent)
Send the stop bit

These 10 Bytes are called Frame. For a baud rate of 9200 bps, as one Frame contains 10 Bits with only 8 of them containing data, we get a resulting Bandwidth of 920 Bps, the duration of one Frame is therefore 1/920s. The rest of the timing calculations can be found in the assembler source.

The protocol used for updating the button states is fairly simple. Each Byte sent contains the adress of a button register stored in the upper 4 Bytes, with the register data in the lower 4 Bytes. This results in a total of 16 different 4-Bit Registers, 16 Bit for each gamepad.

Klesk has also released the source codes for this mod.

You can get it in our PSP Download section [here].

Add a Comment

Your email address will not be published. Required fields are marked *