mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #4784 from leoetlino/mios
IOS: Implement MIOS functionality
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user