2020-07-23 04:09:59 +01:00
|
|
|
|
// /***************************************************************************
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Aaru Data Preservation Suite
|
2020-07-23 04:09:59 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2020-07-23 04:14:36 +01:00
|
|
|
|
// Filename : BlindWrite5.cs
|
2020-07-23 04:09:59 +01:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
2020-07-25 02:01:36 +01:00
|
|
|
|
// Component : Aaru unit testing.
|
2020-07-23 04:09:59 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ 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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-07-25 01:58:50 +01:00
|
|
|
|
// Copyright © 2011-2020 Natalia Portillo
|
2020-07-23 04:09:59 +01:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using Aaru.Checksums;
|
|
|
|
|
|
using Aaru.CommonTypes;
|
|
|
|
|
|
using Aaru.CommonTypes.Enums;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
|
|
|
|
|
using Aaru.CommonTypes.Structs;
|
|
|
|
|
|
using Aaru.Filters;
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Aaru.Tests.Images
|
|
|
|
|
|
{
|
|
|
|
|
|
[TestFixture]
|
|
|
|
|
|
public class BlindWrite5
|
|
|
|
|
|
{
|
|
|
|
|
|
readonly string[] _testFiles =
|
|
|
|
|
|
{
|
|
|
|
|
|
"audiocd_cdtext.B5T", "cdg.B5T", "cdplus.B5T", "cdr.B5T", "cdrom80mm.B5T", "cdrom.B5T", "cdrw.B5T",
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
//"dvdrom.B5T",
|
|
|
|
|
|
"cdi.B5T", "gdrom.B5T", "jaguarcd.B5T", "mixed.B5T", "multitrack.B5T", "pcengine.B5T", "pcfx.B5T",
|
|
|
|
|
|
"videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly ulong[] _sectors =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
222187,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
309546,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
303316,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
97765,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
19042,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
502,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
355500,
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//2287072,
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
309834,
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
6400,
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
243587,
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
283397,
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
328360,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
|
|
|
|
|
160956,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
|
|
|
|
|
246680,
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
|
|
|
|
|
205072
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly MediaType[] _mediaTypes =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
MediaType.CDDA,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
MediaType.CDDA,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
MediaType.CDPLUS,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
MediaType.CDR,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
MediaType.CDROM,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
MediaType.CDROM,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
MediaType.CDRW,
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//MediaType.DVDROM,
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
MediaType.CDROMXA,
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
MediaType.CDROMXA,
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
MediaType.CDDA,
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
MediaType.CDROMXA,
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
MediaType.CDROM,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
|
|
|
|
|
MediaType.CD,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
|
|
|
|
|
MediaType.CD,
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
|
|
|
|
|
MediaType.CDROMXA
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly string[] _md5S =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
"1a4f916dff70030e26fe0454729d0e79",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
"d61ace888212ea274071e4c454dfaf5c",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
"22c1dc74889d87ffb80e0a4d03cac230",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
"d5c765d46834abc33a1f303a379ec840",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
"20a0307dc58aa2ab409e903b3ba85518",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
"a637b6849f983623efd86563af30e6d9",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
"bd2bc3f0a72a4c41b1afc7267bd70430",
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//"b9b0b4318e6264c405c3f96128901815",
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
"b6aea697cf5580f3f798ffc4d86f48b8",
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
"b8795d40ccbd9d480cfe79961b9fb3cc",
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
"3dd5bd0f7d95a40d411761d69255567a",
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
"556b0159070ee11a926f3932650c8f2c",
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
"41458c6ff3e35aa635cc2f2fdb5582ae",
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
|
|
|
|
|
"4f5165069b3c5f11afe5f59711bd945d",
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
|
|
|
|
|
"c1bc8de499756453d1387542bb32bb4d",
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
|
|
|
|
|
"47284e4065fbb26c94cf13870cb31c5d"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly string[] _longMd5S =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
"1a4f916dff70030e26fe0454729d0e79",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
"d61ace888212ea274071e4c454dfaf5c",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
"b59128c19a617782f5a1f22263046ad7",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
"18569ebb43ef9eb45f5f26bcbff3ebd7",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
"a940232a64a51e2848fdd7ea22cbb5f1",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
"e242fd3e7e353af1661b453dfe7f0562",
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
"40a83558b159ea0a7dae0f87f9fd60d8",
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//"b9b0b4318e6264c405c3f96128901815",
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
"a071c4ff0e6bf75dec2f9293af52fc64",
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
"b2297e21f26a509701d48507626e8990",
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
"3dd5bd0f7d95a40d411761d69255567a",
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
"ca7e0d49553f026098bfc5cfd5cdc7d0",
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
"6d8d9c35156b26cad81e1c598cc326ac",
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
|
|
|
|
|
"fd30db9486f67654179c90c8a5052edb",
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B6T"
|
|
|
|
|
|
"455ec326506d2c5b974c4617c1010796",
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B6T"
|
|
|
|
|
|
"93dccc154dabfbe98790b462f1b8dec3"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly string[] _subchannelMd5S =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//null,
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B6T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B6T"
|
|
|
|
|
|
null,
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B6T"
|
|
|
|
|
|
null
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly int[] _tracks =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
|
|
|
|
|
13,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
|
|
|
|
|
16,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
|
|
|
|
|
14,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
|
|
|
|
|
2,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
//1,
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
|
|
|
|
|
2,
|
|
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
|
|
|
|
|
11,
|
|
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
|
|
|
|
|
11,
|
|
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
|
|
|
|
|
3,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
|
|
|
|
|
16,
|
|
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
|
|
|
|
|
8,
|
|
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
|
|
|
|
|
18
|
2020-07-23 04:09:59 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly int[][] _trackSessions =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
1, 2
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
/*
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
*/
|
|
|
|
|
|
// "cdi.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
1
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly ulong[][] _trackStarts =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 14710, 31607, 48487, 70120, 86710, 103485, 122540, 139935, 153990, 172670, 190525, 205465
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 17377, 38525, 54936, 72860, 90755, 114546, 136451, 154773, 172150, 193298, 209709, 227633, 245528,
|
|
|
|
|
|
269319, 291224
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 15661, 33959, 51330, 71973, 87582, 103305, 117691, 136167, 153418, 166932, 187113, 201441, 234030
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 42737
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
/*
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
*/
|
|
|
|
|
|
// "cdi.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 450
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 27490, 28237, 78892, 100054, 133203, 160908, 181466, 202024, 222582, 243140
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 16586, 40043, 51156, 88837, 116403, 149909, 188938, 214294, 243625, 259729
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 48658, 207528
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 3590, 38464, 47217, 53501, 61819, 68563, 75397, 83130, 86481, 91267, 99274, 106693, 112238, 120270,
|
2020-07-23 04:09:59 +01:00
|
|
|
|
126229
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0, 4395, 4909, 5941, 42059, 220645, 225646, 235498
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 2100, 12985, 20451, 39498, 47368, 56600, 67387, 71546, 77030, 80535, 95180, 110808, 115449, 118723,
|
|
|
|
|
|
123266, 128328, 131637
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly ulong[][] _trackEnds =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
14709, 31606, 48486, 70119, 86709, 103484, 122539, 139934, 153989, 172669, 190524, 205464, 222186
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
17376, 38524, 54935, 72859, 90754, 114545, 136450, 154772, 172149, 193297, 209708, 227632, 245527,
|
|
|
|
|
|
269318, 291223, 309545
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
15660, 33958, 51329, 71972, 87581, 103304, 117690, 136166, 153417, 166931, 187112, 201440, 222779,
|
|
|
|
|
|
303315
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
31336, 97764
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
19041
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
501
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
355499
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
/*
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
2287071
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
*/
|
|
|
|
|
|
// "cdi.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
309833
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
449, 6399
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
16239, 28236, 78891, 100053, 133202, 160907, 181465, 202023, 222581, 243139, 243586
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
16585, 40042, 51155, 88836, 116402, 149908, 188937, 214293, 243624, 259728, 283396
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
48657, 207527, 328359
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
3589, 38463, 47216, 53500, 61818, 68562, 75396, 83129, 86480, 91266, 99273, 106692, 112237, 120269,
|
|
|
|
|
|
126228, 160955
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
4394, 4908, 5940, 42058, 220644, 225645, 235497, 246679
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
2099, 12984, 20450, 39497, 47367, 56599, 67386, 71545, 77029, 80534, 95179, 110807, 115448, 118722,
|
2020-07-23 04:09:59 +01:00
|
|
|
|
123265, 128327, 131636, 205071
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly ulong[][] _trackPregaps =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 150
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
/*
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
*/
|
|
|
|
|
|
// "cdi.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
150
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
150, 0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
|
|
|
|
|
150, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
150, 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
150, 0, 0, 0, 0, 150, 0, 0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new ulong[]
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
2020-07-23 04:09:59 +01:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
readonly byte[][] _trackFlags =
|
|
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
// "audiocd_cdtext.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdg.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdplus.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdr.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4, 4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom80mm.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "cdrw.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/aaru-dps/Aaru/issues/430
|
|
|
|
|
|
// "dvdrom.B5T"
|
|
|
|
|
|
/*
|
|
|
|
|
|
null,
|
|
|
|
|
|
*/
|
|
|
|
|
|
// "cdi.B5T"
|
|
|
|
|
|
new byte[]
|
2020-07-23 04:09:59 +01:00
|
|
|
|
{
|
2020-11-10 21:50:04 +00:00
|
|
|
|
4
|
2020-07-23 04:09:59 +01:00
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "gdrom.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "jaguarcd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "mixed.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "multitrack.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4, 4, 4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcengine.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "pcfx.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
0, 4, 4, 4, 4, 0, 0, 0
|
|
|
|
|
|
},
|
2020-11-10 21:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
// "videocd.B5T"
|
2020-07-23 04:09:59 +01:00
|
|
|
|
new byte[]
|
|
|
|
|
|
{
|
|
|
|
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
public void Test()
|
|
|
|
|
|
{
|
|
|
|
|
|
Environment.CurrentDirectory = Path.Combine(Consts.TEST_FILES_ROOT, "Media image formats", "BlindWrite 5");
|
|
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < _testFiles.Length; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
IFilter filter = new ZZZNoFilter();
|
|
|
|
|
|
filter.Open(_testFiles[i]);
|
|
|
|
|
|
IOpticalMediaImage image = new DiscImages.BlindWrite5();
|
|
|
|
|
|
Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_mediaTypes[i], image.Info.MediaType, _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_tracks[i], image.Tracks.Count, _testFiles[i]);
|
|
|
|
|
|
|
|
|
|
|
|
// How many sectors to read at once
|
|
|
|
|
|
const uint sectorsToRead = 256;
|
|
|
|
|
|
|
|
|
|
|
|
int trackNo = 0;
|
|
|
|
|
|
|
|
|
|
|
|
foreach(Track currentTrack in image.Tracks)
|
|
|
|
|
|
{
|
|
|
|
|
|
Assert.AreEqual(_trackSessions[i][trackNo], currentTrack.TrackSession, _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_trackStarts[i][trackNo], currentTrack.TrackStartSector, _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_trackEnds[i][trackNo], currentTrack.TrackEndSector, _testFiles[i]);
|
|
|
|
|
|
Assert.AreEqual(_trackPregaps[i][trackNo], currentTrack.TrackPregap, _testFiles[i]);
|
|
|
|
|
|
|
|
|
|
|
|
if(image.Info.ReadableSectorTags.Contains(SectorTagType.CdTrackFlags))
|
|
|
|
|
|
Assert.AreEqual(_trackFlags[i][trackNo],
|
|
|
|
|
|
image.ReadSectorTag(currentTrack.TrackSequence, SectorTagType.CdTrackFlags)[0],
|
|
|
|
|
|
_testFiles[i]);
|
|
|
|
|
|
|
|
|
|
|
|
trackNo++;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach(bool @long in new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
false, true
|
|
|
|
|
|
})
|
|
|
|
|
|
{
|
|
|
|
|
|
var ctx = new Md5Context();
|
|
|
|
|
|
|
|
|
|
|
|
foreach(Track currentTrack in image.Tracks)
|
|
|
|
|
|
{
|
|
|
|
|
|
ulong sectors = (currentTrack.TrackEndSector - currentTrack.TrackStartSector) + 1;
|
|
|
|
|
|
ulong doneSectors = 0;
|
|
|
|
|
|
|
|
|
|
|
|
while(doneSectors < sectors)
|
|
|
|
|
|
{
|
|
|
|
|
|
byte[] sector;
|
|
|
|
|
|
|
|
|
|
|
|
if(sectors - doneSectors >= sectorsToRead)
|
|
|
|
|
|
{
|
|
|
|
|
|
sector =
|
|
|
|
|
|
@long ? image.ReadSectorsLong(doneSectors, sectorsToRead,
|
|
|
|
|
|
currentTrack.TrackSequence)
|
|
|
|
|
|
: image.ReadSectors(doneSectors, sectorsToRead, currentTrack.TrackSequence);
|
|
|
|
|
|
|
|
|
|
|
|
doneSectors += sectorsToRead;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
sector = @long ? image.ReadSectorsLong(doneSectors, (uint)(sectors - doneSectors),
|
|
|
|
|
|
currentTrack.TrackSequence)
|
|
|
|
|
|
: image.ReadSectors(doneSectors, (uint)(sectors - doneSectors),
|
|
|
|
|
|
currentTrack.TrackSequence);
|
|
|
|
|
|
|
|
|
|
|
|
doneSectors += sectors - doneSectors;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ctx.Update(sector);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(@long ? _longMd5S[i] : _md5S[i], ctx.End(), _testFiles[i]);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(image.Info.ReadableSectorTags.Contains(SectorTagType.CdSectorSubchannel))
|
|
|
|
|
|
{
|
|
|
|
|
|
var ctx = new Md5Context();
|
|
|
|
|
|
|
|
|
|
|
|
foreach(Track currentTrack in image.Tracks)
|
|
|
|
|
|
{
|
|
|
|
|
|
ulong sectors = (currentTrack.TrackEndSector - currentTrack.TrackStartSector) + 1;
|
|
|
|
|
|
ulong doneSectors = 0;
|
|
|
|
|
|
|
|
|
|
|
|
while(doneSectors < sectors)
|
|
|
|
|
|
{
|
|
|
|
|
|
byte[] sector;
|
|
|
|
|
|
|
|
|
|
|
|
if(sectors - doneSectors >= sectorsToRead)
|
|
|
|
|
|
{
|
|
|
|
|
|
sector = image.ReadSectorsTag(doneSectors, sectorsToRead, currentTrack.TrackSequence,
|
|
|
|
|
|
SectorTagType.CdSectorSubchannel);
|
|
|
|
|
|
|
|
|
|
|
|
doneSectors += sectorsToRead;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
sector = image.ReadSectorsTag(doneSectors, (uint)(sectors - doneSectors),
|
|
|
|
|
|
currentTrack.TrackSequence,
|
|
|
|
|
|
SectorTagType.CdSectorSubchannel);
|
|
|
|
|
|
|
|
|
|
|
|
doneSectors += sectors - doneSectors;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ctx.Update(sector);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(_subchannelMd5S[i], ctx.End(), _testFiles[i]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|