mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Added new things, updated others
+ Tab in settings for cellCamera and cellGem related things, currently includes setting camera type + cellCamera and cellGem initilization + Added cellCameraGetType * Updated asmjit and ffmpeg * Some minor optimizations
This commit is contained in:
parent
a99c8e3c7c
commit
6029cc40f2
2
asmjit
2
asmjit
@ -1 +1 @@
|
||||
Subproject commit d7fc62d9e905859579f5965eee6f7f99b65c2246
|
||||
Subproject commit 9ead0cfb4cb5eb1bcf8c12b4a1ea115e438c44fa
|
2
ffmpeg
2
ffmpeg
@ -1 +1 @@
|
||||
Subproject commit 8bcaa2485c2434d7d7a9da17491bafb58de42bb6
|
||||
Subproject commit 352fdfbbfa6d7b26142f00b43d7e1802a03c68a8
|
@ -609,7 +609,7 @@ int cellAdecQueryAttr(vm::ptr<CellAdecType> type, vm::ptr<CellAdecAttr> attr)
|
||||
// TODO: check values
|
||||
attr->adecVerLower = 0x280000; // from dmux
|
||||
attr->adecVerUpper = 0x260000;
|
||||
attr->workMemSize = 4 * 1024 * 1024;
|
||||
attr->workMemSize = 4194304; // 4MB
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "Ini.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
#include "cellCamera.h"
|
||||
@ -7,27 +9,29 @@ void cellCamera_init();
|
||||
//Module cellCamera(0x0023, cellCamera_init);
|
||||
Module *cellCamera = nullptr;
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
struct cellCameraInternal
|
||||
{
|
||||
CELL_CAMERA_ERROR_ALREADY_INIT = 0x80140801,
|
||||
CELL_CAMERA_ERROR_NOT_INIT = 0x80140803,
|
||||
CELL_CAMERA_ERROR_PARAM = 0x80140804,
|
||||
CELL_CAMERA_ERROR_ALREADY_OPEN = 0x80140805,
|
||||
CELL_CAMERA_ERROR_NOT_OPEN = 0x80140806,
|
||||
CELL_CAMERA_ERROR_DEVICE_NOT_FOUND = 0x80140807,
|
||||
CELL_CAMERA_ERROR_DEVICE_DEACTIVATED = 0x80140808,
|
||||
CELL_CAMERA_ERROR_NOT_STARTED = 0x80140809,
|
||||
CELL_CAMERA_ERROR_FORMAT_UNKNOWN = 0x8014080a,
|
||||
CELL_CAMERA_ERROR_RESOLUTION_UNKNOWN = 0x8014080b,
|
||||
CELL_CAMERA_ERROR_BAD_FRAMERATE = 0x8014080c,
|
||||
CELL_CAMERA_ERROR_TIMEOUT = 0x8014080d,
|
||||
CELL_CAMERA_ERROR_FATAL = 0x8014080f,
|
||||
bool m_bInitialized;
|
||||
|
||||
cellCameraInternal()
|
||||
: m_bInitialized(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
cellCameraInternal cellCameraInstance;
|
||||
|
||||
int cellCameraInit()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellCamera);
|
||||
cellCamera->Warning("cellCameraInit()");
|
||||
|
||||
if (cellCameraInstance.m_bInitialized)
|
||||
return CELL_CAMERA_ERROR_ALREADY_INIT;
|
||||
|
||||
// TODO: Check if camera is connected, if not return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND
|
||||
|
||||
cellCameraInstance.m_bInitialized = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -61,9 +65,19 @@ int cellCameraGetDeviceGUID()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellCameraGetType()
|
||||
int cellCameraGetType(s32 dev_num, CellCameraType type)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellCamera);
|
||||
cellCamera->Warning("cellCameraGetType(dev_num=%d, type_addr=0x%x)", dev_num, type);
|
||||
|
||||
if (Ini.CameraType.GetValue() == 1)
|
||||
type = CELL_CAMERA_EYETOY;
|
||||
else if (Ini.CameraType.GetValue() == 2)
|
||||
type = CELL_CAMERA_EYETOY2;
|
||||
else if (Ini.CameraType.GetValue() == 3)
|
||||
type == CELL_CAMERA_USBVIDEOCLASS;
|
||||
else
|
||||
type = CELL_CAMERA_TYPE_UNKNOWN;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
CELL_CAMERA_ERROR_ALREADY_INIT = 0x80140801,
|
||||
CELL_CAMERA_ERROR_NOT_INIT = 0x80140803,
|
||||
CELL_CAMERA_ERROR_PARAM = 0x80140804,
|
||||
CELL_CAMERA_ERROR_ALREADY_OPEN = 0x80140805,
|
||||
CELL_CAMERA_ERROR_NOT_OPEN = 0x80140806,
|
||||
CELL_CAMERA_ERROR_DEVICE_NOT_FOUND = 0x80140807,
|
||||
CELL_CAMERA_ERROR_DEVICE_DEACTIVATED = 0x80140808,
|
||||
CELL_CAMERA_ERROR_NOT_STARTED = 0x80140809,
|
||||
CELL_CAMERA_ERROR_FORMAT_UNKNOWN = 0x8014080a,
|
||||
CELL_CAMERA_ERROR_RESOLUTION_UNKNOWN = 0x8014080b,
|
||||
CELL_CAMERA_ERROR_BAD_FRAMERATE = 0x8014080c,
|
||||
CELL_CAMERA_ERROR_TIMEOUT = 0x8014080d,
|
||||
CELL_CAMERA_ERROR_FATAL = 0x8014080f,
|
||||
};
|
||||
|
||||
// Camera types
|
||||
enum CellCameraType
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
#include "cellGem.h"
|
||||
@ -7,6 +8,18 @@ void cellGem_init();
|
||||
//Module cellGem(0x005a, cellGem_init);
|
||||
Module *cellGem = nullptr;
|
||||
|
||||
struct cellGemInternal
|
||||
{
|
||||
bool m_bInitialized;
|
||||
|
||||
cellGemInternal()
|
||||
: m_bInitialized(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
cellGemInternal cellGemInstance;
|
||||
|
||||
int cellGemCalibrate()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellGem);
|
||||
@ -117,7 +130,7 @@ s32 cellGemGetMemorySize(be_t<s32> max_connect)
|
||||
if (max_connect > CELL_GEM_MAX_NUM)
|
||||
return CELL_GEM_ERROR_INVALID_PARAMETER;
|
||||
|
||||
return (1024 * 1024) * max_connect; // 1MB * max_connect
|
||||
return 1048576 * max_connect; // 1MB * max_connect
|
||||
}
|
||||
|
||||
int cellGemGetRGB()
|
||||
@ -156,9 +169,15 @@ int cellGemHSVtoRGB()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellGemInit()
|
||||
int cellGemInit(vm::ptr<CellGemAttribute> attribute)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellGem);
|
||||
cellGem->Warning("cellGemInit(attribute_addr=0x%x)", attribute.addr());
|
||||
|
||||
if (cellGemInstance.m_bInitialized)
|
||||
return CELL_GEM_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
cellGemInstance.m_bInitialized = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ int cellHddGameCheck(u32 version, vm::ptr<const char> dirName, u32 errDialog, vm
|
||||
vm::var<CellHddGameStatGet> get;
|
||||
vm::var<CellHddGameStatSet> set;
|
||||
|
||||
get->hddFreeSizeKB = 40 * 1024 * 1024; // 40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run.
|
||||
get->hddFreeSizeKB = 419430400; // 40 MB, TODO: Use the free space of the computer's HDD where RPCS3 is being run.
|
||||
get->isNewData = CELL_HDDGAME_ISNEWDATA_EXIST;
|
||||
get->sysSizeKB = 0; // TODO
|
||||
get->st_atime__ = 0; // TODO
|
||||
@ -709,12 +709,9 @@ int cellHddGameCheck(u32 version, vm::ptr<const char> dirName, u32 errDialog, vm
|
||||
// TODO ?
|
||||
|
||||
funcStat(result, get, set);
|
||||
|
||||
/*
|
||||
if (result->result != CELL_HDDGAME_CBRESULT_OK && // error on compiling in MVS. Needs to use LE byte order?
|
||||
if (result->result != CELL_HDDGAME_CBRESULT_OK &&
|
||||
result->result != CELL_HDDGAME_CBRESULT_OK_CANCEL)
|
||||
return CELL_HDDGAME_ERROR_CBRESULT;
|
||||
*/
|
||||
|
||||
// TODO ?
|
||||
|
||||
@ -794,7 +791,7 @@ int cellWebBrowserEstimate2(const vm::ptr<const CellWebBrowserConfig2> config, v
|
||||
|
||||
// TODO: When cellWebBrowser stuff is implemented, change this to some real
|
||||
// needed memory buffer size.
|
||||
*memSize = 1024 * 1024 * 1; // 1 MB
|
||||
*memSize = 1048576; // 1 MB
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ u32 vdecQueryAttr(CellVdecCodecType type, u32 profile, u32 spec_addr /* may be 0
|
||||
// TODO: check values
|
||||
attr->decoderVerLower = 0x280000; // from dmux
|
||||
attr->decoderVerUpper = 0x260000;
|
||||
attr->memSize = 4 * 1024 * 1024;
|
||||
attr->memSize = 4194304; // 4MB
|
||||
attr->cmdDepth = 16;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ int cellVpostQueryAttr(vm::ptr<const CellVpostCfgParam> cfgParam, vm::ptr<CellVp
|
||||
// TODO: check cfgParam and output values
|
||||
|
||||
attr->delay = 0;
|
||||
attr->memSize = 4 * 1024 * 1024;
|
||||
attr->memSize = 4194304; // 4MB
|
||||
attr->vpostVerLower = 0x280000; // from dmux
|
||||
attr->vpostVerUpper = 0x260000;
|
||||
|
||||
|
@ -590,8 +590,8 @@ s32 cellFsStReadInit(u32 fd, vm::ptr<CellFsRingBuffer> ringbuf)
|
||||
fs_config.m_ring_buffer = *ringbuf;
|
||||
|
||||
if(ringbuf->ringbuf_size < 0x40000000) // If the size is less than 1MB
|
||||
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 64 * 1024 - 1) / (64 * 1024)) * (64 * 1024);
|
||||
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 1024 * 1024 - 1) / (1024 * 1024)) * (1024 * 1024);
|
||||
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 65535) / (65536)) * (65536);
|
||||
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 1048575) / (1048576)) * (1048576);
|
||||
|
||||
// alloc memory
|
||||
fs_config.m_buffer = (u32)Memory.Alloc(fs_config.m_alloc_mem_size, 1024);
|
||||
|
@ -11,10 +11,10 @@
|
||||
wxDEFINE_EVENT(EVT_LOG_COMMAND, wxCommandEvent);
|
||||
|
||||
//amount of memory in bytes used to buffer log messages for the gui
|
||||
const int BUFFER_MAX_SIZE = 1024 * 1024;
|
||||
const int BUFFER_MAX_SIZE = 1048576; // 1MB
|
||||
|
||||
//amount of characters in the TextCtrl text-buffer for the emulation log
|
||||
const int GUI_BUFFER_MAX_SIZE = 1024 * 1024;
|
||||
const int GUI_BUFFER_MAX_SIZE = 1048576; // 1MB
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -331,8 +331,8 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
|
||||
wxDialog diag(this, wxID_ANY, "Settings", wxDefaultPosition);
|
||||
static const u32 width = 425;
|
||||
static const u32 height = 400;
|
||||
static const u32 width = 385;
|
||||
|
||||
// Settings panels
|
||||
wxNotebook* nb_config = new wxNotebook(&diag, wxID_ANY, wxPoint(6,6), wxSize(width, height));
|
||||
@ -340,12 +340,14 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
wxPanel* p_cpu = new wxPanel(nb_config, wxID_ANY);
|
||||
wxPanel* p_graphics = new wxPanel(nb_config, wxID_ANY);
|
||||
wxPanel* p_audio = new wxPanel(nb_config, wxID_ANY);
|
||||
wxPanel* p_camera = new wxPanel(nb_config, wxID_ANY);
|
||||
wxPanel* p_io = new wxPanel(nb_config, wxID_ANY);
|
||||
wxPanel* p_hle = new wxPanel(nb_config, wxID_ANY);
|
||||
|
||||
nb_config->AddPage(p_cpu, wxT("Core"));
|
||||
nb_config->AddPage(p_graphics, wxT("Graphics"));
|
||||
nb_config->AddPage(p_audio, wxT("Audio"));
|
||||
nb_config->AddPage(p_camera, wxT("Camera"));
|
||||
nb_config->AddPage(p_io, wxT("Input / Output"));
|
||||
nb_config->AddPage(p_hle, wxT("HLE / Misc."));
|
||||
nb_config->AddPage(p_system, wxT("System"));
|
||||
@ -354,6 +356,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
wxBoxSizer* s_subpanel_cpu = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_graphics = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_audio = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_camera = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_io = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer* s_subpanel_hle = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
@ -374,6 +377,9 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
// Audio
|
||||
wxStaticBoxSizer* s_round_audio_out = new wxStaticBoxSizer(wxVERTICAL, p_audio, _("Audio Out"));
|
||||
|
||||
// Camera
|
||||
wxStaticBoxSizer* s_round_camera_type = new wxStaticBoxSizer(wxVERTICAL, p_camera, _("Camera type"));
|
||||
|
||||
// HLE / Misc.
|
||||
wxStaticBoxSizer* s_round_hle_log_lvl = new wxStaticBoxSizer(wxVERTICAL, p_hle, _("Log Level"));
|
||||
|
||||
@ -389,6 +395,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
wxComboBox* cbox_keyboard_handler = new wxComboBox(p_io, wxID_ANY);
|
||||
wxComboBox* cbox_mouse_handler = new wxComboBox(p_io, wxID_ANY);
|
||||
wxComboBox* cbox_audio_out = new wxComboBox(p_audio, wxID_ANY);
|
||||
wxComboBox* cbox_camera_type = new wxComboBox(p_camera, wxID_ANY);
|
||||
wxComboBox* cbox_hle_loglvl = new wxComboBox(p_hle, wxID_ANY);
|
||||
wxComboBox* cbox_sys_lang = new wxComboBox(p_system, wxID_ANY);
|
||||
|
||||
@ -444,6 +451,11 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
cbox_audio_out->Append("Null");
|
||||
cbox_audio_out->Append("OpenAL");
|
||||
|
||||
cbox_camera_type->Append("Unknown");
|
||||
cbox_camera_type->Append("EyeToy");
|
||||
cbox_camera_type->Append("PlayStation Eye");
|
||||
cbox_camera_type->Append("USB Video Class 1.1");
|
||||
|
||||
cbox_hle_loglvl->Append("All");
|
||||
cbox_hle_loglvl->Append("Success");
|
||||
cbox_hle_loglvl->Append("Warnings");
|
||||
@ -495,6 +507,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
cbox_keyboard_handler->SetSelection(Ini.KeyboardHandlerMode.GetValue());
|
||||
cbox_mouse_handler ->SetSelection(Ini.MouseHandlerMode.GetValue());
|
||||
cbox_audio_out ->SetSelection(Ini.AudioOutMode.GetValue());
|
||||
cbox_camera_type ->SetSelection(Ini.CameraType.GetValue());
|
||||
cbox_hle_loglvl ->SetSelection(Ini.HLELogLvl.GetValue());
|
||||
cbox_sys_lang ->SetSelection(Ini.SysLanguage.GetValue());
|
||||
|
||||
@ -517,6 +530,8 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
s_round_audio_out->Add(cbox_audio_out, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_camera_type->Add(cbox_camera_type, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_hle_log_lvl->Add(cbox_hle_loglvl, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_sys_lang->Add(cbox_sys_lang, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
@ -544,6 +559,9 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
s_subpanel_audio->Add(chbox_audio_dump, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel_audio->Add(chbox_audio_conv, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
// Camera
|
||||
s_subpanel_camera->Add(s_round_camera_type, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
// HLE / Misc.
|
||||
s_subpanel_hle->Add(s_round_hle_log_lvl, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel_hle->Add(chbox_hle_logging, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
@ -569,6 +587,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
diag.SetSizerAndFit(s_subpanel_graphics, false);
|
||||
diag.SetSizerAndFit(s_subpanel_io, false);
|
||||
diag.SetSizerAndFit(s_subpanel_audio, false);
|
||||
diag.SetSizerAndFit(s_subpanel_camera, false);
|
||||
diag.SetSizerAndFit(s_subpanel_hle, false);
|
||||
diag.SetSizerAndFit(s_subpanel_system, false);
|
||||
diag.SetSizerAndFit(s_b_panel, false);
|
||||
@ -592,6 +611,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
Ini.AudioOutMode.SetValue(cbox_audio_out->GetSelection());
|
||||
Ini.AudioDumpToFile.SetValue(chbox_audio_dump->GetValue());
|
||||
Ini.AudioConvertToU16.SetValue(chbox_audio_conv->GetValue());
|
||||
Ini.CameraType.SetValue(cbox_camera_type->GetSelection());
|
||||
Ini.HLELogging.SetValue(chbox_hle_logging->GetValue());
|
||||
Ini.HLEHookStFunc.SetValue(chbox_hle_hook_stfunc->GetValue());
|
||||
Ini.HLESaveTTY.SetValue(chbox_hle_savetty->GetValue());
|
||||
|
12
rpcs3/Ini.h
12
rpcs3/Ini.h
@ -114,6 +114,9 @@ public:
|
||||
IniEntry<bool> AudioDumpToFile;
|
||||
IniEntry<bool> AudioConvertToU16;
|
||||
|
||||
// Camera
|
||||
IniEntry<u8> CameraType;
|
||||
|
||||
// Input/Output
|
||||
IniEntry<u8> PadHandlerMode;
|
||||
IniEntry<u8> KeyboardHandlerMode;
|
||||
@ -183,6 +186,9 @@ public:
|
||||
AudioDumpToFile.Init("Audio_AudioDumpToFile", path);
|
||||
AudioConvertToU16.Init("Audio_AudioConvertToU16", path);
|
||||
|
||||
// Camera
|
||||
CameraType.Init("Camera_Type", path);
|
||||
|
||||
// Input/Output
|
||||
PadHandlerMode.Init("IO_PadHandlerMode", path);
|
||||
KeyboardHandlerMode.Init("IO_KeyboardHandlerMode", path);
|
||||
@ -248,6 +254,9 @@ public:
|
||||
AudioDumpToFile.Load(false);
|
||||
AudioConvertToU16.Load(false);
|
||||
|
||||
// Camera
|
||||
CameraType.Load(2);
|
||||
|
||||
// Input/Ouput
|
||||
PadHandlerMode.Load(1);
|
||||
KeyboardHandlerMode.Load(0);
|
||||
@ -314,6 +323,9 @@ public:
|
||||
AudioDumpToFile.Save();
|
||||
AudioConvertToU16.Save();
|
||||
|
||||
// Camera
|
||||
CameraType.Save();
|
||||
|
||||
// Input/Output
|
||||
PadHandlerMode.Save();
|
||||
KeyboardHandlerMode.Save();
|
||||
|
Loading…
Reference in New Issue
Block a user