bool ExportDOL(const Volume& volume, const Partition& partition, const std::string& export_filename) { if (!IsDisc(volume.GetVolumeType())) return false; const std::optional<u64> dol_offset = GetBootDOLOffset(volume, partition); if (!dol_offset) return false; const std::optional<u32> dol_size = GetBootDOLSize(volume, partition, *dol_offset); if (!dol_size) return false; return ExportData(volume, partition, *dol_offset, *dol_size, export_filename); }
bool CFileSystemGCWii::ExportDOL(const std::string& _rExportFolder) const { u32 DolOffset = m_rVolume->Read32(0x420, m_Wii) << GetOffsetShift(); u32 DolSize = GetBootDOLSize(); std::vector<u8> buffer(DolSize); if (m_rVolume->Read(DolOffset, DolSize, &buffer[0], m_Wii)) { std::string exportName(_rExportFolder + "/boot.dol"); File::IOFile DolFile(exportName, "wb"); if (DolFile) { DolFile.WriteBytes(&buffer[0], DolSize); return true; } } return false; }
u32 CFileSystemGCWii::GetBootDOLSize() const { return GetBootDOLSize((u64)m_rVolume->Read32(0x420, m_Wii) << GetOffsetShift()); }