271 Commits
1.3.0 ... main

Author SHA1 Message Date
Matt Nadareski
729a2ca0a2 Update final notice 2025-09-29 07:29:37 -04:00
Matt Nadareski
d9b7ebedc3 Add deprecation notice 2025-09-26 12:00:12 -04:00
Matt Nadareski
19e9734a6f Migrate non-executable models to Serialization 2025-09-26 11:57:24 -04:00
Matt Nadareski
f101df48ae Migrate support file models to Serialization 2025-09-26 11:39:29 -04:00
Matt Nadareski
ceececd8a0 Remove now-unnecessary warning disable 2025-09-26 10:58:10 -04:00
Matt Nadareski
d86f539da4 Migrate archive models to Serialization 2025-09-26 10:54:17 -04:00
Matt Nadareski
54b0a0f4b1 Migrate ASN1 models to Serialization 2025-09-26 10:22:32 -04:00
Matt Nadareski
c6cba88ba6 Migrate metadata models to Serialization 2025-09-26 10:22:11 -04:00
Matt Nadareski
063d91db6d Add some more notes about SFX 2025-09-26 08:50:59 -04:00
Matt Nadareski
f7311b8f01 Add observed values 2025-09-26 08:45:18 -04:00
Matt Nadareski
697a2e0f05 Reduce redundant remarks 2025-09-26 08:43:04 -04:00
Matt Nadareski
35806a16d2 Relabel to an unknown because correlation is difficult 2025-09-26 08:41:09 -04:00
Matt Nadareski
550e8f5d8b Clarify unknown offset information 2025-09-26 08:13:51 -04:00
Matt Nadareski
c5a818d1a3 Missing? field 2025-09-26 08:03:46 -04:00
Matt Nadareski
12943ac578 Remove incorrect remark 2025-09-26 07:56:51 -04:00
Matt Nadareski
028fdf14f6 More Advanced Installer notes 2025-09-26 07:56:30 -04:00
Matt Nadareski
e535b23953 Correct some information 2025-09-25 22:51:54 -04:00
Matt Nadareski
b94f011c15 Better footer research 2025-09-25 22:50:30 -04:00
Matt Nadareski
a7fa074877 Add anotehr note about size 2025-09-25 22:36:45 -04:00
Matt Nadareski
219ce890c4 Reorganize remarks a bit 2025-09-25 22:28:01 -04:00
Matt Nadareski
76fcc49d6d Start documenting Advanced Installer 2025-09-25 22:23:50 -04:00
Matt Nadareski
d7ade2efc4 Add ASN.1 models 2025-09-24 09:31:40 -04:00
Matt Nadareski
f4f1870cee Fix this for later 2025-09-22 19:32:26 -04:00
Matt Nadareski
0130a9caee Bump version 2025-09-22 17:26:04 -04:00
Matt Nadareski
da204f129f Remove unnecessary NoWarn 2025-09-22 17:22:32 -04:00
Matt Nadareski
945a62d1f2 Add COFF constants 2025-09-22 15:57:16 -04:00
Matt Nadareski
8ab5088607 Simplify naming in comments 2025-09-22 12:58:02 -04:00
Matt Nadareski
9e9fcac654 Move delay load table because it was missed 2025-09-22 12:39:44 -04:00
Matt Nadareski
76dac1025c Move TODO more out of the way 2025-09-22 12:38:03 -04:00
Matt Nadareski
0ec1cac7cf Remove TODO that was done 2025-09-22 12:36:01 -04:00
Matt Nadareski
6a0b97fdcd Remove meta-tables 2025-09-22 12:34:26 -04:00
Matt Nadareski
66f7adc49a Slightly change description on optional header 2025-09-22 12:19:06 -04:00
Matt Nadareski
4bc685ba23 Move TLS 2025-09-22 12:17:29 -04:00
Matt Nadareski
89ef827251 Move resource 2025-09-22 12:16:47 -04:00
Matt Nadareski
beb42b7e35 Move load configuration 2025-09-22 12:13:08 -04:00
Matt Nadareski
0502808962 This goes in resource entries 2025-09-22 12:07:26 -04:00
Matt Nadareski
e3411d3984 This is also import-related 2025-09-22 12:06:46 -04:00
Matt Nadareski
9d13cb01e3 Move import table 2025-09-22 12:06:05 -04:00
Matt Nadareski
649ea98a52 Move export table 2025-09-22 12:04:06 -04:00
Matt Nadareski
b90d7c5e9a Move debug data table 2025-09-22 12:01:12 -04:00
Matt Nadareski
9def156302 Move delay load directory table 2025-09-22 11:56:11 -04:00
Matt Nadareski
e1db4fc17b Move attribute certificate table 2025-09-22 11:52:28 -04:00
Matt Nadareski
ae4ad5c272 Optional header is partially COFF 2025-09-22 11:38:24 -04:00
Matt Nadareski
5bda523aec Sections are COFF, who knew? 2025-09-22 11:29:39 -04:00
Matt Nadareski
eda099d44e Separate out COFF stuff maybe for later? 2025-09-22 11:26:08 -04:00
Matt Nadareski
b5ac9304a4 Move base relocation to new namespace 2025-09-22 11:14:27 -04:00
Matt Nadareski
b40f84dd4b Move more things to resource entries namespace 2025-09-22 11:09:58 -04:00
Matt Nadareski
4a276fb65e Move MoPaQ encryption constants to IO 2025-09-22 10:37:40 -04:00
Matt Nadareski
973a94b340 Move LZX models to IO 2025-09-22 10:33:33 -04:00
Matt Nadareski
c6062f71eb Move Quantum compression models to IO 2025-09-22 10:29:29 -04:00
Matt Nadareski
fd7746fae3 Move MSZIP "model" to IO 2025-09-22 10:22:38 -04:00
Matt Nadareski
d3c6bdf23f Update Newtonsoft 2025-09-22 09:46:23 -04:00
Matt Nadareski
605a3bf30d Add a bunch of useful constants 2025-09-22 09:35:00 -04:00
Matt Nadareski
710ddc912d Add and update models needed for BOS 2025-09-22 09:06:33 -04:00
HeroponRikiBestest
2f94464b7d Small matroschka model update (#14)
* Small model updates, mainly documentation. Not essential.

* wrong branch lol
2025-09-19 12:09:16 -04:00
Matt Nadareski
b3d9bd3d6b Add some more hashes for fun 2025-09-19 08:29:49 -04:00
Matt Nadareski
c51c16ed2d Add RA extensions to Logiqx (fixes #13) 2025-09-17 09:29:29 -04:00
HeroponRikiBestest
978b6904db Add fileData variable to MatroshkaEntry.cs model (#12)
* Add fileData variable to MatroshkaEntry.cs model

This will be necessary to handle parsing properly in serialization.

* Use PascalCase
2025-09-16 15:30:47 -04:00
Matt Nadareski
d62bd2f60c Cleanup from last PR 2025-09-12 12:54:22 -04:00
Deterous
26f7f4d7da AACS2 support (#11)
* AACS2 support

* Better names

* libaacs links
2025-09-12 12:50:32 -04:00
Matt Nadareski
50a6f9ba89 There 2025-09-10 21:52:09 -04:00
Matt Nadareski
f07c11fb47 Simplify TLS directory 2025-09-09 13:54:19 -04:00
Matt Nadareski
dc47f64ee6 Sync a few notes from Serialization 2025-09-09 13:52:48 -04:00
Matt Nadareski
69006247a9 One more potential constant 2025-09-09 12:32:11 -04:00
Matt Nadareski
9c43b80502 Rename to be more accurate 2025-09-09 12:29:26 -04:00
Matt Nadareski
cbb7563724 Add missing symbol types, make a flag 2025-09-09 11:07:51 -04:00
Matt Nadareski
c7530884b3 Add constant notes 2025-09-09 09:42:55 -04:00
Matt Nadareski
e59c9205d4 Make OptionalHeader a bit more correct 2025-09-09 09:30:43 -04:00
Matt Nadareski
f5859638c2 Move these 2025-09-08 21:09:54 -04:00
Matt Nadareski
84d3740e73 Yeah 2025-09-08 21:07:25 -04:00
Matt Nadareski
517324ab58 Bump version 2025-09-05 09:10:29 -04:00
Matt Nadareski
a02c037995 Remind myself of this 2025-09-02 19:20:59 -04:00
Matt Nadareski
a1890e1fe6 I messed this up too 2025-09-01 16:17:02 -04:00
Matt Nadareski
32c6633788 Fix this naming for later 2025-09-01 15:52:50 -04:00
Matt Nadareski
81b53c9785 Bump version 2025-09-01 15:05:53 -04:00
Matt Nadareski
54c05f2746 Sync changes from downstream 2025-09-01 15:05:15 -04:00
Matt Nadareski
4a4d7ceddf Make this more clear 2025-08-28 23:37:18 -04:00
Matt Nadareski
0f029c5979 Fix one 2025-08-28 21:29:23 -04:00
Matt Nadareski
bb4fee91d9 Sort some things around PE 2025-08-28 21:18:39 -04:00
Matt Nadareski
ed56e2543d Convert this to an array 2025-08-28 12:12:04 -04:00
Matt Nadareski
d675673e50 More descriptive names 2025-08-28 09:47:01 -04:00
Matt Nadareski
ebee967c7f Clean up gzip and tar a bit 2025-08-28 09:27:08 -04:00
Matt Nadareski
f5da54eaac Fix some tar model issues 2025-08-28 08:56:11 -04:00
Matt Nadareski
2350c1af27 Add placeholder models 2025-08-28 07:46:23 -04:00
Matt Nadareski
454d507b41 Source my sources 2025-08-28 07:40:09 -04:00
Matt Nadareski
10de4acbb9 File ending thing for PKZIP 2025-08-28 07:38:11 -04:00
Matt Nadareski
8ec91d8d04 Add a couple missing extra field structures 2025-08-27 22:28:06 -04:00
Matt Nadareski
1d62d69a53 Interleaved types don't need to be here 2025-08-27 22:09:28 -04:00
Matt Nadareski
5b5fed8932 Rename a few things 2025-08-27 21:09:30 -04:00
Matt Nadareski
32123d4b80 Fix one more PKZIP extra field 2025-08-27 20:40:32 -04:00
Matt Nadareski
f5717c3929 Forgot to sync change here 2025-08-27 19:19:36 -04:00
Matt Nadareski
e8db261d73 Start making some fixes to PKZIP 2025-08-27 19:14:31 -04:00
Matt Nadareski
9557f43dab Add placeholder extras field 2025-08-27 18:43:26 -04:00
Matt Nadareski
51b9c1a016 Make PKZIP models a bit easier to follow 2025-08-27 12:51:57 -04:00
Matt Nadareski
bb3cd54865 Remove now-useless note 2025-08-15 10:13:31 -04:00
Matt Nadareski
0c6060a901 Clickable sources, archive links for dead pages 2025-08-15 10:09:43 -04:00
Matt Nadareski
c18770f627 Upstream changes from WiseUnpacker 2025-08-15 08:59:29 -04:00
Matt Nadareski
c2a5d6770c Upstream changes from WiseUnpacker 2025-08-13 12:22:11 -04:00
Matt Nadareski
4ef79ccdca Upstream changes from WiseUnpacker 2025-08-10 21:44:23 -04:00
Matt Nadareski
cf5135f330 Slight NE cleanup 2025-08-10 20:36:53 -04:00
Matt Nadareski
6d989209db Update NE notes and structure a bit more 2025-08-10 20:15:49 -04:00
Matt Nadareski
cc48593646 Upstream changes from WiseUnpacker 2025-08-09 10:26:37 -04:00
Matt Nadareski
415d571b65 Upstream changes from WiseUnpacker 2025-08-06 09:33:51 -04:00
Matt Nadareski
4a6e244b38 Upstream changes from WiseUnpacker 2025-08-04 12:16:34 -04:00
Matt Nadareski
771a39517f Upstream changes from WiseUnpacker 2025-08-01 16:06:32 -04:00
Matt Nadareski
b072a3809c Fix enum 2025-08-01 10:32:17 -04:00
Matt Nadareski
341585206a Add Wise Installer models from REWise
All credit to CYBERDEV for their work in documenting these structures in the first place
2025-07-31 22:35:04 -04:00
Matt Nadareski
2dc2ab5dd1 Add OLE models 2025-07-30 22:46:37 -04:00
Matt Nadareski
144a3ce52b Fix CFB comments 2025-07-29 22:45:15 -04:00
Matt Nadareski
85199789f7 Add new Matroshka package comment 2025-07-28 07:54:29 -04:00
Matt Nadareski
fb39216c82 Bump verison 2025-07-24 09:11:34 -04:00
Matt Nadareski
1a2de39868 Fix Dir serialization issue 2025-07-24 09:11:10 -04:00
Matt Nadareski
f18b6c8850 Bump version 2025-07-23 09:48:18 -04:00
Matt Nadareski
8f1e49e464 Add .NET Standard 2.0 and 2.1 2025-07-23 09:43:12 -04:00
Matt Nadareski
6547242f93 Clean up more Matroskha comments 2025-07-21 11:27:20 -04:00
Matt Nadareski
edf00f3ab2 Add analysis block comment 2025-07-21 11:25:18 -04:00
Matt Nadareski
bce4736037 Clean up more Matroskha comments 2025-07-21 11:23:25 -04:00
Matt Nadareski
81f28974c0 More remark corrections based on more samples 2025-07-21 11:10:35 -04:00
Matt Nadareski
30ebe84af4 Remove disproven theory 2025-07-21 11:08:01 -04:00
Matt Nadareski
b07fbdedd6 Add secondary length note 2025-07-21 09:39:31 -04:00
Matt Nadareski
cd8fff4a86 Slight tweaks to Matroska entry notes 2025-07-21 09:21:56 -04:00
Matt Nadareski
3d3275e3cb Add SecuROM Matroshka models
All research thanks to HeroponRikiBestest
2025-07-21 09:11:37 -04:00
Matt Nadareski
4c76ce1230 Add SecuROM DFA models
All research thanks to HeroponRikiBestest
2025-07-21 08:10:25 -04:00
Matt Nadareski
0c4e3b4bf2 Dirs can be nested 2025-06-24 12:32:14 -04:00
Matt Nadareski
e8f4386199 Add mess alternative ListXML model 2025-05-28 09:53:05 -04:00
Matt Nadareski
ab66ccf3c5 Update copyright 2024-12-30 21:19:05 -05:00
Matt Nadareski
cc60d54a33 Remove unnecessary action step 2024-12-30 21:18:59 -05:00
Matt Nadareski
e805f4cb9a Ensure .NET versions are installed for testing 2024-12-19 10:50:01 -05:00
Matt Nadareski
328c893a38 Ensure .NET versions are installed for testing 2024-12-19 10:45:08 -05:00
Matt Nadareski
ab2a12c996 Bump version 2024-12-16 12:10:13 -05:00
Matt Nadareski
362b123661 Allow symbols to be packed 2024-12-16 11:37:18 -05:00
Matt Nadareski
4a8a4746a2 Add big-endian note for PS4 PKG 2024-12-16 11:31:38 -05:00
Deterous
3f368a3be8 Create model for PS4 app.pkg header (#7)
* Create model for PS4 app.pkg header

* Rename PS4 app.pkg class

* Fix typo

* Requested changes

* Add newline
2024-12-15 20:12:06 -05:00
Matt Nadareski
2749c2f5bd Bump version 2024-12-11 11:25:41 -05:00
Matt Nadareski
41ce962700 Reorder LZ constants 2024-12-11 11:10:01 -05:00
Matt Nadareski
85b7103bd3 Re-rename Expand to SZDD for consistency 2024-12-11 11:09:28 -05:00
Matt Nadareski
4c61a191e8 Remove MS-ZIP Block type 2024-12-11 11:00:44 -05:00
Matt Nadareski
0f70598969 Add LZ prefixes for easier checking 2024-12-11 10:58:47 -05:00
Matt Nadareski
d6b057d808 Move LZ models out of Compression namespace 2024-12-11 10:54:10 -05:00
Matt Nadareski
3d8036e7b5 Remove things that Compression doesn't need anymore 2024-12-11 10:46:28 -05:00
Matt Nadareski
bb35946866 Ensure KWAJ header flags serialized 2024-12-11 04:19:02 -05:00
Matt Nadareski
78f9f1b36f Fix KWAJ serialization 2024-12-11 04:16:23 -05:00
Matt Nadareski
9d1b1ca36d Further simplify LZ models 2024-12-11 03:48:10 -05:00
Matt Nadareski
6e1f8bf55e Fix issues with MS-LZ models 2024-12-11 01:50:02 -05:00
Matt Nadareski
a19afc240c Bump version 2024-12-10 15:28:49 -05:00
Matt Nadareski
148e97ef64 Add now-supported DOSCenter SHA-1 attribute 2024-12-07 23:28:52 -05:00
Matt Nadareski
676b446025 Add badge for build status 2024-12-06 10:48:43 -05:00
Matt Nadareski
aeff75d8d3 Rename workflow file, add releases to README 2024-12-06 10:47:42 -05:00
Matt Nadareski
e20e515f56 Attempt to use publish script 2024-12-06 10:43:08 -05:00
Matt Nadareski
bf02266f0f Bump version 2024-11-29 19:51:47 -05:00
Matt Nadareski
b521e503c2 Rearrange SGA 2024-11-28 20:26:58 -05:00
Matt Nadareski
48e79d26ed Ensure nullable arrays are correct 2024-11-27 23:37:25 -05:00
Matt Nadareski
989ef41c6d Get/Set may be fully disallowed? 2024-11-27 21:31:33 -05:00
Matt Nadareski
6b0c4c3024 Bump version 2024-11-27 21:15:05 -05:00
Matt Nadareski
4b54d0f4dc Fix build 2024-11-27 21:09:01 -05:00
Matt Nadareski
2bc1cfc5d0 Cleanup from issues in Serialization 2024-11-27 21:03:50 -05:00
Matt Nadareski
362abfdc64 Remove layout from CopyrightRecord 2024-11-27 10:38:58 -05:00
Matt Nadareski
a06ff8f8b3 Bump version 2024-11-20 14:03:14 -05:00
Matt Nadareski
7269e91913 Partially add VBSP lump 40 2024-11-19 14:34:32 -05:00
Matt Nadareski
c118271565 Add VBSP lump 29 2024-11-19 14:30:54 -05:00
Matt Nadareski
71ccbc6ab1 Fix issues found during Serialization update 2024-11-19 12:47:09 -05:00
Matt Nadareski
ed5c1a7173 Use array-of-array instead of multidimensional array 2024-11-18 23:35:47 -05:00
Matt Nadareski
0451af3eb4 Bump version 2024-11-18 20:37:56 -05:00
Matt Nadareski
7967eb29eb Move Deflate constants to new file 2024-11-18 12:09:48 -05:00
Matt Nadareski
6bbe904cc3 Move Deflate-specific models to separate namespace 2024-11-18 10:04:45 -05:00
Matt Nadareski
dce9d98885 Add GZIP models 2024-11-18 02:45:07 -05:00
Matt Nadareski
f862e018fb Update VPK models 2024-11-18 02:13:52 -05:00
Matt Nadareski
b4a5154da8 Update VBSP models 2024-11-18 01:59:46 -05:00
Matt Nadareski
077aa3c57e Update BSP models 2024-11-17 21:20:50 -05:00
Matt Nadareski
ea8630ba8c Update WAD3 models 2024-11-17 19:56:59 -05:00
Matt Nadareski
385491c67b Framework only matters for executable 2024-11-15 20:16:03 -05:00
Matt Nadareski
f57461e0c3 Make obsolete types NoWarn instead of ignore 2024-11-15 20:10:16 -05:00
Matt Nadareski
18f49ac43f It was correct 2024-11-14 11:19:21 -05:00
Matt Nadareski
28fd81adab Minor tweaks 2024-11-13 23:12:37 -05:00
Matt Nadareski
ecca68822d Bump version 2024-11-13 20:33:38 -05:00
Matt Nadareski
58c2dcbe4f Fix duplicate data bug in N3DS cart data 2024-11-13 17:03:57 -05:00
Matt Nadareski
f9b8717abb Add .NET 9 to target frameworks 2024-11-13 00:33:49 -05:00
Matt Nadareski
6a356a5874 Add .NET 9 to target frameworks 2024-11-13 00:19:00 -05:00
Matt Nadareski
88c6a0302f Add .NET 9 to target frameworks 2024-11-13 00:16:28 -05:00
Matt Nadareski
5282db965f Bump version 2024-11-13 00:12:59 -05:00
Matt Nadareski
33217a7efe Remove "overflow" fields finally 2024-11-13 00:09:20 -05:00
Matt Nadareski
c8583589d6 Add .NET 9 to target frameworks 2024-11-12 23:58:35 -05:00
Matt Nadareski
6ed2b406d7 Add .NET 9 to target frameworks 2024-11-12 23:57:23 -05:00
Matt Nadareski
4b08e0f5dd Add keys to Rom for MD2/4 2024-11-12 12:41:39 -05:00
Matt Nadareski
e8259fed12 Add placeholders to main hashfile 2024-11-12 12:40:17 -05:00
Matt Nadareski
d06df28f72 Add placeholder models for MD2/MD4 2024-11-12 12:39:38 -05:00
Matt Nadareski
f73ff87922 Make CHD headers (mostly) serializable 2024-11-12 12:31:23 -05:00
Matt Nadareski
dd6b79a21b Use collection expressions 2024-11-12 12:23:47 -05:00
Matt Nadareski
d3daa2c4aa Add GameHeader models 2024-11-04 13:45:05 -05:00
Matt Nadareski
1620d00edf Technically use CodecType 2024-10-31 13:42:37 -04:00
Matt Nadareski
5565fa2fc3 Bump version 2024-10-31 11:08:14 -04:00
Matt Nadareski
e088e203ea Tags are tags, use them 2024-10-31 00:26:46 -04:00
Matt Nadareski
acc8d95930 Correctly redefine const as enum 2024-10-31 00:15:43 -04:00
Matt Nadareski
1a76c59827 Port significantly more CHD info 2024-10-31 00:05:19 -04:00
Matt Nadareski
8725ec0337 Port more CHD info from SabreTools 2024-10-19 23:58:56 -04:00
Matt Nadareski
8991cc460d Correct info for IS-CAB components 2024-10-03 02:49:47 -04:00
Matt Nadareski
98ce8b65ec Correct info for IS-CAB file groups 2024-10-03 02:35:15 -04:00
Matt Nadareski
ca58343c30 Bump version 2024-10-01 12:32:33 -04:00
Matt Nadareski
2f637e0012 Remove ValueTuple requirement 2024-10-01 01:41:43 -04:00
Matt Nadareski
80172942fd Mark extended TAR header info 2024-09-26 14:08:55 -04:00
Matt Nadareski
aa0960b42f Separate entry from archive in TAR 2024-09-26 13:45:49 -04:00
Matt Nadareski
2554f64277 Add layout for TAR header 2024-09-26 12:15:59 -04:00
Matt Nadareski
4c5c960915 Slight tweak to TAR header (nw) 2024-09-26 12:03:20 -04:00
Matt Nadareski
1cb49163dd Upate MinValueTupleBridge to 0.2.1 2024-09-25 10:46:16 -04:00
Matt Nadareski
d144dd47a1 Bump version 2024-08-08 14:19:26 -04:00
Matt Nadareski
c4247c7ccb Move readme back to where it should be 2024-08-08 14:16:26 -04:00
Matt Nadareski
1e77437167 Fixup csproj a bit 2024-08-08 14:15:30 -04:00
Matt Nadareski
3d79e07d76 Move project to subfolder 2024-08-08 14:11:45 -04:00
Matt Nadareski
9d50d577ab Fix things found during NDecrypt usage 2024-08-08 13:18:47 -04:00
Matt Nadareski
494ca175fb Fix layout of ISv3 directory 2024-06-03 11:57:30 -04:00
Matt Nadareski
73b3d4a7a8 Bump version 2024-05-15 14:09:49 -04:00
Matt Nadareski
bd40158423 Forgot to check... 2024-05-15 14:08:14 -04:00
Matt Nadareski
149a45d871 Bump version 2024-05-15 14:00:54 -04:00
Matt Nadareski
e18d8d7543 Fix menu header parsing/serialization 2024-05-15 14:00:30 -04:00
Matt Nadareski
38f0d4aef5 Bump version 2024-05-13 13:18:47 -04:00
Matt Nadareski
3959993255 Fix XMID/XeMID comments 2024-05-09 21:40:43 -04:00
Matt Nadareski
00df5bdd6e UTF-8 treated like ASCII for old .NET 2024-05-07 05:28:46 -04:00
Matt Nadareski
00c087d8e0 Add third-party expansion fields for PKZIP 2024-04-28 02:30:46 -04:00
Matt Nadareski
6bc948784a Add PKZIP appendix A and B 2024-04-28 02:02:58 -04:00
Matt Nadareski
c4f14854c2 Add extensible data field definitions 2024-04-28 01:11:27 -04:00
Matt Nadareski
adaac68898 Bump version 2024-04-24 10:04:06 -04:00
Matt Nadareski
a9bc4a2bfe Fix getopts 2024-04-24 01:35:59 -04:00
Matt Nadareski
262b91de65 32 unicode characters, 64 bytes 2024-04-24 01:25:30 -04:00
Matt Nadareski
62bd6a4bde Add a couple of constants from UnshieldSharp 2024-04-24 00:36:41 -04:00
Matt Nadareski
7f14f0c5b0 Fix encoding for DirectoryEntry 2024-04-23 21:43:17 -04:00
Matt Nadareski
33d63fddae Bump version 2024-04-23 21:01:52 -04:00
Matt Nadareski
209be57bf4 Add layouts for some BD+ models 2024-04-23 20:59:47 -04:00
Matt Nadareski
a1581e9d9b Add layouts for some BFPK models 2024-04-23 20:58:51 -04:00
Matt Nadareski
521664d5a8 Add layouts for some BSP models 2024-04-23 20:57:24 -04:00
Matt Nadareski
73a8d91a83 Add layouts for some CFB models 2024-04-23 20:55:10 -04:00
Matt Nadareski
438e87f833 Add layouts for some CHD models 2024-04-23 20:50:09 -04:00
Matt Nadareski
2cdedbb456 Add layouts for some DVD models 2024-04-23 20:47:33 -04:00
Matt Nadareski
b57a545598 Add layouts for some GCF models 2024-04-23 20:38:11 -04:00
Matt Nadareski
8dc6eb2eee Add layouts for some IS-CAB models 2024-04-23 20:26:18 -04:00
Matt Nadareski
b58436d71a Add layouts for some MoPaQ models 2024-04-23 20:18:26 -04:00
Matt Nadareski
925c20021f Add layouts for some MSDOS models 2024-04-23 20:13:07 -04:00
Matt Nadareski
9bebf95599 Add layouts for some N3DS models 2024-04-23 20:09:39 -04:00
Matt Nadareski
089e13ca03 Add layouts for some NCF models 2024-04-23 19:34:56 -04:00
Matt Nadareski
de07b3b0dd Make some types non-nullable 2024-04-23 19:13:47 -04:00
Matt Nadareski
22cb5360e6 Add notes about prefixed strings 2024-04-23 17:20:05 -04:00
Matt Nadareski
a422ec7e6d Add layouts for some Nitro models 2024-04-23 17:15:15 -04:00
Matt Nadareski
f60afd6368 Add layouts for some PE models 2024-04-23 16:42:29 -04:00
Matt Nadareski
b8f67a8ab0 Add layouts for some VBSP models 2024-04-23 16:06:09 -04:00
Matt Nadareski
d844a8b582 Add layouts for some VPK models 2024-04-23 16:03:20 -04:00
Matt Nadareski
8583baa862 Add layouts for some WAD models 2024-04-23 15:56:43 -04:00
Matt Nadareski
8f3be17850 Add layouts for some XZP models 2024-04-23 15:49:41 -04:00
Matt Nadareski
5856967794 Fill and fix some ISAv3 information 2024-04-23 15:43:33 -04:00
Matt Nadareski
8f78c73c6f Fix publish scripts 2024-04-23 14:12:10 -04:00
Matt Nadareski
af4ff3d383 Bump version 2024-04-23 14:10:58 -04:00
Matt Nadareski
3e638a5c57 Make Linux publish script executable 2024-04-23 14:10:27 -04:00
Matt Nadareski
638d0226c1 Add publish scripts 2024-04-23 14:10:03 -04:00
Matt Nadareski
07c6d5b43a Obsolete is not an error... for now 2024-04-23 13:38:37 -04:00
Matt Nadareski
108e63a099 Add some null-terminated type flags 2024-04-23 13:36:24 -04:00
Matt Nadareski
c636d3252b Migrate many models to StructLayout 2024-04-23 13:30:43 -04:00
Matt Nadareski
b19dbf2254 Update APPNOTE link, add more Header IDs 2024-04-17 16:43:02 -04:00
Matt Nadareski
111b84170c Add relevant information to PKZIP archive 2024-04-17 16:09:30 -04:00
Matt Nadareski
2d7df0d4fb Add PKZIP archive model 2024-04-17 15:59:56 -04:00
Matt Nadareski
aba02663e5 Start adding PKZIP models 2024-04-17 15:47:41 -04:00
Matt Nadareski
594fec923a Bump version 2024-04-03 22:44:18 -04:00
Deterous
b5cf4e870d Add fields for v1.0 catalog.js files (#6) 2024-04-03 19:43:17 -07:00
Matt Nadareski
e6976796c2 Initial attempt at Delphi models 2024-04-02 10:58:20 -04:00
Deterous
295d8c7612 XboxOne/XboxSX catalog.js Model (#5)
* XboxOne catalog.js model

* Split Catalog object, bump version

* Minor fixes

* Custom JsonConverter for launchPackage

* Make launchPackage an abstract object

* Don't ignore packages

* Fix field types for Catalog/Package
2024-04-02 07:54:57 -07:00
Matt Nadareski
4dd184583c Revert XML tag for OfflineList duplicate ID 2024-03-19 15:30:45 -04:00
Matt Nadareski
081c9c9245 Bump version 2024-03-12 16:21:06 -04:00
Matt Nadareski
b974380ccf Fix SoftwareList.Disk field name 2024-03-12 15:28:58 -04:00
Matt Nadareski
41ed2cbc9a Fix XML element name for duplicateId 2024-03-12 00:07:47 -04:00
Matt Nadareski
2cfcb49e35 Fix missing OfflineList field 2024-03-11 23:35:22 -04:00
Matt Nadareski
b3f3f12b3e Use "main" instead of "master" 2024-02-27 19:06:26 -05:00
Matt Nadareski
b41700ff92 Update copyright date 2024-02-27 17:18:02 -05:00
Matt Nadareski
e8a357546b Add nuget package and PR workflows 2024-02-27 17:17:50 -05:00
Matt Nadareski
68f0201c11 Add SafeDisc encrypted file entry model 2023-11-30 19:11:52 -05:00
731 changed files with 7965 additions and 24943 deletions

40
.github/workflows/build_and_test.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Build and Test
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: Run tests
run: dotnet test
- name: Run publish script
run: ./publish-nix.sh
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: "*.nupkg,*.snupkg"
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True
replacesArtifacts: True
tag: "rolling"
updateOnlyUnreleased: True

23
.github/workflows/check_pr.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Build PR
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: Build
run: dotnet build
- name: Run tests
run: dotnet test

View File

@@ -1,13 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// This record type is undocumented but found in real media key blocks
/// </summary>
public sealed class CopyrightRecord : Record
{
/// <summary>
/// Null-terminated ASCII string representing the copyright
/// </summary>
public string? Copyright { get; set; }
}
}

View File

@@ -1,21 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class DriveRevocationListEntry
{
/// <summary>
/// A 2-byte Range value indicates the range of revoked IDs starting
/// from the ID contained in the record. A value of zero in the Range
/// field indicates that only one ID is being revoked, a value of one
/// in the Range field indicates two IDs are being revoked, and so on.
/// </summary>
public ushort Range { get; set; }
/// <summary>
/// A 6-byte Drive ID value identifying the Licensed Drive being revoked
/// (or the first in a range of Licensed Drives being revoked, in the
/// case of a non-zero Range value).
/// </summary>
public byte[]? DriveID { get; set; }
}
}

View File

@@ -1,26 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// A properly formatted type 3 or type 4 Media Key Block contains exactly
/// one Drive Revocation List Record. It follows the Host Revocation List
/// Record, although it may not immediately follow it.
///
/// The Drive Revocation List Record is identical to the Host Revocation
/// List Record, except it has type 2016, and it contains Drive Revocation
/// List Entries, not Host Revocation List Entries. The Drive Revocation List
/// Entries refer to Drive IDs in the Drive Certificates.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class DriveRevocationListRecord : Record
{
/// <summary>
/// The total number of Drive Revocation List Entry fields that follow.
/// </summary>
public uint TotalNumberOfEntries { get; set; }
/// <summary>
/// Revocation list entries
/// </summary>
public DriveRevocationSignatureBlock?[]? SignatureBlocks { get; set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class DriveRevocationSignatureBlock
{
/// <summary>
/// The number of Drive Revocation List Entry fields in the signature block.
/// </summary>
public uint NumberOfEntries { get; set; }
/// <summary>
/// A list of 8-byte Host Drive List Entry fields, the length of this
/// list being equal to the number in the signature block.
/// </summary>
public DriveRevocationListEntry?[]? EntryFields { get; set; }
}
}

View File

@@ -1,23 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// A properly formatted MKB shall contain an End of Media Key Block Record.
/// When a device encounters this Record it stops processing the MKB, using
/// whatever Km value it has calculated up to that point as the final Km for
/// that MKB (pending possible checks for correctness of the key, as
/// described previously).
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class EndOfMediaKeyBlockRecord : Record
{
/// <summary>
/// AACS LAs signature on the data in the Media Key Block up to,
/// but not including, this record. Devices depending on the Version
/// Number in the Type and Version Record must verify the signature.
/// Other devices may ignore the signature data. If any device
/// determines that the signature does not verify or is omitted, it
/// must refuse to use the Media Key.
/// </summary>
public byte[]? SignatureData { get; set; }
}
}

View File

@@ -1,46 +0,0 @@
namespace SabreTools.Models.AACS
{
public enum MediaKeyBlockType : uint
{
/// <summary>
/// (Type 3). This is a normal Media Key Block suitable for being recorded
/// on a AACS Recordable Media. Both Class I and Class II Licensed Products
/// use it to directly calculate the Media Key.
/// </summary>
Type3 = 0x00031003,
/// <summary>
/// (Type 4). This is a Media Key Block that has been designed to use Key
/// Conversion Data (KCD). Thus, it is suitable only for pre-recorded media
/// from which the KCD is derived. Both Class I and Class II Licensed Products
/// use it to directly calculate the Media Key.
/// </summary>
Type4 = 0x00041003,
/// <summary>
/// (Type 10). This is a Class II Media Key Block (one that has the functionality
/// of a Sequence Key Block). This can only be processed by Class II Licensed
/// Products; Class I Licensed Products are revoked in Type 10 Media Key Blocks
/// and cannot process them. This type does not contain the Host Revocation List
/// Record, the Drive Revocation List Record, and the Media Key Data Record, as
/// described in the following sections. It does contain the records shown in
/// Section 3.2.5.2, which are only processed by Class II Licensed Products.
/// </summary>
Type10 = 0x000A1003,
}
public enum RecordType : byte
{
EndOfMediaKeyBlock = 0x02,
ExplicitSubsetDifference = 0x04,
MediaKeyData = 0x05,
SubsetDifferenceIndex = 0x07,
TypeAndVersion = 0x10,
DriveRevocationList = 0x20,
HostRevocationList = 0x21,
VerifyMediaKey = 0x81,
// Not documented
Copyright = 0x7F,
}
}

View File

@@ -1,11 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class ExplicitSubsetDifferenceRecord : Record
{
/// <summary>
/// In this record, each subset-difference is encoded with 5 bytes.
/// </summary>
public SubsetDifference?[]? SubsetDifferences { get; set; }
}
}

View File

@@ -1,21 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class HostRevocationListEntry
{
/// <summary>
/// A 2-byte Range value indicates the range of revoked IDs starting
/// from the ID contained in the record. A value of zero in the Range
/// field indicates that only one ID is being revoked, a value of one
/// in the Range field indicates two IDs are being revoked, and so on.
/// </summary>
public ushort Range { get; set; }
/// <summary>
/// A 6-byte Host ID value identifying the host being revoked (or the
/// first in a range of hosts being revoked, in the case of a non-zero
/// Range value).
/// </summary>
public byte[]? HostID { get; set; }
}
}

View File

@@ -1,29 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// A properly formatted type 3 or type 4 Media Key Block shall have exactly
/// one Host Revocation List Record as its second record. This record provides
/// a list of hosts that have been revoked by the AACS LA. The AACS specification
/// is applicable to PC-based system where a Licensed Drive and PC Host act
/// together as the Recording Device and/or Playback Device for AACS Content.
/// AACS uses a drive-host authentication protocol for the host to verify the
/// integrity of the data received from the Licensed Drive, and for the Licensed
/// Drive to check the validity of the host application. The Type and Version
/// Record and the Host Revocation List Record are guaranteed to be the first two
/// records of a Media Key Block, to make it easier for Licensed Drives to extract
/// this data from an arbitrary Media Key Block.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class HostRevocationListRecord : Record
{
/// <summary>
/// The total number of Host Revocation List Entry fields that follow.
/// </summary>
public uint TotalNumberOfEntries { get; set; }
/// <summary>
/// Revocation list entries
/// </summary>
public HostRevocationSignatureBlock?[]? SignatureBlocks { get; set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class HostRevocationSignatureBlock
{
/// <summary>
/// The number of Host Revocation List Entry fields in the signature block.
/// </summary>
public uint NumberOfEntries { get; set; }
/// <summary>
/// A list of 8-byte Host Revocation List Entry fields, the length of this
/// list being equal to the number in the signature block.
/// </summary>
public HostRevocationListEntry?[]? EntryFields { get; set; }
}
}

View File

@@ -1,14 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// A Media Key Block is formatted as a sequence of contiguous Records.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class MediaKeyBlock
{
/// <summary>
/// Records
/// </summary>
public Record?[]? Records { get; set; }
}
}

View File

@@ -1,18 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// This record gives the associated encrypted media key data for the
/// subset-differences identified in the Explicit Subset-Difference Record.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class MediaKeyDataRecord : Record
{
/// <summary>
/// Each subset difference has its associated 16 bytes in this
/// record, in the same order it is encountered in the subset-difference
/// record. This 16 bytes is the ciphertext value C in the media
/// key calculation.
/// </summary>
public byte[][]? MediaKeyData { get; set; }
}
}

View File

@@ -1,28 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// Each Record begins with a one-byte Record Type field, followed by a
/// three-byte Record Length field.
///
/// The following subsections describe the currently defined Record types,
/// and how a device processes each. All multi-byte integers, including
/// the length field, are “Big Endian”; in other words, the most significant
/// byte comes first in the record.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public abstract class Record
{
/// <summary>
/// The Record Type field value indicates the type of the Record.
/// </summary>
public RecordType RecordType { get; set; }
/// <summary>
/// The Record Length field value indicates the number of bytes in
/// the Record, including the Record Type and the Record Length
/// fields themselves. Record lengths are always multiples of 4 bytes.
/// </summary>
// <remarks>UInt24 not UInt32</remarks>
public uint RecordLength { get; set; }
}
}

View File

@@ -1,20 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class SubsetDifference
{
/// <summary>
/// The mask for u is given by the first byte. That byte is
/// treated as a number, the number of low-order 0-bits in
/// the mask. For example, the value 0x01 denotes a mask of
/// 0xFFFFFFFE; value 0x0A denotes a mask of 0xFFFFFC00.
/// </summary>
public byte Mask { get; set; }
/// <summary>
/// The last 4 bytes are the uv number, most significant
/// byte first.
/// </summary>
public uint Number { get; set; }
}
}

