PPU Decoder Cache improved

This commit is contained in:
Nekotekina 2015-08-10 22:39:52 +03:00
parent eb63558c6d
commit be9a599beb
13 changed files with 118 additions and 467 deletions

View file

@ -4,6 +4,7 @@
#include "Emu/FS/vfsFile.h"
#include "Emu/FS/vfsDir.h"
#include "Emu/Memory/Memory.h"
#include "Emu/IdManager.h"
#include "Emu/System.h"
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/Modules.h"
@ -15,9 +16,6 @@
using namespace PPU_instr;
extern void initialize_ppu_exec_map();
extern void fill_ppu_exec_map(u32 addr, u32 size);
namespace loader
{
namespace handlers
@ -549,21 +547,22 @@ namespace loader
// branch to initialization
make_branch(entry, m_ehdr.e_entry);
const auto decoder_cache = fxm::make<ppu_decoder_cache_t>();
for (u32 page = 0; page < 0x20000000; page += 4096)
{
// TODO: scan only executable areas
if (vm::check_addr(page, 4096))
{
decoder_cache->initialize(page, 4096);
}
}
ppu_thread main_thread(OPD.addr(), "main_thread");
main_thread.args({ Emu.GetPath()/*, "-emu"*/ }).run();
main_thread.gpr(11, OPD.addr()).gpr(12, Emu.GetMallocPageSize());
initialize_ppu_exec_map();
for (u32 page = 0; page < 0x20000000; page += 4096)
{
if (vm::check_addr(page, 4096))
{
fill_ppu_exec_map(page, 4096);
}
}
return ok;
}