Skip to content

Instantly share code, notes, and snippets.

@Slipyx
Slipyx / pad.c
Last active August 17, 2016 08:40
PS1 Psy-Q SDK LIBPAD example code for controller input. No analog or actuator use yet.
// Must manually link to LIBPAD.LIB for compiling
#include <LIBPAD.H>
// Pad terminal type masks. First four bits of padData[1]
#define PADTT_DIG 0x40 // 16 button controller (no analog)
#define PADTT_ANA 0x70 // Analog controller
// All 16 16bit button bit masks. Button state bit is 0 if pressed.
#define PADLeft 0x8000
#define PADDown 0x4000