View File

@@ -1,26 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// This is a speed-up record which can be ignored by devices not wishing to
/// take advantage of it. It is a lookup table which allows devices to quickly
/// find their subset-difference in the Explicit Subset-Difference record,
/// without processing the entire record. This Subset-Difference Index record
/// is always present, and always precedes the Explicit Subset-Difference record
/// in the MKB, although it does not necessarily immediately precede it.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class SubsetDifferenceIndexRecord : Record
{
/// <summary>
/// The number of devices per index offset.
/// </summary>
public uint Span { get; set; }
/// <summary>
/// These offsets refer to the offset within the following Explicit
/// Subset-Difference record, with 0 being the start of the record.
/// </summary>
// <remarks>UInt24 not UInt32</remarks>
public uint[]? Offsets { get; set; }
}
}

View File

@@ -1,32 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// Devices, except for recording devices which are writing Media Key Block
/// Extensions, may ignore this record. Recording devices shall verify the
/// signature (see End of Media Key Block record) and use the Version Number
/// in this record to determine if a new Media Key BLock Extension is, in
/// fact, more recent than the Media Key Block Extension that is currently
/// on the media.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class TypeAndVersionRecord : Record
{
/// <summary>
/// For AACS applications, the MKBType field is one of three values.
/// It is not an error for a Type 3 Media Key Block to be used for
/// controlling access to AACS Content on pre- recorded media. In
/// this case, the device shall not use the KCD.
/// </summary>
public MediaKeyBlockType MediaKeyBlockType { get; set; }
/// <summary>
/// The Version Number is a 32-bit unsigned integer. Each time the
/// licensing agency changes the revocation, it increments the version
/// number and inserts the new value in subsequent Media Key Blocks.
/// Thus, larger values indicate more recent Media Key Blocks. The
/// Version Numbers begin at 1; 0 is a special value used for test
/// Media Key Blocks.
/// </summary>
public uint VersionNumber { get; set; }
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// A properly formatted MKB shall have exactly one Verify Media Key Record
/// as its first record. The presence of the Verify Media Key Record in an MKB
/// is mandatory, but the use of the Record by a device is not mandatory. The
/// device may use the Verify Media Key Record to verify the correctness of a
/// given MKB, or of its processing of it. If everything is correct, the device
/// should observe the condition:
/// [AES_128D(vKm, C]msb_64 == 0x0123456789ABCDEF)]
/// where Km is the Media Key value.
/// </summary>
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
public sealed class VerifyMediaKeyRecord : Record
{
/// <summary>
/// Bytes 4 through 19 of the Record contain the ciphertext value
/// Cv = AES-128E (Km, 0x0123456789ABCDEF || 0xXXXXXXXXXXXXXXXX)
/// where 0xXXXXXXXXXXXXXXXX is an arbitrary 8-byte value, and Km is
/// the correct final Media Key value.
/// </summary>
public byte[]? CiphertextValue { get; set; }
}
}

View File

@@ -1,217 +0,0 @@
using System.Xml;
using System.Xml.Serialization;
namespace SabreTools.Models.ArchiveDotOrg
{
[XmlRoot("file")]
public class File
{
[XmlAttribute("name")]
public string? Name { get; set; }
/// <remarks>Is this a set of defined values?</remarks>
[XmlAttribute("source")]
public string? Source { get; set; }
[XmlElement("btih")]
public string? BitTorrentMagnetHash { get; set; }
[XmlElement("mtime")]
public string? LastModifiedTime { get; set; }
[XmlElement("size")]
public string? Size { get; set; }
[XmlElement("md5")]
public string? MD5 { get; set; }
[XmlElement("crc32")]
public string? CRC32 { get; set; }
[XmlElement("sha1")]
public string? SHA1 { get; set; }
[XmlElement("filecount")]
public string? FileCount { get; set; }
/// <remarks>Is this a set of defined values?</remarks>
[XmlElement("format")]
public string? Format { get; set; }
[XmlElement("original")]
public string? Original { get; set; }
/// <remarks>Is this a set of defined values?</remarks>
[XmlElement("summation")]
public string? Summation { get; set; }
[XmlElement("matrix_number")]
public string? MatrixNumber { get; set; }
[XmlElement("collection-catalog-number")]
public string? CollectionCatalogNumber { get; set; }
[XmlElement("publisher")]
public string? Publisher { get; set; }
[XmlElement("comment")]
public string? Comment { get; set; }
#region ASR-Related
[XmlElement("asr_detected_lang")]
public string? ASRDetectedLang { get; set; }
[XmlElement("asr_detected_lang_conf")]
public string? ASRDetectedLangConf { get; set; }
[XmlElement("asr_transcribed_lang")]
public string? ASRTranscribedLang { get; set; }
[XmlElement("whisper_asr_module_version")]
public string? WhisperASRModuleVersion { get; set; }
[XmlElement("whisper_model_hash")]
public string? WhisperModelHash { get; set; }
[XmlElement("whisper_model_name")]
public string? WhisperModelName { get; set; }
[XmlElement("whisper_version")]
public string? WhisperVersion { get; set; }
#endregion
#region OCR-Related
[XmlElement("cloth_cover_detection_module_version")]
public string? ClothCoverDetectionModuleVersion { get; set; }
[XmlElement("hocr_char_to_word_hocr_version")]
public string? hOCRCharToWordhOCRVersion { get; set; }
[XmlElement("hocr_char_to_word_module_version")]
public string? hOCRCharToWordModuleVersion { get; set; }
[XmlElement("hocr_fts_text_hocr_version")]
public string? hOCRFtsTexthOCRVersion { get; set; }
[XmlElement("hocr_fts_text_module_version")]
public string? hOCRFtsTextModuleVersion { get; set; }
[XmlElement("hocr_pageindex_hocr_version")]
public string? hOCRPageIndexhOCRVersion { get; set; }
[XmlElement("hocr_pageindex_module_version")]
public string? hOCRPageIndexModuleVersion { get; set; }
[XmlElement("ocr")]
public string? TesseractOCR { get; set; }
[XmlElement("ocr_converted")]
public string? TesseractOCRConverted { get; set; }
[XmlElement("ocr_detected_lang")]
public string? TesseractOCRDetectedLang { get; set; }
[XmlElement("ocr_detected_lang_conf")]
public string? TesseractOCRDetectedLangConf { get; set; }
[XmlElement("ocr_detected_script")]
public string? TesseractOCRDetectedScript { get; set; }
[XmlElement("ocr_detected_script_conf")]
public string? TesseractOCRDetectedScriptConf { get; set; }
[XmlElement("ocr_module_version")]
public string? TesseractOCRModuleVersion { get; set; }
[XmlElement("ocr_parameters")]
public string? TesseractOCRParameters { get; set; }
[XmlElement("pdf_module_version")]
public string? PDFModuleVersion { get; set; }
[XmlElement("word_conf_0_10")]
public string? WordConfidenceInterval0To10 { get; set; }
[XmlElement("word_conf_11_20")]
public string? WordConfidenceInterval11To20 { get; set; }
[XmlElement("word_conf_21_30")]
public string? WordConfidenceInterval21To30 { get; set; }
[XmlElement("word_conf_31_40")]
public string? WordConfidenceInterval31To40 { get; set; }
[XmlElement("word_conf_41_50")]
public string? WordConfidenceInterval41To50 { get; set; }
[XmlElement("word_conf_51_60")]
public string? WordConfidenceInterval51To60 { get; set; }
[XmlElement("word_conf_61_70")]
public string? WordConfidenceInterval61To70 { get; set; }
[XmlElement("word_conf_71_80")]
public string? WordConfidenceInterval71To80 { get; set; }
[XmlElement("word_conf_81_90")]
public string? WordConfidenceInterval81To90 { get; set; }
[XmlElement("word_conf_91_100")]
public string? WordConfidenceInterval91To100 { get; set; }
#endregion
#region Media-Related
[XmlElement("album")]
public string? Album { get; set; }
[XmlElement("artist")]
public string? Artist { get; set; }
[XmlElement("bitrate")]
public string? Bitrate { get; set; }
[XmlElement("creator")]
public string? Creator { get; set; }
[XmlElement("height")]
public string? Height { get; set; }
[XmlElement("length")]
public string? Length { get; set; }
[XmlElement("preview-image")]
public string? PreviewImage { get; set; }
/// <remarks>Is this a set of defined values?</remarks>
[XmlElement("rotation")]
public string? Rotation { get; set; }
[XmlElement("title")]
public string? Title { get; set; }
[XmlElement("track")]
public string? Track { get; set; }
[XmlElement("width")]
public string? Width { get; set; }
#endregion
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
[XmlAnyAttribute]
public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; }
/// <remarks>Should be empty</remarks>
[XmlAnyElement]
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,24 +0,0 @@
using System.Xml;
using System.Xml.Serialization;
namespace SabreTools.Models.ArchiveDotOrg
{
[XmlRoot("files")]
public class Files
{
[XmlElement("file")]
public File?[]? File { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
[XmlAnyAttribute]
public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; }
/// <remarks>Should be empty</remarks>
[XmlAnyElement]
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,13 +0,0 @@
namespace SabreTools.Models.AttractMode
{
/// <summary>
/// #Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons /// </summary>
/// </summary>
public class MetadataFile
{
[Required]
public string[]? Header { get; set; }
public Row?[]? Row { get; set; }
}
}

View File

@@ -1,58 +0,0 @@
namespace SabreTools.Models.AttractMode
{
public class Row
{
/// <remarks>Also called Romname</remarks>
[Required]
public string? Name { get; set; }
public string? Title { get; set; }
public string? Emulator { get; set; }
public string? CloneOf { get; set; }
public string? Year { get; set; }
public string? Manufacturer { get; set; }
public string? Category { get; set; }
public string? Players { get; set; }
public string? Rotation { get; set; }
public string? Control { get; set; }
public string? Status { get; set; }
public string? DisplayCount { get; set; }
public string? DisplayType { get; set; }
public string? AltRomname { get; set; }
public string? AltTitle { get; set; }
public string? Extra { get; set; }
public string? Buttons { get; set; }
public string? Favorite { get; set; }
public string? Tags { get; set; }
public string? PlayedCount { get; set; }
public string? PlayedTime { get; set; }
public string? FileIsAvailable { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,7 +0,0 @@
namespace SabreTools.Models.BDPlus
{
public static class Constants
{
public const string SignatureString = "BDSVM_CC";
}
}

View File

@@ -1,46 +0,0 @@
namespace SabreTools.Models.BDPlus
{
/// <see href="https://github.com/mwgoldsmith/bdplus/blob/master/src/libbdplus/bdsvm/loader.c"/>
public sealed class SVM
{
/// <summary>
/// "BDSVM_CC"
/// </summary>
public string? Signature { get; set; }
/// <summary>
/// 5 bytes of unknown data
/// </summary>
public byte[]? Unknown1 { get; set; }
/// <summary>
/// Version year
/// </summary>
public ushort Year { get; set; }
/// <summary>
/// Version month
/// </summary>
public byte Month { get; set; }
/// <summary>
/// Version day
/// </summary>
public byte Day { get; set; }
/// <summary>
/// 4 bytes of unknown data
/// </summary>
public byte[]? Unknown2 { get; set; }
/// <summary>
/// Length
/// </summary>
public uint Length { get; set; }
/// <summary>
/// Length bytes of data
/// </summary>
public byte[]? Data { get; set; }
}
}

View File

@@ -1,19 +0,0 @@
namespace SabreTools.Models.BFPK
{
/// <summary>
/// BFPK custom archive format
/// </summary>
/// <see cref="https://forum.xentax.com/viewtopic.php?t=5102"/>
public sealed class Archive
{
/// <summary>
/// Header
/// </summary>
public Header? Header { get; set; }
/// <summary>
/// Files
/// </summary>
public FileEntry?[]? Files { get; set; }
}
}

View File

@@ -1,11 +0,0 @@
namespace SabreTools.Models.BFPK
{
public static class Constants
{
public static readonly byte[] SignatureBytes = new byte[] { 0x42, 0x46, 0x50, 0x4b };
public const string SignatureString = "BFPK";
public const uint SignatureUInt32 = 0x4b504642;
}
}

View File

@@ -1,34 +0,0 @@
namespace SabreTools.Models.BFPK
{
/// <summary>
/// File entry
/// </summary>
/// <see cref="https://forum.xentax.com/viewtopic.php?t=5102"/>
public sealed class FileEntry
{
/// <summary>
/// Name size
/// </summary>
public int NameSize { get; set; }
/// <summary>
/// Name
/// </summary>
public string? Name { get; set; }
/// <summary>
/// Uncompressed size
/// </summary>
public int UncompressedSize { get; set; }
/// <summary>
/// Offset
/// </summary>
public int Offset { get; set; }
/// <summary>
/// Compressed size
/// </summary>
public int CompressedSize { get; set; }
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.BFPK
{
/// <summary>
/// Header
/// </summary>
/// <see cref="https://forum.xentax.com/viewtopic.php?t=5102"/>
public sealed class Header
{
/// <summary>
/// "BFPK"
/// </summary>
public string? Magic { get; set; }
/// <summary>
/// Version
/// </summary>
public int Version { get; set; }
/// <summary>
/// Files
/// </summary>
public int Files { get; set; }
}
}

View File

@@ -1,35 +0,0 @@
namespace SabreTools.Models.BMP
{
/// <summary>
/// The BITMAPFILEHEADER structure contains information about the type, size,
/// and layout of a file that contains a DIB.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader"/>
public sealed class BITMAPFILEHEADER
{
/// <summary>
/// The file type; must be BM.
/// </summary>
public ushort Type { get; set; }
/// <summary>
/// The size, in bytes, of the bitmap file.
/// </summary>
public uint Size { get; set; }
/// <summary>
/// Reserved; must be zero.
/// </summary>
public ushort Reserved1 { get; set; }
/// <summary>
/// Reserved; must be zero.
/// </summary>
public ushort Reserved2 { get; set; }
/// <summary>
/// The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
/// </summary>
public uint OffBits { get; set; }
}
}

View File

@@ -1,94 +0,0 @@
namespace SabreTools.Models.BMP
{
/// <summary>
/// The BITMAPINFOHEADER structure contains information about the dimensions and
/// color format of a device-independent bitmap (DIB).
/// </summary>
public sealed class BITMAPINFOHEADER
{
/// <summary>
/// Specifies the number of bytes required by the structure. This value does
/// not include the size of the color table or the size of the color masks,
/// if they are appended to the end of structure.
/// </summary>
public uint Size { get; set; }
/// <summary>
/// Specifies the width of the bitmap, in pixels.
/// </summary>
public int Width { get; set; }
/// <summary>
/// Specifies the height of the bitmap, in pixels.
/// - For uncompressed RGB bitmaps, if biHeight is positive, the bitmap is a
/// bottom-up DIB with the origin at the lower left corner. If biHeight is
/// negative, the bitmap is a top-down DIB with the origin at the upper left
/// corner.
/// - For YUV bitmaps, the bitmap is always top-down, regardless of the sign of
/// biHeight. Decoders should offer YUV formats with positive biHeight, but for
/// backward compatibility they should accept YUV formats with either positive
/// or negative biHeight.
/// - For compressed formats, biHeight must be positive, regardless of image orientation.
/// </summary>
public int Height { get; set; }
/// <summary>
/// Specifies the number of planes for the target device. This value must be set to 1.
/// </summary>
public ushort Planes { get; set; }
/// <summary>
/// Specifies the number of bits per pixel (bpp). For uncompressed formats, this value
/// is the average number of bits per pixel. For compressed formats, this value is the
/// implied bit depth of the uncompressed image, after the image has been decoded.
/// </summary>
public ushort BitCount { get; set; }
/// <summary>
/// For compressed video and YUV formats, this member is a FOURCC code, specified as a
/// DWORD in little-endian order. For example, YUYV video has the FOURCC 'VYUY' or
/// 0x56595559. For more information, see FOURCC Codes.
///
/// For uncompressed RGB formats, the following values are possible:
/// - BI_RGB: Uncompressed RGB.
/// - BI_BITFIELDS: Uncompressed RGB with color masks. Valid for 16-bpp and 32-bpp bitmaps.
///
/// Note that BI_JPG and BI_PNG are not valid video formats.
///
/// For 16-bpp bitmaps, if biCompression equals BI_RGB, the format is always RGB 555.
/// If biCompression equals BI_BITFIELDS, the format is either RGB 555 or RGB 565. Use
/// the subtype GUID in the AM_MEDIA_TYPE structure to determine the specific RGB type.
/// </summary>
public uint Compression { get; set; }
/// <summary>
/// Specifies the size, in bytes, of the image. This can be set to 0 for uncompressed
/// RGB bitmaps.
/// </summary>
public uint SizeImage { get; set; }
/// <summary>
/// Specifies the horizontal resolution, in pixels per meter, of the target device for
/// the bitmap.
/// </summary>
public int XPelsPerMeter { get; set; }
/// <summary>
/// Specifies the vertical resolution, in pixels per meter, of the target device for
/// the bitmap.
/// </summary>
public int YPelsPerMeter { get; set; }
/// <summary>
/// Specifies the number of color indices in the color table that are actually used by
/// the bitmap.
/// </summary>
public uint ClrUsed { get; set; }
/// <summary>
/// Specifies the number of color indices that are considered important for displaying
/// the bitmap. If this value is zero, all colors are important.
/// </summary>
public uint ClrImportant { get; set; }
}
}

View File

@@ -1,25 +0,0 @@
namespace SabreTools.Models.BSP
{
public static class Constants
{
/// <summary>
/// Number of lumps in a BSP
/// </summary>
public const int HL_BSP_LUMP_COUNT = 15;
/// <summary>
/// Index for the entities lump
/// </summary>
public const int HL_BSP_LUMP_ENTITIES = 0;
/// <summary>
/// Index for the texture data lump
/// </summary>
public const int HL_BSP_LUMP_TEXTUREDATA = 2;
/// <summary>
/// Number of valid mipmap levels
/// </summary>
public const int HL_BSP_MIPMAP_COUNT = 4;
}
}

View File

@@ -1,29 +0,0 @@
namespace SabreTools.Models.BSP
{
/// <summary>
/// Half-Life Level
/// </summary>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
public sealed class File
{
/// <summary>
/// Header data
/// </summary>
public Header? Header { get; set; }
/// <summary>
/// Lumps
/// </summary>
public Lump?[]? Lumps { get; set; }
/// <summary>
/// Texture header data
/// </summary>
public TextureHeader? TextureHeader { get; set; }
/// <summary>
/// Textures
/// </summary>
public Texture?[]? Textures { get; set; }
}
}

View File

@@ -1,11 +0,0 @@
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
public sealed class Header
{
/// <summary>
/// Version
/// </summary>
public uint Version { get; set; }
}
}

View File

@@ -1,16 +0,0 @@
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
public sealed class Lump
{
/// <summary>
/// Offset
/// </summary>
public uint Offset { get; set; }
/// <summary>
/// Length
/// </summary>
public uint Length { get; set; }
}
}

View File

@@ -1,41 +0,0 @@
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
public sealed class Texture
{
/// <summary>
/// Name
/// </summary>
public string? Name { get; set; }
/// <summary>
/// Width
/// </summary>
public uint Width { get; set; }
/// <summary>
/// Height
/// </summary>
public uint Height { get; set; }
/// <summary>
/// Offsets
/// </summary>
public uint[]? Offsets { get; set; }
/// <summary>
/// Texture data
/// </summary>
public byte[]? TextureData { get; set; }
/// <summary>
/// Palette size
/// </summary>
public uint PaletteSize { get; set; }
/// <summary>
/// Palette data
/// </summary>
public byte[]? PaletteData { get; set; }
}
}

View File

@@ -1,16 +0,0 @@
namespace SabreTools.Models.BSP
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/BSPFile.h"/>
public sealed class TextureHeader
{
/// <summary>
/// Texture count
/// </summary>
public uint TextureCount { get; set; }
/// <summary>
/// Offsets
/// </summary>
public uint[]? Offsets { get; set; }
}
}

View File

@@ -1,92 +0,0 @@
namespace SabreTools.Models.CFB
{
/// <summary>
/// Microsoft Compound File Binary (CFB) file format, also known as the
/// Object Linking and Embedding (OLE) or Component Object Model (COM)
/// structured storage compound file implementation binary file format.
/// This structure name can be shortened to compound file.
/// </summary>
/// <see href="https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CFB/%5bMS-CFB%5d.pdf"/>
public sealed class Binary
{
/// <summary>
/// Compound file header
/// </summary>
public FileHeader? Header { get; set; }
/// <summary>
/// The FAT is the main allocator for space within a compound file.
/// Every sector in the file is represented within the FAT in some
/// fashion, including those sectors that are unallocated (free).
/// The FAT is a sector chain that is made up of one or more FAT sectors.
/// </summary>
/// <remarks>
/// If Header Major Version is 3, there MUST be 128 fields specified to fill a 512-byte sector.
///
/// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector
/// </remarks>
public SectorNumber?[]? FATSectorNumbers { get; set; }
/// <summary>
/// The mini FAT is used to allocate space in the mini stream.
/// The mini stream is divided intosmaller, equal-length sectors,
/// and the sector size that is used for the mini stream is specified
/// from the Compound File Header (64 bytes).
/// </summary>
/// <remarks>
/// If Header Major Version is 3, there MUST be 128 fields specified to fill a 512-byte sector.
///
/// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector
/// </remarks>
public SectorNumber?[]? MiniFATSectorNumbers { get; set; }
/// <summary>
/// The DIFAT array is used to represent storage of the FAT sectors.
/// The DIFAT is represented by an array of 32-bit sector numbers.
/// The DIFAT array is stored both in the header and in DIFAT sectors.
/// In the header, the DIFAT array occupies 109 entries, and in each
/// DIFAT sector, the DIFAT array occupies the entire sector minus
/// 4 bytes. (The last field is for chaining the DIFAT sector chain.)
/// </summary>
/// <remarks>
/// If Header Major Version is 3, there MUST be 127 fields specified to
/// fill a 512-byte sector minus the "Next DIFAT Sector Location" field.
///
/// If Header Major Version is 4, there MUST be 1,023 fields specified
/// to fill a 4,096-byte sector minus the "Next DIFAT Sector Location" field.
/// </remarks>
public SectorNumber?[]? DIFATSectorNumbers { get; set; }
/// <summary>
/// The directory entry array is an array of directory entries that
/// are grouped into a directory sector. Each storage object or stream
/// object within a compound file is represented by a single directory
/// entry. The space for the directory sectors that are holding the
/// array is allocated from the FAT.
/// </summary>
/// <remarks>
/// The first entry in the first sector of the directory chain (also
/// referred to as the first element of the directory array, or stream
/// ID #0) is known as the root directory entry, and it is reserved for
/// two purposes. First, it provides a root parent for all objects that
/// are stationed at the root of the compound file. Second, its function
/// is overloaded to store the size and starting sector for the mini stream.
///
/// The root directory entry behaves as both a stream and a storage object.
/// The root directory entry's Name field MUST contain the null-terminated
/// string "Root Entry" in Unicode UTF-16.
///
/// The object class GUID (CLSID) that is stored in the root directory
/// entry can be used for COM activation of the document's application.
///
/// The time stamps for the root storage are not maintained in the root
/// directory entry. Rather, the root storage's creation and modification
/// time stamps are normally stored on the file itself in the file system.
///
/// The Creation Time field in the root storage directory entry MUST be
/// all zeroes. The Modified Time field in the root storage directory
/// entry MAY be all zeroes.
/// <remarks>
public DirectoryEntry?[]? DirectoryEntries { get; set; }
}
}

View File

@@ -1,52 +0,0 @@
using System;
namespace SabreTools.Models.CFB
{
public static class Constants
{
public static readonly byte[] SignatureBytes = new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 };
public const ulong SignatureUInt64 = 0xE11AB1A1E011CFD0;
/// <see href="https://devblogs.microsoft.com/setup/identifying-windows-installer-file-types/"/>
#region Class IDs
/// <summary>
/// Installer Package (msi), Merge Module (msm), Patch Creation Properties (pcp)
/// </summary>
public static readonly Guid InstallerPackage = new Guid("000c1084-0000-0000-c000-000000000046");
/// <summary>
/// Patch Package (msp)
/// </summary>
public static readonly Guid PatchPackage = new Guid("000C1086-0000-0000-C000-000000000046");
/// <summary>
/// Transform (mst)
/// </summary>
public static readonly Guid Transform = new Guid("000C1082-0000-0000-C000-000000000046");
#endregion
/// <see href="https://learn.microsoft.com/en-us/windows/win32/stg/predefined-property-set-format-identifiers"/>
#region Property Set Format IDs
/// <summary>
/// The Summary Information Property Set
/// </summary>
public static readonly Guid FMTID_SummaryInformation = new Guid("F29F85E0-4FF9-1068-AB91-08002B27B3D9");
/// <summary>
/// The DocumentSummaryInformation and UserDefined Property Sets
/// </summary>
public static readonly Guid FMTID_DocSummaryInformation = new Guid("D5CDD502-2E9C-101B-9397-08002B2CF9AE");
/// <summary>
/// The DocumentSummaryInformation and UserDefined Property Sets
/// </summary>
public static readonly Guid FMTID_UserDefinedProperties = new Guid("D5CDD505-2E9C-101B-9397-08002B2CF9AE");
#endregion
}
}

View File

@@ -1,133 +0,0 @@
using System;
namespace SabreTools.Models.CFB
{
/// <see href="https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CFB/%5bMS-CFB%5d.pdf"/>
public sealed class DirectoryEntry
{
/// <summary>
/// This field MUST contain a Unicode string for the storage or stream
/// name encoded in UTF-16. The name MUST be terminated with a UTF-16
/// terminating null character. Thus, storage and stream names are limited
/// to 32 UTF-16 code points, including the terminating null character.
/// When locating an object in the compound file except for the root
/// storage, the directory entry name is compared by using a special
/// case-insensitive uppercase mapping, described in Red-Black Tree.
/// The following characters are illegal and MUST NOT be part of the
/// name: '/', '\', ':', '!'.
/// </summary>
public string? Name { get; set; }
/// <summary>
/// This field MUST be 0x00, 0x01, 0x02, or 0x05, depending on the
/// actual type of object. All other values are not valid.
/// </summary>
public ushort NameLength { get; set; }
/// <summary>
/// This field MUST match the length of the Directory Entry Name Unicode
/// string in bytes. The length MUST be a multiple of 2 and include the
/// terminating null character in the count. This length MUST NOT exceed 64,
/// the maximum size of the Directory Entry Name field.
/// </summary>
public ObjectType ObjectType { get; set; }
/// <summary>
/// This field MUST be 0x00 (red) or 0x01 (black). All other values are not valid.
/// </summary>
public ColorFlag ColorFlag { get; set; }
/// <summary>
/// This field contains the stream ID of the left sibling. If there
/// is no left sibling, the field MUST be set to NOSTREAM (0xFFFFFFFF).
/// </summary>
public StreamID LeftSiblingID { get; set; }
/// <summary>
/// This field contains the stream ID of the right sibling. If there
/// is no right sibling, the field MUST be set to NOSTREAM (0xFFFFFFFF).
/// </summary>
public StreamID RightSiblingID { get; set; }
/// <summary>
/// This field contains the stream ID of a child object. If there is no
/// child object, including all entries for stream objects, the field
/// MUST be set to NOSTREAM (0xFFFFFFFF).
/// </summary>
public StreamID ChildID { get; set; }
/// <summary>
/// This field contains an object class GUID, if this entry is for a
/// storage object or root storage object. For a stream object, this field
/// MUST be set to all zeroes. A value containing all zeroes in a storage
/// or root storage directory entry is valid, and indicates that no object
/// class is associated with the storage. If an implementation of the file
/// format enables applications to create storage objects without explicitly
/// setting an object class GUID, it MUST write all zeroes by default. If
/// this value is not all zeroes, the object class GUID can be used as a
/// parameter to start applications.
/// </summary>
public Guid CLSID { get; set; }
/// <summary>
/// This field contains the user-defined flags if this entry is for a storage
/// object or root storage object. For a stream object, this field SHOULD be
/// set to all zeroes because many implementations provide no way for
/// applications to retrieve state bits from a stream object. If an
/// implementation of the file format enables applications to create storage
/// objects without explicitly setting state bits, it MUST write all zeroes
/// by default.
/// </summary>
public uint StateBits { get; set; }
/// <summary>
/// This field contains the creation time for a storage object, or all zeroes
/// to indicate that the creation time of the storage object was not recorded.
/// The Windows FILETIME structure is used to represent this field in UTC.
/// For a stream object, this field MUST be all zeroes. For a root storage
/// object, this field MUST be all zeroes, and the creation time is retrieved
/// or set on the compound file itself.
/// </summary>
public ulong CreationTime { get; set; }
/// <summary>
/// This field contains the modification time for a storage object, or all
/// zeroes to indicate that the modified time of the storage object was not
/// recorded. The Windows FILETIME structure is used to represent this field
/// in UTC. For a stream object, this field MUST be all zeroes. For a root
/// storage object, this field MAY<2> be set to all zeroes, and the modified
/// time is retrieved or set on the compound file itself.
/// </summary>
public ulong ModifiedTime { get; set; }
/// <summary>
/// This field contains the first sector location if this is a stream object.
/// For a root storage object, this field MUST contain the first sector of the
/// mini stream, if the mini stream exists. For a storage object, this field MUST
/// be set to all zeroes.
/// </summary>
public uint StartingSectorLocation { get; set; }
/// <summary>
/// This 64-bit integer field contains the size of the user-defined data if this
/// is a stream object. For a root storage object, this field contains the size
/// of the mini stream. For a storage object, this field MUST be set to all zeroes.
/// </summary>
/// <remarks>
/// For a version 3 compound file 512-byte sector size, the value of this field MUST
/// be less than or equal to 0x80000000. (Equivalently, this requirement can be stated:
/// the size of a stream or of the mini stream in a version 3 compound file MUST be
/// less than or equal to 2 gigabytes (GB).) Note that as a consequence of this
/// requirement, the most significant 32 bits of this field MUST be zero in a version
/// 3 compound file. However, implementers should be aware that some older
/// implementations did not initialize the most significant 32 bits of this field,
/// and these bits might therefore be nonzero in files that are otherwise valid
/// version 3 compound files. Although this document does not normatively specify
/// parser behavior, it is recommended that parsers ignore the most significant 32 bits
/// of this field in version 3 compound files, treating it as if its value were zero,
/// unless there is a specific reason to do otherwise (for example, a parser whose
/// purpose is to verify the correctness of a compound file).
/// </remarks>
public ulong StreamSize { get; set; }
}
}

View File

@@ -1,474 +0,0 @@
namespace SabreTools.Models.CFB
{
public enum ColorFlag : byte
{
Red = 0x00,
Black = 0x01,
}
public enum ObjectType : byte
{
Unknown = 0x00,
StorageObject = 0x01,
StreamObject = 0x02,
RootStorageObject = 0x05,
}
public enum SectorNumber : uint
{
/// <summary>
/// Regular sector number.
/// </summary>
REGSECT = 0x00000000, // 0x00000000 - 0xFFFFFFF9
/// <summary>
/// Maximum regular sector number.
/// </summary>
MAXREGSECT = 0xFFFFFFFA,
/// <summary>
/// Reserved for future use.
/// </summary>
NotApplicable = 0xFFFFFFFB,
/// <summary>
/// Specifies a DIFAT sector in the FAT.
/// </summary>
DIFSECT = 0xFFFFFFFC,
/// <summary>
/// Specifies a FAT sector in the FAT.
/// </summary>
FATSECT = 0xFFFFFFFD,
/// <summary>
/// End of a linked chain of sectors.
/// </summary>
ENDOFCHAIN = 0xFFFFFFFE,
/// <summary>
/// Specifies an unallocated sector in the FAT, Mini FAT, or DIFAT.
/// </summary>
FREESECT = 0xFFFFFFFF,
}
public enum StreamID : uint
{
/// <summary>
/// Regular stream ID to identify the directory entry.
/// </summary>
REGSID = 0x00000000, // 0x00000000 - 0xFFFFFFF9
/// <summary>
/// Maximum regular stream ID.
/// </summary>
MAXREGSID = 0xFFFFFFFA,
/// <summary>
/// Terminator or empty pointer.
/// </summary>
NOSTREAM = 0xFFFFFFFF,
}
/// <see href="https://learn.microsoft.com/en-us/windows/win32/stg/the-summary-information-property-set"/>
public enum SummaryInformationProperty : uint
{
/// <summary>
/// Title
/// </summary>
PIDSI_TITLE = 0x00000002,
/// <summary>
/// Subject
/// </summary>
PIDSI_SUBJECT = 0x00000003,
/// <summary>
/// Author
/// </summary>
PIDSI_AUTHOR = 0x00000004,
/// <summary>
/// Keywords
/// </summary>
PIDSI_KEYWORDS = 0x00000005,
/// <summary>
/// Comments
/// </summary>
PIDSI_COMMENTS = 0x00000006,
/// <summary>
/// Template
/// </summary>
PIDSI_TEMPLATE = 0x00000007,
/// <summary>
/// Last Saved By
/// </summary>
PIDSI_LASTAUTHOR = 0x00000008,
/// <summary>
/// Revision Number
/// </summary>
PIDSI_REVNUMBER = 0x00000009,
/// <summary>
/// Total Editing Time
/// </summary>
PIDSI_EDITTIME = 0x0000000A,
/// <summary>
/// Last Printed
/// </summary>
PIDSI_LASTPRINTED = 0x0000000B,
/// <summary>
/// Create Time/Date
/// </summary>
PIDSI_CREATE_DTM = 0x0000000C,
/// <summary>
/// Last saved Time/Date
/// </summary>
PIDSI_LASTSAVE_DTM = 0x0000000D,
/// <summary>
/// Number of Pages
/// </summary>
PIDSI_PAGECOUNT = 0x0000000E,
/// <summary>
/// Number of Words
/// </summary>
PIDSI_WORDCOUNT = 0x0000000F,
/// <summary>
/// Number of Characters
/// </summary>
PIDSI_CHARCOUNT = 0x00000010,
/// <summary>
/// Thumbnail
/// </summary>
PIDSI_THUMBNAIL = 0x00000011,
/// <summary>
/// Name of Creating Application
/// </summary>
PIDSI_APPNAME = 0x00000012,
/// <summary>
/// Security
/// </summary>
PIDSI_SECURITY = 0x00000013,
}
/// <remarks>Also includes the DocumentSummaryInformation set</remarks>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/stg/the-documentsummaryinformation-and-userdefined-property-sets"/>
public enum UserDefinedProperty : uint
{
/// <summary>
/// Category - A text string typed by the user that indicates what
/// category the file belongs to (memo, proposal, and so on). It
/// is useful for finding files of same type.
/// </summary>
PIDDSI_CATEGORY = 0x00000002,
/// <summary>
/// PresentationTarget - Target format for presentation (35mm,
/// printer, video, and so on).
/// </summary>
PIDDSI_PRESFORMAT = 0x00000003,
/// <summary>
/// Bytes - Number of bytes.
/// </summary>
PIDDSI_BYTECOUNT = 0x00000004,
/// <summary>
/// Lines - Number of lines.
/// </summary>
PIDDSI_LINECOUNT = 0x00000005,
/// <summary>
/// Paragraphs - Number of paragraphs.
/// </summary>
PIDDSI_PARCOUNT = 0x00000006,
/// <summary>
/// Slides - Number of slides.
/// </summary>
PIDDSI_SLIDECOUNT = 0x00000007,
/// <summary>
/// Notes - Number of pages that contain notes.
/// </summary>
PIDDSI_NOTECOUNT = 0x00000008,
/// <summary>
/// HiddenSlides - Number of slides that are hidden.
/// </summary>
PIDDSI_HIDDENCOUNT = 0x00000009,
/// <summary>
/// MMClips - Number of sound or video clips.
/// </summary>
PIDDSI_MMCLIPCOUNT = 0x0000000A,
/// <summary>
/// ScaleCrop - Set to True (-1) when scaling of the thumbnail
/// is desired. If not set, cropping is desired.
/// </summary>
PIDDSI_SCALE = 0x0000000B,
/// <summary>
/// HeadingPairs - Internally used property indicating the
/// grouping of different document parts and the number of
/// items in each group. The titles of the document parts are
/// stored in the TitlesofParts property. The HeadingPairs
/// property is stored as a vector of variants, in repeating
/// pairs of VT_LPSTR (or VT_LPWSTR) and VT_I4 values. The
/// VT_LPSTR value represents a heading name, and the VT_I4
/// value indicates the count of document parts under that heading.
/// </summary>
PIDDSI_HEADINGPAIR = 0x0000000C,
/// <summary>
/// TitlesofParts - Names of document parts.
/// </summary>
PIDDSI_DOCPARTS = 0x0000000D,
/// <summary>
/// Manager - Manager of the project.
/// </summary>
PIDDSI_MANAGER = 0x0000000E,
/// <summary>
/// Company - Company name.
/// </summary>
PIDDSI_COMPANY = 0x0000000F,
/// <summary>
/// LinksUpToDate - Boolean value to indicate whether the custom
/// links are hampered by excessive noise, for all applications.
/// </summary>
PIDDSI_LINKSDIRTY = 0x00000010,
}
/// <see href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-oaut/3fe7db9f-5803-4dc4-9d14-5425d3f5461f"/>
public enum VariantType : ushort
{
/// <summary>
/// The type of the contained field is undefined. When this flag is
/// specified, the VARIANT MUST NOT contain a data field.
/// </summary>
VT_EMPTY = 0x0000,
/// <summary>
/// The type of the contained field is NULL. When this flag is
/// specified, the VARIANT MUST NOT contain a data field.
/// </summary>
VT_NULL = 0x0001,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 2-byte signed integer.
/// </summary>
VT_I2 = 0x0002,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 4-byte signed integer.
/// </summary>
VT_I4 = 0x0003,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 4-byte IEEE floating-point number.
/// </summary>
VT_R4 = 0x0004,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be an 8-byte IEEE floating-point number.
/// </summary>
VT_R8 = 0x0005,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be CURRENCY.
/// </summary>
VT_CY = 0x0006,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be DATE.
/// </summary>
VT_DATE = 0x0007,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be BSTR.
/// </summary>
VT_BSTR = 0x0008,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a pointer to IDispatch.
/// </summary>
VT_DISPATCH = 0x0009,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be HRESULT.
/// </summary>
VT_ERROR = 0x000A,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be VARIANT_BOOL.
/// </summary>
VT_BOOL = 0x000B,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be VARIANT. It MUST appear with the bit flag VT_BYREF.
/// </summary>
VT_VARIANT = 0x000C,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a pointer to IUnknown.
/// </summary>
VT_UNKNOWN = 0x000D,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be DECIMAL.
/// </summary>
VT_DECIMAL = 0x000E,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 1-byte integer.
/// </summary>
VT_I1 = 0x0010,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 1-byte unsigned integer.
/// </summary>
VT_UI1 = 0x0011,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 2-byte unsigned integer.
/// </summary>
VT_UI2 = 0x0012,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 4-byte unsigned integer.
/// </summary>
VT_UI4 = 0x0013,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be an 8-byte signed integer.
/// </summary>
VT_I8 = 0x0014,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be an 8-byte unsigned integer.
/// </summary>
VT_UI8 = 0x0015,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 4-byte signed integer.
/// </summary>
VT_INT = 0x0016,
/// <summary>
/// Either the specified type, or the type of the element or contained
/// field MUST be a 4-byte unsigned integer.
/// </summary>
VT_UINT = 0x0017,
/// <summary>
/// The specified type MUST be void.
/// </summary>
VT_VOID = 0x0018,
/// <summary>
/// The specified type MUST be HRESULT.
/// </summary>
VT_HRESULT = 0x0019,
/// <summary>
/// The specified type MUST be a unique pointer.
/// </summary>
VT_PTR = 0x001A,
/// <summary>
/// The specified type MUST be SAFEARRAY.
/// </summary>
VT_SAFEARRAY = 0x001B,
/// <summary>
/// The specified type MUST be a fixed-size array.
/// </summary>
VT_CARRAY = 0x001C,
/// <summary>
/// The specified type MUST be user defined.
/// </summary>
VT_USERDEFINED = 0x001D,
/// <summary>
/// The specified type MUST be a NULL-terminated string.
/// </summary>
VT_LPSTR = 0x001E,
/// <summary>
/// The specified type MUST be a zero-terminated string of
/// UNICODE characters.
/// </summary>
VT_LPWSTR = 0x001F,
/// <summary>
/// The type of the element or contained field MUST be a BRECORD.
/// </summary>
VT_RECORD = 0x0024,
/// <summary>
/// The specified type MUST be either a 4-byte or an 8-byte signed
/// integer. The size of the integer is platform specific and
/// determines the system pointer size value.
/// </summary>
VT_INT_PTR = 0x0025,
/// <summary>
/// The specified type MUST be either a 4 byte or an 8 byte unsigned
/// integer. The size of the integer is platform specific and
/// determines the system pointer size value
/// </summary>
VT_UINT_PTR = 0x0026,
/// <summary>
/// The type of the element or contained field MUST be a SAFEARRAY.
/// </summary>
VT_ARRAY = 0x2000,
/// <summary>
/// The type of the element or contained field MUST be a pointer to
/// one of the types listed in the previous rows of this table. If
/// present, this bit flag MUST appear in a VARIANT discriminant
/// with one of the previous flags.
/// </summary>
VT_BYREF = 0x4000
}
}

View File

@@ -1,127 +0,0 @@
using System;
namespace SabreTools.Models.CFB
{
/// <see href="https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CFB/%5bMS-CFB%5d.pdf"/>
public sealed class FileHeader
{
/// <summary>
/// Iddentification signature for the compound file structure, and MUST be
/// set to the value 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1.
/// </summary>
public ulong Signature { get; set; }
/// <summary>
/// Reserved and unused class ID that MUST be set to all zeroes (CLSID_NULL)
/// </summary>
public Guid CLSID { get; set; }
/// <summary>
/// Version number for nonbreaking changes. This field SHOULD be set to
/// 0x003E if the major version field is either 0x0003 or 0x0004.
/// </summary>
public ushort MinorVersion { get; set; }
/// <summary>
/// Version number for breaking changes. This field MUST be set to either
/// 0x0003 (version 3) or 0x0004 (version 4).
/// </summary>
public ushort MajorVersion { get; set; }
/// <summary>
/// This field MUST be set to 0xFFFE. This field is a byte order mark for
/// all integer fields, specifying little-endian byte order.
/// </summary>
public ushort ByteOrder { get; set; }
/// <summary>
/// This field MUST be set to 0x0009, or 0x000c, depending on the Major
/// Version field. This field specifies the sector size of the compound file
/// as a power of 2.
///
/// If Major Version is 3, the Sector Shift MUST be 0x0009, specifying a
/// sector size of 512 bytes.
///
/// If Major Version is 4, the Sector Shift MUST be 0x000C, specifying a
/// sector size of 4096 bytes.
/// </summary>
public ushort SectorShift { get; set; }
/// <summary>
/// This field MUST be set to 0x0006. This field specifies the sector size
/// of the Mini Stream as a power of 2. The sector size of the Mini Stream
/// MUST be 64 bytes.
/// </summary>
public ushort MiniSectorShift { get; set; }
/// <summary>
/// This field MUST be set to all zeroes.
/// </summary>
public byte[]? Reserved { get; set; }
/// <summary>
/// This integer field contains the count of the number of directory sectors
/// in the compound file.
///
/// If Major Version is 3, the Number of Directory Sectors MUST be zero. This
/// field is not supported for version 3 compound files.
/// </summary>
public uint NumberOfDirectorySectors { get; set; }
/// <summary>
/// This integer field contains the count of the number of FAT sectors in the
/// compound file.
/// </summary>
public uint NumberOfFATSectors { get; set; }
/// <summary>
/// This integer field contains the starting sector number for the directory stream.
/// </summary>
public uint FirstDirectorySectorLocation { get; set; }
/// <summary>
/// This integer field MAY contain a sequence number that is incremented every time
/// the compound file is saved by an implementation that supports file transactions.
/// This is the field that MUST be set to all zeroes if file transactions are not
/// implemented.
/// </summary>
public uint TransactionSignatureNumber { get; set; }
/// <summary>
/// This integer field MUST be set to 0x00001000. This field specifies the maximum
/// size of a user-defined data stream that is allocated from the mini FAT and mini
/// stream, and that cutoff is 4,096 bytes. Any user-defined data stream that is
/// greater than or equal to this cutoff size must be allocated as normal sectors from
/// the FAT.
/// </summary>
public uint MiniStreamCutoffSize { get; set; }
/// <summary>
/// This integer field contains the starting sector number for the mini FAT.
/// </summary>
public uint FirstMiniFATSectorLocation { get; set; }
/// <summary>
/// This integer field contains the count of the number of mini FAT sectors in the
/// compound file.
/// </summary>
public uint NumberOfMiniFATSectors { get; set; }
/// <summary>
/// This integer field contains the starting sector number for the DIFAT.
/// </summary>
public uint FirstDIFATSectorLocation { get; set; }
/// <summary>
/// This integer field contains the count of the number of DIFAT sectors in the
/// compound file.
/// </summary>
public uint NumberOfDIFATSectors { get; set; }
/// <summary>
/// This array of 32-bit integer fields contains the first 109 FAT sector
/// locations of the compound file
/// </summary>
public SectorNumber?[]? DIFAT { get; set; }
}
}

View File

@@ -1,82 +0,0 @@
using System;
namespace SabreTools.Models.CFB
{
/// <see href="https://github.com/GNOME/msitools/blob/master/libmsi/libmsi-summary-info.c"/>
public sealed class SummaryInformation
{
#region Set Header
/// <summary>
/// This field MUST be set to 0xFFFE. This field is a byte order mark for
/// all integer fields, specifying little-endian byte order.
/// </summary>
public ushort ByteOrder { get; set; }
/// <summary>
/// Format
/// </summary>
public ushort Format { get; set; }
/// <summary>
/// Build
/// </summary>
public ushort Build { get; set; }
/// <summary>
/// Platform ID
/// </summary>
public ushort PlatformID { get; set; }
/// <summary>
/// CLSID
/// </summary>
public Guid CLSID { get; set; }
/// <summary>
/// 4 bytes of reserved data
/// </summary>
public byte[]? Reserved { get; set; }
#endregion
#region Format Header
/// <summary>
/// Format ID, should be <see cref="Constants.FMTID_SummaryInformation"/>
/// </summary>
public Guid FormatID { get; set; }
/// <summary>
/// 16 bytes of unknown data
/// </summary>
public byte[]? Unknown { get; set; }
#endregion
#region Section Header
/// <summary>
/// Location of the section
/// </summary>
public uint Offset { get; set; }
/// <summary>
/// Section count(?)
/// </summary>
public uint SectionCount { get; set; }
/// <summary>
/// Property count
/// </summary>
public uint PropertyCount { get; set; }
/// <summary>
/// Properties
/// </summary>
/// <remarks>Each Variant might be followed by an index and offset value</remarks>
public Variant?[]? Properties { get; set; }
#endregion
}
}

View File

@@ -1,45 +0,0 @@
namespace SabreTools.Models.CFB
{
/// <summary>
/// VARIANT is a container for a union that can hold many types of data.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-oaut/b2ee2b50-665e-43e6-a92c-8f2a29fd7add"/>
public sealed class Variant
{
/// <summary>
/// MUST be set to the size, in quad words (64 bits), of the structure.
/// </summary>
public uint Size { get; set; }
/// <summary>
/// MUST be set to 0 and MUST be ignored by the recipient.
/// </summary>
public uint RpcReserved { get; set; }
/// <summary>
/// MUST be set to one of the values specified with a "V".
/// </summary>
public VariantType VariantType { get; set; }
/// <summary>
/// MAY be set to 0 and MUST be ignored by the recipient.
/// </summary>
public ushort Reserved1 { get; set; }
/// <summary>
/// MAY be set to 0 and MUST be ignored by the recipient.
/// </summary>
public ushort Reserved2 { get; set; }
/// <summary>
/// MAY be set to 0 and MUST be ignored by the recipient.
/// </summary>
public ushort Reserved3 { get; set; }
/// <summary>
/// MUST contain an instance of the type, according to the value
/// in the <see cref="VariantType"/> field.
/// </summary>
public object? Union { get; set; }
}
}

View File

@@ -1,28 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class CompressedMapEntryV5
{
/// <summary>
/// Compression type
/// </summary>
public byte Compression { get; set; }
/// <summary>
/// Compressed length
/// </summary>
/// <remarks>Actually UInt24</remarks>
public uint CompLength { get; set; }
/// <summary>
/// Offset
/// </summary>
/// <remarks>Actually UInt48</remarks>
public ulong Offset { get; set; }
/// <summary>
/// CRC-16 of the data
/// </summary>
public ushort CRC { get; set; }
}
}

View File

@@ -1,42 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class CompressedMapHeaderV5
{
/// <summary>
/// Length of compressed map
/// </summary>
public uint Length { get; set; }
/// <summary>
/// Offset of first block
/// </summary>
/// <remarks>Actually UInt48</remarks>
public ulong DataStart { get; set; }
/// <summary>
/// CRC-16 of the map
/// </summary>
public ushort CRC { get; set; }
/// <summary>
/// Bits used to encode complength
/// </summary>
public byte LengthBits { get; set; }
/// <summary>
/// Bits used to encode self-refs
/// </summary>
public byte HunkBits { get; set; }
/// <summary>
/// Bits used to encode parent unit refs
/// </summary>
public byte ParentUnitBits { get; set; }
/// <summary>
/// Future use
/// </summary>
public byte Reserved { get; set; }
}
}

View File

@@ -1,42 +0,0 @@
using System;
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public enum CompressionType : uint
{
#region V1
CHDCOMPRESSION_NONE = 0,
CHDCOMPRESSION_ZLIB = 1,
#endregion
#region V3
CHDCOMPRESSION_ZLIB_PLUS = 2,
#endregion
#region V4
CHDCOMPRESSION_AV = 3,
#endregion
}
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
[Flags]
public enum Flags : uint
{
/// <summary>
/// Set if this drive has a parent
/// </summary>
DriveHasParent = 0x00000001,
/// <summary>
/// Set if this drive allows writes
/// </summary>
DriveAllowsWrites = 0x00000002,
}
}

