[runtime] pckernel implementation (#1032)

* toggle for ripping level models

* Create pckernel.gc

* builds and works

* fix defs

* resolution info works

* native letterboxing

* menu

* Fullscreen buttons

* Update glfw

* fix fullscreen taking over everything for some reason

* fix screenshots and add more menu options

* Cleanup DMA mess in load boundary render code (first try!!)

* Update default-menu.gc

* clang

* fix accidental macros in pairs

* refs

* fix null reference bugs

* add lavatube

* custom aspect ratios work (3D only)

* custom aspect ratios work (3D only)

* fix aspect ratio and non-4x3 debug text

* change `sceOpen`

* deadzone setting

* merge fixes

* check out `debug-pad-display`

* update readme imgs

* settings save works

* oops

* settings read/load (incomplete)

* add `:stop` to debugger and fix detach on Windows

* settings load works

* fullscreen and aspect ratio setting fixes

* swap menu options for convenience

* settings loads automatically properly

* fix panic and font hack edge case

* add rolling, ogre, snow, swamp, sunken b, jungle b

* Fixed borderless on windows please work

* Update fake_iso.txt

* remove error from opengl debug filter

* update refs

* minor tfrag tod palette lookup change

* accidentally nuked all opengl errors
This commit is contained in:
ManDude
2021-12-30 23:48:37 +00:00
committed by GitHub
parent 72fe06826f
commit 9ff71412e5
90 changed files with 3840 additions and 2447 deletions
+27 -3
View File
@@ -55,18 +55,35 @@ bool Debugger::is_attached() const {
* Will silently do nothing if we aren't attached, so it is safe to just call detach() to try to
* clean up when exiting.
*/
void Debugger::detach() {
bool Debugger::detach() {
bool succ = true;
if (is_valid() && m_attached) {
#ifdef __linux__
if (!is_halted()) {
do_break();
succ = do_break();
}
stop_watcher();
xdbg::close_memory(m_debug_context.tid, &m_memory_handle);
xdbg::detach_and_resume(m_debug_context.tid);
m_context_valid = false;
#elif _WIN32
if (is_halted()) {
succ = do_continue();
}
{
std::unique_lock<std::mutex> lk(m_watcher_mutex);
m_attach_return = false;
stop_watcher();
m_attach_cv.wait(lk, [&]() { return m_attach_return; });
}
xdbg::close_memory(m_debug_context.tid, &m_memory_handle);
#endif
// m_context_valid = false;
m_attached = false;
} else {
succ = false;
}
// todo, should we print something if we can't detach?
return succ;
}
/*!
@@ -751,6 +768,13 @@ void Debugger::watcher() {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
}
// watcher will now detach from target.
// again, windows needs the debugger thread to remain consistent
#ifdef _WIN32
m_attach_response = xdbg::detach_and_resume(m_debug_context.tid);
m_attach_return = true;
#endif
}
void Debugger::handle_disappearance() {