コード例 #1
0
ファイル: DiscExtractor.cpp プロジェクト: booto/dolphin
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);
}
コード例 #2
0
ファイル: FileSystemGCWii.cpp プロジェクト: Chemlo/dolphin
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;
}
コード例 #3
0
ファイル: FileSystemGCWii.cpp プロジェクト: Chemlo/dolphin
u32 CFileSystemGCWii::GetBootDOLSize() const
{
	return GetBootDOLSize((u64)m_rVolume->Read32(0x420, m_Wii) << GetOffsetShift());
}