View File

@@ -1,21 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public abstract class Header
{
/// <summary>
/// 'MComprHD'
/// </summary>
public string? Tag { get; set; }
/// <summary>
/// Length of header (including tag and length fields)
/// </summary>
public uint Length { get; set; }
/// <summary>
/// Drive format version
/// </summary>
public uint Version { get; set; }
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class HeaderV1 : Header
{
/// <summary>
/// Flags
/// </summary>
public Flags Flags { get; set; }
/// <summary>
/// Compression type
/// </summary>
public CompressionType Compression { get; set; }
/// <summary>
/// 512-byte sectors per hunk
/// </summary>
public uint HunkSize { get; set; }
/// <summary>
/// Total # of hunks represented
/// </summary>
public uint TotalHunks { get; set; }
/// <summary>
/// Number of cylinders on hard disk
/// </summary>
public uint Cylinders { get; set; }
/// <summary>
/// Number of heads on hard disk
/// </summary>
public uint Heads { get; set; }
/// <summary>
/// Number of sectors on hard disk
/// </summary>
public uint Sectors { get; set; }
/// <summary>
/// MD5 checksum of raw data
/// </summary>
public byte[]? MD5 { get; set; } = new byte[16];
/// <summary>
/// MD5 checksum of parent file
/// </summary>
public byte[]? ParentMD5 { get; set; } = new byte[16];
}
}

