resonance 1.0.1
Loading...
Searching...
No Matches
PadRecord Class Reference

One controller's pad-library state: the DMA area libpad fills and the decoder's working state. More...

#include <padrecord.h>

Public Attributes

scePadDmaFrame mDmaArea [kDmaFrameCount]
 The area libpad writes reports into.
unsigned int mButtons
 The decoded button word BreugPadRead() reports.
unsigned int mHeldButtonsSeen
unsigned int mToggledButtons
unsigned int mPreviousButtons
int mPort
 The port BreugPadInit() received.
int mSlot
 The multitap slot BreugPadInit() received.
short mRawButtons
int mPhase
 Index into BreugPadRead()'s setup state machine.
int mReportMode
int mReadyLevel
 Setup progress BreugPadRead() records.
int mDeadZone
int mReadCount
unsigned char mLastAxes [kLastAxisCount]
short mAxisDeltas [kAxisDeltaCount]
unsigned char mPressureBaseline [kPressureByteCount]
 The pressure baseline BreugPadRead() subtracts.
unsigned char mActDirect [kActuatorByteCount]
 The actuator levels BreugPadSetMotors() sends.
unsigned char mActAlign [kActuatorByteCount]
 The actuator alignment BreugPadRead() sends during setup.

Static Public Attributes

static constexpr int kActuatorByteCount = 6
 Bytes of the actuator buffers scePadSetActDirect() and scePadSetActAlign() receive.
static constexpr int kPressureByteCount = 12
 Bytes of the pressure baseline BreugPadRead() subtracts from each pressure reading.
static constexpr int kDmaFrameCount = 2
 Frames of the DMA area scePadPortOpen() receives.
static constexpr int kLastAxisCount = 4
 Entries of mLastAxes.
static constexpr int kAxisDeltaCount = 4
 Entries of mAxisDeltas.

Detailed Description

One controller's pad-library state: the DMA area libpad fills and the decoder's working state.

The class is not polymorphic, emits no RTTI, and has no embedded file path, so the title is inferred. JoypadPS2 has a table of eight at 0x00704bc0, one per port and multitap slot, and every JoypadPS2 member forwards to the record its index selects. The record is 0x180 bytes. The first 0x100 bytes are the area scePadPortOpen() receives, which is why the record starts on a 64-byte boundary.

The routines sit between the RndArena and Python units, and none of them includes a string or a structure that matches a Sony sample or ps2sdk. They are therefore treated as game code. The free routines below operate on a record.

Member Data Documentation

◆ kActuatorByteCount

int PadRecord::kActuatorByteCount = 6
staticconstexpr

Bytes of the actuator buffers scePadSetActDirect() and scePadSetActAlign() receive.

◆ kPressureByteCount

int PadRecord::kPressureByteCount = 12
staticconstexpr

Bytes of the pressure baseline BreugPadRead() subtracts from each pressure reading.

◆ kDmaFrameCount

int PadRecord::kDmaFrameCount = 2
staticconstexpr

Frames of the DMA area scePadPortOpen() receives.

◆ kLastAxisCount

int PadRecord::kLastAxisCount = 4
staticconstexpr

Entries of mLastAxes.

BreugPadInit() clears them one byte at a time.

◆ kAxisDeltaCount

int PadRecord::kAxisDeltaCount = 4
staticconstexpr

Entries of mAxisDeltas.

BreugPadInit() clears them one halfword at a time.

◆ mDmaArea

scePadDmaFrame PadRecord::mDmaArea[kDmaFrameCount]

The area libpad writes reports into.

+0x000

◆ mButtons

unsigned int PadRecord::mButtons

The decoded button word BreugPadRead() reports.

+0x100

◆ mHeldButtonsSeen

unsigned int PadRecord::mHeldButtonsSeen

◆ mToggledButtons

unsigned int PadRecord::mToggledButtons

◆ mPreviousButtons

unsigned int PadRecord::mPreviousButtons

◆ mPort

int PadRecord::mPort

The port BreugPadInit() received.

+0x110

◆ mSlot

int PadRecord::mSlot

The multitap slot BreugPadInit() received.

+0x114

◆ mRawButtons

short PadRecord::mRawButtons

◆ mPhase

int PadRecord::mPhase

Index into BreugPadRead()'s setup state machine.

BreugPadInit() and JoypadPS2::Reset() clear it. +0x11c

◆ mReportMode

int PadRecord::mReportMode

◆ mReadyLevel

int PadRecord::mReadyLevel

Setup progress BreugPadRead() records.

BreugPadSetMotors() acts only from 2, and JoypadPS2::Reset() clears it. +0x124

◆ mDeadZone

int PadRecord::mDeadZone

◆ mReadCount

int PadRecord::mReadCount

◆ mLastAxes

unsigned char PadRecord::mLastAxes[kLastAxisCount]

◆ mAxisDeltas

short PadRecord::mAxisDeltas[kAxisDeltaCount]

◆ mPressureBaseline

unsigned char PadRecord::mPressureBaseline[kPressureByteCount]

The pressure baseline BreugPadRead() subtracts.

+0x13c

◆ mActDirect

unsigned char PadRecord::mActDirect[kActuatorByteCount]

The actuator levels BreugPadSetMotors() sends.

+0x148

◆ mActAlign

unsigned char PadRecord::mActAlign[kActuatorByteCount]

The actuator alignment BreugPadRead() sends during setup.

+0x14e


The documentation for this class was generated from the following file: