cellGem: Fix headers

This commit is contained in:
Jake 2017-06-19 00:17:19 -05:00 committed by Ivan
parent d3df83a3ea
commit 72590e2c93
2 changed files with 46 additions and 37 deletions

View file

@ -131,6 +131,7 @@ s32 cellGemGetInfo(vm::ptr<CellGemInfo> info)
for (int i = 0; i < CELL_GEM_MAX_NUM; i++)
{
info->status[i] = CELL_GEM_STATUS_DISCONNECTED;
info->port[i] = 0;
}
return CELL_OK;
@ -160,10 +161,18 @@ s32 cellGemGetRumble()
return CELL_OK;
}
s32 cellGemGetState()
s32 cellGemGetState(u32 gem_num, u32 flag, u64 time_parameter, vm::ptr<CellGemState> gem_state)
{
UNIMPLEMENTED_FUNC(cellGem);
return CELL_OK;
cellGem.todo("cellGemGetState(gem_num=%d, flag=0x%x, time=0x%llx, gem_state=*0x%x)", gem_num, flag, time_parameter, gem_state);
const auto gem = fxm::get<gem_t>();
if (!gem)
return CELL_GEM_ERROR_UNINITIALIZED;
// clear out gem_state so no games get any funny ideas about them being connected...
std::memset(gem_state.get_ptr(), 0, sizeof(CellGemState));
return CELL_GEM_NOT_CONNECTED;
}
s32 cellGemGetStatusFlags()

View file

@ -96,10 +96,10 @@ struct CellGemAttribute
struct CellGemCameraState
{
be_t<s32> exposure;
float exposure_time;
float gain;
float pitch_angle;
float pitch_angle_estimate;
be_t<f32> exposure_time;
be_t<f32> gain;
be_t<f32> pitch_angle;
be_t<f32> pitch_angle_estimate;
};
struct CellGemExtPortData
@ -116,14 +116,14 @@ struct CellGemExtPortData
struct CellGemImageState
{
//system_time_t frame_timestamp; // TODO: Figure what to use for them
//system_time_t timestamp;
float u;
float v;
float r;
float projectionx;
float projectiony;
float distance;
be_t<u64> frame_timestamp;
be_t<u64> timestamp;
be_t<f32> u;
be_t<f32> v;
be_t<f32> r;
be_t<f32> projectionx;
be_t<f32> projectiony;
be_t<f32> distance;
u8 visible;
u8 r_valid;
};
@ -136,15 +136,15 @@ struct CellGemPadData
struct CellGemInertialState
{
//vec_float4 accelerometer; // TODO: Figure what to use as replacement for vec_float4
//vec_float4 gyro;
//vec_float4 accelerometer_bias;
//vec_float4 gyro_bias;
be_t<f32> accelerometer[4];
be_t<f32> gyro[4];
be_t<f32> accelerometer_bias[4];
be_t<f32> gyro_bias[4];
CellGemPadData pad;
CellGemExtPortData ext;
//system_time_t timestamp;
be_t<u64> timestamp;
be_t<s32> counter;
float temperature;
be_t<f32> temperature;
};
struct CellGemInfo
@ -157,20 +157,20 @@ struct CellGemInfo
struct CellGemState
{
//vec_float4 pos;
//vec_float4 vel;
//vec_float4 accel;
//vec_float4 quat;
//vec_float4 angvel;
//vec_float4 angaccel;
//vec_float4 handle_pos;
//vec_float4 handle_vel;
//vec_float4 handle_accel;
be_t<f32> pos[4];
be_t<f32> vel[4];
be_t<f32> accel[4];
be_t<f32> quat[4];
be_t<f32> angvel[4];
be_t<f32> angaccel[4];
be_t<f32> handle_pos[4];
be_t<f32> handle_vel[4];
be_t<f32> handle_accel[4];
CellGemPadData pad;
CellGemExtPortData ext;
//system_time_t timestamp;
float temperature;
float camera_pitch_angle;
be_t<u64> timestamp;
be_t<f32> temperature;
be_t<f32> camera_pitch_angle;
be_t<u32> tracking_flags;
};
@ -179,10 +179,10 @@ struct CellGemVideoConvertAttribute
be_t<s32> version;
be_t<s32> output_format;
be_t<s32> conversion_flags;
float gain;
float red_gain;
float green_gain;
float blue_gain;
be_t<f32> gain;
be_t<f32> red_gain;
be_t<f32> green_gain;
be_t<f32> blue_gain;
be_t<u32> buffer_memory;
be_t<u32> video_data_out;
u8 alpha;