Merge pull request #4784 from leoetlino/mios

IOS: Implement MIOS functionality
This commit is contained in:
Pierre Bourdon
2017-02-09 01:57:16 +01:00
committed by GitHub
37 changed files with 496 additions and 181 deletions

View File

@ -103,7 +103,7 @@ const char* ElfReader::GetSectionName(int section) const
}
// This is just a simple elf loader, good enough to load elfs generated by devkitPPC
bool ElfReader::LoadIntoMemory()
bool ElfReader::LoadIntoMemory(bool only_in_mem1)
{
INFO_LOG(MASTER_LOG, "String section: %i", header->e_shstrndx);
@ -133,6 +133,9 @@ bool ElfReader::LoadIntoMemory()
u32 srcSize = p->p_filesz;
u32 dstSize = p->p_memsz;
if (only_in_mem1 && p->p_vaddr >= Memory::REALRAM_SIZE)
continue;
Memory::CopyToEmu(writeAddr, src, srcSize);
if (srcSize < dstSize)
Memory::Memset(writeAddr + srcSize, 0, dstSize - srcSize); // zero out bss