// *********************************************************************************** // Re-written joypad reading routines // *********************************************************************************** #include // include PSX library #include "pad.h" // include #defines and prototypes volatile u_char *bb0, *bb1; // pad buffers - never need to touch // **** Call once at the start of main function void PadInit(void) { GetPadBuf(&bb0, &bb1); }; // **** Call once every frame to read state of controller u_long Pad1Read(void) { return(~(*(bb0+3) | *(bb0+2) << 8)); }; // **** Call once every frame to read state of controller u_long Pad2Read(void) { return(~(*(bb1+3) | *(bb1+2) << 8)); };