mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +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
|
|
@ -11,7 +11,12 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
|||
add_definitions(-fpermissive) # TODO: remove me
|
||||
endif()
|
||||
|
||||
find_package(wxWidgets)
|
||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||
|
||||
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
include("${wxWidgets_USE_FILE}")
|
||||
|
||||
|
|
@ -27,11 +32,15 @@ ${CMAKE_SOURCE_DIR}/..
|
|||
file(
|
||||
GLOB_RECURSE
|
||||
RPCS3_SRC
|
||||
${CMAKE_SOURCE_DIR}/rpcs3.cpp
|
||||
${CMAKE_SOURCE_DIR}/AppConnector.cpp
|
||||
${CMAKE_SOURCE_DIR}/Ini.cpp
|
||||
${CMAKE_SOURCE_DIR}/Emu/*
|
||||
${CMAKE_SOURCE_DIR}/Gui/*
|
||||
${CMAKE_SOURCE_DIR}/Loader/*
|
||||
${CMAKE_SOURCE_DIR}/../Utilities/*
|
||||
${CMAKE_SOURCE_DIR}/../scetool/scetool.cpp
|
||||
)
|
||||
|
||||
add_executable(rpcs3 ${RPCS3_SRC})
|
||||
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES})
|
||||
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ struct DMAC
|
|||
u32 queue_pos;
|
||||
u32 proxy_pos;
|
||||
long queue_lock;
|
||||
long proxy_lock;
|
||||
volatile std::atomic<int> proxy_lock;
|
||||
|
||||
bool ProcessCmd(u32 cmd, u32 tag, u32 lsa, u64 ea, u32 size)
|
||||
{
|
||||
|
|
@ -193,7 +193,7 @@ struct DMAC
|
|||
return MFC_PPU_DMA_QUEUE_FULL;
|
||||
}
|
||||
|
||||
/* while (_InterlockedExchange(&proxy_lock, 1));
|
||||
/* while (std::atomic_exchange(&proxy_lock, 1));
|
||||
_mm_lfence();
|
||||
DMAC_Proxy& p = proxy[proxy_pos];
|
||||
p.cmd = cmd;
|
||||
|
|
@ -212,7 +212,7 @@ struct DMAC
|
|||
|
||||
void ClearCmd()
|
||||
{
|
||||
while (_InterlockedExchange(&proxy_lock, 1));
|
||||
while (std::atomic_exchange(&proxy_lock, 1));
|
||||
_mm_lfence();
|
||||
memcpy(proxy, proxy + 1, --proxy_pos * sizeof(DMAC_Proxy));
|
||||
_mm_sfence();
|
||||
|
|
@ -298,4 +298,4 @@ struct MFC
|
|||
MFC_QStatus.SetValue(mask);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -647,7 +647,12 @@ void GLGSRender::OnInitThread()
|
|||
glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
#ifdef _WIN32
|
||||
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||
#else
|
||||
if (GLXDrawable drawable = glXGetCurrentDrawable())
|
||||
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||
#endif
|
||||
|
||||
glGenTextures(1, &g_depth_tex);
|
||||
glGenTextures(1, &g_flip_tex);
|
||||
|
|
@ -964,7 +969,7 @@ void GLGSRender::ExecCMD()
|
|||
if(m_set_depth_bounds)
|
||||
{
|
||||
//ConLog.Warning("glDepthBounds(%f, %f)", m_depth_bounds_min, m_depth_bounds_max);
|
||||
glDepthBounds(m_depth_bounds_min, m_depth_bounds_max);
|
||||
glDepthBoundsEXT(m_depth_bounds_min, m_depth_bounds_max);
|
||||
checkForGlError("glDepthBounds");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,10 +175,10 @@ public:
|
|||
default: ConLog.Error("Init tex error: Bad tex format (0x%x | %s | 0x%x)", format, is_swizzled ? "swizzled" : "linear", tex.GetFormat() & 0x40); break;
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, tex.Getmipmap() - 1);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, tex.Getmipmap() > 1);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, tex.GetMipmap() - 1);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, tex.GetMipmap() > 1);
|
||||
|
||||
if(format != 0x81 && format != 0x94)
|
||||
if(format != CELL_GCM_TEXTURE_B8 && format != CELL_GCM_TEXTURE_X16)
|
||||
{
|
||||
u8 remap_a = tex.GetRemap() & 0x3;
|
||||
u8 remap_r = (tex.GetRemap() >> 2) & 0x3;
|
||||
|
|
@ -245,7 +245,7 @@ public:
|
|||
|
||||
//Unbind();
|
||||
|
||||
if(is_swizzled && format == 0x85)
|
||||
if(is_swizzled && format == CELL_GCM_TEXTURE_A8R8G8B8)
|
||||
{
|
||||
free(unswizzledPixels);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ OPENGL_PROC(PFNGLPROGRAMUNIFORM1FPROC, ProgramUniform1f);
|
|||
OPENGL_PROC(PFNGLPROGRAMUNIFORM4FPROC, ProgramUniform4f);
|
||||
OPENGL_PROC(PFNGLUNIFORMMATRIX4FVPROC, UniformMatrix4fv);
|
||||
OPENGL_PROC(PFNGLUSEPROGRAMPROC, UseProgram);
|
||||
OPENGL_PROC2(PFNGLDEPTHBOUNDSEXTPROC, DepthBounds, glDepthBoundsEXT);
|
||||
OPENGL_PROC2(PFNGLDEPTHBOUNDSEXTPROC, DepthBoundsEXT, glDepthBoundsEXT);
|
||||
OPENGL_PROC(PFNGLSTENCILOPSEPARATEPROC, StencilOpSeparate);
|
||||
OPENGL_PROC(PFNGLSTENCILFUNCSEPARATEPROC, StencilFuncSeparate);
|
||||
OPENGL_PROC(PFNGLSTENCILMASKSEPARATEPROC, StencilMaskSeparate);
|
||||
|
|
|
|||
|
|
@ -3,18 +3,22 @@
|
|||
|
||||
void InitProcTable()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_PROC(p, n) OPENGL_PROC2(p, n, gl##n)
|
||||
#define OPENGL_PROC2(p, n, tn) /*if(!gl##n)*/ if(!(gl##n = (p)wglGetProcAddress(#tn))) ConLog.Error("OpenGL: initialization of " #tn " failed.")
|
||||
#include "GLProcTable.tbl"
|
||||
#undef OPENGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_PROC(p, n) p gl##n = nullptr
|
||||
#define OPENGL_PROC2(p, n, tn) OPENGL_PROC(p, n)
|
||||
#include "GLProcTable.tbl"
|
||||
#undef OPENGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
#endif
|
||||
|
||||
OpenGL::OpenGL()
|
||||
{
|
||||
|
|
@ -29,18 +33,22 @@ OpenGL::~OpenGL()
|
|||
|
||||
void OpenGL::Init()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_PROC(p, n) OPENGL_PROC2(p, n, gl##n)
|
||||
#define OPENGL_PROC2(p, n, tn) if(!(n = (p)wglGetProcAddress(#tn))) ConLog.Error("OpenGL: initialization of " #tn " failed.")
|
||||
#include "GLProcTable.tbl"
|
||||
#undef OPENGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
#endif
|
||||
}
|
||||
|
||||
void OpenGL::Close()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_PROC(p, n) n = nullptr
|
||||
#define OPENGL_PROC2(p, n, tn) OPENGL_PROC(p, n)
|
||||
#include "GLProcTable.tbl"
|
||||
#undef OPENGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
typedef BOOL (WINAPI* PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
#endif
|
||||
|
||||
#define OPENGL_PROC(p, n) extern p gl##n
|
||||
#define OPENGL_PROC2(p, n, tn) OPENGL_PROC(p, n)
|
||||
|
|
@ -12,6 +11,11 @@ typedef BOOL (WINAPI* PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
|||
#undef OPENGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
|
||||
#else
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glxext.h>
|
||||
#endif
|
||||
|
||||
void InitProcTable();
|
||||
|
||||
struct OpenGL
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "RSXThread.h"
|
||||
#include "RSXTexture.h"
|
||||
|
||||
RSXTexture::RSXTexture()
|
||||
{
|
||||
|
|
@ -70,7 +70,7 @@ u8 RSXTexture::GetFormat() const
|
|||
return ((methodRegisters[NV4097_SET_TEXTURE_FORMAT + (m_index*32)] >> 8) & 0xff);
|
||||
}
|
||||
|
||||
u16 RSXTexture::Getmipmap() const
|
||||
u16 RSXTexture::GetMipmap() const
|
||||
{
|
||||
return ((methodRegisters[NV4097_SET_TEXTURE_FORMAT + (m_index*32)] >> 16) & 0xffff);
|
||||
}
|
||||
|
|
@ -199,4 +199,4 @@ void RSXTexture::SetControl3(u16 depth, u32 pitch)
|
|||
{
|
||||
m_depth = depth;
|
||||
m_pitch = pitch;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
62
rpcs3/Emu/GS/RSXTexture.h
Normal file
62
rpcs3/Emu/GS/RSXTexture.h
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#pragma once
|
||||
|
||||
class RSXTexture
|
||||
{
|
||||
u8 m_index;
|
||||
|
||||
public:
|
||||
u32 m_pitch;
|
||||
u16 m_depth;
|
||||
|
||||
public:
|
||||
RSXTexture();
|
||||
RSXTexture(u8 index);
|
||||
void Init();
|
||||
|
||||
// Offset
|
||||
u32 GetOffset() const;
|
||||
|
||||
// Format
|
||||
u8 GetLocation() const;
|
||||
bool isCubemap() const;
|
||||
u8 GetBorderType() const;
|
||||
u8 GetDimension() const;
|
||||
u8 GetFormat() const;
|
||||
u16 GetMipmap() const;
|
||||
|
||||
// Address
|
||||
u8 GetWrapS() const;
|
||||
u8 GetWrapT() const;
|
||||
u8 GetWrapR() const;
|
||||
u8 GetUnsignedRemap() const;
|
||||
u8 GetZfunc() const;
|
||||
u8 GetGamma() const;
|
||||
u8 GetAnisoBias() const;
|
||||
u8 GetSignedRemap() const;
|
||||
|
||||
// Control0
|
||||
bool IsEnabled() const;
|
||||
u16 GetMinLOD() const;
|
||||
u16 GetMaxLOD() const;
|
||||
u8 GetMaxAniso() const;
|
||||
bool IsAlphaKillEnabled() const;
|
||||
|
||||
// Control1
|
||||
u32 GetRemap() const;
|
||||
|
||||
// Filter
|
||||
u16 GetBias() const;
|
||||
u8 GetMinFilter() const;
|
||||
u8 GetMagFilter() const;
|
||||
u8 GetConvolutionFilter() const;
|
||||
bool isASigned() const;
|
||||
bool isRSigned() const;
|
||||
bool isGSigned() const;
|
||||
bool isBSigned() const;
|
||||
|
||||
// Image Rect
|
||||
u16 GetWidth() const;
|
||||
u16 GetHeight() const;
|
||||
|
||||
void SetControl3(u16 depth, u32 pitch);
|
||||
};
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include "GCM.h"
|
||||
#include "RSXTexture.h"
|
||||
#include "RSXVertexProgram.h"
|
||||
#include "RSXFragmentProgram.h"
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
|
|
@ -15,67 +16,6 @@ enum Method
|
|||
extern u32 methodRegisters[0xffff];
|
||||
u32 GetAddress(u32 offset, u8 location);
|
||||
|
||||
class RSXTexture
|
||||
{
|
||||
u8 m_index;
|
||||
|
||||
public:
|
||||
u32 m_pitch;
|
||||
u16 m_depth;
|
||||
|
||||
public:
|
||||
RSXTexture();
|
||||
RSXTexture(u8 index);
|
||||
void Init();
|
||||
|
||||
// Offset
|
||||
u32 GetOffset() const;
|
||||
|
||||
// Format
|
||||
u8 GetLocation() const;
|
||||
bool isCubemap() const;
|
||||
u8 GetBorderType() const;
|
||||
u8 GetDimension() const;
|
||||
u8 GetFormat() const;
|
||||
u16 Getmipmap() const;
|
||||
|
||||
// Address
|
||||
u8 GetWrapS() const;
|
||||
u8 GetWrapT() const;
|
||||
u8 GetWrapR() const;
|
||||
u8 GetUnsignedRemap() const;
|
||||
u8 GetZfunc() const;
|
||||
u8 GetGamma() const;
|
||||
u8 GetAnisoBias() const;
|
||||
u8 GetSignedRemap() const;
|
||||
|
||||
// Control0
|
||||
bool IsEnabled() const;
|
||||
u16 GetMinLOD() const;
|
||||
u16 GetMaxLOD() const;
|
||||
u8 GetMaxAniso() const;
|
||||
bool IsAlphaKillEnabled() const;
|
||||
|
||||
// Control1
|
||||
u32 GetRemap() const;
|
||||
|
||||
// Filter
|
||||
u16 GetBias() const;
|
||||
u8 GetMinFilter() const;
|
||||
u8 GetMagFilter() const;
|
||||
u8 GetConvolutionFilter() const;
|
||||
bool isASigned() const;
|
||||
bool isRSigned() const;
|
||||
bool isGSigned() const;
|
||||
bool isBSigned() const;
|
||||
|
||||
// Image Rect
|
||||
u16 GetWidth() const;
|
||||
u16 GetHeight() const;
|
||||
|
||||
void SetControl3(u16 depth, u32 pitch);
|
||||
};
|
||||
|
||||
struct RSXVertexData
|
||||
{
|
||||
u32 frequency;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> s
|
|||
|
||||
// Get size of file
|
||||
MemoryAllocator<CellFsStat> sb; // Alloc a CellFsStat struct
|
||||
ret = cellFsFstat(current_subHandle->fd, sb);
|
||||
ret = cellFsFstat(current_subHandle->fd, sb.GetAddr());
|
||||
if(ret != CELL_OK) return ret;
|
||||
current_subHandle->fileSize = sb->st_size; // Get CellFsStat.st_size
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void Emulator::Load()
|
|||
|
||||
if(IsSelf(m_path.ToStdString()))
|
||||
{
|
||||
std::string self_path = m_path;
|
||||
std::string self_path = m_path.mb_str();
|
||||
std::string elf_path = wxFileName(m_path).GetPath().c_str();
|
||||
|
||||
if(wxFileName(m_path).GetFullName().CmpNoCase("EBOOT.BIN") == 0)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#include "stdafx.h"
|
||||
#include "Ini.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wx/msw/iniconf.h>
|
||||
#endif
|
||||
|
||||
Inis Ini;
|
||||
|
||||
|
|
@ -148,9 +150,13 @@ static wxString WindowInfoToString(const WindowInfo wind)
|
|||
//Ini
|
||||
Ini::Ini()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
m_Config = new wxIniConfig( wxEmptyString, wxEmptyString,
|
||||
wxGetCwd() + "\\rpcs3.ini",
|
||||
wxEmptyString, wxCONFIG_USE_LOCAL_FILE );
|
||||
#else
|
||||
m_Config = new wxConfig("rpcs3");
|
||||
#endif
|
||||
}
|
||||
|
||||
void Ini::Save(wxString key, int value)
|
||||
|
|
@ -211,4 +217,4 @@ wxString Ini::Load(wxString key, const wxString& def_value)
|
|||
WindowInfo Ini::Load(wxString key, const WindowInfo& def_value)
|
||||
{
|
||||
return StringToWindowInfo(m_Config->Read(key, WindowInfoToString(def_value)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
248
rpcs3/Loader/PKG.cpp
Normal file
248
rpcs3/Loader/PKG.cpp
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
#include "stdafx.h"
|
||||
#include "PKG.h"
|
||||
#include "scetool/aes.h"
|
||||
#include "scetool/sha1.h"
|
||||
|
||||
#include <wx/progdlg.h>
|
||||
|
||||
PKGLoader::PKGLoader(wxFile& f) : pkg_f(f)
|
||||
{
|
||||
}
|
||||
|
||||
bool PKGLoader::Install(std::string dest, bool show)
|
||||
{
|
||||
// Initial checks
|
||||
if (!pkg_f.IsOpened())
|
||||
return false;
|
||||
|
||||
dest = wxGetCwd() + dest;
|
||||
if (!dest.empty() && dest.back() != '/')
|
||||
dest += '/';
|
||||
|
||||
if(!LoadHeader(show))
|
||||
return false;
|
||||
|
||||
std::string titleID = std::string(m_header.title_id).substr(7, 9);
|
||||
std::string decryptedFile = wxGetCwd() + "/dev_hdd1/" + titleID + ".dec";
|
||||
|
||||
if (wxDirExists(dest+titleID)) {
|
||||
wxMessageDialog d_overwrite(NULL, "Another installation was found. Do you want to overwrite it?", "PKG Decrypter / Installer", wxYES_NO|wxCENTRE);
|
||||
if (d_overwrite.ShowModal() != wxID_YES) {
|
||||
ConLog.Error("PKG Loader: Another installation found in: %s", wxString(titleID).wx_str());
|
||||
return false;
|
||||
}
|
||||
// TODO: Remove the following two lines and remove the folder dest+titleID
|
||||
ConLog.Error("PKG Loader: Another installation found in: %s", wxString(titleID).wx_str());
|
||||
return false;
|
||||
}
|
||||
if (!wxMkdir(dest+titleID)) {
|
||||
ConLog.Error("PKG Loader: Could not make the installation directory: %s", wxString(titleID).wx_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Decrypt the PKG file
|
||||
wxFile out;
|
||||
out.Create(decryptedFile, true);
|
||||
Decrypt(out);
|
||||
out.Close();
|
||||
|
||||
// Unpack the decrypted file
|
||||
wxFile dec(decryptedFile, wxFile::read);
|
||||
LoadEntries(dec);
|
||||
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, unpacking...", m_entries.size(), 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
|
||||
|
||||
for (const PKGEntry& entry : m_entries)
|
||||
{
|
||||
UnpackEntry(dec, entry, dest+titleID+'/');
|
||||
pdlg.Update(pdlg.GetValue() + 1);
|
||||
}
|
||||
pdlg.Update(m_entries.size());
|
||||
|
||||
// Delete decrypted file
|
||||
dec.Close();
|
||||
wxRemoveFile(decryptedFile);
|
||||
ConLog.Write("PKG Loader: Package successfully installed in: /dev_hdd0/game/%s", wxString(titleID.c_str()).wx_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PKGLoader::Close()
|
||||
{
|
||||
return pkg_f.Close();
|
||||
}
|
||||
|
||||
bool PKGLoader::LoadHeader(bool show)
|
||||
{
|
||||
pkg_f.Seek(0);
|
||||
if (pkg_f.Read(&m_header, sizeof(PKGHeader)) != sizeof(PKGHeader)) {
|
||||
ConLog.Error("PKG Loader: Package file is too short!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CheckHeader())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PKGLoader::CheckHeader()
|
||||
{
|
||||
if (m_header.pkg_magic != 0x7F504B47) {
|
||||
ConLog.Error("PKG Loader: Not a package file!");
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (m_header.pkg_type)
|
||||
{
|
||||
case PKG_RELEASE_TYPE_DEBUG: break;
|
||||
case PKG_RELEASE_TYPE_RELEASE: break;
|
||||
default:
|
||||
ConLog.Error("PKG Loader: Unknown PKG type!");
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (m_header.pkg_platform)
|
||||
{
|
||||
case PKG_PLATFORM_TYPE_PS3: break;
|
||||
case PKG_PLATFORM_TYPE_PSP: break;
|
||||
default:
|
||||
ConLog.Error("PKG Loader: Unknown PKG type!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_header.header_size != PKG_HEADER_SIZE) {
|
||||
ConLog.Error("PKG Loader: Wrong header size!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_header.pkg_size != pkg_f.Length()) {
|
||||
ConLog.Error("PKG Loader: File size mismatch.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_header.data_size + m_header.data_offset + 0x60 != pkg_f.Length()) {
|
||||
ConLog.Error("PKG Loader: Data size mismatch.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PKGLoader::LoadEntries(wxFile& dec)
|
||||
{
|
||||
m_entries.resize(m_header.file_count);
|
||||
|
||||
dec.Seek(0);
|
||||
dec.Read(&m_entries[0], sizeof(PKGEntry) * m_header.file_count);
|
||||
|
||||
if (m_entries[0].name_offset / sizeof(PKGEntry) != m_header.file_count) {
|
||||
ConLog.Error("PKG Loader: Entries are damaged!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PKGLoader::UnpackEntry(wxFile& dec, const PKGEntry& entry, std::string dir)
|
||||
{
|
||||
u8 buf[BUF_SIZE];
|
||||
|
||||
dec.Seek(entry.name_offset);
|
||||
dec.Read(buf, entry.name_size);
|
||||
buf[entry.name_size] = 0;
|
||||
|
||||
switch (entry.type & (0xffff))
|
||||
{
|
||||
case PKG_FILE_ENTRY_NPDRM:
|
||||
case PKG_FILE_ENTRY_NPDRMEDAT:
|
||||
case PKG_FILE_ENTRY_SDAT:
|
||||
case PKG_FILE_ENTRY_REGULAR:
|
||||
{
|
||||
wxFile out;
|
||||
out.Create(dir + buf);
|
||||
dec.Seek(entry.file_offset);
|
||||
|
||||
for (u64 size = 0; size < entry.file_size; ) {
|
||||
size += dec.Read(buf, BUF_SIZE);
|
||||
if (size > entry.file_size)
|
||||
out.Write(buf, BUF_SIZE - (size - entry.file_size));
|
||||
else
|
||||
out.Write(buf, BUF_SIZE);
|
||||
}
|
||||
out.Close();
|
||||
}
|
||||
break;
|
||||
|
||||
case PKG_FILE_ENTRY_FOLDER:
|
||||
wxMkdir(dir + buf);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void PKGLoader::Decrypt(wxFile& out)
|
||||
{
|
||||
aes_context c;
|
||||
u8 iv[HASH_LEN];
|
||||
u8 buf[BUF_SIZE];
|
||||
u8 ctr[BUF_SIZE];
|
||||
|
||||
// Debug key
|
||||
u8 key[0x40];
|
||||
memset(key, 0, 0x40);
|
||||
memcpy(key+0x00, &m_header.qa_digest[0], 8); // &data[0x60]
|
||||
memcpy(key+0x08, &m_header.qa_digest[0], 8); // &data[0x60]
|
||||
memcpy(key+0x10, &m_header.qa_digest[8], 8); // &data[0x68]
|
||||
memcpy(key+0x18, &m_header.qa_digest[8], 8); // &data[0x68]
|
||||
|
||||
pkg_f.Seek(m_header.data_offset);
|
||||
u32 parts = (m_header.data_size + BUF_SIZE - 1) / BUF_SIZE;
|
||||
|
||||
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, decrypting...", parts, 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
|
||||
|
||||
memcpy(iv, m_header.klicensee, sizeof(iv));
|
||||
aes_setkey_enc(&c, PKG_AES_KEY, 128);
|
||||
|
||||
for (u32 i=0; i<parts; i++)
|
||||
{
|
||||
memset(buf, 0, sizeof(buf));
|
||||
u32 length = pkg_f.Read(buf, BUF_SIZE);
|
||||
u32 bits = (length + HASH_LEN - 1) / HASH_LEN;
|
||||
|
||||
if (m_header.pkg_type == PKG_RELEASE_TYPE_DEBUG)
|
||||
{
|
||||
for (u32 j=0; j<bits; j++)
|
||||
{
|
||||
u8 hash[0x14];
|
||||
sha1(key, 0x40, hash);
|
||||
*(u64*)&buf[j*HASH_LEN + 0] ^= *(u64*)&hash[0];
|
||||
*(u64*)&buf[j*HASH_LEN + 8] ^= *(u64*)&hash[8];
|
||||
*(be_t<u64>*)&key[0x38] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_header.pkg_type == PKG_RELEASE_TYPE_RELEASE)
|
||||
{
|
||||
for (u32 j=0; j<bits; j++)
|
||||
{
|
||||
aes_crypt_ecb(&c, AES_ENCRYPT, iv, ctr+j*HASH_LEN);
|
||||
|
||||
be_t<u64> hi = *(be_t<u64>*)&iv[0];
|
||||
be_t<u64> lo = *(be_t<u64>*)&iv[8] + 1;
|
||||
|
||||
if (lo == 0)
|
||||
hi += 1;
|
||||
|
||||
*(be_t<u64>*)&iv[0] = hi;
|
||||
*(be_t<u64>*)&iv[8] = lo;
|
||||
}
|
||||
|
||||
for (u32 j=0; j<length; j++) {
|
||||
buf[j] ^= ctr[j];
|
||||
}
|
||||
}
|
||||
|
||||
out.Write(buf, length);
|
||||
pdlg.Update(i);
|
||||
}
|
||||
pdlg.Update(parts);
|
||||
}
|
||||
76
rpcs3/Loader/PKG.h
Normal file
76
rpcs3/Loader/PKG.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#pragma once
|
||||
#include "Loader.h"
|
||||
|
||||
// Constants
|
||||
#define PKG_HEADER_SIZE 0xC0 //sizeof(pkg_header) + sizeof(pkg_unk_checksum)
|
||||
#define PKG_RELEASE_TYPE_RELEASE 0x8000
|
||||
#define PKG_RELEASE_TYPE_DEBUG 0x0000
|
||||
#define PKG_PLATFORM_TYPE_PS3 0x0001
|
||||
#define PKG_PLATFORM_TYPE_PSP 0x0002
|
||||
|
||||
#define PKG_FILE_ENTRY_NPDRM 0x0001
|
||||
#define PKG_FILE_ENTRY_NPDRMEDAT 0x0002
|
||||
#define PKG_FILE_ENTRY_REGULAR 0x0003
|
||||
#define PKG_FILE_ENTRY_FOLDER 0x0004
|
||||
#define PKG_FILE_ENTRY_SDAT 0x0009
|
||||
#define PKG_FILE_ENTRY_OVERWRITE 0x80000000
|
||||
|
||||
#define HASH_LEN 16
|
||||
#define BUF_SIZE 4096
|
||||
|
||||
// Key
|
||||
static const u8 PKG_AES_KEY[16] = {
|
||||
0x2e, 0x7b, 0x71, 0xd7,
|
||||
0xc9, 0xc9, 0xa1, 0x4e,
|
||||
0xa3, 0x22, 0x1f, 0x18,
|
||||
0x88, 0x28, 0xb8, 0xf8
|
||||
};
|
||||
|
||||
// Structs
|
||||
struct PKGHeader
|
||||
{
|
||||
be_t<u32> pkg_magic; // Magic (0x7f504b47)
|
||||
be_t<u16> pkg_type; // Release type (Retail:0x8000, Debug:0x0000)
|
||||
be_t<u16> pkg_platform; // Platform type (PS3:0x0001, PSP:0x0002)
|
||||
be_t<u32> header_size; // Header size (0xc0)
|
||||
be_t<u32> unk1; // Some PKG version maybe?
|
||||
be_t<u32> meta_size; // Size of metadata (block after header & hashes)
|
||||
be_t<u32> file_count; // Number of files
|
||||
be_t<u64> pkg_size; // PKG size in bytes
|
||||
be_t<u64> data_offset; // Encrypted data offset
|
||||
be_t<u64> data_size; // Encrypted data size in bytes
|
||||
char title_id[48]; // Title ID
|
||||
u8 qa_digest[16]; // This should be the hash of "files + attribs"
|
||||
u8 klicensee[16]; // Nonce
|
||||
};
|
||||
|
||||
struct PKGEntry
|
||||
{
|
||||
be_t<u32> name_offset; // File name offset
|
||||
be_t<u32> name_size; // File name size
|
||||
be_t<u64> file_offset; // File offset
|
||||
be_t<u64> file_size; // File size
|
||||
be_t<u32> type; // File type
|
||||
be_t<u32> pad; // Padding (zeros)
|
||||
};
|
||||
|
||||
class PKGLoader
|
||||
{
|
||||
wxFile& pkg_f;
|
||||
PKGHeader m_header;
|
||||
std::vector<PKGEntry> m_entries;
|
||||
|
||||
virtual void Decrypt(wxFile& out);
|
||||
|
||||
public:
|
||||
PKGLoader(wxFile& f);
|
||||
virtual bool Install(std::string dest, bool show = false);
|
||||
|
||||
virtual bool LoadHeader(bool show = false);
|
||||
virtual bool CheckHeader();
|
||||
|
||||
virtual bool LoadEntries(wxFile& dec);
|
||||
virtual bool UnpackEntry(wxFile& dec, const PKGEntry& entry, std::string dir);
|
||||
|
||||
virtual bool Close();
|
||||
};
|
||||
|
|
@ -2,8 +2,10 @@
|
|||
#include "rpcs3.h"
|
||||
#include "Ini.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wx/msw/wrapwin.h>
|
||||
#include "Gui/CompilerELF.h"
|
||||
#endif
|
||||
|
||||
const wxEventType wxEVT_DBG_COMMAND = wxNewEventType();
|
||||
|
||||
|
|
@ -22,15 +24,7 @@ bool Rpcs3App::OnInit()
|
|||
SetTopWindow(m_MainFrame);
|
||||
Emu.Init();
|
||||
|
||||
// (new CompilerELF(m_MainFrame))->Show();
|
||||
m_debugger_frame = new DebuggerPanel(m_MainFrame);
|
||||
ConLogFrame = new LogFrame(m_MainFrame);
|
||||
|
||||
m_MainFrame->AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM);
|
||||
m_MainFrame->AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
|
||||
//ConLogFrame->Show();
|
||||
m_MainFrame->Show();
|
||||
|
||||
m_MainFrame->DoSettings(true);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Gui/MainFrame.h"
|
||||
#include "Gui/Debugger.h"
|
||||
|
||||
template<typename T> T min(const T a, const T b) { return a < b ? a : b; }
|
||||
template<typename T> T max(const T a, const T b) { return a > b ? a : b; }
|
||||
|
|
@ -55,7 +54,6 @@ class Rpcs3App : public wxApp
|
|||
{
|
||||
public:
|
||||
MainFrame* m_MainFrame;
|
||||
DebuggerPanel* m_debugger_frame;
|
||||
|
||||
virtual bool OnInit();
|
||||
virtual void Exit();
|
||||
|
|
|
|||
|
|
@ -321,6 +321,7 @@
|
|||
<ClCompile Include="Loader\ELF32.cpp" />
|
||||
<ClCompile Include="Loader\ELF64.cpp" />
|
||||
<ClCompile Include="Loader\Loader.cpp" />
|
||||
<ClCompile Include="Loader\PKG.cpp" />
|
||||
<ClCompile Include="Loader\PSF.cpp" />
|
||||
<ClCompile Include="Loader\SELF.cpp" />
|
||||
<ClCompile Include="Loader\TRP.cpp" />
|
||||
|
|
|
|||
|
|
@ -415,6 +415,9 @@
|
|||
<ClCompile Include="Emu\SysCalls\Modules\cellAdec.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Loader\PKG.cpp">
|
||||
<Filter>Loader</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="rpcs3.rc" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue