rpcsx/rpcs3/Emu/System.cpp

1499 lines
36 KiB
C++
Raw Normal View History

#include "stdafx.h"
2017-03-29 01:54:05 +02:00
#include "Utilities/bin_patch.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUThread.h"
2016-04-14 00:59:00 +02:00
#include "Emu/Cell/PPUCallback.h"
#include "Emu/Cell/PPUOpcodes.h"
#include "Emu/Cell/PPUDisAsm.h"
#include "Emu/Cell/PPUAnalyser.h"
#include "Emu/Cell/SPUThread.h"
2016-05-13 16:01:48 +02:00
#include "Emu/Cell/RawSPUThread.h"
2016-04-14 00:59:00 +02:00
#include "Emu/Cell/lv2/sys_sync.h"
#include "Emu/Cell/lv2/sys_prx.h"
#include "Emu/Cell/lv2/sys_rsx.h"
2014-08-26 01:55:37 +02:00
#include "Emu/IdManager.h"
2016-04-14 00:59:00 +02:00
#include "Emu/RSX/GSRender.h"
#include "Emu/RSX/Capture/rsx_replay.h"
2014-08-26 01:55:37 +02:00
#include "Loader/PSF.h"
2016-04-14 00:59:00 +02:00
#include "Loader/ELF.h"
2014-08-09 17:16:21 +02:00
#include "Utilities/StrUtil.h"
#include "Utilities/sysinfo.h"
#include "../Crypto/unself.h"
#include "../Crypto/unpkg.h"
#include <yaml-cpp/yaml.h>
#include "cereal/archives/binary.hpp"
2016-05-13 16:01:48 +02:00
#include <thread>
2017-09-16 19:36:53 +02:00
#include <typeinfo>
#include <queue>
#include <fstream>
#include <memory>
2016-05-13 16:01:48 +02:00
2017-04-02 20:10:06 +02:00
#include "Utilities/GDBDebugServer.h"
2018-06-13 13:54:16 +02:00
#include "Utilities/sysinfo.h"
2018-05-18 21:37:20 +02:00
#if defined(_WIN32) || defined(HAVE_VULKAN)
#include "Emu/RSX/VK/VulkanAPI.h"
#endif
2017-05-20 13:45:02 +02:00
cfg_root g_cfg;
2018-06-13 13:54:16 +02:00
bool g_use_rtm;
2016-06-02 17:16:01 +02:00
std::string g_cfg_defaults;
2016-04-14 00:59:00 +02:00
extern atomic_t<u32> g_thread_count;
2015-07-04 21:23:10 +02:00
extern u64 get_system_time();
2016-04-14 00:59:00 +02:00
extern void ppu_load_exec(const ppu_exec_object&);
extern void spu_load_exec(const spu_exec_object&);
extern void ppu_initialize(const ppu_module&);
extern void ppu_unload_prx(const lv2_prx&);
extern std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object&, const std::string&);
extern void network_thread_init();
fs::file g_tty;
atomic_t<s64> g_tty_size{0};
2018-06-29 07:59:56 +02:00
std::array<std::deque<std::string>, 16> g_tty_input;
std::mutex g_tty_mutex;
// Progress display server synchronization variables
atomic_t<const char*> g_progr{nullptr};
atomic_t<u64> g_progr_ftotal{0};
atomic_t<u64> g_progr_fdone{0};
atomic_t<u64> g_progr_ptotal{0};
atomic_t<u64> g_progr_pdone{0};
2017-05-20 13:45:02 +02:00
template <>
void fmt_class_string<mouse_handler>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](mouse_handler value)
{
switch (value)
{
case mouse_handler::null: return "Null";
case mouse_handler::basic: return "Basic";
}
return unknown;
});
}
template <>
void fmt_class_string<pad_handler>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](pad_handler value)
{
switch (value)
{
case pad_handler::null: return "Null";
case pad_handler::keyboard: return "Keyboard";
case pad_handler::ds4: return "DualShock 4";
#ifdef _MSC_VER
case pad_handler::xinput: return "XInput";
#endif
#ifdef _WIN32
case pad_handler::mm: return "MMJoystick";
#endif
#ifdef HAVE_LIBEVDEV
case pad_handler::evdev: return "Evdev";
2017-05-20 13:45:02 +02:00
#endif
}
return unknown;
});
}
template <>
void fmt_class_string<video_renderer>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](video_renderer value)
{
switch (value)
{
case video_renderer::null: return "Null";
case video_renderer::opengl: return "OpenGL";
case video_renderer::vulkan: return "Vulkan";
#ifdef _MSC_VER
case video_renderer::dx12: return "D3D12";
#endif
}
return unknown;
});
}
template <>
void fmt_class_string<video_resolution>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](video_resolution value)
{
switch (value)
{
case video_resolution::_1080: return "1920x1080";
case video_resolution::_720: return "1280x720";
case video_resolution::_480: return "720x480";
case video_resolution::_576: return "720x576";
case video_resolution::_1600x1080: return "1600x1080";
case video_resolution::_1440x1080: return "1440x1080";
case video_resolution::_1280x1080: return "1280x1080";
case video_resolution::_960x1080: return "960x1080";
}
return unknown;
});
}
template <>
void fmt_class_string<video_aspect>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](video_aspect value)
{
switch (value)
{
case video_aspect::_auto: return "Auto";
case video_aspect::_4_3: return "4:3";
case video_aspect::_16_9: return "16:9";
}
return unknown;
});
}
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
template <>
void fmt_class_string<keyboard_handler>::format(std::string& out, u64 arg)
2016-04-14 00:59:00 +02:00
{
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
format_enum(out, arg, [](keyboard_handler value)
{
switch (value)
{
case keyboard_handler::null: return "Null";
case keyboard_handler::basic: return "Basic";
}
return unknown;
});
}
template <>
void fmt_class_string<audio_renderer>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](audio_renderer value)
{
switch (value)
{
case audio_renderer::null: return "Null";
#ifdef _WIN32
case audio_renderer::xaudio: return "XAudio2";
2017-08-24 10:42:01 +02:00
#endif
#ifdef HAVE_ALSA
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
case audio_renderer::alsa: return "ALSA";
2017-08-24 10:42:01 +02:00
#endif
#ifdef HAVE_PULSE
case audio_renderer::pulse: return "PulseAudio";
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
#endif
case audio_renderer::openal: return "OpenAL";
}
return unknown;
});
2016-04-14 00:59:00 +02:00
}
2018-05-29 23:38:21 +02:00
template <>
inline void fmt_class_string<detail_level>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](detail_level value)
{
switch (value)
{
case detail_level::minimal: return "Minimal";
case detail_level::low: return "Low";
case detail_level::medium: return "Medium";
case detail_level::high: return "High";
}
return unknown;
});
}
2018-06-13 13:54:16 +02:00
template <>
inline void fmt_class_string<screen_quadrant>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](screen_quadrant value)
{
switch (value)
{
case screen_quadrant::top_left: return "Top Left";
case screen_quadrant::top_right: return "Top Right";
case screen_quadrant::bottom_left: return "Bottom Left";
case screen_quadrant::bottom_right: return "Bottom Right";
}
return unknown;
});
}
template <>
2018-06-13 13:54:16 +02:00
void fmt_class_string<tsx_usage>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](tsx_usage value)
{
switch (value)
{
case tsx_usage::disabled: return "Disabled";
case tsx_usage::enabled: return "Enabled";
case tsx_usage::forced: return "Forced";
}
return unknown;
});
}
void Emulator::Init()
{
if (!g_tty)
{
g_tty.open(fs::get_config_dir() + "TTY.log", fs::rewrite + fs::append);
}
2017-10-31 22:23:09 +01:00
2016-04-14 00:59:00 +02:00
idm::init();
fxm::init();
// Reset defaults, cache them
2017-05-20 13:45:02 +02:00
g_cfg.from_default();
g_cfg_defaults = g_cfg.to_string();
2016-04-14 00:59:00 +02:00
// Reload global configuration
2017-05-20 13:45:02 +02:00
g_cfg.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
2017-02-22 15:22:27 +01:00
// Create directories
2018-01-24 20:04:35 +01:00
const std::string emu_dir = GetEmuDir();
const std::string dev_hdd0 = GetHddDir();
2017-05-20 13:45:02 +02:00
const std::string dev_hdd1 = fmt::replace_all(g_cfg.vfs.dev_hdd1, "$(EmulatorDir)", emu_dir);
const std::string dev_usb = fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir);
2017-02-22 15:22:27 +01:00
fs::create_path(dev_hdd0);
2018-06-21 14:41:11 +02:00
fs::create_path(dev_hdd1);
fs::create_path(dev_usb);
2017-02-22 15:22:27 +01:00
fs::create_dir(dev_hdd0 + "game/");
fs::create_dir(dev_hdd0 + "game/TEST12345/");
fs::create_dir(dev_hdd0 + "game/TEST12345/USRDIR/");
fs::create_dir(dev_hdd0 + "game/.locks/");
2017-02-22 15:22:27 +01:00
fs::create_dir(dev_hdd0 + "home/");
fs::create_dir(dev_hdd0 + "home/" + m_usr + "/");
fs::create_dir(dev_hdd0 + "home/" + m_usr + "/exdata/");
fs::create_dir(dev_hdd0 + "home/" + m_usr + "/savedata/");
fs::create_dir(dev_hdd0 + "home/" + m_usr + "/trophy/");
fs::write_file(dev_hdd0 + "home/" + m_usr + "/localusername", fs::create + fs::excl + fs::write, "User"s);
fs::create_dir(dev_hdd0 + "disc/");
2018-06-23 11:36:16 +02:00
fs::create_dir(dev_hdd0 + "savedata/");
fs::create_dir(dev_hdd0 + "savedata/vmc/");
2017-02-22 15:22:27 +01:00
fs::create_dir(dev_hdd1 + "cache/");
fs::create_dir(dev_hdd1 + "game/");
fs::create_path(fs::get_config_dir() + "shaderlog/");
2017-04-02 20:10:06 +02:00
#ifdef WITH_GDB_DEBUGGER
LOG_SUCCESS(GENERAL, "GDB debug server will be started and listening on %d upon emulator boot", (int) g_cfg.misc.gdb_server_port);
2017-04-02 20:10:06 +02:00
#endif
2017-03-29 01:54:05 +02:00
// Initialize patch engine
fxm::make_always<patch_engine>()->append(fs::get_config_dir() + "/patch.yml");
// Initialize progress dialog server (TODO)
if (g_progr.exchange("") == nullptr)
{
std::thread server([]()
{
while (true)
{
std::shared_ptr<MsgDialogBase> dlg;
// Wait for the start condition
while (!g_progr_ftotal && !g_progr_ptotal)
{
std::this_thread::sleep_for(5ms);
}
// Initialize message dialog
dlg = Emu.GetCallbacks().get_msg_dialog();
dlg->type.se_normal = true;
dlg->type.bg_invisible = true;
dlg->type.progress_bar_count = 1;
dlg->on_close = [](s32 status)
{
Emu.CallAfter([]()
{
// Abort everything
Emu.Stop();
});
};
Emu.CallAfter([=]()
{
dlg->Create(+g_progr);
});
u64 ftotal = 0;
u64 fdone = 0;
u64 ptotal = 0;
u64 pdone = 0;
u32 value = 0;
// Update progress
while (true)
{
if (ftotal != g_progr_ftotal || fdone != g_progr_fdone || ptotal != g_progr_ptotal || pdone != g_progr_pdone)
{
ftotal = g_progr_ftotal;
fdone = g_progr_fdone;
ptotal = g_progr_ptotal;
pdone = g_progr_pdone;
// Compute new progress in percents
const u32 new_value = ((ptotal ? pdone * 1. / ptotal : 0.) + fdone) * 100. / (ftotal ? ftotal : 1);
// Compute the difference
const u32 delta = new_value > value ? new_value - value : 0;
value += delta;
// Changes detected, send update
Emu.CallAfter([=]()
{
std::string progr = "Progress:";
if (ftotal)
fmt::append(progr, " file %u of %u%s", fdone, ftotal, ptotal ? "," : "");
if (ptotal)
fmt::append(progr, " module %u of %u", pdone, ptotal);
dlg->SetMsg(+g_progr);
dlg->ProgressBarSetMsg(0, progr);
dlg->ProgressBarInc(0, delta);
});
}
if (fdone >= ftotal && pdone >= ptotal)
{
// Close dialog
break;
}
std::this_thread::sleep_for(10ms);
}
// Cleanup
g_progr_ftotal -= fdone;
g_progr_fdone -= fdone;
g_progr_ptotal -= pdone;
g_progr_pdone -= pdone;
}
});
server.detach();
}
}
2018-07-23 23:55:27 +02:00
const bool Emulator::SetUsr(const std::string& user)
{
if (user.empty())
{
return false;
}
u32 id;
try
{
id = static_cast<u32>(std::stoul(user));
}
catch (const std::exception&)
{
id = 0;
}
if (id == 0)
{
return false;
}
m_usrid = id;
m_usr = user;
return true;
}
bool Emulator::BootRsxCapture(const std::string& path)
{
if (!fs::is_file(path))
return false;
std::fstream f(path, std::ios::in | std::ios::binary);
cereal::BinaryInputArchive archive(f);
std::unique_ptr<rsx::frame_capture_data> frame = std::make_unique<rsx::frame_capture_data>();
archive(*frame);
if (frame->magic != rsx::FRAME_CAPTURE_MAGIC)
{
LOG_ERROR(LOADER, "Invalid rsx capture file!");
return false;
}
if (frame->version != rsx::FRAME_CAPTURE_VERSION)
{
LOG_ERROR(LOADER, "Rsx capture file version not supported! Expected %d, found %d", rsx::FRAME_CAPTURE_VERSION, frame->version);
return false;
}
Init();
vm::init();
// PS3 'executable'
m_state = system_state::ready;
GetCallbacks().on_ready();
auto gsrender = fxm::import<GSRender>(Emu.GetCallbacks().get_gs_render);
if (gsrender.get() == nullptr)
return false;
GetCallbacks().on_run();
m_state = system_state::running;
auto&& rsxcapture = idm::make_ptr<ppu_thread, rsx::rsx_replay_thread>(std::move(frame));
rsxcapture->run();
return true;
}
2017-08-06 21:29:28 +02:00
bool Emulator::BootGame(const std::string& path, bool direct, bool add_only)
{
2016-01-06 00:52:48 +01:00
static const char* boot_list[] =
{
2014-03-11 17:36:17 +01:00
"/PS3_GAME/USRDIR/EBOOT.BIN",
"/USRDIR/EBOOT.BIN",
2016-01-06 00:52:48 +01:00
"/EBOOT.BIN",
2017-02-22 11:13:06 +01:00
"/eboot.bin",
2018-06-23 11:36:16 +02:00
"/USRDIR/ISO.BIN.EDAT",
};
2015-04-19 15:19:24 +02:00
if (direct && fs::exists(path))
{
m_path = path;
2017-08-06 21:29:28 +02:00
Load(add_only);
2016-01-06 00:52:48 +01:00
return true;
}
2016-01-06 00:52:48 +01:00
for (std::string elf : boot_list)
2014-12-26 17:16:57 +01:00
{
2016-01-06 00:52:48 +01:00
elf = path + elf;
if (fs::is_file(elf))
{
m_path = elf;
2017-08-06 21:29:28 +02:00
Load(add_only);
return true;
}
}
return false;
}
bool Emulator::InstallPkg(const std::string& path)
{
LOG_SUCCESS(GENERAL, "Installing package: %s", path);
atomic_t<double> progress(0.);
int int_progress = 0;
{
// Run PKG unpacking asynchronously
scope_thread worker("PKG Installer", [&]
{
if (pkg_install(path, progress))
{
progress = 1.;
return;
}
progress = -1.;
});
// Wait for the completion
while (std::this_thread::sleep_for(5ms), std::abs(progress) < 1.)
{
// TODO: update unified progress dialog
double pval = progress;
pval < 0 ? pval += 1. : pval;
pval *= 100.;
if (static_cast<int>(pval) > int_progress)
{
int_progress = static_cast<int>(pval);
LOG_SUCCESS(GENERAL, "... %u%%", int_progress);
}
}
}
if (progress >= 1.)
{
return true;
}
return false;
}
2018-01-24 20:04:35 +01:00
std::string Emulator::GetEmuDir()
2016-06-02 17:16:01 +02:00
{
2017-05-20 13:45:02 +02:00
const std::string& emu_dir_ = g_cfg.vfs.emulator_dir;
2018-01-24 20:04:35 +01:00
return emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
}
2016-06-02 17:16:01 +02:00
2018-01-24 20:04:35 +01:00
std::string Emulator::GetHddDir()
{
return fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", GetEmuDir());
2016-06-02 17:16:01 +02:00
}
void Emulator::SetForceBoot(bool force_boot)
{
m_force_boot = force_boot;
}
2017-08-06 21:29:28 +02:00
void Emulator::Load(bool add_only)
{
if (!IsStopped())
{
Stop();
}
2015-07-01 00:25:52 +02:00
2016-04-14 00:59:00 +02:00
try
2015-07-04 21:23:10 +02:00
{
2016-04-14 00:59:00 +02:00
Init();
// Load game list (maps ABCD12345 IDs to /dev_bdvd/ locations)
YAML::Node games = YAML::Load(fs::file{fs::get_config_dir() + "/games.yml", fs::read + fs::create}.to_string());
if (!games.IsMap())
{
games.reset();
}
2017-02-22 13:21:30 +01:00
LOG_NOTICE(LOADER, "Path: %s", m_path);
const std::string elf_dir = fs::get_parent_dir(m_path);
// Load PARAM.SFO (TODO)
const auto _psf = psf::load_object([&]() -> fs::file
2017-07-12 18:35:46 +02:00
{
if (fs::file sfov{elf_dir + "/sce_sys/param.sfo"})
{
return sfov;
}
2017-10-31 22:23:09 +01:00
if (fs::is_dir(m_path))
{
// Special case (directory scan)
if (fs::file sfo{m_path + "/PS3_GAME/PARAM.SFO"})
{
return sfo;
}
return fs::file{m_path + "/PARAM.SFO"};
}
if (disc.size())
2017-07-12 18:35:46 +02:00
{
// Check previously used category before it's overwritten
if (m_cat == "DG")
{
return fs::file{disc + "/PS3_GAME/PARAM.SFO"};
}
if (m_cat == "GD")
{
return fs::file{GetHddDir() + "game/" + m_title_id + "/PARAM.SFO"};
}
return fs::file{disc + "/PARAM.SFO"};
2017-07-12 18:35:46 +02:00
}
2017-10-31 22:23:09 +01:00
return fs::file{elf_dir + "/../PARAM.SFO"};
2017-07-12 18:35:46 +02:00
}());
2018-04-21 22:56:42 +02:00
m_title = psf::get_string(_psf, "TITLE", m_path.substr(m_path.find_last_of('/') + 1));
2017-02-22 13:21:30 +01:00
m_title_id = psf::get_string(_psf, "TITLE_ID");
m_cat = psf::get_string(_psf, "CATEGORY");
2017-02-22 13:21:30 +01:00
2018-05-04 22:52:03 +02:00
for (auto& c : m_title)
{
// Replace newlines with spaces
if (c == '\n')
c = ' ';
}
2017-12-29 18:05:06 +01:00
if (!_psf.empty() && m_cat.empty())
{
LOG_FATAL(LOADER, "Corrupted PARAM.SFO found! Assuming category GD. Try reinstalling the game.");
m_cat = "GD";
}
LOG_NOTICE(LOADER, "Title: %s", GetTitle());
LOG_NOTICE(LOADER, "Serial: %s", GetTitleID());
LOG_NOTICE(LOADER, "Category: %s", GetCat());
2017-02-22 13:21:30 +01:00
// Initialize data/cache directory
2018-04-21 22:57:27 +02:00
if (fs::is_dir(m_path))
{
m_cache_path = fs::get_config_dir() + "data/" + GetTitleID() + '/';
LOG_NOTICE(LOADER, "Cache: %s", GetCachePath());
}
else
{
m_cache_path = fs::get_data_dir(m_title_id, m_path);
LOG_NOTICE(LOADER, "Cache: %s", GetCachePath());
}
// Load custom config-0
if (fs::file cfg_file{m_cache_path + "/config.yml"})
{
LOG_NOTICE(LOADER, "Applying custom config: %s/config.yml", m_cache_path);
2017-05-20 13:45:02 +02:00
g_cfg.from_string(cfg_file.to_string());
}
// Load custom config-1
if (fs::file cfg_file{fs::get_config_dir() + "data/" + m_title_id + "/config.yml"})
{
LOG_NOTICE(LOADER, "Applying custom config: data/%s/config.yml", m_title_id);
2017-05-20 13:45:02 +02:00
g_cfg.from_string(cfg_file.to_string());
}
// Load custom config-2
if (fs::file cfg_file{m_path + ".yml"})
{
LOG_NOTICE(LOADER, "Applying custom config: %s.yml", m_path);
2017-05-20 13:45:02 +02:00
g_cfg.from_string(cfg_file.to_string());
}
2018-05-18 21:37:20 +02:00
#if defined(_WIN32) || defined(HAVE_VULKAN)
if (g_cfg.video.renderer == video_renderer::vulkan)
{
LOG_NOTICE(LOADER, "Vulkan SDK Revision: %d", VK_HEADER_VERSION);
}
#endif
2017-05-20 13:45:02 +02:00
LOG_NOTICE(LOADER, "Used configuration:\n%s\n", g_cfg.to_string());
2018-06-13 13:54:16 +02:00
// Set RTM usage
g_use_rtm = utils::has_rtm() && ((utils::has_mpx() && g_cfg.core.enable_TSX == tsx_usage::enabled) || g_cfg.core.enable_TSX == tsx_usage::forced);
if (g_use_rtm && !utils::has_mpx())
{
LOG_WARNING(GENERAL, "TSX forced by User");
}
2017-03-29 01:54:05 +02:00
// Load patches from different locations
fxm::check_unlocked<patch_engine>()->append(fs::get_config_dir() + "data/" + m_title_id + "/patch.yml");
fxm::check_unlocked<patch_engine>()->append(m_cache_path + "/patch.yml");
// Mount all devices
2018-01-24 20:04:35 +01:00
const std::string emu_dir = GetEmuDir();
2017-05-20 13:45:02 +02:00
const std::string home_dir = g_cfg.vfs.app_home;
std::string bdvd_dir = g_cfg.vfs.dev_bdvd;
2017-09-21 13:34:09 +02:00
// Mount default relative path to non-existent directory
vfs::mount("", fs::get_config_dir() + "delete_this_dir/");
2017-05-20 13:45:02 +02:00
vfs::mount("dev_hdd0", fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir));
vfs::mount("dev_hdd1", fmt::replace_all(g_cfg.vfs.dev_hdd1, "$(EmulatorDir)", emu_dir));
2018-06-23 08:26:11 +02:00
vfs::mount("dev_flash", g_cfg.vfs.get_dev_flash());
2017-05-20 13:45:02 +02:00
vfs::mount("dev_usb", fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir));
vfs::mount("dev_usb000", fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir));
vfs::mount("app_home", home_dir.empty() ? elf_dir + '/' : fmt::replace_all(home_dir, "$(EmulatorDir)", emu_dir));
// Special boot mode (directory scan)
if (fs::is_dir(m_path))
{
m_state = system_state::ready;
GetCallbacks().on_ready();
vm::init();
Run();
m_force_boot = false;
// Force LLVM recompiler
g_cfg.core.ppu_decoder.from_default();
2018-03-24 22:04:17 +01:00
// Workaround for analyser glitches
vm::falloc(0x10000, 0xf0000, vm::main);
return thread_ctrl::spawn("SPRX Loader", [this]
{
std::vector<std::string> dir_queue;
dir_queue.emplace_back(m_path + '/');
std::vector<std::pair<std::string, u64>> file_queue;
file_queue.reserve(2000);
std::queue<std::shared_ptr<thread_ctrl>> thread_queue;
const uint max_threads = std::thread::hardware_concurrency();
// Initialize progress dialog
g_progr = "Scanning directories for SPRX libraries...";
// Find all .sprx files recursively (TODO: process .mself files)
for (std::size_t i = 0; i < dir_queue.size(); i++)
{
if (Emu.IsStopped())
{
break;
}
LOG_NOTICE(LOADER, "Scanning directory: %s", dir_queue[i]);
for (auto&& entry : fs::dir(dir_queue[i]))
{
if (Emu.IsStopped())
{
break;
}
if (entry.is_directory)
{
if (entry.name != "." && entry.name != "..")
{
dir_queue.emplace_back(dir_queue[i] + entry.name + '/');
}
continue;
}
// Check .sprx filename
if (entry.name.size() >= 5 && fmt::to_upper(entry.name).compare(entry.name.size() - 5, 5, ".SPRX", 5) == 0)
{
if (entry.name == "libfs_155.sprx")
{
continue;
}
// Get full path
file_queue.emplace_back(dir_queue[i] + entry.name, 0);
g_progr_ftotal++;
}
}
}
for (std::size_t i = 0; i < file_queue.size(); i++)
{
const auto& path = file_queue[i].first;
LOG_NOTICE(LOADER, "Trying to load SPRX: %s", path);
// Load MSELF or SPRX
fs::file src{path};
if (file_queue[i].second == 0)
{
// Some files may fail to decrypt due to the lack of klic
src = decrypt_self(std::move(src));
}
const ppu_prx_object obj = src;
if (obj == elf_error::ok)
{
if (auto prx = ppu_load_prx(obj, path))
{
while (g_thread_count >= max_threads + 2)
{
std::this_thread::sleep_for(10ms);
}
thread_queue.emplace();
thread_ctrl::spawn(thread_queue.back(), "Worker " + std::to_string(thread_queue.size()), [_prx = std::move(prx)]
{
ppu_initialize(*_prx);
ppu_unload_prx(*_prx);
g_progr_fdone++;
});
continue;
}
}
LOG_ERROR(LOADER, "Failed to load SPRX '%s' (%s)", path, obj.get_error());
g_progr_fdone++;
}
// Join every thread and print exceptions
while (!thread_queue.empty())
{
try
{
thread_queue.front()->join();
}
catch (const std::exception& e)
{
LOG_FATAL(LOADER, "[%s] %s thrown: %s", thread_queue.front()->get_name(), typeid(e).name(), e.what());
}
thread_queue.pop();
}
// Exit "process"
Emu.CallAfter([]
{
Emu.Stop();
});
});
}
// Detect boot location
const std::string hdd0_game = vfs::get("/dev_hdd0/game/");
const std::string hdd0_disc = vfs::get("/dev_hdd0/disc/");
const std::size_t bdvd_pos = m_cat == "DG" && bdvd_dir.empty() && disc.empty() ? elf_dir.rfind("/PS3_GAME/") + 1 : 0;
const bool from_hdd0_game = m_path.find(hdd0_game) != -1;
if (bdvd_pos && from_hdd0_game)
{
// Booting disc game from wrong location
LOG_ERROR(LOADER, "Disc game %s found at invalid location /dev_hdd0/game/", m_title_id);
// Move and retry from correct location
if (fs::rename(elf_dir + "/../../", hdd0_disc + elf_dir.substr(hdd0_game.size()) + "/../../", false))
{
LOG_SUCCESS(LOADER, "Disc game %s moved to special location /dev_hdd0/disc/", m_title_id);
return m_path = hdd0_disc + m_path.substr(hdd0_game.size()), Load();
}
else
{
LOG_ERROR(LOADER, "Failed to move disc game %s to /dev_hdd0/disc/ (%s)", m_title_id, fs::g_tls_error);
return;
}
}
// Booting disc game
if (bdvd_pos)
{
// Mount /dev_bdvd/ if necessary
bdvd_dir = elf_dir.substr(0, bdvd_pos);
}
// Booting patch data
if (m_cat == "GD" && bdvd_dir.empty() && disc.empty())
{
// Load /dev_bdvd/ from game list if available
if (auto node = games[m_title_id])
{
bdvd_dir = node.Scalar();
}
else
{
LOG_FATAL(LOADER, "Disc directory not found. Try to run the game from the actual game disc directory.");
}
}
// Check /dev_bdvd/
if (disc.empty() && !bdvd_dir.empty() && fs::is_dir(bdvd_dir))
{
fs::file sfb_file;
vfs::mount("dev_bdvd", bdvd_dir);
LOG_NOTICE(LOADER, "Disc: %s", vfs::get("/dev_bdvd"));
if (!sfb_file.open(vfs::get("/dev_bdvd/PS3_DISC.SFB")) || sfb_file.size() < 4 || sfb_file.read<u32>() != ".SFB"_u32)
{
LOG_ERROR(LOADER, "Invalid disc directory for the disc game %s", m_title_id);
return;
}
const std::string bdvd_title_id = psf::get_string(psf::load_object(fs::file{vfs::get("/dev_bdvd/PS3_GAME/PARAM.SFO")}), "TITLE_ID");
if (bdvd_title_id != m_title_id)
{
LOG_ERROR(LOADER, "Unexpected disc directory for the disc game %s (found %s)", m_title_id, bdvd_title_id);
return;
}
// Store /dev_bdvd/ location
games[m_title_id] = bdvd_dir;
YAML::Emitter out;
out << games;
fs::file(fs::get_config_dir() + "/games.yml", fs::rewrite).write(out.c_str(), out.size());
}
2018-06-23 11:36:16 +02:00
else if (m_cat == "1P" && from_hdd0_game)
{
//PS1 Classics
LOG_NOTICE(LOADER, "PS1 Game: %s, %s", m_title_id, m_title);
std::string gamePath = m_path.substr(m_path.find("/dev_hdd0/game/"), 24);
LOG_NOTICE(LOADER, "Forcing manual lib loading mode");
g_cfg.core.lib_loading.from_string(fmt::format("%s", lib_loading_type::manual));
g_cfg.core.load_libraries.from_list({});
argv.resize(9);
argv[0] = "/dev_flash/ps1emu/ps1_newemu.self";
argv[1] = m_title_id + "_mc1.VM1"; // virtual mc 1 /dev_hdd0/savedata/vmc/%argv[1]%
argv[2] = m_title_id + "_mc2.VM1"; // virtual mc 2 /dev_hdd0/savedata/vmc/%argv[2]%
argv[3] = "0082"; // region target
argv[4] = "1600"; // ??? arg4 600 / 1200 / 1600, resolution scale? (purely a guess, the numbers seem to match closely to resolutions tho)
argv[5] = gamePath; // ps1 game folder path (not the game serial)
argv[6] = "1"; // ??? arg6 1 ?
argv[7] = "2"; // ??? arg7 2 -- full screen on/off 2/1 ?
argv[8] = "1"; // ??? arg8 2 -- smoothing on/off = 1/0 ?
//TODO, this seems like it would normally be done by sysutil etc
//Basically make 2 128KB memory cards 0 filled and let the games handle formatting.
fs::file card_1_file(vfs::get("/dev_hdd0/savedata/vmc/" + argv[1]), fs::write + fs::create);
card_1_file.trunc(128 * 1024);
fs::file card_2_file(vfs::get("/dev_hdd0/savedata/vmc/" + argv[2]), fs::write + fs::create);
card_2_file.trunc(128 * 1024);
2018-06-23 16:30:16 +02:00
m_cache_path = fs::get_data_dir("", vfs::get(argv[0]));
2018-06-23 11:36:16 +02:00
}
else if (m_cat != "DG" && m_cat != "GD")
2017-10-31 22:23:09 +01:00
{
// Don't need /dev_bdvd
2017-10-31 22:23:09 +01:00
}
else if (m_cat == "DG" && from_hdd0_game)
{
vfs::mount("dev_bdvd/PS3_GAME", hdd0_game + m_path.substr(hdd0_game.size(), 10));
LOG_NOTICE(LOADER, "Game: %s", vfs::get("/dev_bdvd/PS3_GAME"));
}
else if (disc.empty())
{
LOG_ERROR(LOADER, "Failed to mount disc directory for the disc game %s", m_title_id);
return;
}
else
{
bdvd_dir = disc;
vfs::mount("dev_bdvd", bdvd_dir);
LOG_NOTICE(LOADER, "Disk: %s", vfs::get("/dev_bdvd"));
}
2017-08-06 21:29:28 +02:00
if (add_only)
{
LOG_NOTICE(LOADER, "Finished to add data to games.yml by boot for: %s", m_path);
return;
}
// Install PKGDIR, INSDIR, PS3_EXTRA
if (!bdvd_dir.empty())
{
const std::string ins_dir = vfs::get("/dev_bdvd/PS3_GAME/INSDIR/");
const std::string pkg_dir = vfs::get("/dev_bdvd/PS3_GAME/PKGDIR/");
const std::string extra_dir = vfs::get("/dev_bdvd/PS3_GAME/PS3_EXTRA/");
fs::file lock_file;
if (fs::is_dir(ins_dir) || fs::is_dir(pkg_dir) || fs::is_dir(extra_dir))
{
// Create lock file to prevent double installation
lock_file.open(hdd0_game + ".locks/" + m_title_id, fs::read + fs::create + fs::excl);
}
if (lock_file && fs::is_dir(ins_dir))
{
LOG_NOTICE(LOADER, "Found INSDIR: %s", ins_dir);
for (auto&& entry : fs::dir{ins_dir})
{
if (!entry.is_directory && ends_with(entry.name, ".PKG") && !InstallPkg(ins_dir + entry.name))
{
LOG_ERROR(LOADER, "Failed to install /dev_bdvd/PS3_GAME/INSDIR/%s", entry.name);
return;
}
}
}
if (lock_file && fs::is_dir(pkg_dir))
{
LOG_NOTICE(LOADER, "Found PKGDIR: %s", pkg_dir);
for (auto&& entry : fs::dir{pkg_dir})
{
if (entry.is_directory && entry.name.compare(0, 3, "PKG", 3) == 0)
{
const std::string pkg_file = pkg_dir + entry.name + "/INSTALL.PKG";
if (fs::is_file(pkg_file) && !InstallPkg(pkg_file))
{
LOG_ERROR(LOADER, "Failed to install /dev_bdvd/PS3_GAME/PKGDIR/%s/INSTALL.PKG", entry.name);
return;
}
}
}
}
if (lock_file && fs::is_dir(extra_dir))
{
LOG_NOTICE(LOADER, "Found PS3_EXTRA: %s", extra_dir);
for (auto&& entry : fs::dir{extra_dir})
{
if (entry.is_directory && entry.name[0] == 'D')
{
const std::string pkg_file = extra_dir + entry.name + "/DATA000.PKG";
if (fs::is_file(pkg_file) && !InstallPkg(pkg_file))
{
LOG_ERROR(LOADER, "Failed to install /dev_bdvd/PS3_GAME/PKGDIR/%s/DATA000.PKG", entry.name);
return;
}
}
}
}
}
// Check game updates
const std::string hdd0_boot = hdd0_game + m_title_id + "/USRDIR/EBOOT.BIN";
if (disc.empty() && m_cat == "DG" && fs::is_file(hdd0_boot))
{
// Booting game update
LOG_SUCCESS(LOADER, "Updates found at /dev_hdd0/game/%s/!", m_title_id);
return m_path = hdd0_boot, Load();
}
// Mount /host_root/ if necessary
2017-05-20 13:45:02 +02:00
if (g_cfg.vfs.host_root)
{
vfs::mount("host_root", {});
}
2017-07-12 18:35:46 +02:00
// Open SELF or ELF
2018-06-23 16:30:16 +02:00
std::string elf_path = m_path;
if (m_cat == "1P")
{
// Use emulator path
elf_path = vfs::get(argv[0]);
}
fs::file elf_file(elf_path);
2017-07-12 18:35:46 +02:00
if (!elf_file)
{
2018-06-23 16:30:16 +02:00
LOG_ERROR(LOADER, "Failed to open executable: %s", elf_path);
2017-07-12 18:35:46 +02:00
return;
}
// Check SELF header
if (elf_file.size() >= 4 && elf_file.read<u32>() == "SCE\0"_u32)
2015-04-24 02:35:42 +02:00
{
2017-02-22 14:08:53 +01:00
const std::string decrypted_path = m_cache_path + "boot.elf";
2016-04-14 00:59:00 +02:00
2017-02-22 13:21:30 +01:00
fs::stat_t encrypted_stat = elf_file.stat();
fs::stat_t decrypted_stat;
2017-02-22 13:21:30 +01:00
// Check modification time and try to load decrypted ELF
if (fs::stat(decrypted_path, decrypted_stat) && decrypted_stat.mtime == encrypted_stat.mtime)
2016-04-14 00:59:00 +02:00
{
2017-02-22 13:21:30 +01:00
elf_file.open(decrypted_path);
2016-04-14 00:59:00 +02:00
}
// Decrypt SELF
else if (elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data()))
2016-04-14 00:59:00 +02:00
{
2017-02-22 13:21:30 +01:00
if (fs::file elf_out{decrypted_path, fs::rewrite})
{
elf_out.write(elf_file.to_vector<u8>());
elf_out.close();
fs::utime(decrypted_path, encrypted_stat.atime, encrypted_stat.mtime);
}
else
{
2017-02-22 14:08:53 +01:00
LOG_ERROR(LOADER, "Failed to create boot.elf");
2017-02-22 13:21:30 +01:00
}
2016-04-14 00:59:00 +02:00
}
2017-02-22 13:21:30 +01:00
}
2016-04-14 00:59:00 +02:00
if (!elf_file)
{
2018-06-23 16:30:16 +02:00
LOG_ERROR(LOADER, "Failed to decrypt SELF: %s", elf_path);
2016-04-14 00:59:00 +02:00
return;
}
ppu_exec_object ppu_exec;
ppu_prx_object ppu_prx;
spu_exec_object spu_exec;
if (ppu_exec.open(elf_file) == elf_error::ok)
2016-04-14 00:59:00 +02:00
{
// PS3 executable
2017-05-20 13:45:02 +02:00
m_state = system_state::ready;
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_ready();
2018-02-09 15:49:37 +01:00
vm::init();
2016-04-14 00:59:00 +02:00
if (argv.empty())
2017-10-12 16:58:06 +02:00
{
argv.resize(1);
}
if (argv[0].empty())
2016-04-14 00:59:00 +02:00
{
2018-03-11 12:42:57 +01:00
if (from_hdd0_game && m_cat == "DG")
{
argv[0] = "/dev_bdvd/PS3_GAME/" + m_path.substr(hdd0_game.size() + 10);
m_dir = "/dev_hdd0/game/" + m_path.substr(hdd0_game.size(), 10);
LOG_NOTICE(LOADER, "Disc path: %s", m_dir);
}
else if (from_hdd0_game)
2017-07-12 13:07:38 +02:00
{
2017-10-12 16:58:06 +02:00
argv[0] = "/dev_hdd0/game/" + m_path.substr(hdd0_game.size());
m_dir = "/dev_hdd0/game/" + m_path.substr(hdd0_game.size(), 10);
LOG_NOTICE(LOADER, "Boot path: %s", m_dir);
2017-07-12 13:07:38 +02:00
}
else if (!bdvd_dir.empty() && fs::is_dir(bdvd_dir))
2017-06-10 21:50:10 +02:00
{
// Disc games are on /dev_bdvd/
const std::size_t pos = m_path.rfind("PS3_GAME");
2017-10-12 16:58:06 +02:00
argv[0] = "/dev_bdvd/" + m_path.substr(pos);
m_dir = "/dev_bdvd/PS3_GAME/";
2017-06-10 21:50:10 +02:00
}
else
{
// For homebrew
2017-10-12 16:58:06 +02:00
argv[0] = "/host_root/" + m_path;
m_dir = "/host_root/" + elf_dir + '/';
2017-06-10 21:50:10 +02:00
}
LOG_NOTICE(LOADER, "Elf path: %s", argv[0]);
2016-04-14 00:59:00 +02:00
}
ppu_load_exec(ppu_exec);
2016-04-14 00:59:00 +02:00
2016-08-14 02:22:19 +02:00
fxm::import<GSRender>(Emu.GetCallbacks().get_gs_render); // TODO: must be created in appropriate sys_rsx syscall
network_thread_init();
2016-04-14 00:59:00 +02:00
}
else if (ppu_prx.open(elf_file) == elf_error::ok)
{
// PPU PRX (experimental)
2017-05-20 13:45:02 +02:00
m_state = system_state::ready;
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_ready();
2018-02-09 15:49:37 +01:00
vm::init();
2017-07-13 17:35:37 +02:00
ppu_load_prx(ppu_prx, m_path);
2016-04-14 00:59:00 +02:00
}
else if (spu_exec.open(elf_file) == elf_error::ok)
{
// SPU executable (experimental)
2017-05-20 13:45:02 +02:00
m_state = system_state::ready;
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_ready();
2018-02-09 15:49:37 +01:00
vm::init();
spu_load_exec(spu_exec);
2016-04-14 00:59:00 +02:00
}
else
{
2018-06-23 16:30:16 +02:00
LOG_ERROR(LOADER, "Invalid or unsupported file format: %s", elf_path);
LOG_WARNING(LOADER, "** ppu_exec -> %s", ppu_exec.get_error());
LOG_WARNING(LOADER, "** ppu_prx -> %s", ppu_prx.get_error());
LOG_WARNING(LOADER, "** spu_exec -> %s", spu_exec.get_error());
2016-04-14 00:59:00 +02:00
return;
}
if ((m_force_boot || g_cfg.misc.autostart) && IsReady())
2017-04-13 01:31:42 +02:00
{
Run();
m_force_boot = false;
2017-04-13 01:31:42 +02:00
}
else if (IsPaused())
{
2017-05-20 13:45:02 +02:00
m_state = system_state::ready;
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_ready();
2017-04-13 01:31:42 +02:00
}
}
2016-04-14 00:59:00 +02:00
catch (const std::exception& e)
{
2016-04-14 00:59:00 +02:00
LOG_FATAL(LOADER, "%s thrown: %s", typeid(e).name(), e.what());
Stop();
}
}
void Emulator::Run()
{
2014-12-28 23:53:31 +01:00
if (!IsReady())
{
Load();
if(!IsReady()) return;
}
2014-12-28 23:53:31 +01:00
if (IsRunning()) Stop();
if (IsPaused())
{
Resume();
return;
}
2014-12-28 23:53:31 +01:00
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_run();
2015-07-04 21:23:10 +02:00
m_pause_start_time = 0;
m_pause_amend_time = 0;
2017-05-20 13:45:02 +02:00
m_state = system_state::running;
auto on_select = [](u32, cpu_thread& cpu)
2016-04-14 00:59:00 +02:00
{
cpu.run();
};
idm::select<ppu_thread>(on_select);
idm::select<RawSPUThread>(on_select);
idm::select<SPUThread>(on_select);
#ifdef WITH_GDB_DEBUGGER
// Initialize debug server at the end of emu run sequence
fxm::make<GDBDebugServer>();
#endif
}
2015-09-13 00:37:57 +02:00
bool Emulator::Pause()
{
2015-07-04 21:23:10 +02:00
const u64 start = get_system_time();
2016-04-14 00:59:00 +02:00
// Try to pause
2017-05-20 13:45:02 +02:00
if (!m_state.compare_and_swap_test(system_state::running, system_state::paused))
{
2017-05-20 13:45:02 +02:00
return m_state.compare_and_swap_test(system_state::ready, system_state::paused);
2015-07-04 21:23:10 +02:00
}
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_pause();
2016-04-14 00:59:00 +02:00
// Update pause start time
2015-07-04 21:23:10 +02:00
if (m_pause_start_time.exchange(start))
{
2015-07-06 21:35:34 +02:00
LOG_ERROR(GENERAL, "Emulator::Pause() error: concurrent access");
2015-07-04 21:23:10 +02:00
}
2015-07-01 00:25:52 +02:00
auto on_select = [](u32, cpu_thread& cpu)
2015-07-04 21:23:10 +02:00
{
cpu.state += cpu_flag::dbg_global_pause;
};
idm::select<ppu_thread>(on_select);
idm::select<RawSPUThread>(on_select);
idm::select<SPUThread>(on_select);
2015-09-13 00:37:57 +02:00
return true;
}
void Emulator::Resume()
{
2016-04-14 00:59:00 +02:00
// Get pause start time
const u64 time = m_pause_start_time.exchange(0);
2016-04-14 00:59:00 +02:00
// Try to increment summary pause time
if (time)
{
m_pause_amend_time += get_system_time() - time;
}
// Print and reset debug data collected
2018-02-09 13:24:46 +01:00
if (m_state == system_state::paused && g_cfg.core.ppu_debug)
{
PPUDisAsm dis_asm(CPUDisAsm_InterpreterMode);
dis_asm.offset = vm::g_base_addr;
std::string dump;
for (u32 i = 0x10000; i < 0x40000000;)
{
if (vm::check_addr(i))
{
if (auto& data = *(be_t<u32>*)(vm::g_stat_addr + i))
{
dis_asm.dump_pc = i;
dis_asm.disasm(i);
fmt::append(dump, "\n\t'%08X' %s", data, dis_asm.last_opcode);
data = 0;
}
i += sizeof(u32);
}
else
{
i += 4096;
}
}
LOG_NOTICE(PPU, "[RESUME] Dumping instruction stats:%s", dump);
}
2016-04-14 00:59:00 +02:00
// Try to resume
2017-05-20 13:45:02 +02:00
if (!m_state.compare_and_swap_test(system_state::paused, system_state::running))
2015-07-04 21:23:10 +02:00
{
return;
}
if (!time)
2015-07-04 21:23:10 +02:00
{
2015-07-06 21:35:34 +02:00
LOG_ERROR(GENERAL, "Emulator::Resume() error: concurrent access");
2015-07-04 21:23:10 +02:00
}
2017-02-05 14:35:10 +01:00
auto on_select = [](u32, cpu_thread& cpu)
2015-07-01 00:25:52 +02:00
{
2017-02-05 14:35:10 +01:00
cpu.state -= cpu_flag::dbg_global_pause;
cpu.notify();
};
2017-02-05 14:35:10 +01:00
idm::select<ppu_thread>(on_select);
idm::select<RawSPUThread>(on_select);
idm::select<SPUThread>(on_select);
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_resume();
}
void Emulator::Stop(bool restart)
{
2017-05-20 13:45:02 +02:00
if (m_state.exchange(system_state::stopped) == system_state::stopped)
2015-07-04 21:23:10 +02:00
{
m_force_boot = false;
2015-07-04 21:23:10 +02:00
return;
}
const bool do_exit = !restart && !m_force_boot && g_cfg.misc.autoexit;
2016-04-14 00:59:00 +02:00
LOG_NOTICE(GENERAL, "Stopping emulator...");
RPCS3 QT (#2645) * Fix windows build. I made sure to do everything with a win32 prefix to not effect linux build. * Make the window resizable instead of fixed in the corner. * Ignore moc files and things in the debug/release folder. I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file. But, this helps clean out clutter for now. * Add cmake. This doesn't interact with the rest of rpcs3 nor the main cmake file. That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt. * The build works. I'd like to thank my friends, Google and Stackoverflow. Setted up by importing rpcs3Qt project using Qt's visual studio plugin. * Cleanup. Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files. * Update readme to reflect getting Qt. * Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild. * Add rpcs3_version, few GUI tweaks * Set defaultSize to 70% of screen size * Add the view menu (#3) * Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets. * Make log visible by default * Improve UI by making it into a checkbox that's easier to use. * fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users) * updated readme for qt * update appveyor for qt - cleaned formatting for the post build command * fix build (#6) * fix build legit this time i promise * [Ready] Gamepadsettings (#4) * WIP Gamepadsettings pushbutton Eventhandling missing * GamepadSettings should work except for cfg Init Some KeyInputs are missing * Update padsettingsdialog.h * Update padsettingsdialog.cpp (#5) * Update padsettingsdialog.cpp removed silly tabs * Update padsettingsdialog.cpp * GetKeyCode simplified * rename pad settings to keyboard settings o.O * rename keyboard setting to input settings * Remvoed the QT_UI defines. * Readded new line at end of file. Replaced define in padsettings with constant. * GUI fixes (Settings) * Stub the logger UI. Nothing special besides a simple stub. * Unstub the log. I haven't tested TTY but it should work. Only thing to do, but this is in general, is add persistent settings. * Minor refactoring to simplify code. * Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images. * Made game lists much more functional than it was. * mainwindow * gamelist * Please forgive me for I have lambdaed. Added the ability to toggle showing columns via a context menu. * Fix GameList further * sort by name on init fixed * Created the baseline refactoring. I'm going to start working on the callbacks now. May need to implement other classes in the process. Fun stuff, I know. * adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation adds RefreshGameList obliterates 10sec Refresh * messages * Rpcs3 gs frame (#16) * Messing with project settings try to get trails of cold steel to boot.bluh Definitely one change is needed in linker settings for RPCS3 to not crash immediately. Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf. * remove random ! not that it matters much right now * minor additions * "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it. However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call) Crashes due to needing pad callback to be done. * With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol) * Fix release mode. Fix the Qt debug assert by using ancient occault rituals. I want to be able to remove the blocking connects but it won't work right now without it. It isn't perfect but it's good enough for now IMO. * Add enters to the end of files. * Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event. Works, though, it's admittedly probably not optimal by ANY means. * Fix comment. * Fix libpng wit zlib. * Move Qt GUI into RPCS3Qt. (#17) Restore wx GUI. * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * Add stylesheet to git ignore. * XInput.. * Joystick... * Rpcs3 qt small fixes (#20) * Small fixes. Have emulator stop when x button is pressed on game window. Have emulator/application stop when the main window is closed. * If I forget another new line ending for a file............................................. * Add CgDisasm (#21) * fix install-progressdialogs randomly not showing * install-progressdialog cosmetics * add stylesheet file loading * apply request * add CgDisasm add code to disable contextmenu options fix gamelist issue * missing proj changes * Add ability to open stylesheets from menu. * Mega searcher (#23) * add MemoryStringSearcher set minimum Sizes for mainwindow and CgDisasm * minor fixes * Since the system.cpp callbacks for emulator state were unused, I removed them. Then, I replaced them with callbacks for the Gui. * added stylesheet options setfocus on settings fixed newline added * added signals and slots for EmuRun and EmuStop * update ui update ui now works added callback onReady added EnableMenues added ps3 commands * added restart logic to menu * newline * event header removed * Added graphic settings class. (#26) * Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful. Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets. But, that'll come in time as I update this class. * Add view debugger, logger, gamelist to settings and synchronize them. * Separate initializing actions from connects * Add invisible fullscreen cursor and double click event. * Add the UI log settings. * Add MemoryViewer (#30) * Add Memoryviewer Image Button crashes/not fully implemented focus on some button annoying minor changes for question dialogs * GuiSettings Refactoring (#31) * Add settings for columns shown and which one is saved * I accidentally refactored the settings class. Added ability to reset to default GUI. Added statefulness to column widths. * add gui tab * Fix logging at startup. * Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase. * Removed dock widget controls. * Added style sheets. Removed the option from the menu. * Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right? * It's remarkable how tricky this is. * Added convenience button to open up the settings folder in explorer * Add newlines at end of file * simplified logic. Fixed a bug.. hopefully not more bugs * Fix the undocumented feature * Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol * Make warning messagebox instead of changing the title of the dialog. * marking... * Hcorion suggested changes. * [WIP] autopause (#32) * autopause added needs fixing headers do not show text * fix compile stuff * Add MsgDialog + edge widgets (#33) * Add MsgDialog needs magic * add "Debugger" Buttons to menubar * Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller. But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation. * [Ready] Add KernelExplorer (#36) * KernelExplorer added * Fix build. Connect mainwindow to show explorer. * qstr formatting added hid header, fixed button size * Taskbar Progress for install PUP/PKG (#37) * Add Taskbar Progress for both PKG and PUP installer * fix missing ifdefs for windows * add mainwindow icon + thumbnail toolbar * add game specific icons to the GSFrame * fix icon crash * fix appIcon's aspect ratio in SetAppIconFromPath * Fix black borders in RGB32 icons * rename thumbar related buttons * EmuSettings (#35) * Core tab done minus doing the library list. * Graphics tab. * Audio tab * Input tab * Added the other tabs * LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega) * add search and add other libraries that aren't checked. * Finish adding lle selecting things. * marking my territory (#38) fixed settingsdialog glitch and width added groupbox to gui buttons removed parents from layouts * add debuggerframe + RSXDebugger (#34) * Add Debuggerframe * add RSXDebugger * add RSXDebugger fo real * RSXDebugger improved minor adjustments * add utf8 conversions like neko told me to hopefully i did not utf8-ise too many things xD * fix some variables * maybe fix image buffers in RSXDebugger * fixed image view (pretty sure) * fixed image buffer (hopefully) * QT Opengl frame (#41) * fix RSX Debugger headers (#40) * fix some debugger layout issues fix RSX Debugger headers + some comments * add kd-11's SPU options fix D3D12 showing on non-compatible systems tidy up coretab * improve D3D12 behaviour in graphicstab: adapter selection and D3D12 render won't show on non-compatible systems add monospace font to cgDisasm * enable update only on visibility * Rpcs3 qt llvm build (#42) * LLVM pushed so mega can test * probably is what is needed with Release LLVM * should probably have RPCS3-Qt be using release-llvm * include zlib the same way. * don't talk to me about how I made this happen. * I applied the magical treatment to debug mode too. Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant * hack * progress bar for LLVM spawns but doesn't close yet. * fix msgDialog (#43) fix oskDialog * Minor bug fixzz * fix osk and msgdialog for real (#44) * fix msgDialog fix oskDialog * fix OskDialog part 2 fix MsgDialog part 2 * This bug is evil, and it should be ashamed of itself. * Refactor YAML. Commented out gui options that aren't added to config yet (add em back later when we merge that in) * Fix pad stuff. * add SaveDataUtility (#45) * add SaveDataUtility * fix slots * fix slots again fix lists not showing stuff fix dialogs not showing add colClicked refactor stuff and polish some layouts * add SaveDataDialog.h and SaveDataDialog.cpp * tidy up mainwindow * add callback * fix RegisterEditor (#47) * fix RegisterEditor * fix other dialogs' immortality (gasp...vampires) * remove debug leftovers * fix InstructionEditor (#46) * fix InstructionEditor * fix typo * Fix MouseClickEvents in RSXDebugger (#50) * Fix MouseClickEvents in RSXDebugger Fix focus on MemoryViewer and RSXDebugger Adjust PadButtonWidth * fix another comment * fix debuggerframe events (#49) * Fix pad settings bro (#48) * Fix pad settings bro * fix comment * Icons and Menu-Additions (#39) * Add Icons and iconlogic to cornerWidget and actions * add cornerWidget toggle fix dockwidget action state on start remove DoSettings * fix game removal bug remove tableitem focus rectangle therefore add TableItemDelegate.h * remove grid and focus rectangle from autopausedialog * add fullscreen checkbox to misctab minor padsettings layout improvements * Add show category submenu to view menu Add gamelist filter accordingly fix minor bug where play icon was displayed despite pause label add boolean b_fullscreen to mainwindow for later use in GSFrame * fix headers in autopausesettings fix remove bug in autopausesettings add delete keypressevent in autopausesettings fix missing tr() and minor refactoring in gamelist * add default Icons for play/pause/stop/restart * Fix fullscreen start. Some stuff was wrong with settings, just trust me. * remove fullscreen leftovers and fix merge * SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build) * please neko's lambda fetishes (#53) * please neko's lambda fetish in mainwindow * please neko's lambda fetish in gamelistframe * please neko's lambda fetish in logframe * fix neko's lambda fetish in debuggerframe * pleasefixdofetishsomething in Autopausesettingsdialog * fix sth sth lambda in cg disasm * lambda stuff in instructioneditor * lambda kernelexplorer * lambda-ise memoryviewer * lambda rsxdebugger * lambda savedatautil this could be done even more, but the functions are not implemented * Rpcs3 qt fixes -- shadow taskbar bug (#52) * SShadow's bug of taskbar progress staying fixed on cancelling pkg install. * other taskbar * i'm still a baka * Fix a warning * qtQt refactoring (#54) * fix neko's snake fetish * File names should match headers. Are these the names I want? Not necessarily. But, this is much less confusing. * i thought I committed everything with stage all......................... * remove unused utilities * The most important commit of them all. * Disable legacy opengl buffers when not using opengl. * fix code review comment * Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab * Merge lovely things from master (#55) * Configuration simplified * untrivial parts of the merge * no need for these options anymore * Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever) * here ya go * FIx hitting okay in settings causing graphics to messup (#57) * fixes + msgdialog taskbarprogress (#56) * fix ok button in taskbar add taskicon progressbar for msgdialog add tablewidgetitem to rsxdebugger fix comments in save_data_utility.cpp * fix d3d adapter default * fix taskicon progressbar not being destroyed properly * add last_path to filedialogs * fix msgdialog crash on ok (#58) * fix thread stopping in debbugerFrame (#59) * Move Emu.init to be first. This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60) * Fix full screen opening on double RIGHT click. * fix other instances of double click ... * Fix locaiton of gui config. (#61) * fix d3d bug (#62) * fix d3d bug * small utf8 addition * Fix cmake for qt (#64) * Initial CMake fix * Fix compilation with GCC * Get rid of awful hack * Update cotire with qt support * Maybe fix travis * Emergency Hack Relief Program Activated * Fix travis build (#65) * make about dialog great again (#67) and add previous additions * Fix library sort / smart gamelist context menu (#63) * fix library sort * add Title to custom game config dialog * disable options on gamelist context menu * use namespace for category Strings * introduce sstr * fix some tr nonsense * Rpcs3qt Appveyor (#68) Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * possible fix for gamelist icons (#69) add warning for appicon * Fix clang build (#66) Hcorion, the build savior. * Rpcs3 qt resources (#70) * Resource files attempt 1 * Autorcc should probably be on? * forgot the most important file lol * Forgot an instance of the icon in the code... * Patch fix for clang build. * vulkan/d3d12 combobox merge (#71) * add vulkan adapterbox and merge with d3d12 box * fix adapter text on other renderer * gather render strings * attempt fix on gamelist row height * adjust adapter behaviour to new guideline * Compiler of Peace. * High critical hit rate. * Mugi eating strawberries is savage. * Apply KD-11 Hotfix (#73) * Most of Ani Adjusts (#72) * Most of the adjustments are made here. * fix gamelist rowheight * fix msg dialog layout and disable_cancel * cleanup * fix disable cancle again * fix debuggerframe buttons and doubleclick * Add a fun little bonus feature :) (#74) * category filters simplyfied (#75) * Cleaning up cmake a bit. * fixezzzzzz (#76) * upgrade Info Boxes * upgrade file explorer * refactor GetSettings and SetSettings * second refactoring * cleanup * travis is a grammar nazi * second travis shenanigans * third travis weirdo thingy * travis 4 mega fun * travis 5 default to def * finish refactoring for settings fix gamelist headers * hotfix msgdialog and infobox (#77) * msgdialog fix 1 * fix zombie infobox * Rpcs3 Qt Welcome Page (#78) * Add a welcome dialog. * Add enter to end of file * i'm an idiot * last mistake i hope * sponsored via --> funded by * RPCS3 does not condone piracy. * Mega Adjusts * Ani Adjustments and a few refactorings * Yay * Add Gamelist Icon Sizes (#79) * Reverting Mega's suggestion. If people can use alt-f4 to get around this dialog, they can probably use an emulator too. * Fix firmware file choice dialog in QT GUI (#80) * ani adjusts 2 + minor icon size simplifications (#81) FPS Additions * Update Travis to Qt 5.9 (#82)
2017-06-04 16:48:33 +02:00
GetCallbacks().on_stop();
2015-03-16 22:38:21 +01:00
2017-04-02 20:10:06 +02:00
#ifdef WITH_GDB_DEBUGGER
//fxm for some reason doesn't call on_stop
fxm::get<GDBDebugServer>()->on_stop();
fxm::remove<GDBDebugServer>();
#endif
2017-02-24 17:56:59 +01:00
auto e_stop = std::make_exception_ptr(cpu_flag::dbg_global_stop);
auto on_select = [&](u32, cpu_thread& cpu)
2015-03-16 22:38:21 +01:00
{
2017-02-05 14:35:10 +01:00
cpu.state += cpu_flag::dbg_global_stop;
// Can't normally be null.
// Hack for a possible vm deadlock on thread creation.
if (auto thread = cpu.get())
{
thread->set_exception(e_stop);
}
2017-02-05 14:35:10 +01:00
};
2015-07-06 21:35:34 +02:00
2017-02-05 14:35:10 +01:00
idm::select<ppu_thread>(on_select);
idm::select<RawSPUThread>(on_select);
idm::select<SPUThread>(on_select);
2015-03-16 22:38:21 +01:00
2015-07-21 22:14:04 +02:00
LOG_NOTICE(GENERAL, "All threads signaled...");
2015-01-18 00:01:08 +01:00
while (g_thread_count)
{
std::this_thread::sleep_for(10ms);
}
2015-07-03 18:07:36 +02:00
LOG_NOTICE(GENERAL, "All threads stopped...");
2015-01-18 00:01:08 +01:00
2017-02-06 19:36:46 +01:00
lv2_obj::cleanup();
idm::clear();
2015-08-06 15:05:33 +02:00
fxm::clear();
2015-08-06 15:05:33 +02:00
LOG_NOTICE(GENERAL, "Objects cleared...");
2015-07-12 13:52:55 +02:00
RSXIOMem.Clear();
2015-07-11 22:44:53 +02:00
vm::close();
if (do_exit)
{
2016-04-14 00:59:00 +02:00
GetCallbacks().exit();
}
else
{
Init();
}
2017-06-24 17:36:49 +02:00
#ifdef LLVM_AVAILABLE
extern void jit_finalize();
jit_finalize();
#endif
if (restart)
{
return Load();
}
// Boot arg cleanup (preserved in the case restarting)
argv.clear();
envp.clear();
data.clear();
2017-10-31 22:23:09 +01:00
disc.clear();
2017-10-31 22:36:25 +01:00
klic.clear();
m_force_boot = false;
}
2018-06-23 08:26:11 +02:00
std::string cfg_root::node_vfs::get(const cfg::string& _cfg, const char* _def) const
{
if (_cfg.get().empty())
{
return fs::get_config_dir() + _def;
}
return fmt::replace_all(_cfg.get(), "$(EmulatorDir)", emulator_dir.get().empty() ? fs::get_config_dir() : emulator_dir.get());
}
2017-08-08 21:13:48 +02:00
s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_info* sup2, u64 arg2)
{
static thread_local std::unordered_map<std::string, std::size_t> g_tls_error_stats;
static thread_local std::string g_tls_error_str;
2017-08-02 16:49:18 +02:00
if (g_tls_error_stats.empty())
2017-08-02 16:49:18 +02:00
{
thread_ctrl::atexit([]
{
for (auto&& pair : g_tls_error_stats)
2017-08-02 16:49:18 +02:00
{
if (pair.second > 3)
{
LOG_ERROR(GENERAL, "Stat: %s [x%u]", pair.first, pair.second);
}
}
});
}
2017-02-02 18:47:25 +01:00
logs::channel* channel = &logs::GENERAL;
logs::level level = logs::level::error;
const char* func = "Unknown function";
if (auto thread = get_current_cpu_thread())
{
2018-02-09 13:24:46 +01:00
if (thread->id_type() == 1)
{
2017-02-02 18:47:25 +01:00
auto& ppu = static_cast<ppu_thread&>(*thread);
if (ppu.last_function)
{
2017-02-02 18:47:25 +01:00
func = ppu.last_function;
}
}
}
2017-08-02 16:49:18 +02:00
// Format log message (use preallocated buffer)
g_tls_error_str.clear();
fmt::append(g_tls_error_str, "'%s' failed with 0x%08x%s%s%s%s", func, arg, sup ? " : " : "", std::make_pair(sup, arg), sup2 ? ", " : "", std::make_pair(sup2, arg2));
2017-08-02 16:49:18 +02:00
// Update stats and check log threshold
const auto stat = ++g_tls_error_stats[g_tls_error_str];
2017-08-02 16:49:18 +02:00
if (stat <= 3)
{
channel->format(level, "%s [%u]", g_tls_error_str, stat);
2017-08-02 16:49:18 +02:00
}
return static_cast<s32>(arg);
}
Emulator Emu;