Add media type and detection of PlayStation 5 Ultra HD Blu-ray game discs.

This commit is contained in:
2021-02-10 17:11:47 +00:00
parent bdf8169aa3
commit 753a40465e
9 changed files with 36 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Aaru" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/netcoreapp3.1/aaru.dll" />
<option name="PROGRAM_PARAMETERS" value="dev list" />
<option name="PROGRAM_PARAMETERS" value="media info /dev/sr0" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Aaru/bin/Debug/netcoreapp3.1" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />

View File

@@ -758,6 +758,7 @@ namespace Aaru.Core.Devices.Report
case "Ultra HD Blu-ray movie":
case "PlayStation 3 game":
case "PlayStation 4 game":
case "PlayStation 5 game":
case "Xbox One game":
case "Nintendo Wii U game":
AaruConsole.WriteLine("Querying BD BCA...");
@@ -916,6 +917,7 @@ namespace Aaru.Core.Devices.Report
mediaType == "Ultra HD Blu-ray movie" ||
mediaType == "PlayStation 3 game" ||
mediaType == "PlayStation 4 game" ||
mediaType == "PlayStation 5 game" ||
mediaType == "Xbox One game" ||
mediaType == "Nintendo Wii game")
{

View File

@@ -71,6 +71,11 @@ namespace Aaru.Core.Media.Detection
0x50, 0x6C, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x34, 0x00, 0x00, 0x00, 0x00
};
static readonly byte[] _ps5Id =
{
0x50, 0x6C, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x35, 0x00, 0x00, 0x00, 0x00
};
static readonly byte[] _operaId =
{
0x01, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x01
@@ -2322,6 +2327,22 @@ namespace Aaru.Core.Media.Detection
// TODO: PS5
case "BDU":
if(sector1 != null)
{
byte[] tmp = new byte[_ps5Id.Length];
Array.Copy(sector1, 1024, tmp, 0, tmp.Length);
if(tmp.SequenceEqual(_ps5Id))
{
mediaType = MediaType.PS5BD;
AaruConsole.DebugWriteLine("Media detection",
"Found Sony PlayStation 5 boot sectors, setting disc type to PS5 Ultra HD Blu-ray.");
break;
}
}
AaruConsole.DebugWriteLine("Media detection",
"Blu-ray type set to \"BDU\", setting disc type to Ultra HD Blu-ray.");

View File

@@ -207,6 +207,7 @@ namespace Aaru.DiscImages
case MediaType.PS3DVD:
case MediaType.PS3BD:
case MediaType.PS4BD:
case MediaType.PS5BD:
case MediaType.UMD:
case MediaType.XGD:
case MediaType.XGD2:

View File

@@ -153,11 +153,12 @@ namespace Aaru.DiscImages
MediaType.DVDRWDL, MediaType.EVD, MediaType.FDDVD, MediaType.DTSCD, MediaType.FVD, MediaType.HDDVDR,
MediaType.HDDVDRAM, MediaType.HDDVDRDL, MediaType.HDDVDROM, MediaType.HDDVDRW, MediaType.HDDVDRWDL,
MediaType.HDVMD, MediaType.HVD, MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD,
MediaType.PS2DVD, MediaType.PS3BD, MediaType.PS3DVD, MediaType.PS4BD, MediaType.SuperCDROM2, MediaType.SVCD,
MediaType.SVOD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO, MediaType.UDO2, MediaType.UDO2_WORM,
MediaType.UMD, MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV,
MediaType.CD32, MediaType.Nuon, MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD,
MediaType.VideoNow, MediaType.VideoNowColor, MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
MediaType.PS2DVD, MediaType.PS3BD, MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD,
MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO,
MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD, MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD,
MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon, MediaType.Playdia, MediaType.Pippin,
MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow, MediaType.VideoNowColor, MediaType.VideoNowXp,
MediaType.CVD, MediaType.PCD
};
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]

View File

@@ -181,6 +181,7 @@ namespace Aaru.DiscImages
case MediaType.CBHD:
case MediaType.PS3BD:
case MediaType.PS4BD:
case MediaType.PS5BD:
case MediaType.UDO:
case MediaType.UDO2:
case MediaType.UDO2_WORM: return CDRWIN_DISK_TYPE_BD;

View File

@@ -207,7 +207,7 @@ namespace Aaru.DiscImages
MediaType.DTSCD, MediaType.FVD, MediaType.HDDVDR, MediaType.HDDVDRAM, MediaType.HDDVDRDL,
MediaType.HDDVDROM, MediaType.HDDVDRW, MediaType.HDDVDRWDL, MediaType.HDVMD, MediaType.HVD,
MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD, MediaType.PS2DVD, MediaType.PS3BD,
MediaType.PS3DVD, MediaType.PS4BD, MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD,
MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD, MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD,
MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO, MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD,
MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32,
MediaType.Nuon, MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow,

View File

@@ -607,6 +607,7 @@ namespace Aaru.Commands.Device
mediaTypes.Add("Ultra HD Blu-ray movie");
mediaTypes.Add("PlayStation 3 game");
mediaTypes.Add("PlayStation 4 game");
mediaTypes.Add("PlayStation 5 game");
mediaTypes.Add("Xbox One game");
mediaTypes.Add("Nintendo Wii U game");
@@ -682,6 +683,7 @@ namespace Aaru.Commands.Device
mediaTypes.Add("Ultra HD Blu-ray movie");
mediaTypes.Add("PlayStation 3 game");
mediaTypes.Add("PlayStation 4 game");
mediaTypes.Add("PlayStation 5 game");
mediaTypes.Add("Xbox One game");
mediaTypes.Add("Nintendo Wii U game");
}