From 456374d487020933eae69fbeb063aece803de53e Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 24 Dec 2013 06:02:21 +0200 Subject: [PATCH] Added missed files. --- rpcs3/Gui/MainFrame.cpp | 17 +++++++++++++---- rpcs3/Loader/ELF64.cpp | 15 +++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index ea154ffc1b..a8c1bac8fc 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -218,7 +218,6 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) { - //TODO: progress bar bool stopped = false; if(Emu.IsRunning()) @@ -227,7 +226,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) stopped = true; } - wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "*.pkg", + wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "PKG files (*.pkg)|*.pkg|All files (*.*)|*.*", wxFD_OPEN | wxFD_FILE_MUST_EXIST); if(ctrl.ShowModal() == wxID_CANCEL) @@ -241,7 +240,11 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) Emu.Stop(); wxString fileName = ctrl.GetPath(); - pkg_unpack((const char *)fileName.mb_str()); + + { + wxProgressDialog pdlg("Please wait", "Installing PKG...", 0, this, wxPD_APP_MODAL); + pkg_unpack((const char *)fileName.mb_str()); + } if (!wxRemoveFile(ctrl.GetPath()+".dec")) ConLog.Warning("Could not delete the decoded DEC file"); @@ -290,7 +293,13 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) stopped = true; } - wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString, "*.*", + wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString, + "(S)ELF files (*BOOT.BIN;*.elf;*.self)|*BOOT.BIN;*.elf;*.self" + "|ELF files (BOOT.BIN;*.elf)|BOOT.BIN;*.elf" + "|SELF files (EBOOT.BIN;*.self)|EBOOT.BIN;*.self" + "|BOOT files (*BOOT.BIN)|*BOOT.BIN" + "|BIN files (*.bin)|*.bin" + "|All files (*.*)|*.*", wxFD_OPEN | wxFD_FILE_MUST_EXIST); if(ctrl.ShowModal() == wxID_CANCEL) diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index f0406e0aea..94c5e57884 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -436,7 +436,7 @@ bool ELF64Loader::LoadShdrData(u64 offset) if(size == 0 || !Memory.IsGoodAddr(offset + addr, size)) continue; - if(shdr.sh_addr < min_addr) + if(shdr.sh_addr && shdr.sh_addr < min_addr) { min_addr = shdr.sh_addr; } @@ -455,18 +455,13 @@ bool ELF64Loader::LoadShdrData(u64 offset) switch(shdr.sh_type) { case SHT_NOBITS: - memset(&Memory[offset + addr], 0, size); + //ConLog.Warning("SHT_NOBITS: addr=0x%llx, size=0x%llx", offset + addr, size); + //memset(&Memory[offset + addr], 0, size); break; case SHT_PROGBITS: - /* - elf64_f.Seek(shdr.sh_offset); - elf64_f.Read(&Memory[addr], shdr.sh_size); - */ - break; - - case SHT_RELA: - ConLog.Warning("ELF64: RELA"); + //elf64_f.Seek(shdr.sh_offset); + //elf64_f.Read(&Memory[offset + addr], shdr.sh_size); break; } }