View File

@@ -1,56 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class HeaderV2 : Header
{
/// <summary>
/// Flags
/// </summary>
public Flags Flags { get; set; }
/// <summary>
/// Compression type
/// </summary>
public CompressionType Compression { get; set; }
/// <summary>
/// Seclen-byte sectors per hunk
/// </summary>
public uint HunkSize { get; set; }
/// <summary>
/// Total # of hunks represented
/// </summary>
public uint TotalHunks { get; set; }
/// <summary>
/// Number of cylinders on hard disk
/// </summary>
public uint Cylinders { get; set; }
/// <summary>
/// Number of heads on hard disk
/// </summary>
public uint Heads { get; set; }
/// <summary>
/// Number of sectors on hard disk
/// </summary>
public uint Sectors { get; set; }
/// <summary>
/// MD5 checksum of raw data
/// </summary>
public byte[]? MD5 { get; set; } = new byte[16];
/// <summary>
/// MD5 checksum of parent file
/// </summary>
public byte[]? ParentMD5 { get; set; } = new byte[16];
/// <summary>
/// Number of bytes per sector
/// </summary>
public uint BytesPerSector { get; set; }
}
}

View File

@@ -1,56 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class HeaderV3 : Header
{
/// <summary>
/// Flags
/// </summary>
public Flags Flags { get; set; }
/// <summary>
/// Compression type
/// </summary>
public CompressionType Compression { get; set; }
/// <summary>
/// Total # of hunks represented
/// </summary>
public uint TotalHunks { get; set; }
/// <summary>
/// Logical size of the data (in bytes)
/// </summary>
public ulong LogicalBytes { get; set; }
/// <summary>
/// Offset to the first blob of metadata
/// </summary>
public ulong MetaOffset { get; set; }
/// <summary>
/// MD5 checksum of raw data
/// </summary>
public byte[]? MD5 { get; set; } = new byte[16];
/// <summary>
/// MD5 checksum of parent file
/// </summary>
public byte[]? ParentMD5 { get; set; } = new byte[16];
/// <summary>
/// Number of bytes per hunk
/// </summary>
public uint HunkBytes { get; set; }
/// <summary>
/// SHA1 checksum of raw data
/// </summary>
public byte[]? SHA1 { get; set; } = new byte[20];
/// <summary>
/// SHA1 checksum of parent file
/// </summary>
public byte[]? ParentSHA1 { get; set; } = new byte[20];
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class HeaderV4 : Header
{
/// <summary>
/// Flags
/// </summary>
public Flags Flags { get; set; }
/// <summary>
/// Compression type
/// </summary>
public CompressionType Compression { get; set; }
/// <summary>
/// Total # of hunks represented
/// </summary>
public uint TotalHunks { get; set; }
/// <summary>
/// Logical size of the data (in bytes)
/// </summary>
public ulong LogicalBytes { get; set; }
/// <summary>
/// Offset to the first blob of metadata
/// </summary>
public ulong MetaOffset { get; set; }
/// <summary>
/// Number of bytes per hunk
/// </summary>
public uint HunkBytes { get; set; }
/// <summary>
/// Combined raw+meta SHA1
/// </summary>
public byte[]? SHA1 { get; set; } = new byte[20];
/// <summary>
/// Combined raw+meta SHA1 of parent
/// </summary>
public byte[]? ParentSHA1 { get; set; } = new byte[20];
/// <summary>
/// Raw data SHA1
/// </summary>
public byte[]? RawSHA1 { get; set; } = new byte[20];
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class HeaderV5 : Header
{
/// <summary>
/// Which custom compressors are used?
/// </summary>
public uint[] Compressors { get; set; } = new uint[4];
/// <summary>
/// Logical size of the data (in bytes)
/// </summary>
public ulong LogicalBytes { get; set; }
/// <summary>
/// Offset to the map
/// </summary>
public ulong MapOffset { get; set; }
/// <summary>
/// Offset to the first blob of metadata
/// </summary>
public ulong MetaOffset { get; set; }
/// <summary>
/// Number of bytes per hunk (512k maximum)
/// </summary>
public uint HunkBytes { get; set; }
/// <summary>
/// Number of bytes per unit within each hunk
/// </summary>
public uint UnitBytes { get; set; }
/// <summary>
/// Raw data SHA1
/// </summary>
public byte[]? RawSHA1 { get; set; }
/// <summary>
/// Combined raw+meta SHA1
/// </summary>
public byte[]? SHA1 { get; set; }
/// <summary>
/// Combined raw+meta SHA1 of parent
/// </summary>
public byte[]? ParentSHA1 { get; set; }
}
}

View File

@@ -1,16 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class MapV1
{
/// <summary>
/// Starting offset within the file
/// </summary>
public ulong StartingOffset { get; set; }
/// <summary>
/// Length of data; If == hunksize, data is uncompressed
/// </summary>
public ulong Length { get; set; }
}
}

