mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 18:16:24 +00:00
Add support for dummping XGD1/2/3 with OmniDrive units.
This commit is contained in:
@@ -51,7 +51,6 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Devices\"/>
|
||||
<Folder Include="Devices\Scanning\"/>
|
||||
<Folder Include="Devices\Dumping\"/>
|
||||
<Folder Include="Devices\Report\"/>
|
||||
<Folder Include="Sidecar\"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=devices_005Cdumping_005Clinearmemory/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=devices_005Cdumping_005Cplaystationportable/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=devices_005Cdumping_005Csbc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=devices_005Cdumping_005Cxgd/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=image_005Cmerge/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=sidecar/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -484,7 +484,7 @@ partial class Dump
|
||||
|
||||
sense = _dev.ScsiInquiry(out byte[] inqBuf, out _);
|
||||
|
||||
if(sense || Inquiry.Decode(inqBuf)?.KreonPresent != true)
|
||||
if((sense || Inquiry.Decode(inqBuf)?.KreonPresent != true) && !_omnidrive)
|
||||
{
|
||||
StoppingErrorMessage?.Invoke(Localization.Core
|
||||
.Dumping_Xbox_Game_Discs_requires_a_drive_with_Kreon_firmware);
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : XGD.cs
|
||||
// Filename : Kreon.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Core algorithms.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Dumps Xbox Game Discs.
|
||||
// Dumps Xbox Game Discs using drives with the Kreon firmware.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
@@ -66,7 +66,7 @@ partial class Dump
|
||||
/// <summary>Dumps an Xbox Game Disc using a Kreon drive</summary>
|
||||
/// <param name="mediaTags">Media tags as retrieved in MMC layer</param>
|
||||
/// <param name="dskType">Disc type as detected in MMC layer</param>
|
||||
void Xgd(Dictionary<MediaTagType, byte[]> mediaTags, MediaType dskType)
|
||||
void DumpXgdKreon(Dictionary<MediaTagType, byte[]> mediaTags, MediaType dskType)
|
||||
{
|
||||
bool sense;
|
||||
const uint blockSize = 2048;
|
||||
@@ -1105,8 +1105,9 @@ partial class Dump
|
||||
List<ulong> tmpList = [];
|
||||
|
||||
foreach(ulong ur in _resume.BadBlocks)
|
||||
for(ulong i = ur; i < ur + blocksToRead; i++)
|
||||
tmpList.Add(i);
|
||||
{
|
||||
for(ulong i = ur; i < ur + blocksToRead; i++) tmpList.Add(i);
|
||||
}
|
||||
|
||||
tmpList.Sort();
|
||||
|
||||
1254
Aaru.Core/Devices/Dumping/Xgd/OmniDrive.cs
Normal file
1254
Aaru.Core/Devices/Dumping/Xgd/OmniDrive.cs
Normal file
File diff suppressed because it is too large
Load Diff
48
Aaru.Core/Devices/Dumping/Xgd/Xgd.cs
Normal file
48
Aaru.Core/Devices/Dumping/Xgd/Xgd.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
// /***************************************************************************
|
||||
// Aaru Data Preservation Suite
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Xgd.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Core algorithms.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Dumps Xbox Game Discs.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2026 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
|
||||
namespace Aaru.Core.Devices.Dumping;
|
||||
|
||||
partial class Dump
|
||||
{
|
||||
void Xgd(Dictionary<MediaTagType, byte[]> mediaTags, MediaType dskType)
|
||||
{
|
||||
if(_omnidrive)
|
||||
DumpXgdOmniDrive(mediaTags, dskType);
|
||||
else
|
||||
DumpXgdKreon(mediaTags, dskType);
|
||||
}
|
||||
}
|
||||
@@ -106,9 +106,8 @@ public partial class Device
|
||||
if(reserved5.Length < omnidrive.Length) return false;
|
||||
|
||||
for(var i = 0; i < omnidrive.Length; i++)
|
||||
{
|
||||
if(reserved5[i] != omnidrive[i]) return false;
|
||||
}
|
||||
if(reserved5[i] != omnidrive[i])
|
||||
return false;
|
||||
|
||||
major = reserved5[9];
|
||||
minor = reserved5[10];
|
||||
@@ -127,9 +126,9 @@ public partial class Device
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="fua">Set to <c>true</c> if the command should use FUA.</param>
|
||||
/// <param name="descramble">Set to <c>true</c> if the data should be descrambled by the device.</param>
|
||||
public bool OmniDriveReadRawDvd(out byte[] buffer, out ReadOnlySpan<byte> senseBuffer, uint lba,
|
||||
uint transferLength, uint timeout, out double duration, bool fua = false,
|
||||
bool descramble = true)
|
||||
public bool OmniDriveReadRawDvd(out byte[] buffer, out ReadOnlySpan<byte> senseBuffer, uint lba,
|
||||
uint transferLength, uint timeout, out double duration, bool fua = false,
|
||||
bool descramble = true, bool rawAddresing = false)
|
||||
{
|
||||
senseBuffer = SenseBuffer;
|
||||
Span<byte> cdb = CdbBuffer[..12];
|
||||
@@ -138,7 +137,7 @@ public partial class Device
|
||||
FillOmniDriveReadDvdCdb(cdb,
|
||||
lba,
|
||||
transferLength,
|
||||
EncodeOmniDriveReadCdb1(OmniDriveDiscType.DVD, false, fua, descramble));
|
||||
EncodeOmniDriveReadCdb1(OmniDriveDiscType.DVD, rawAddresing, fua, descramble));
|
||||
|
||||
LastError = SendScsiCommand(cdb, ref buffer, timeout, ScsiDirection.In, out duration, out bool sense);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user