From 79a6a2c7fbe59a94efa79c5f3177deec45dab58a Mon Sep 17 00:00:00 2001 From: eladash Date: Wed, 21 Nov 2018 13:55:12 +0200 Subject: [PATCH] Debug console emulation --- rpcs3/Emu/Cell/PPUModule.cpp | 6 ++++++ rpcs3/Emu/Cell/lv2/sys_tty.cpp | 4 +++- rpcs3/Emu/System.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index 80553ce5fc..4982a2c3f1 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -1526,6 +1526,12 @@ void ppu_load_exec(const ppu_exec_object& elf) mem_size = 0xC800000; } + if (g_cfg.core.debug_console_mode) + { + // TODO: Check for all sdk versions + mem_size += 0xC000000; + } + fxm::make_always(mem_size); ppu->cmd_push({ppu_cmd::initialize, 0}); diff --git a/rpcs3/Emu/Cell/lv2/sys_tty.cpp b/rpcs3/Emu/Cell/lv2/sys_tty.cpp index 16f36e2669..c82cb6aed6 100644 --- a/rpcs3/Emu/Cell/lv2/sys_tty.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_tty.cpp @@ -1,4 +1,6 @@ #include "stdafx.h" +#include "Emu/System.h" + #include "sys_tty.h" #include @@ -15,7 +17,7 @@ error_code sys_tty_read(s32 ch, vm::ptr buf, u32 len, vm::ptr preadle { sys_tty.trace("sys_tty_read(ch=%d, buf=*0x%x, len=%d, preadlen=*0x%x)", ch, buf, len, preadlen); - if (false) // TODO: debug mode check + if (!g_cfg.core.debug_console_mode) { return CELL_EIO; } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 7d507fa43f..793f237b8f 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -380,6 +380,7 @@ struct cfg_root : cfg::node cfg::_bool spu_accurate_xfloat{this, "Accurate xfloat", false}; cfg::_bool spu_approx_xfloat{this, "Approximate xfloat", true}; + cfg::_bool debug_console_mode{this, "Debug Console Mode", false}; // Debug console emulation, not recommended cfg::_enum lib_loading{this, "Lib Loader", lib_loading_type::liblv2only}; cfg::_bool hook_functions{this, "Hook static functions"}; cfg::set_entry load_libraries{this, "Load libraries"};