View File

@@ -1,31 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class MapV3
{
/// <summary>
/// Starting offset within the file
/// </summary>
public ulong StartingOffset { get; set; }
/// <summary>
/// 32-bit CRC of the uncompressed data
/// </summary>
public uint CRC32 { get; set; }
/// <summary>
/// Lower 16 bits of length
/// </summary>
public ushort LengthLo { get; set; }
/// <summary>
/// Upper 8 bits of length
/// </summary>
public byte LengthHi { get; set; }
/// <summary>
/// Flags, indicating compression info
/// </summary>
public byte Flags { get; set; }
}
}

View File

@@ -1,11 +0,0 @@
namespace SabreTools.Models.CHD
{
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
public class UncompressedMapV5
{
/// <summary>
/// Starting offset / hunk size
/// </summary>
public uint StartingOffset { get; set; }
}
}

View File

@@ -1,621 +0,0 @@
using System;
namespace SabreTools.Models.Charts
{
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/tree/main/doc/FileFormats/song.ini"/>
/// <remarks>[song]/[Song]</remarks>
internal class SongIni
{
#region Song/Chart Metadata
/// <summary>
/// Title of the song.
/// </summary>
/// <remarks>name</remarks>
public string? Name { get; set; }
/// <summary>
/// Artist(s) or band(s) behind the song.
/// </summary>
/// <remarks>artist</remarks>
public string? Artist { get; set; }
/// <summary>
/// Title of the album the song is featured in.
/// </summary>
/// <remarks>album</remarks>
public string? Album { get; set; }
/// <summary>
/// Genre of the song.
/// </summary>
/// <remarks>genre</remarks>
public string? Genre { get; set; }
/// <summary>
/// Sub-genre for the song.
/// </summary>
/// <remarks>sub_genre</remarks>
public string? SubGenre { get; set; }
/// <summary>
/// Year of the songs release.
/// </summary>
/// <remarks>year</remarks>
public string? Year { get; set; }
/// <summary>
/// Community member responsible for charting the song.
/// </summary>
/// <remarks>charter, frets</remarks>
public string? Charter { get; set; }
/// <summary>
/// Version number for the song.
/// </summary>
/// <remarks>version</remarks>
public long? Version { get; set; }
/// <summary>
/// Track number of the song within the album it's from.
/// </summary>
/// <remarks>album_track, track</remarks>
public long? AlbumTrack { get; set; }
/// <summary>
/// Track number of the song within the playlist/setlist it's from.
/// </summary>
/// <remarks>playlist_track</remarks>
public long? PlaylistTrack { get; set; }
/// <summary>
/// Length of the song's audio in milliseconds.
/// </summary>
/// <remarks>song_length</remarks>
public long? SongLength { get; set; }
/// <summary>
/// Timestamp in milliseconds where the song preview starts.
/// </summary>
/// <remarks>preview_start_time</remarks>
public long? PreviewStartTime { get; set; }
/// <summary>
/// Timestamp in milliseconds that the preview should stop at.
/// </summary>
/// <remarks>preview_end_time</remarks>
public long? PreviewEndTime { get; set; }
/// <summary>
/// Flavor text for this song, usually shown after picking the song or during loading.
/// </summary>
/// <remarks>loading_phrase</remarks>
public string? LoadingPhrase { get; set; }
#endregion
#region Song/Chart Metadata (Game-Specific)
/// <summary>
/// (FoFiX) Hex color to use in the song screen for the cassette.
/// </summary>
/// <remarks>cassettecolor</remarks>
public string? CassetteColor { get; set; }
/// <summary>
/// (FoFiX) Miscellaneous tags for the chart.
/// Only known valid value is `cover`.
/// </summary>
/// <remarks>tags</remarks>
public string? Tags { get; set; }
/// <summary>
/// (PS) Two timestamps in milliseconds for preview start and end time.
/// Example: `55000 85000`
/// </summary>
/// <remarks>preview</remarks>
public long[]? Preview { get; set; }
/// <summary>
/// (CH) Playlist that the song should show up in.
/// </summary>
/// <remarks>playlist</remarks>
public string? Playlist { get; set; }
/// <summary>
/// (CH) Sub-playlist that the song should show up in.
/// </summary>
/// <remarks>sub_playlist</remarks>
public string? SubPlaylist { get; set; }
/// <summary>
/// (CH) Indicates if this song is a modchart.
/// Meant for sorting purposes only.
/// </summary>
/// <remarks>modchart</remarks>
public bool? Modchart { get; set; }
/// <summary>
/// (CH) Indicates if the song has lyrics or not.
/// Meant for sorting purposes only.
/// </summary>
/// <remarks>lyrics</remarks>
public bool? Lyrics { get; set; }
#endregion
#region Track Difficulties
/// <summary>
/// Overall difficulty of the song.
/// </summary>
/// <remarks>diff_band</remarks>
public long? DiffBand { get; set; }
/// <summary>
/// Difficulty of the Lead Guitar track.
/// </summary>
/// <remarks>diff_guitar</remarks>
public long? DiffGuitar { get; set; }
/// <summary>
/// Difficulty of the 6-Fret Lead track.
/// </summary>
/// <remarks>diff_guitarghl</remarks>
public long? DiffGuitarGHL { get; set; }
/// <summary>
/// Difficulty of the Guitar Co-op track.
/// </summary>
/// <remarks>diff_guitar_coop</remarks>
public long? DiffGuitarCoop { get; set; }
/// <summary>
/// Difficulty of the 6-Fret Guitar Co-op track.
/// </summary>
/// <remarks>diff_guitar_coop_ghl</remarks>
public long? DiffGuitarCoopGHL { get; set; }
/// <summary>
/// Difficulty of the Pro Guitar track.
/// </summary>
/// <remarks>diff_guitar_real</remarks>
public long? DiffGuitarReal { get; set; }
/// <summary>
/// Difficulty of the Pro Guitar 22-fret track.
/// </summary>
/// <remarks>diff_guitar_real_22</remarks>
public long? DiffGuitarReal22 { get; set; }
/// <summary>
/// Difficulty of the Rhythm Guitar track.
/// </summary>
/// <remarks>diff_rhythm</remarks>
public long? DiffRhythm { get; set; }
/// <summary>
/// Difficulty of the 6-Fret Rhythm Guitar track.
/// </summary>
/// <remarks>diff_rhythm_ghl</remarks>
public long? DiffRhythmGHL { get; set; }
/// <summary>
/// Difficulty of the Bass Guitar track.
/// </summary>
/// <remarks>diff_bass</remarks>
public long? DiffBass { get; set; }
/// <summary>
/// Difficulty of the 6-Fret Bass track.
/// </summary>
/// <remarks>diff_bassghl</remarks>
public long? DiffBassGHL { get; set; }
/// <summary>
/// Difficulty of the Pro Bass track.
/// </summary>
/// <remarks>diff_bass_real</remarks>
public long? DiffBassReal { get; set; }
/// <summary>
/// Difficulty of the Pro Bass 22-fret track.
/// </summary>
/// <remarks>diff_bass_real_22</remarks>
public long? DiffBassReal22 { get; set; }
/// <summary>
/// Difficulty of the Drums track.
/// </summary>
/// <remarks>diff_drums</remarks>
public long? DiffDrums { get; set; }
/// <summary>
/// Difficulty of the Pro Drums track.
/// </summary>
/// <remarks>diff_drums_real</remarks>
public long? DiffDrumsReal { get; set; }
/// <summary>
/// Difficulty of the Drums Real track.
/// </summary>
/// <remarks>diff_drums_real_ps</remarks>
public long? DiffDrumsRealPS { get; set; }
/// <summary>
/// Difficulty of the Keys track.
/// </summary>
/// <remarks>diff_keys</remarks>
public long? DiffKeys { get; set; }
/// <summary>
/// Difficulty of the Pro Keys track.
/// </summary>
/// <remarks>diff_keys_real</remarks>
public long? DiffKeysReal { get; set; }
/// <summary>
/// Difficulty of the Keys Real track.
/// </summary>
/// <remarks>diff_keys_real_ps</remarks>
public long? DiffKeysRealPS { get; set; }
/// <summary>
/// Difficulty of the Vocals track.
/// </summary>
/// <remarks>diff_vocals</remarks>
public long? DiffVocals { get; set; }
/// <summary>
/// Difficulty of the Harmonies track.
/// </summary>
/// <remarks>diff_vocals_harm</remarks>
public long? DiffVocalsHarm { get; set; }
/// <summary>
/// Difficulty of the Dance track.
/// </summary>
/// <remarks>diff_dance</remarks>
public long? DiffDance { get; set; }
#endregion
#region Chart Properties
/// <summary>
/// Forces the Drums track to be Pro Drums.
/// </summary>
/// <remarks>pro_drums, pro_drum (FoFiX)</remarks>
public bool? ProDrums { get; set; }
/// <summary>
/// Forces the Drums track to be 5-lane.
/// </summary>
/// <remarks>five_lane_drums</remarks>
public bool? FiveLaneDrums { get; set; }
/// <summary>
/// Specifies a voice type for the singer (either "male" or "female").
/// </summary>
/// <remarks>vocal_gender</remarks>
public string? VocalGender { get; set; }
/// <summary>
/// Specifies a tuning for 17-fret Pro Guitar.
/// </summary>
/// <remarks>real_guitar_tuning</remarks>
public string? RealGuitarTuning { get; set; }
/// <summary>
/// Specifies a tuning for 22-fret Pro Guitar.
/// </summary>
/// <remarks>real_guitar_22_tuning</remarks>
public string? RealGuitar22Tuning { get; set; }
/// <summary>
/// Specifies a tuning for 17-fret Pro Bass.
/// </summary>
/// <remarks>real_bass_tuning</remarks>
public string? RealBassTuning { get; set; }
/// <summary>
/// Specifies a tuning for 22-fret Pro Bass.
/// </summary>
/// <remarks>real_bass_22_tuning</remarks>
public string? RealBass22Tuning { get; set; }
/// <summary>
/// Specifies the number of lanes for the right hand in Real Keys.
/// </summary>
/// <remarks>real_keys_lane_count_right</remarks>
public long? RealKeysLaneCountRight { get; set; }
/// <summary>
/// Specifies the number of lanes for the left hand in Real Keys.
/// </summary>
/// <remarks>real_keys_lane_count_left</remarks>
public long? RealKeysLaneCountLeft { get; set; }
/// <summary>
/// Delays the chart relative to the audio by the specified number of milliseconds.
/// Higher = later notes. Can be negative.
/// </summary>
/// <remarks>delay</remarks>
[Obsolete]
public long? Delay { get; set; }
/// <summary>
/// Overrides the default sustain cutoff threshold with a specified value in ticks.
/// </summary>
/// <remarks>sustain_cutoff_threshold</remarks>
[Obsolete]
public long? SustainCutoffThreshold { get; set; }
/// <summary>
/// Overrides the default HOPO threshold with a specified value in ticks.
/// </summary>
/// <remarks>hopo_frequency</remarks>
[Obsolete]
public long? HopoFrequency { get; set; }
/// <summary>
/// Sets the HOPO threshold to be a 1/8th step.
/// </summary>
/// <remarks>eighthnote_hopo</remarks>
[Obsolete]
public bool? EighthNoteHopo { get; set; }
/// <summary>
/// Overrides the .mid note number for Star Power on 5-Fret Guitar.
/// Valid values are 103 and 116.
/// </summary>
/// <remarks>multiplier_note, star_power_note (PS)</remarks>
[Obsolete]
public long? MultiplierNote { get; set; }
#endregion
#region Chart Properties (Game-Specific)
/// <summary>
/// (PS) Sets 5 to 4 Lane Drums Fallback Note
/// </summary>
/// <remarks>drum_fallback_blue</remarks>
public bool? DrumFallbackBlue { get; set; }
/// <summary>
/// (FoFiX) Marks a song as a tutorial and hides it from Quickplay.
/// </summary>
/// <remarks>tutorial</remarks>
public bool? Tutorial { get; set; }
/// <summary>
/// (FoFiX) Marks a song as a boss battle.
/// </summary>
/// <remarks>boss_battle</remarks>
public bool? BossBattle { get; set; }
/// <summary>
/// (FoFiX) Overrides the natural HOPO threshold using numbers from 0 to 5.
/// </summary>
/// <remarks>hopofreq</remarks>
[Obsolete]
public long? HopoFreq { get; set; }
/// <summary>
/// (FoFiX) Sets the "early hit window" size.
/// Valid values are "none", "half", or "full".
/// </summary>
/// <remarks>early_hit_window_size</remarks>
public string? EarlyHitWindowSize { get; set; }
/// <summary>
/// (CH) Sets whether or not end events in the chart will be respected.
/// </summary>
/// <remarks>end_events</remarks>
public bool? EndEvents { get; set; }
/// <summary>
/// (PS) Enables .mid SysEx events for guitar sliders/tap notes.
/// </summary>
/// <remarks>sysex_slider</remarks>
public bool? SysExSlider { get; set; }
/// <summary>
/// (PS) Enables .mid SysEx events for Real Drums hi-hat pedal control.
/// </summary>
/// <remarks>sysex_high_hat_ctrl</remarks>
public bool? SysExHighHatCtrl { get; set; }
/// <summary>
/// (PS) Enables .mid SysEx events for Real Drums rimshot hits.
/// </summary>
/// <remarks>sysex_rimshot</remarks>
public bool? SysExRimshot { get; set; }
/// <summary>
/// (PS) Enables .mid SysEx events for guitar open notes.
/// </summary>
/// <remarks>sysex_open_bass</remarks>
public bool? SysExOpenBass { get; set; }
/// <summary>
/// (PS) Enables .mid SysEx events for Pro Guitar/Bass slide directions.
/// </summary>
/// <remarks>sysex_pro_slide</remarks>
public bool? SysExProSlide { get; set; }
/// <summary>
/// (PS) Sound sample set index for guitar.
/// </summary>
/// <remarks>guitar_type</remarks>
public long? GuitarType { get; set; }
/// <summary>
/// (PS) Sound sample set index for bass.
/// </summary>
/// <remarks>bass_type</remarks>
public long? BassType { get; set; }
/// <summary>
/// (PS) Sound sample set index for drums.
/// </summary>
/// <remarks>kit_type</remarks>
public long? KitType { get; set; }
/// <summary>
/// (PS) Sound sample set index for keys.
/// </summary>
/// <remarks>keys_type</remarks>
public long? KeysType { get; set; }
/// <summary>
/// (PS) Sound sample set index for dance.
/// </summary>
/// <remarks>dance_type</remarks>
public long? DanceType { get; set; }
#endregion
#region Images and Other Resources
/// <summary>
/// Name of an icon image to display for this song.
/// Included in either the chart folder or the game the chart was made for, or sourced from this repository of icons.
/// </summary>
/// <remarks>icon</remarks>
public string? Icon { get; set; }
/// <summary>
/// Name for a background image file.
/// </summary>
/// <remarks>background</remarks>
public string? Background { get; set; }
/// <summary>
/// Name for a background video file.
/// </summary>
/// <remarks>video</remarks>
public string? Video { get; set; }
/// <summary>
/// Name for a background video file.
/// </summary>
/// <remarks>video_loop</remarks>
public bool? VideoLoop { get; set; }
/// <summary>
/// Timestamp in milliseconds where playback of an included video will start. Can be negative.
/// This tag controls the time relative to the video, not relative to the chart. Negative values will delay the video, positive values will make the video be at a further point in when the chart starts.
/// </summary>
/// <remarks>video_start_time</remarks>
public long? VideoStartTime { get; set; }
/// <summary>
/// Timestamp in milliseconds where playback of an included video will end. -1 means no time is specified.
/// This is assumed to also be relative to the video, not the chart.
/// </summary>
/// <remarks>video_end_time</remarks>
public long? VideoEndTime { get; set; }
/// <summary>
/// Name for a cover image file.
/// </summary>
/// <remarks>cover</remarks>
public string? Cover { get; set; }
#endregion
#region Images and Other Resources (Game-Specific)
/// <summary>
/// (PS) Name for banner A.
/// </summary>
/// <remarks>link_name_a</remarks>
public string? LinkNameA { get; set; }
/// <summary>
/// (PS) Name for banner B.
/// </summary>
/// <remarks>link_name_b</remarks>
public string? LinkNameB { get; set; }
/// <summary>
/// (PS) Link that clicking banner A will open.
/// </summary>
/// <remarks>banner_link_a</remarks>
public string? BannerLinkA { get; set; }
/// <summary>
/// (PS) Link that clicking banner B will open.
/// </summary>
/// <remarks>banner_link_b</remarks>
public string? BannerLinkB { get; set; }
#endregion
#region Miscellaneous (Game-Specific)
/// <summary>
/// (FoFiX) High score data.
/// </summary>
/// <remarks>scores</remarks>
public string? Scores { get; set; }
/// <summary>
/// (FoFiX) Additional score data.
/// </summary>
/// <remarks>scores_ext</remarks>
public string? ScoresExt { get; set; }
/// <summary>
/// (FoFiX) Play count.
/// </summary>
/// <remarks>count</remarks>
public long? Count { get; set; }
/// <summary>
/// (PS) Player's rating of the song
/// </summary>
/// <remarks>rating</remarks>
public long? Rating { get; set; }
/// <summary>
/// (FoFiX) Career ID for this song.
/// </summary>
/// <remarks>unlock_id</remarks>
public string? UnlockId { get; set; }
/// <summary>
/// (FoFiX) The career ID that must be completed to unlock this song.
/// </summary>
/// <remarks>unlock_require</remarks>
public string? UnlockRequire { get; set; }
/// <summary>
/// (FoFiX) Text to display if the song is locked.
/// </summary>
/// <remarks>unlock_text</remarks>
public string? UnlockText { get; set; }
/// <summary>
/// (FoFiX) Indicates if the song is unlocked.
/// </summary>
/// <remarks>unlock_completed</remarks>
public long? UnlockCompleted { get; set; }
/// <summary>
/// (Editor on Fire) Sets a velocity number for drums accent notes.
/// </summary>
/// <remarks>eof_midi_import_drum_accent_velocity</remarks>
public long? EoFMidiImportDrumAccentVelocity { get; set; }
/// <summary>
/// (Editor on Fire) Sets a velocity number for drums ghost notes.
/// </summary>
/// <remarks>eof_midi_import_drum_ghost_velocity</remarks>
public long? EoFMidiImportDrumGhostVelocity { get; set; }
#endregion
}
}

