Merge pull request #4784 from leoetlino/mios
IOS: Implement MIOS functionality
This commit is contained in:
commit
17e4b450fb
37 files changed
+496
-181
No files matched your search
@@ -37,6 +37,7 @@ public:
|
||||
// Returns true if a map file exists, false if none could be found.
|
||||
static bool FindMapFile(std::string* existing_map_file, std::string* writable_map_file,
|
||||
std::string* title_id = nullptr);
|
||||
static bool LoadMapFromFilename();
|
||||
|
||||
private:
|
||||
static bool DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt);
|
||||
@@ -44,7 +45,6 @@ private:
|
||||
|
||||
static void UpdateDebugger_MapLoaded();
|
||||
|
||||
static bool LoadMapFromFilename();
|
||||
static bool Boot_ELF(const std::string& filename);
|
||||
static bool Boot_WiiWAD(const std::string& filename);
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ bool CBoot::SetupWiiMemory(u64 ios_title_id)
|
||||
Memory::Write_U16(0x8201, 0x000030e6); // Dev console / debug capable
|
||||
Memory::Write_U32(0x00000000, 0x000030f0); // Apploader
|
||||
|
||||
if (!IOS::HLE::SetupMemory(ios_title_id))
|
||||
if (!IOS::HLE::Reload(ios_title_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
ElfMachine GetMachine() const { return (ElfMachine)(header->e_machine); }
|
||||
u32 GetEntryPoint() const { return entryPoint; }
|
||||
u32 GetFlags() const { return (u32)(header->e_flags); }
|
||||
bool LoadIntoMemory();
|
||||
bool LoadIntoMemory(bool only_in_mem1 = false);
|
||||
bool LoadSymbols();
|
||||
|
||||
int GetNumSegments() const { return (int)(header->e_phnum); }
|
||||
|
||||
Reference in new issue
Block a user