SELF decrypter improves & About... dialog added

SELF decrypter improved:
The files 'scetool.exe' and 'zlib1.dll' are no longer needed. Everything
needed is now included in the rpsc3 project. So the only thing you need
in order to load SELF files are the keys. More information about this
matter in my last commit: c1565e55

Warning for devs! There is a lot of spaghetti code in /scetool/. I
fucked up things a bit while trying to include scetool in rpcs3. There
is a lot of unused code there and I need to make sure that everything is
working properly. In any case, the code seems to work stable so
end-users shouldn't be worried about this warning. ;-)

'About...' dialog added:
Well, I have nothing more to say here. I wish you all a nice day!
This commit is contained in:
Alexandro Sánchez Bach 2013-10-21 23:02:43 +02:00
parent c1565e55e5
commit f1b420eb3b
34 changed files with 10091 additions and 19 deletions

View file

@ -8,8 +8,11 @@
#include "Emu/GS/sysutil_video.h"
#include "Gui/VHDDManager.h"
#include "Gui/VFSManager.h"
#include "Gui/AboutDialog.cpp"
#include <wx/dynlib.h>
#include "scetool/scetool.cpp"
BEGIN_EVENT_TABLE(MainFrame, FrameBase)
EVT_CLOSE(MainFrame::OnQuit)
END_EVENT_TABLE()
@ -26,6 +29,7 @@ enum IDs
id_config_emu,
id_config_vfs_manager,
id_config_vhdd_manager,
id_help_about,
id_update_dbg,
};
@ -53,10 +57,12 @@ MainFrame::MainFrame()
wxMenu& menu_boot(*new wxMenu());
wxMenu& menu_sys(*new wxMenu());
wxMenu& menu_conf(*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_help, "Help");
menu_boot.Append(id_boot_game, "Boot game");
menu_boot.AppendSeparator();
@ -74,6 +80,8 @@ MainFrame::MainFrame()
menu_conf.Append(id_config_vfs_manager, "Virtual File System Manager");
menu_conf.Append(id_config_vhdd_manager, "Virtual HDD Manager");
menu_help.Append(id_help_about, "About...");
SetMenuBar(&menubar);
m_game_viewer = new GameViewer(this);
@ -92,6 +100,8 @@ MainFrame::MainFrame()
Connect( id_config_vfs_manager, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::ConfigVFS) );
Connect( id_config_vhdd_manager,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::ConfigVHDD) );
Connect( id_help_about, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::AboutDialogHandler) );
Connect( id_update_dbg, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::UpdateUI) );
m_app_connector.Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrame::OnKeyDown), (wxObject*)0, this);
@ -220,24 +230,10 @@ void MainFrame::BootSelf(wxCommandEvent& WXUNUSED(event))
ConLog.Write("SELF: booting...");
Emu.Stop();
if (!wxFileExists("scetool.exe"))
{
ConLog.Error("Could not load SELF file: scetool.exe is missing");
return;
}
if (!wxFileExists("data/keys") ||
!wxFileExists("data/ldr_curves") ||
!wxFileExists("data/vsh_curves"))
{
ConLog.Error("Could not load SELF file: Key files are missing");
return;
}
//(TODO: This is not portable. I should feel bad for this)
wxString cmd = "scetool.exe -d";
cmd += " " + ctrl.GetPath();
cmd += " " + ctrl.GetPath()+".elf";
system(cmd.mb_str());
wxString fileIn = ctrl.GetPath();
wxString fileOut = ctrl.GetPath()+".elf";
scetool_decrypt((scetool::s8 *)fileIn.mb_str(), (scetool::s8 *)fileOut.mb_str());
Emu.SetPath(ctrl.GetPath()+".elf");
Emu.Load();
@ -422,6 +418,11 @@ void MainFrame::ConfigVHDD(wxCommandEvent& WXUNUSED(event))
VHDDManagerDialog(this).ShowModal();
}
void MainFrame::AboutDialogHandler(wxCommandEvent& WXUNUSED(event))
{
AboutDialog(this).ShowModal();
}
void MainFrame::UpdateUI(wxCommandEvent& event)
{
event.Skip();