mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Added a camera option
Also a couple minor optimizations
This commit is contained in:
parent
279ec3d8a3
commit
fcfdd1551b
4 changed files with 15 additions and 4 deletions
|
@ -175,16 +175,16 @@ void SPUThread::ProcessCmd(u32 cmd, u32 tag, u32 lsa, u64 ea, u32 size)
|
|||
return;
|
||||
}
|
||||
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
|
||||
u32 addr = (ea & SYS_SPU_THREAD_BASE_MASK) % SYS_SPU_THREAD_OFFSET;
|
||||
if ((addr <= 0x3ffff) && (addr + size <= 0x40000))
|
||||
{
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
// LS access
|
||||
ea = spu->dmac.ls_offset + addr;
|
||||
}
|
||||
else if ((cmd & MFC_PUT_CMD) && size == 4 && (addr == SYS_SPU_THREAD_SNR1 || addr == SYS_SPU_THREAD_SNR2))
|
||||
{
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
spu->WriteSNR(SYS_SPU_THREAD_SNR2 == addr, vm::read32(dmac.ls_offset + lsa));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,6 @@ void Emulator::Load()
|
|||
|
||||
if(IsSelf(m_path))
|
||||
{
|
||||
std::string self_path = m_path;
|
||||
std::string elf_path = rFileName(m_path).GetPath();
|
||||
|
||||
if (fmt::CmpNoCase(rFileName(m_path).GetFullName(),"EBOOT.BIN") == 0)
|
||||
|
@ -183,7 +182,7 @@ void Emulator::Load()
|
|||
elf_path += "/" + rFileName(m_path).GetName() + ".elf";
|
||||
}
|
||||
|
||||
if(!DecryptSelf(elf_path, self_path))
|
||||
if(!DecryptSelf(elf_path, m_path))
|
||||
return;
|
||||
|
||||
m_path = elf_path;
|
||||
|
|
|
@ -379,6 +379,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
wxStaticBoxSizer* s_round_audio_out = new wxStaticBoxSizer(wxVERTICAL, p_audio, _("Audio Out"));
|
||||
|
||||
// Camera
|
||||
wxStaticBoxSizer* s_round_camera = new wxStaticBoxSizer(wxVERTICAL, p_camera, _("Camera"));
|
||||
wxStaticBoxSizer* s_round_camera_type = new wxStaticBoxSizer(wxVERTICAL, p_camera, _("Camera type"));
|
||||
|
||||
// HLE / Misc.
|
||||
|
@ -396,6 +397,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 = new wxComboBox(p_camera, 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);
|
||||
|
@ -452,6 +454,8 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
cbox_audio_out->Append("Null");
|
||||
cbox_audio_out->Append("OpenAL");
|
||||
|
||||
cbox_camera->Append("Null");
|
||||
|
||||
cbox_camera_type->Append("Unknown");
|
||||
cbox_camera_type->Append("EyeToy");
|
||||
cbox_camera_type->Append("PlayStation Eye");
|
||||
|
@ -508,6 +512,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 ->SetSelection(Ini.Camera.GetValue());
|
||||
cbox_camera_type ->SetSelection(Ini.CameraType.GetValue());
|
||||
cbox_hle_loglvl ->SetSelection(Ini.HLELogLvl.GetValue());
|
||||
cbox_sys_lang ->SetSelection(Ini.SysLanguage.GetValue());
|
||||
|
@ -531,6 +536,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
s_round_audio_out->Add(cbox_audio_out, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_camera->Add(cbox_camera, 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());
|
||||
|
@ -561,6 +567,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
s_subpanel_audio->Add(chbox_audio_conv, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
// Camera
|
||||
s_subpanel_camera->Add(s_round_camera, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel_camera->Add(s_round_camera_type, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
// HLE / Misc.
|
||||
|
@ -612,6 +619,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.Camera.SetValue(cbox_camera->GetSelection());
|
||||
Ini.CameraType.SetValue(cbox_camera_type->GetSelection());
|
||||
Ini.HLELogging.SetValue(chbox_hle_logging->GetValue());
|
||||
Ini.HLEHookStFunc.SetValue(chbox_hle_hook_stfunc->GetValue());
|
||||
|
|
|
@ -115,6 +115,7 @@ public:
|
|||
IniEntry<bool> AudioConvertToU16;
|
||||
|
||||
// Camera
|
||||
IniEntry<u8> Camera;
|
||||
IniEntry<u8> CameraType;
|
||||
|
||||
// Input/Output
|
||||
|
@ -187,6 +188,7 @@ public:
|
|||
AudioConvertToU16.Init("Audio_AudioConvertToU16", path);
|
||||
|
||||
// Camera
|
||||
Camera.Init("Camera", path);
|
||||
CameraType.Init("Camera_Type", path);
|
||||
|
||||
// Input/Output
|
||||
|
@ -255,6 +257,7 @@ public:
|
|||
AudioConvertToU16.Load(false);
|
||||
|
||||
// Camera
|
||||
Camera.Load(0);
|
||||
CameraType.Load(2);
|
||||
|
||||
// Input/Ouput
|
||||
|
@ -324,6 +327,7 @@ public:
|
|||
AudioConvertToU16.Save();
|
||||
|
||||
// Camera
|
||||
Camera.Save();
|
||||
CameraType.Save();
|
||||
|
||||
// Input/Output
|
||||
|
|
Loading…
Add table
Reference in a new issue