From c84e5489f2ec95d8e46af893c5a7005db8bb4b5a Mon Sep 17 00:00:00 2001 From: Eladash Date: Tue, 20 Jul 2021 01:36:32 +0300 Subject: [PATCH] vsh.self: Fix execution on default settings (#10586) --- rpcs3/Emu/Cell/PPUModule.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index 9c005d097c..142d3b1b05 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -1763,7 +1763,12 @@ bool ppu_load_exec(const ppu_exec_object& elf) // Initialize memory stats (according to sdk version) u32 mem_size; - if (sdk_version > 0x0021FFFF) + if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv) + { + // Because vsh.self comes before any generic application, more memory is available to it + mem_size = 0xF000000; + } + else if (sdk_version > 0x0021FFFF) { mem_size = 0xD500000; } @@ -1794,13 +1799,6 @@ bool ppu_load_exec(const ppu_exec_object& elf) mem_size += 0xC000000; } - if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv) - { - // Because vsh.self comes before any generic application, more memory is available to it - // This is an estimation though (TODO) - mem_size += 0x800000; - } - g_fxo->init(mem_size)->used += primary_stacksize; ppu->cmd_push({ppu_cmd::initialize, 0});