diff --git a/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor b/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor new file mode 100644 index 00000000..0eddf369 --- /dev/null +++ b/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor @@ -0,0 +1,1128 @@ +@using Aaru.Decoders.SCSI +@attribute [Authorize] +@layout AdminLayout + +@inject Microsoft.EntityFrameworkCore.IDbContextFactory DbContextFactory + +GD-ROM swap-trick capabilities report + +@if(!_initialized) +{ +
+

Loading...

+
+ + return; +} + +
+

GD-ROM swap-trick capabilities report

+
+@if(_model?.TestCrashed == true) +{ +

Computer crashed while testing.

+} +else if(_model?.RecognizedSwapDisc == true) +{ +

Swap disc Lead-Out starts at @($"{_model?.SwapDiscLeadOutPMIN:X2}"):@($"{_model?.SwapDiscLeadOutPSEC:X2}"):@($"{_model?.SwapDiscLeadOutPFRAM:X2}") (@($"{_model?.SwapDiscLeadOutStart}") sectors).

+
+
+
Minimum readable sector in HD area:
+
@_model?.MinimumReadableSectorInHdArea
+
Maximum readable sector in HD area:
+
@_model?.MaximumReadableSectorInHdArea
+ @if(_model?.MaximumReadablePqInHdArea != null) + { +
Contents of last readable sector in HD area (with PQ):
+
+ @_model?.MaximumReadablePqInHdArea.Length bytes +
+ } + @if(_model?.MaximumReadableRwInHdArea != null) + { +
Contents of last readable sector in HD area (with RW):
+
+ @_model?.MaximumReadableRwInHdArea.Length bytes +
+ } +
+ + + + + + + + + + + + @if(_model?.Lba0Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba0ScrambledReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba44990AudioRwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba45000AudioRwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba50000AudioRwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba100000AudioRwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba400000AudioRwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000Readable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000PqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000RwReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000AudioReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000AudioPqReadable == true) + { + + } + else + { + + } + + + + + + + @if(_model?.Lba450000AudioRwReadable == true) + { + + } + else + { + + } + + + +
LBARead modeStatusDataSense
0Data + ✔️ + + ❌️ + + @if(_model?.Lba0Data != null) + { + @_model?.Lba0Data.Length bytes + } + + @if(_model?.Lba0DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
0Audio (scrambled) + ✔️ + + ❌️ + + @if(_model?.Lba0ScrambledData != null) + { + @_model?.Lba0ScrambledData.Length bytes + } + + @if(_model?.Lba0ScrambledDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Data + ✔️ + + ❌️ + + @if(_model?.Lba44990Data != null) + { + @_model?.Lba44990Data.Length bytes + } + + @if(_model?.Lba44990DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba44990PqData != null) + { + @_model?.Lba44990PqData.Length bytes + } + + @if(_model?.Lba44990PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba44990RwData != null) + { + @_model?.Lba44990RwData.Length bytes + } + + @if(_model?.Lba44990RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Audio + ✔️ + + ❌️ + + @if(_model?.Lba44990AudioData != null) + { + @_model?.Lba44990AudioData.Length bytes + } + + @if(_model?.Lba44990AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba44990AudioRwData != null) + { + @_model?.Lba44990AudioRwData.Length bytes + } + + @if(_model?.Lba44990AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
44990Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba44990AudioRwData != null) + { + @_model?.Lba44990AudioRwData.Length bytes + } + + @if(_model?.Lba44990AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Data + ✔️ + + ❌️ + + @if(_model?.Lba45000Data != null) + { + @_model?.Lba45000Data.Length bytes + } + + @if(_model?.Lba45000DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba45000PqData != null) + { + @_model?.Lba45000PqData.Length bytes + } + + @if(_model?.Lba45000PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba45000RwData != null) + { + @_model?.Lba45000RwData.Length bytes + } + + @if(_model?.Lba45000RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Audio + ✔️ + + ❌️ + + @if(_model?.Lba45000AudioData != null) + { + @_model?.Lba45000AudioData.Length bytes + } + + @if(_model?.Lba45000AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba45000AudioRwData != null) + { + @_model?.Lba45000AudioRwData.Length bytes + } + + @if(_model?.Lba45000AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
45000Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba45000AudioRwData != null) + { + @_model?.Lba45000AudioRwData.Length bytes + } + + @if(_model?.Lba45000AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Data + ✔️ + + ❌️ + + @if(_model?.Lba50000Data != null) + { + @_model?.Lba50000Data.Length bytes + } + + @if(_model?.Lba50000DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba50000PqData != null) + { + @_model?.Lba50000PqData.Length bytes + } + + @if(_model?.Lba50000PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba50000RwData != null) + { + @_model?.Lba50000RwData.Length bytes + } + + @if(_model?.Lba50000RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Audio + ✔️ + + ❌️ + + @if(_model?.Lba50000AudioData != null) + { + @_model?.Lba50000AudioData.Length bytes + } + + @if(_model?.Lba50000AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba50000AudioRwData != null) + { + @_model?.Lba50000AudioRwData.Length bytes + } + + @if(_model?.Lba50000AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
50000Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba50000AudioRwData != null) + { + @_model?.Lba50000AudioRwData.Length bytes + } + + @if(_model?.Lba50000AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Data + ✔️ + + ❌️ + + @if(_model?.Lba100000Data != null) + { + @_model?.Lba100000Data.Length bytes + } + + @if(_model?.Lba100000DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba100000PqData != null) + { + @_model?.Lba100000PqData.Length bytes + } + + @if(_model?.Lba100000PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba100000RwData != null) + { + @_model?.Lba100000RwData.Length bytes + } + + @if(_model?.Lba100000RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Audio + ✔️ + + ❌️ + + @if(_model?.Lba100000AudioData != null) + { + @_model?.Lba100000AudioData.Length bytes + } + + @if(_model?.Lba100000AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba100000AudioRwData != null) + { + @_model?.Lba100000AudioRwData.Length bytes + } + + @if(_model?.Lba100000AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
100000Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba100000AudioRwData != null) + { + @_model?.Lba100000AudioRwData.Length bytes + } + + @if(_model?.Lba100000AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Data + ✔️ + + ❌️ + + @if(_model?.Lba400000Data != null) + { + @_model?.Lba400000Data.Length bytes + } + + @if(_model?.Lba400000DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba400000PqData != null) + { + @_model?.Lba400000PqData.Length bytes + } + + @if(_model?.Lba400000PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba400000RwData != null) + { + @_model?.Lba400000RwData.Length bytes + } + + @if(_model?.Lba400000RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Audio + ✔️ + + ❌️ + + @if(_model?.Lba400000AudioData != null) + { + @_model?.Lba400000AudioData.Length bytes + } + + @if(_model?.Lba400000AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba400000AudioRwData != null) + { + @_model?.Lba400000AudioRwData.Length bytes + } + + @if(_model?.Lba400000AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
400000Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba400000AudioRwData != null) + { + @_model?.Lba400000AudioRwData.Length bytes + } + + @if(_model?.Lba400000AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Data + ✔️ + + ❌️ + + @if(_model?.Lba450000Data != null) + { + @_model?.Lba450000Data.Length bytes + } + + @if(_model?.Lba450000DecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Data (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba450000PqData != null) + { + @_model?.Lba450000PqData.Length bytes + } + + @if(_model?.Lba450000PqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Data (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba450000RwData != null) + { + @_model?.Lba450000RwData.Length bytes + } + + @if(_model?.Lba450000RwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Audio + ✔️ + + ❌️ + + @if(_model?.Lba450000AudioData != null) + { + @_model?.Lba450000AudioData.Length bytes + } + + @if(_model?.Lba450000AudioDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Audio (with PQ) + ✔️ + + ❌️ + + @if(_model?.Lba450000AudioRwData != null) + { + @_model?.Lba450000AudioRwData.Length bytes + } + + @if(_model?.Lba450000AudioPqDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
450000Audio (with RW) + ✔️ + + ❌️ + + @if(_model?.Lba450000AudioRwData != null) + { + @_model?.Lba450000AudioRwData.Length bytes + } + + @if(_model?.Lba450000AudioRwDecodedSense != null) + { + @((MarkupString)Sense.PrettifySense(_model?.Lba0Sense).Replace("\n", "
")) + } +
+} +else +{ +

Swap disc not recognized, or firmware reset after tray opened.

+} + +
\ No newline at end of file diff --git a/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor.cs b/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor.cs new file mode 100644 index 00000000..fee97afd --- /dev/null +++ b/Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor.cs @@ -0,0 +1,26 @@ +using Aaru.CommonTypes.Metadata; +using Microsoft.AspNetCore.Components; +using Microsoft.EntityFrameworkCore; +using DbContext = Aaru.Server.Database.DbContext; + +namespace Aaru.Server.Components.Admin.Pages.Gdrom; + +public partial class Details +{ + bool _initialized; + GdRomSwapDiscCapabilities? _model; + [Parameter] + public int Id { get; set; } + + /// + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + + StateHasChanged(); + + await using DbContext ctx = await DbContextFactory.CreateDbContextAsync(); + + _model = await ctx.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == Id); + } +} \ No newline at end of file