View File

@@ -1,21 +0,0 @@
using System.Collections.Generic;
namespace SabreTools.Models.Charts
{
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/blob/main/doc/FileFormats/Other/Frets%20on%20Fire%20X/Careers.md"/>
/// <remarks>[titles]</remarks>
internal class TitlesIni
{
/// <summary>
/// A space-separated list of .ini sections to include in the career.
/// </summary>
/// <remarks>sections</remarks>
public string[]? SectionList { get; set; }
/// <summary>
/// `name` - Display name of the tier.
/// `unlock_id` - Name used for associating a song with this tier, and for checking unlock requirements.
/// </summary>
public Dictionary<string, (string? Name, string? UnlockId)>? Sections { get; set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>archive</remarks>
public class Archive
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>biosset</remarks>
public class BiosSet
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>description</remarks>
[Required]
public string? Description { get; set; }
/// <remarks>default</remarks>
public string? Default { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,27 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>chip</remarks>
public class Chip
{
/// <remarks>type, (cpu|audio)</remarks>
[Required]
public string? Type { get; set; }
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>flags</remarks>
public string? Flags { get; set; }
/// <remarks>clock, Numeric?</remarks>
public string? Clock { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,58 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>clrmamepro</remarks>
public class ClrMamePro
{
/// <remarks>name</remarks>
public string? Name { get; set; }
/// <remarks>description</remarks>
public string? Description { get; set; }
/// <remarks>rootdir</remarks>
public string? RootDir { get; set; }
/// <remarks>category</remarks>
public string? Category { get; set; }
/// <remarks>version</remarks>
public string? Version { get; set; }
/// <remarks>date</remarks>
public string? Date { get; set; }
/// <remarks>author</remarks>
public string? Author { get; set; }
/// <remarks>homepage</remarks>
public string? Homepage { get; set; }
/// <remarks>url</remarks>
public string? Url { get; set; }
/// <remarks>comment</remarks>
public string? Comment { get; set; }
/// <remarks>header</remarks>
public string? Header { get; set; }
/// <remarks>type</remarks>
public string? Type { get; set; }
/// <remarks>forcemerging</remarks>
public string? ForceMerging { get; set; }
/// <remarks>forcezipping</remarks>
public string? ForceZipping { get; set; }
/// <remarks>forcepacking</remarks>
public string? ForcePacking { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,23 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>dipswitch</remarks>
public class DipSwitch
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>entry</remarks>
public string[]? Entry { get; set; }
/// <remarks>default, (yes|no) "no"</remarks>
public string? Default { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,32 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>disk</remarks>
public class Disk
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>md5</remarks>
public string? MD5 { get; set; }
/// <remarks>sha1</remarks>
public string? SHA1 { get; set; }
/// <remarks>merge</remarks>
public string? Merge { get; set; }
/// <remarks>status</remarks>
public string? Status { get; set; }
/// <remarks>flags</remarks>
public string? Flags { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,29 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>driver</remarks>
public class Driver
{
/// <remarks>status, (good|imperfect|preliminary)</remarks>
[Required]
public string? Status { get; set; }
/// <remarks>color, (good|imperfect|preliminary)</remarks>
public string? Color { get; set; }
/// <remarks>sound, (good|imperfect|preliminary)</remarks>
public string? Sound { get; set; }
/// <remarks>palettesize, Numeric?</remarks>
public string? PaletteSize { get; set; }
/// <remarks>blit, (plain|dirty)</remarks>
public string? Blit { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,5 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>game</remarks>
public class Game : GameBase { }
}

View File

@@ -1,87 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <summary>
/// Base class to unify the various game-like types
/// </summary>
public abstract class GameBase
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>description</remarks>
public string? Description { get; set; }
/// <remarks>year</remarks>
public string? Year { get; set; }
/// <remarks>manufacturer</remarks>
public string? Manufacturer { get; set; }
/// <remarks>category</remarks>
public string? Category { get; set; }
/// <remarks>cloneof</remarks>
public string? CloneOf { get; set; }
/// <remarks>romof</remarks>
public string? RomOf { get; set; }
/// <remarks>sampleof</remarks>
public string? SampleOf { get; set; }
/// <remarks>release</remarks>
public Release[]? Release { get; set; }
/// <remarks>biosset</remarks>
public BiosSet[]? BiosSet { get; set; }
/// <remarks>rom</remarks>
public Rom[]? Rom { get; set; }
/// <remarks>disk</remarks>
public Disk[]? Disk { get; set; }
/// <remarks>sample</remarks>
public Sample[]? Sample { get; set; }
/// <remarks>archive</remarks>
public Archive[]? Archive { get; set; }
#region Aaru Extensions
/// <remarks>media, Appears after Disk</remarks>
public Media[]? Media { get; set; }
#endregion
#region MAME Extensions
/// <remarks>chip, Appears after Archive</remarks>
public Chip[]? Chip { get; set; }
/// <remarks>video, Appears after Chip</remarks>
public Video[]? Video { get; set; }
/// <remarks>sound, Appears after Video</remarks>
public Sound? Sound { get; set; }
/// <remarks>input, Appears after Sound</remarks>
public Input? Input { get; set; }
/// <remarks>dipswitch, Appears after Input</remarks>
public DipSwitch[]? DipSwitch { get; set; }
/// <remarks>driver, Appears after DipSwitch</remarks>
public Driver? Driver { get; set; }
#endregion
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,33 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>input</remarks>
public class Input
{
/// <remarks>players, Numeric/remarks>
[Required]
public string? Players { get; set; }
/// <remarks>control</remarks>
public string? Control { get; set; }
/// <remarks>buttons, Numeric</remarks>
[Required]
public string? Buttons { get; set; }
/// <remarks>coins, Numeric</remarks>
public string? Coins { get; set; }
/// <remarks>tilt, (yes|no) "no"</remarks>
public string? Tilt { get; set; }
/// <remarks>service, (yes|no) "no"</remarks>
public string? Service { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,5 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>machine</remarks>
public class Machine : GameBase { }
}

View File

@@ -1,29 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>media</remarks>
public class Media
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>md5</remarks>
public string? MD5 { get; set; }
/// <remarks>sha1</remarks>
public string? SHA1 { get; set; }
/// <remarks>sha256</remarks>
public string? SHA256 { get; set; }
/// <remarks>spamsum</remarks>
public string? SpamSum { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,18 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
public class MetadataFile
{
/// <remarks>clrmamepro</remarks>
public ClrMamePro? ClrMamePro { get; set; }
/// <remarks>game, machine, resource, set</remarks>
public GameBase?[]? Game { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,30 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>release</remarks>
public class Release
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>region</remarks>
[Required]
public string? Region { get; set; }
/// <remarks>language</remarks>
public string? Language { get; set; }
/// <remarks>date</remarks>
public string? Date { get; set; }
/// <remarks>default</remarks>
public string? Default { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,5 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>resource</remarks>
public class Resource : GameBase { }
}

View File

@@ -1,98 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>rom</remarks>
public class Rom
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
/// <remarks>size, Numeric</remarks>
[Required]
public string? Size { get; set; }
/// <remarks>crc</remarks>
public string? CRC { get; set; }
/// <remarks>md5</remarks>
public string? MD5 { get; set; }
/// <remarks>sha1</remarks>
public string? SHA1 { get; set; }
/// <remarks>merge</remarks>
public string? Merge { get; set; }
/// <remarks>status</remarks>
public string? Status { get; set; }
/// <remarks>flags</remarks>
public string? Flags { get; set; }
/// <remarks>date</remarks>
public string? Date { get; set; }
#region Hash Extensions
/// <remarks>sha256; Also in No-Intro spec; Appears after SHA1</remarks>
public string? SHA256 { get; set; }
/// <remarks>sha384; Appears after SHA256</remarks>
public string? SHA384 { get; set; }
/// <remarks>sha512; Appears after SHA384</remarks>
public string? SHA512 { get; set; }
/// <remarks>spamsum; Appears after SHA512</remarks>
public string? SpamSum { get; set; }
#endregion
#region DiscImgeCreator Extensions
/// <remarks>xxh3_64; Appears after SpamSum</remarks>
public string? xxHash364 { get; set; }
/// <remarks>xxh3_128; Appears after xxHash364</remarks>
public string? xxHash3128 { get; set; }
#endregion
#region MAME Extensions
/// <remarks>region; Appears after Status</remarks>
public string? Region { get; set; }
/// <remarks>offs; Appears after Flags</remarks>
public string? Offs { get; set; }
#endregion
#region No-Intro Extensions
/// <remarks>serial; Appears after Offs</remarks>
public string? Serial { get; set; }
/// <remarks>header; Appears after Serial</remarks>
public string? Header { get; set; }
#endregion
#region RomVault Extensions
/// <remarks>inverted; Boolean; Appears after Date</remarks>
public string? Inverted { get; set; }
/// <remarks>mia; Boolean; Appears after Inverted</remarks>
public string? MIA { get; set; }
#endregion
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>romvault</remarks>
public class RomVault
{
/// <remarks>name</remarks>
public string? Name { get; set; }
/// <remarks>description</remarks>
public string? Description { get; set; }
/// <remarks>rootdir</remarks>
public string? RootDir { get; set; }
/// <remarks>category</remarks>
public string? Category { get; set; }
/// <remarks>version</remarks>
public string? Version { get; set; }
/// <remarks>date</remarks>
public string? Date { get; set; }
/// <remarks>author</remarks>
public string? Author { get; set; }
/// <remarks>homepage</remarks>
public string? Homepage { get; set; }
/// <remarks>url</remarks>
public string? Url { get; set; }
/// <remarks>comment</remarks>
public string? Comment { get; set; }
/// <remarks>header</remarks>
public string? Header { get; set; }
/// <remarks>type</remarks>
public string? Type { get; set; }
/// <remarks>forcemerging</remarks>
public string? ForceMerging { get; set; }
/// <remarks>forcezipping</remarks>
public string? ForceZipping { get; set; }
/// <remarks>forcepacking</remarks>
public string? ForcePacking { get; set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>sample</remarks>
public class Sample
{
/// <remarks>name</remarks>
[Required]
public string? Name { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public string[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,5 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>set</remarks>
public class Set : GameBase { }
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>sound</remarks>
public class Sound
{
/// <remarks>channels, Numeric?</remarks>
[Required]
public string? Channels { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,36 +0,0 @@
namespace SabreTools.Models.ClrMamePro
{
/// <remarks>video</remarks>
public class Video
{
/// <remarks>screen, (raster|vector)</remarks>
[Required]
public string? Screen { get; set; }
/// <remarks>orientation, (vertical|horizontal)</remarks>
[Required]
public string? Orientation { get; set; }
/// <remarks>x, Numeric?</remarks>
public string? X { get; set; }
/// <remarks>y, Numeric?</remarks>
public string? Y { get; set; }
/// <remarks>aspectx, Numeric?</remarks>
public string? AspectX { get; set; }
/// <remarks>aspecty, Numeric?</remarks>
public string? AspectY { get; set; }
/// <remarks>freq, Numeric?</remarks>
public string? Freq { get; set; }
#region DO NOT USE IN PRODUCTION
/// <remarks>Should be empty</remarks>
public object[]? ADDITIONAL_ELEMENTS { get; set; }
#endregion
}
}

View File

@@ -1,23 +0,0 @@
namespace SabreTools.Models.Compression.LZ
{
public static class Constants
{
public const int GETLEN = 2048;
public const int LZ_MAGIC_LEN = 8;
public const int LZ_HEADER_LEN = 14;
public static readonly byte[] MagicBytes = new byte[] { 0x53, 0x5a, 0x44, 0x44, 0x88, 0xf0, 0x27, 0x33 };
public static readonly string MagicString = System.Text.Encoding.ASCII.GetString(MagicBytes);
public const ulong MagicUInt64 = 0x3327f08844445a53;
public const int LZ_TABLE_SIZE = 0x1000;
public const int MAX_LZSTATES = 16;
public const int LZ_MIN_HANDLE = 0x400;
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.Compression.LZ
{
/// <see href="https://github.com/wine-mirror/wine/blob/master/include/lzexpand.h"/>
public enum LZERROR
{
LZERROR_OK = 1,
LZERROR_NOT_LZ = 0,
LZERROR_BADINHANDLE = -1,
LZERROR_BADOUTHANDLE = -2,
LZERROR_READ = -3,
LZERROR_WRITE = -4,
LZERROR_GLOBALLOC = -5,
LZERROR_GLOBLOCK = -6,
LZERROR_BADVALUE = -7,
LZERROR_UNKNOWNALG = -8,
}
}

View File

@@ -1,17 +0,0 @@
namespace SabreTools.Models.Compression.LZ
{
/// <summary>
/// Format of first 14 byte of LZ compressed file
/// </summary>
/// <see href="https://github.com/wine-mirror/wine/blob/master/dlls/kernel32/lzexpand.c"/>
public sealed class FileHeaader
{
public string? Magic { get; set; }
public byte CompressionType { get; set; }
public char LastChar { get; set; }
public uint RealLength { get; set; }
}
}

View File

@@ -1,72 +0,0 @@
using System.IO;
namespace SabreTools.Models.Compression.LZ
{
public sealed class State
{
/// <summary>
/// Internal backing stream
/// </summary>
public Stream? Source { get; set; }
/// <summary>
/// The last char of the filename for replacement
/// </summary>
public char LastChar { get; set; }
/// <summary>
/// Decompressed length of the file
/// </summary>
public uint RealLength { get; set; }
/// <summary>
/// Position the decompressor currently is
/// </summary>
public uint RealCurrent { get; set; }
/// <summary>
/// Position the user wants to read from
/// </summary>
public uint RealWanted { get; set; }
/// <summary>
/// The rotating LZ table
/// </summary>
public byte[]? Table { get; set; }
/// <summary>
/// CURrent TABle ENTry
/// </summary>
public uint CurrentTableEntry { get; set; }
/// <summary>
/// Length and position of current string
/// </summary>
public byte StringLength { get; set; }
/// <summary>
/// From stringtable
/// </summary>
public uint StringPosition { get; set; }
/// <summary>
/// Bitmask within blocks
/// </summary>
public ushort ByteType { get; set; }
/// <summary>
/// GETLEN bytes
/// </summary>
public byte[]? Window { get; set; }
/// <summary>
/// Current read
/// </summary>
public uint WindowCurrent { get; set; }
/// <summary>
/// Length last got
/// </summary>
public uint WindowLength { get; set; }
}
}

View File

@@ -1,58 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// An aligned offset block is identical to the verbatim block except for the presence of the aligned offset
/// tree preceding the other trees.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class AlignedOffsetBlockData : BlockData
{
/// <summary>
/// Aligned offset tree
/// </summary>
/// <remarks>8 elements, 3 bits each</remarks>
public byte[]? AlignedOffsetTree { get; set; }
/// <summary>
/// Pretree for first 256 elements of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeFirst256 { get; set; }
/// <summary>
/// Path lengths of first 256 elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsFirst256 { get; set; }
/// <summary>
/// Pretree for remainder of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeRemainder { get; set; }
/// <summary>
/// Path lengths of remaining elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsRemainder { get; set; }
/// <summary>
/// Pretree for length tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeLengthTree { get; set; }
/// <summary>
/// Path lengths of elements in length tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsLengthTree { get; set; }
/// <summary>
/// Token sequence (matches and literals)
/// </summary>
/// <remarks>Variable</remarks>
public byte[]? TokenSequence { get; set; }
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// An LZXD block represents a sequence of compressed data that is encoded with the same set of
/// Huffman trees, or a sequence of uncompressed data. There can be one or more LZXD blocks in a
/// compressed stream, each with its own set of Huffman trees. Blocks do not have to start or end on a
/// chunk boundary; blocks can span multiple chunks, or a single chunk can contain multiple blocks. The
/// number of chunks is related to the size of the data being compressed, while the number of blocks is
/// related to how well the data is compressed.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class Block
{
/// <summary>
/// Block header
/// </summary>
public BlockHeader? Header { get; set; }
/// <summary>
/// Block data
/// </summary>
public BlockData? BlockData { get; set; }
}
}

View File

@@ -1,8 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public abstract class BlockData
{
// No common fields between all block data
}
}

View File

@@ -1,33 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The Block Type field, as specified in section 2.3.1.1, indicates which type of block follows,
/// and the Block Size field, as specified in section 2.3.1.2, indicates the number of
/// uncompressed bytes represented by the block. Following the generic block
/// header is a type-specific header that describes the remainder of the block.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class BlockHeader
{
/// <remarks>3 bits</remarks>
public BlockType BlockType { get; set; }
/// <summary>
/// Block size is the high 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlockSizeMSB { get; set; }
/// <summary>
/// Block size is the middle 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlockSizeByte2 { get; set; }
/// <summary>
/// Block size is the low 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlocksizeLSB { get; set; }
}
}

View File

@@ -1,25 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The LZXD compressor emits chunks of compressed data. A chunk represents exactly 32 KB of
/// uncompressed data until the last chunk in the stream, which can represent less than 32 KB. To
/// ensure that an exact number of input bytes represent an exact number of output bytes for each
/// chunk, after each 32 KB of uncompressed data is represented in the output compressed bitstream, the
/// output bitstream is padded with up to 15 bits of zeros to realign the bitstream on a 16-bit boundary
/// (even byte boundary) for the next 32 KB of data. This results in a compressed chunk of a byte-aligned
/// size. The compressed chunk could be smaller than 32 KB or larger than 32 KB if the data is
/// incompressible when the chunk is not the last one.
/// </summary>
public class Chunk
{
/// <summary>
/// Chunk header
/// </summary>
public ChunkHeader? Header { get; set; }
/// <summary>
/// Block headers and data
/// </summary>
public Block[]? Blocks { get; set; }
}
}

View File

@@ -1,46 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The LZXD compressor emits chunks of compressed data. A chunk represents exactly 32 KB of
/// uncompressed data until the last chunk in the stream, which can represent less than 32 KB. To
/// ensure that an exact number of input bytes represent an exact number of output bytes for each
/// chunk, after each 32 KB of uncompressed data is represented in the output compressed bitstream, the
/// output bitstream is padded with up to 15 bits of zeros to realign the bitstream on a 16-bit boundary
/// (even byte boundary) for the next 32 KB of data. This results in a compressed chunk of a byte-aligned
/// size. The compressed chunk could be smaller than 32 KB or larger than 32 KB if the data is
/// incompressible when the chunk is not the last one.
/// </summary>
public class ChunkHeader
{
/// <summary>
/// The LZXD engine encodes a compressed, chunk-size prefix field preceding each compressed chunk in
/// the compressed byte stream. The compressed, chunk-size prefix field is a byte aligned, little-endian,
/// 16-bit field. The chunk prefix chain could be followed in the compressed stream without
/// decompressing any data. The next chunk prefix is at a location computed by the absolute byte offset
/// location of this chunk prefix plus 2 (for the size of the chunk-size prefix field) plus the current chunk
/// size.
/// </summary>
public ushort ChunkSize { get; set; }
/// <summary>
/// The first bit in the first chunk in the LZXD bitstream (following the 2-byte, chunk-size prefix described
/// in section 2.2.1) indicates the presence or absence of two 16-bit fields immediately following the
/// single bit. If the bit is set, E8 translation is enabled for all the following chunks in the stream using the
/// 32-bit value derived from the two 16-bit fields as the E8_file_size provided to the compressor when E8
/// translation was enabled. Note that E8_file_size is completely independent of the length of the
/// uncompressed data. E8 call translation is disabled after the 32,768th chunk (after 1 gigabyte (GB) of
/// uncompressed data).
/// </summary>
public byte E8Translation { get; set; }
/// <summary>
/// E8 translation size, high WORD
/// </summary>
public ushort? TranslationSizeHighWord { get; set; }
/// <summary>
/// E8 translation size, low WORD
/// </summary>
public ushort? TranslationSizeLowWord { get; set; }
}
}

View File

@@ -1,38 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
public static class Constants
{
/* some constants defined by the LZX specification */
public const int LZX_MIN_MATCH = 2;
public const int LZX_MAX_MATCH = 257;
public const int LZX_NUM_CHARS = 256;
public const int LZX_PRETREE_NUM_ELEMENTS = 20;
/// <summary>
/// aligned offset tree #elements
/// </summary>
public const int LZX_ALIGNED_NUM_ELEMENTS = 8;
/// <summary>
/// this one missing from spec!
/// </summary>
public const int LZX_NUM_PRIMARY_LENGTHS = 7;
/// <summary>
/// length tree #elements
/// </summary>
public const int LZX_NUM_SECONDARY_LENGTHS = 249;
/* LZX huffman defines: tweak tablebits as desired */
public const int LZX_PRETREE_MAXSYMBOLS = LZX_PRETREE_NUM_ELEMENTS;
public const int LZX_PRETREE_TABLEBITS = 6;
public const int LZX_MAINTREE_MAXSYMBOLS = LZX_NUM_CHARS + 50 * 8;
public const int LZX_MAINTREE_TABLEBITS = 12;
public const int LZX_LENGTH_MAXSYMBOLS = LZX_NUM_SECONDARY_LENGTHS + 1;
public const int LZX_LENGTH_TABLEBITS = 12;
public const int LZX_ALIGNED_MAXSYMBOLS = LZX_ALIGNED_NUM_ELEMENTS;
public const int LZX_ALIGNED_TABLEBITS = 7;
public const int LZX_LENTABLE_SAFETY = 64; /* we allow length table decoding overruns */
}
}

View File

@@ -1,48 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// 3-bit block type
/// </summary>
public enum BlockType : byte
{
/// <summary>
/// Not valid
/// </summary>
INVALID_0 = 0b000,
/// <summary>
/// Verbatim block
/// </summary>
Verbatim = 0b001,
/// <summary>
/// Aligned offset block
/// </summary>
AlignedOffset = 0b010,
/// <summary>
/// Uncompressed block
/// </summary>
Uncompressed = 0b011,
/// <summary>
/// Not valid
/// </summary>
INVALID_4 = 0b100,
/// <summary>
/// Not valid
/// </summary>
INVALID_5 = 0b101,
/// <summary>
/// Not valid
/// </summary>
INVALID_6 = 0b110,
/// <summary>
/// Not valid
/// </summary>
INVALID_7 = 0b111,
}
}

View File

@@ -1,54 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// Following the generic block header, an uncompressed block begins with 1 to 16 bits of zero padding
/// to align the bit buffer on a 16-bit boundary. At this point, the bitstream ends and a byte stream
/// begins. Following the zero padding, new 32-bit values for R0, R1, and R2 are output in little-endian
/// form, followed by the uncompressed data bytes themselves. Finally, if the uncompressed data length
/// is odd, one extra byte of zero padding is encoded to realign the following bitstream.
///
/// Then the bitstream of byte-swapped 16-bit integers resumes for the next Block Type field (if there
/// are subsequent blocks).
///
/// The decoded R0, R1, and R2 values are used as initial repeated offset values to decode the
/// subsequent compressed block if present.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class UncompressedBlockData : BlockData
{
/// <summary>
/// Padding to align following field on 16-bit boundary
/// </summary>
/// <remarks>Bits have a value of zero</remarks>
public ushort PaddingBits { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD ([MS-DTYP]))
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R0 { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD)
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R1 { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD)
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R2 { get; set; }
/// <summary>
/// Can use the direct memcpy function, as specified in [IEEE1003.1]
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public byte[]? RawDataBytes { get; set; }
/// <summary>
/// Only if uncompressed size is odd
/// </summary>
public byte AlignmentByte { get; set; }
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The fields of a verbatim block that follow the generic block header
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class VerbatimBlockData : BlockData
{
/// <summary>
/// Pretree for first 256 elements of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeFirst256 { get; set; }
/// <summary>
/// Path lengths of first 256 elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsFirst256 { get; set; }
/// <summary>
/// Pretree for remainder of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeRemainder { get; set; }
/// <summary>
/// Path lengths of remaining elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsRemainder { get; set; }
/// <summary>
/// Pretree for length tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeLengthTree { get; set; }
/// <summary>
/// Path lengths of elements in length tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsLengthTree { get; set; }
/// <summary>
/// Token sequence (matches and literals)
/// </summary>
/// <remarks>Variable</remarks>
public byte[]? TokenSequence { get; set; }
}
}

View File

@@ -1,33 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Each MSZIP block MUST consist of a 2-byte MSZIP signature and one or more RFC 1951 blocks. The
/// 2-byte MSZIP signature MUST consist of the bytes 0x43 and 0x4B. The MSZIP signature MUST be
/// the first 2 bytes in the MSZIP block. The MSZIP signature is shown in the following packet diagram.
///
/// Each MSZIP block is the result of a single deflate compression operation, as defined in [RFC1951].
/// The compressor that performs the compression operation MUST generate one or more RFC 1951
/// blocks, as defined in [RFC1951]. The number, deflation mode, and type of RFC 1951 blocks in each
/// MSZIP block is determined by the compressor, as defined in [RFC1951]. The last RFC 1951 block in
/// each MSZIP block MUST be marked as the "end" of the stream(1), as defined by [RFC1951]
/// section 3.2.3. Decoding trees MUST be discarded after each RFC 1951 block, but the history buffer
/// MUST be maintained.Each MSZIP block MUST represent no more than 32 KB of uncompressed data.
///
/// The maximum compressed size of each MSZIP block is 32 KB + 12 bytes. This enables the MSZIP
/// block to contain 32 KB of data split between two noncompressed RFC 1951 blocks, each of which
/// has a value of BTYPE = 00.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-MCI/%5bMS-MCI%5d.pdf"/>
public class Block
{
/// <summary>
/// Block header
/// </summary>
public BlockHeader? BlockHeader { get; set; }
/// <summary>
/// Compressed blocks
/// </summary>
public DeflateBlock[]? CompressedBlocks { get; set; }
}
}

View File

@@ -1,16 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Each MSZIP block MUST consist of a 2-byte MSZIP signature and one or more RFC 1951 blocks. The
/// 2-byte MSZIP signature MUST consist of the bytes 0x43 and 0x4B. The MSZIP signature MUST be
/// the first 2 bytes in the MSZIP block. The MSZIP signature is shown in the following packet diagram.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-MCI/%5bMS-MCI%5d.pdf"/>
public class BlockHeader
{
/// <summary>
/// 'CK'
/// </summary>
public ushort Signature { get; set; }
}
}

View File

@@ -1,20 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Compression with Huffman codes (BTYPE=01 or BTYPE=02)
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-MCI/%5bMS-MCI%5d.pdf"/>
/// <see href="https://www.rfc-editor.org/rfc/rfc1951"/>
public abstract class CompressedDataHeader : DataHeader
{
/// <summary>
/// Huffman code lengths for the literal / length alphabet
/// </summary>
public virtual uint[]? LiteralLengths { get; set; }
/// <summary>
/// Huffman distance codes for the literal / length alphabet
/// </summary>
public virtual uint[]? DistanceCodes { get; set; }
}
}

View File

@@ -1,89 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <see href="https://github.com/wine-mirror/wine/blob/master/dlls/cabinet/cabinet.h"/>
public static class Constants
{
/// <summary>
/// Window size
/// </summary>
public const ushort ZIPWSIZE = 0x8000;
/// <summary>
/// Bits in base literal/length lookup table
/// </summary>
public const int ZIPLBITS = 9;
/// <summary>
/// Bits in base distance lookup table
/// </summary>
public const int ZIPDBITS = 6;
/// <summary>
/// Maximum bit length of any code
/// </summary>
public const int ZIPBMAX = 16;
/// <summary>
/// Maximum number of codes in any set
/// </summary>
public const int ZIPN_MAX = 288;
#region THOSE_ZIP_CONSTS
/// <summary>
/// Order of the bit length code lengths
/// </summary>
public static readonly byte[] BitLengthOrder = new byte[]
{
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
};
/// <summary>
/// Copy lengths for literal codes 257..285
/// </summary>
public static readonly ushort[] CopyLengths = new ushort[]
{
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51,
59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
};
/// <summary>
/// Extra bits for literal codes 257..285
/// </summary>
/// <remarks>99 == invalid</remarks>
public static readonly ushort[] LiteralExtraBits = new ushort[]
{
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,
4, 5, 5, 5, 5, 0, 99, 99
};
/// <summary>
/// Copy offsets for distance codes 0..29
/// </summary>
public static readonly ushort[] CopyOffsets = new ushort[]
{
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385,
513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
};
/// <summary>
/// Extra bits for distance codes
/// </summary>
public static readonly ushort[] DistanceExtraBits = new ushort[]
{
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10,
10, 11, 11, 12, 12, 13, 13
};
/// <summary>
/// And'ing with Zipmask[n] masks the lower n bits
/// </summary>
public static readonly ushort[] BitMasks = new ushort[17]
{
0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
};
#endregion
}
}

View File

@@ -1,11 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Base class for all data headers (BTYPE=00, BTYPE=01, or BTYPE=02)
/// </summary>
/// <see href="https://www.rfc-editor.org/rfc/rfc1951"/>
public abstract class DataHeader
{
// No common fields between all data headers
}
}

View File

@@ -1,35 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Each MSZIP block is the result of a single deflate compression operation, as defined in [RFC1951].
/// The compressor that performs the compression operation MUST generate one or more RFC 1951
/// blocks, as defined in [RFC1951]. The number, deflation mode, and type of RFC 1951 blocks in each
/// MSZIP block is determined by the compressor, as defined in [RFC1951]. The last RFC 1951 block in
/// each MSZIP block MUST be marked as the "end" of the stream(1), as defined by [RFC1951]
/// section 3.2.3. Decoding trees MUST be discarded after each RFC 1951 block, but the history buffer
/// MUST be maintained.Each MSZIP block MUST represent no more than 32 KB of uncompressed data.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-MCI/%5bMS-MCI%5d.pdf"/>
public class DeflateBlock
{
/// <summary>
/// Deflate block (RFC-1951) header
/// </summary>
public DeflateBlockHeader? Header { get; set; }
/// <summary>
/// Compression-specific data header
/// </summary>
public DataHeader? DataHeader { get; set; }
/// <summary>
/// MSZIP data
/// </summary>
/// <remarks>
/// Depending on the implementation of these models, this property could either be
/// compressed or uncompressed data. Keep this in mind when using the built
/// versions of this model.
/// </remarks>
public byte[]? Data { get; set; }
}
}

View File

@@ -1,18 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <see href="https://www.rfc-editor.org/rfc/rfc1951"/>
public class DeflateBlockHeader
{
/// <summary>
/// Set if and only if this is the last block of the data set.
/// </summary>
/// <remarks>Bit 0</remarks>
public bool BFINAL { get; set; }
/// <summary>
/// Specifies how the data are compressed
/// </summary>
/// <remarks>Bits 1-2</remarks>
public CompressionType BTYPE { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More