Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input: Add PS Move navigation controller to pad classes #14527

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rpcs3/Emu/Cell/Modules/cellPad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ void cellPad_NotifyStateChange(u32 index, u32 state)
product = input::get_product_info(input::product_type::dance_dance_revolution_mat);
break;
case CELL_PAD_PCLASS_TYPE_NAVIGATION:
product = input::get_product_info(input::product_type::ps_move_navigation);
break;
case CELL_PAD_PCLASS_TYPE_STANDARD:
default:
product = input::get_product_info(input::product_type::playstation_3_controller);
Expand Down
86 changes: 0 additions & 86 deletions rpcs3/Emu/Cell/Modules/cellPad.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,92 +24,6 @@ enum CellPadFilterError : u32
CELL_PADFILTER_ERROR_INVALID_PARAMETER = 0x80121401,
};

// Controller types
enum
{
CELL_PAD_PCLASS_TYPE_STANDARD = 0x00,
CELL_PAD_PCLASS_TYPE_GUITAR = 0x01,
CELL_PAD_PCLASS_TYPE_DRUM = 0x02,
CELL_PAD_PCLASS_TYPE_DJ = 0x03,
CELL_PAD_PCLASS_TYPE_DANCEMAT = 0x04,
CELL_PAD_PCLASS_TYPE_NAVIGATION = 0x05,
};

// Profile of a Standard Type Controller
// Profile of a Navigation Type Controller
// Bits 0 – 31 All 0s

// Profile of a Guitar Type Controller
enum
{
// Basic
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_1 = 0x00000001,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_2 = 0x00000002,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_3 = 0x00000004,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_4 = 0x00000008,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_5 = 0x00000010,
CELL_PAD_PCLASS_PROFILE_GUITAR_STRUM_UP = 0x00000020,
CELL_PAD_PCLASS_PROFILE_GUITAR_STRUM_DOWN = 0x00000040,
CELL_PAD_PCLASS_PROFILE_GUITAR_WHAMMYBAR = 0x00000080,
// All Basic = 0x000000FF

// Optional
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H1 = 0x00000100,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H2 = 0x00000200,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H3 = 0x00000400,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H4 = 0x00000800,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H5 = 0x00001000,
CELL_PAD_PCLASS_PROFILE_GUITAR_5WAY_EFFECT = 0x00002000,
CELL_PAD_PCLASS_PROFILE_GUITAR_TILT_SENS = 0x00004000,
// All = 0x00007FFF
};

// Profile of a Drum Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DRUM_SNARE = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM2 = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM_FLOOR = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DRUM_KICK = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_HiHAT = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_CRASH = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_RIDE = 0x00000080,
CELL_PAD_PCLASS_PROFILE_DRUM_KICK2 = 0x00000100,
// All = 0x000001FF
};

// Profile of a DJ Deck Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_ATTACK = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_CROSSFADER = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_DSP_DIAL = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM1 = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM2 = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM3 = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_PLATTER = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM1 = 0x00000080,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM2 = 0x00000100,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM3 = 0x00000200,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_PLATTER = 0x00000400,
// All = 0x000007FF
};

// Profile of a Dance Mat Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DANCEMAT_CIRCLE = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_CROSS = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_TRIANGLE = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_SQUARE = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_RIGHT = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_LEFT = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_UP = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_DOWN = 0x00000080,
// All = 0x000000FF
};

// Length returned in CellPadData struct
enum
{
Expand Down
86 changes: 86 additions & 0 deletions rpcs3/Emu/Io/pad_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,92 @@ enum DeviceType
CELL_PAD_DEV_TYPE_LDD = 5,
};

// Controller types
enum
{
CELL_PAD_PCLASS_TYPE_STANDARD = 0x00,
CELL_PAD_PCLASS_TYPE_GUITAR = 0x01,
CELL_PAD_PCLASS_TYPE_DRUM = 0x02,
CELL_PAD_PCLASS_TYPE_DJ = 0x03,
CELL_PAD_PCLASS_TYPE_DANCEMAT = 0x04,
CELL_PAD_PCLASS_TYPE_NAVIGATION = 0x05,
};

// Profile of a Standard Type Controller
// Profile of a Navigation Type Controller
// Bits 0 – 31 All 0s

// Profile of a Guitar Type Controller
enum
{
// Basic
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_1 = 0x00000001,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_2 = 0x00000002,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_3 = 0x00000004,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_4 = 0x00000008,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_5 = 0x00000010,
CELL_PAD_PCLASS_PROFILE_GUITAR_STRUM_UP = 0x00000020,
CELL_PAD_PCLASS_PROFILE_GUITAR_STRUM_DOWN = 0x00000040,
CELL_PAD_PCLASS_PROFILE_GUITAR_WHAMMYBAR = 0x00000080,
// All Basic = 0x000000FF

// Optional
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H1 = 0x00000100,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H2 = 0x00000200,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H3 = 0x00000400,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H4 = 0x00000800,
CELL_PAD_PCLASS_PROFILE_GUITAR_FRET_H5 = 0x00001000,
CELL_PAD_PCLASS_PROFILE_GUITAR_5WAY_EFFECT = 0x00002000,
CELL_PAD_PCLASS_PROFILE_GUITAR_TILT_SENS = 0x00004000,
// All = 0x00007FFF
};

// Profile of a Drum Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DRUM_SNARE = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM2 = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DRUM_TOM_FLOOR = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DRUM_KICK = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_HiHAT = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_CRASH = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DRUM_CYM_RIDE = 0x00000080,
CELL_PAD_PCLASS_PROFILE_DRUM_KICK2 = 0x00000100,
// All = 0x000001FF
};

// Profile of a DJ Deck Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_ATTACK = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_CROSSFADER = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DJ_MIXER_DSP_DIAL = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM1 = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM2 = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_STREAM3 = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DJ_DECK1_PLATTER = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM1 = 0x00000080,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM2 = 0x00000100,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_STREAM3 = 0x00000200,
CELL_PAD_PCLASS_PROFILE_DJ_DECK2_PLATTER = 0x00000400,
// All = 0x000007FF
};

// Profile of a Dance Mat Type Controller
enum
{
CELL_PAD_PCLASS_PROFILE_DANCEMAT_CIRCLE = 0x00000001,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_CROSS = 0x00000002,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_TRIANGLE = 0x00000004,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_SQUARE = 0x00000008,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_RIGHT = 0x00000010,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_LEFT = 0x00000020,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_UP = 0x00000040,
CELL_PAD_PCLASS_PROFILE_DANCEMAT_DOWN = 0x00000080,
// All = 0x000000FF
};

enum ButtonDataOffset
{
CELL_PAD_BTN_OFFSET_DIGITAL1 = 2,
Expand Down
Loading