mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Merge refactoring branch & Krofna's pull req. #46
This commit is contained in:
commit
696e00a570
32 changed files with 492 additions and 894 deletions
|
|
@ -47,7 +47,7 @@ AboutDialog::AboutDialog(wxWindow *parent)
|
|||
wxBoxSizer* s_panel_credits(new wxBoxSizer(wxHORIZONTAL));
|
||||
wxStaticText* t_section1 = new wxStaticText(this, wxID_ANY, "\nDevelopers:\n\nDH\nAlexAltea\nHykem\nOil", wxDefaultPosition, wxSize(156,160));
|
||||
wxStaticText* t_section2 = new wxStaticText(this, wxID_ANY, "\nThanks:\n\nBlackDaemon", wxDefaultPosition, wxSize(156,160));
|
||||
wxStaticText* t_section3 = new wxStaticText(this, wxID_ANY, "\nExternal code:\n\n - SELF Decrypter based on scetool (C) 2011-2013 by naehrwert\n - PKG Installer based on ps3pkgtool (C) 2011-2013 by avtolstoy and PKG Finalize (C) by geohot", wxDefaultPosition, wxSize(156,160));
|
||||
wxStaticText* t_section3 = new wxStaticText(this, wxID_ANY, "\nExternal code:\n\n - SELF Decrypter based on scetool (C) 2011-2013 by naehrwert", wxDefaultPosition, wxSize(156,160));
|
||||
|
||||
s_panel_credits->AddSpacer(12);
|
||||
s_panel_credits->Add(t_section1);
|
||||
|
|
|
|||
|
|
@ -127,8 +127,10 @@ CompilerELF::CompilerELF(wxWindow* parent)
|
|||
" b exit, 0, 0\n"
|
||||
);
|
||||
|
||||
#ifdef _WIN32
|
||||
::SendMessage((HWND)hex_list->GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||
::SendMessage((HWND)asm_list->GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
CompilerELF::~CompilerELF()
|
||||
|
|
@ -318,6 +320,7 @@ void CompilerELF::OnScroll(wxScrollWinEvent& event)
|
|||
dst = hex_list;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if(!m_disable_scroll && src && dst && event.GetOrientation() == wxVERTICAL)
|
||||
{
|
||||
s64 kind = -1;
|
||||
|
|
@ -364,6 +367,7 @@ void CompilerELF::OnScroll(wxScrollWinEvent& event)
|
|||
m_disable_scroll = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,9 @@ void LogFrame::Task()
|
|||
m_log.SetColumnWidth(0, -1); // crashes on exit
|
||||
m_log.SetColumnWidth(1, -1);
|
||||
|
||||
#ifdef _WIN32
|
||||
::SendMessage((HWND)m_log.GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
LogBuffer.Flush();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "RSXDebugger.h"
|
||||
|
||||
#include "git-version.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Ini.h"
|
||||
#include "Emu/GS/sysutil_video.h"
|
||||
#include "Gui/VHDDManager.h"
|
||||
|
|
@ -13,7 +12,7 @@
|
|||
#include "Gui/AboutDialog.h"
|
||||
#include <wx/dynlib.h>
|
||||
|
||||
#include "unpkg/unpkg.c"
|
||||
#include "Loader/PKG.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(MainFrame, FrameBase)
|
||||
EVT_CLOSE(MainFrame::OnQuit)
|
||||
|
|
@ -81,45 +80,50 @@ MainFrame::MainFrame()
|
|||
wxMenuBar& menubar(*new wxMenuBar());
|
||||
|
||||
wxMenu& menu_boot(*new wxMenu());
|
||||
wxMenu& menu_sys(*new wxMenu());
|
||||
wxMenu& menu_conf(*new wxMenu());
|
||||
wxMenu& menu_tools(*new wxMenu());
|
||||
wxMenu& menu_help(*new wxMenu());
|
||||
|
||||
menubar.Append(&menu_boot, "Boot");
|
||||
menubar.Append(&menu_sys, "System");
|
||||
menubar.Append(&menu_conf, "Config");
|
||||
menubar.Append(&menu_tools, "Tools");
|
||||
menubar.Append(&menu_help, "Help");
|
||||
|
||||
menu_boot.Append(id_boot_game, "Boot game");
|
||||
menu_boot.Append(id_install_pkg, "Install PKG");
|
||||
menu_boot.AppendSeparator();
|
||||
menu_boot.Append(id_boot_elf, "Boot (S)ELF");
|
||||
|
||||
wxMenu& menu_sys(*new wxMenu());
|
||||
menubar.Append(&menu_sys, "System");
|
||||
menu_sys.Append(id_sys_pause, "Pause")->Enable(false);
|
||||
menu_sys.Append(id_sys_stop, "Stop\tCtrl + S")->Enable(false);
|
||||
menu_sys.AppendSeparator();
|
||||
menu_sys.Append(id_sys_send_open_menu, "Send open system menu cmd")->Enable(false);
|
||||
menu_sys.Append(id_sys_send_exit, "Send exit cmd")->Enable(false);
|
||||
|
||||
wxMenu& menu_conf(*new wxMenu());
|
||||
menubar.Append(&menu_conf, "Config");
|
||||
menu_conf.Append(id_config_emu, "Settings");
|
||||
menu_conf.Append(id_config_pad, "PAD Settings");
|
||||
menu_conf.AppendSeparator();
|
||||
menu_conf.Append(id_config_vfs_manager, "Virtual File System Manager");
|
||||
menu_conf.Append(id_config_vhdd_manager, "Virtual HDD Manager");
|
||||
|
||||
wxMenu& menu_tools(*new wxMenu());
|
||||
menubar.Append(&menu_tools, "Tools");
|
||||
menu_tools.Append(id_tools_compiler, "ELF Compiler");
|
||||
menu_tools.Append(id_tools_memory_viewer, "Memory Viewer");
|
||||
menu_tools.Append(id_tools_rsx_debugger, "RSX Debugger");
|
||||
|
||||
wxMenu& menu_help(*new wxMenu());
|
||||
menubar.Append(&menu_help, "Help");
|
||||
menu_help.Append(id_help_about, "About...");
|
||||
|
||||
SetMenuBar(&menubar);
|
||||
|
||||
// Panels
|
||||
m_game_viewer = new GameViewer(this);
|
||||
m_debugger_frame = new DebuggerPanel(this);
|
||||
ConLogFrame = new LogFrame(this);
|
||||
|
||||
AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM);
|
||||
AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM);
|
||||
AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
|
||||
|
||||
// Events
|
||||
Connect( id_boot_game, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootGame) );
|
||||
Connect( id_install_pkg, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::InstallPkg) );
|
||||
Connect( id_boot_elf, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootElf) );
|
||||
|
|
@ -221,43 +225,21 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
|||
return;
|
||||
}
|
||||
|
||||
ConLog.Write("PKG: extracting...");
|
||||
|
||||
Emu.Stop();
|
||||
|
||||
wxString fileName = ctrl.GetPath();
|
||||
if (!pkg_unpack(static_cast<const char*>(fileName)))
|
||||
ConLog.Error("Could not unpack PKG!");
|
||||
else ConLog.Success("PKG: extract done.");
|
||||
|
||||
if (!wxRemoveFile(ctrl.GetPath()+".dec"))
|
||||
ConLog.Warning("Could not delete the decoded DEC file");
|
||||
|
||||
pkg_header *header;
|
||||
pkg_info(static_cast<const char*>(fileName), &header);
|
||||
|
||||
wxString titleID_full (header->title_id);
|
||||
wxString titleID = titleID_full.SubString(7, 15);
|
||||
|
||||
wxString mainDir = wxGetCwd();
|
||||
wxString gamePath = "\\dev_hdd0\\game\\";
|
||||
|
||||
wxString pkgDir = mainDir + gamePath + titleID;
|
||||
|
||||
// Save the title ID.
|
||||
Emu.SetTitleID(titleID);
|
||||
|
||||
//Refresh game list
|
||||
m_game_viewer->Refresh();
|
||||
|
||||
if(Emu.BootGame(pkgDir.ToStdString()))
|
||||
// Open and install PKG file
|
||||
std::string filePath = ctrl.GetPath();
|
||||
wxFile pkg_f(filePath, wxFile::read); // TODO: Use VFS to install PKG files
|
||||
|
||||
if (pkg_f.IsOpened())
|
||||
{
|
||||
ConLog.Success("Game: boot done.");
|
||||
}
|
||||
else
|
||||
{
|
||||
ConLog.Error("Ps3 executable not found in folder (%s)", pkgDir.wx_str());
|
||||
PKGLoader pkg(pkg_f);
|
||||
pkg.Install("/dev_hdd0/game/");
|
||||
pkg.Close();
|
||||
}
|
||||
|
||||
// Refresh game list
|
||||
m_game_viewer->Refresh();
|
||||
}
|
||||
|
||||
void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
#pragma once
|
||||
#include "GameViewer.h"
|
||||
|
||||
#include "Gui/Debugger.h"
|
||||
#include "Gui/GameViewer.h"
|
||||
|
||||
#include <wx/aui/aui.h>
|
||||
|
||||
class MainFrame : public FrameBase
|
||||
{
|
||||
DebuggerPanel* m_debugger_frame;
|
||||
GameViewer* m_game_viewer;
|
||||
wxAuiManager m_aui_mgr;
|
||||
AppConnector m_app_connector;
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ void RSXDebugger::GetTexture()
|
|||
m_list_texture->SetItem(i, 3, wxString::Format("%dD", render.m_textures[i].GetDimension()));
|
||||
m_list_texture->SetItem(i, 4, render.m_textures[i].IsEnabled() ? "True" : "False");
|
||||
m_list_texture->SetItem(i, 5, wxString::Format("0x%x", render.m_textures[i].GetFormat()));
|
||||
m_list_texture->SetItem(i, 6, wxString::Format("0x%x", render.m_textures[i].Getmipmap()));
|
||||
m_list_texture->SetItem(i, 6, wxString::Format("0x%x", render.m_textures[i].GetMipmap()));
|
||||
m_list_texture->SetItem(i, 7, wxString::Format("0x%x", render.m_textures[i].m_pitch));
|
||||
m_list_texture->SetItem(i, 8, wxString::Format("%dx%d",
|
||||
render.m_textures[i].GetWidth(),
|
||||
|
|
@ -569,7 +569,7 @@ void RSXDebugger::GetSettings()
|
|||
|
||||
LIST_SETTINGS_ADD("Alpha func", !(render.m_set_alpha_func) ? "(none)" : wxString::Format("0x%x (%s)",
|
||||
render.m_alpha_func,
|
||||
ParseGCMEnum(render.m_alpha_func, CELL_GCM_ENUM).wx_str()));
|
||||
ParseGCMEnum(render.m_alpha_func, CELL_GCM_ENUM)));
|
||||
LIST_SETTINGS_ADD("Blend color", !(render.m_set_blend_color) ? "(none)" : wxString::Format("R:%d, G:%d, B:%d, A:%d",
|
||||
render.m_blend_color_r,
|
||||
render.m_blend_color_g,
|
||||
|
|
@ -589,10 +589,10 @@ void RSXDebugger::GetSettings()
|
|||
LIST_SETTINGS_ADD("Depth bounds", wxString::Format("Min:%f, Max:%f", render.m_depth_bounds_min, render.m_depth_bounds_max));
|
||||
LIST_SETTINGS_ADD("Depth func", !(render.m_set_depth_func) ? "(none)" : wxString::Format("0x%x (%s)",
|
||||
render.m_depth_func,
|
||||
ParseGCMEnum(render.m_depth_func, CELL_GCM_ENUM).wx_str()));
|
||||
ParseGCMEnum(render.m_depth_func, CELL_GCM_ENUM)));
|
||||
LIST_SETTINGS_ADD("Draw mode", wxString::Format("%d (%s)",
|
||||
render.m_draw_mode,
|
||||
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE_ENUM).wx_str()));
|
||||
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE_ENUM)));
|
||||
LIST_SETTINGS_ADD("Scissor", wxString::Format("X:%d, Y:%d, W:%d, H:%d",
|
||||
render.m_scissor_x,
|
||||
render.m_scissor_y,
|
||||
|
|
@ -600,7 +600,7 @@ void RSXDebugger::GetSettings()
|
|||
render.m_scissor_h));
|
||||
LIST_SETTINGS_ADD("Stencil func", !(render.m_set_stencil_func) ? "(none)" : wxString::Format("0x%x (%s)",
|
||||
render.m_stencil_func,
|
||||
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM).wx_str()));
|
||||
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM)));
|
||||
LIST_SETTINGS_ADD("Surface Pitch A", wxString::Format("0x%x", render.m_surface_pitch_a));
|
||||
LIST_SETTINGS_ADD("Surface Pitch B", wxString::Format("0x%x", render.m_surface_pitch_b));
|
||||
LIST_SETTINGS_ADD("Surface Pitch C", wxString::Format("0x%x", render.m_surface_pitch_c));
|
||||
|
|
@ -690,7 +690,7 @@ void RSXDebugger::OnSelectTexture(wxListEvent& event)
|
|||
UpdateInformation();
|
||||
}
|
||||
|
||||
wxString RSXDebugger::ParseGCMEnum(u32 value, u32 type)
|
||||
const char* RSXDebugger::ParseGCMEnum(u32 value, u32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
virtual void SetPrograms(wxListEvent& event);
|
||||
virtual void OnSelectTexture(wxListEvent& event);
|
||||
|
||||
wxString ParseGCMEnum(u32 value, u32 type);
|
||||
const char* ParseGCMEnum(u32 value, u32 type);
|
||||
wxString DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioAddr);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue