Skip to content

Commit

Permalink
vsh.self: Fix execution on default settings (RPCS3#10586)
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 authored Jul 19, 2021
1 parent aa08df0 commit c84e548
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions rpcs3/Emu/Cell/PPUModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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<lv2_memory_container>(mem_size)->used += primary_stacksize;

ppu->cmd_push({ppu_cmd::initialize, 0});
Expand Down

0 comments on commit c84e548

Please sign in to comment.