mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add support for Amiga extensions to ISO9660.
This commit is contained in:
@@ -63,6 +63,7 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
const ulong ziso_header_cigam = 0x07D6DBC99653E437;
|
||||
const ushort ziso_Magic = 0x5A46; // "ZF"
|
||||
const ushort ziso_PagedZlib = 0x707A; // "pz"
|
||||
const ushort Amiga_Magic = 0x4153; // "AS"
|
||||
|
||||
[Flags]
|
||||
enum FileFlags : byte
|
||||
@@ -232,5 +233,39 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
Effective = 1 << 6,
|
||||
LongFormat = 1 << 7,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum AmigaFlags : byte
|
||||
{
|
||||
Protection = 1 << 0,
|
||||
Comment = 1 << 1,
|
||||
CommentContinues = 1 << 2
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum AmigaMultiuser : byte
|
||||
{
|
||||
GroupDelete = 1 << 0,
|
||||
GroupExec = 1 << 1,
|
||||
GroupWrite = 1 << 2,
|
||||
GroupRead = 1 << 3,
|
||||
OtherDelete = 1 << 4,
|
||||
OtherExec = 1 << 5,
|
||||
OtherWrite = 1 << 6,
|
||||
OtherRead = 1 << 7,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum AmigaAttributes : byte
|
||||
{
|
||||
OwnerDelete = 1 << 0,
|
||||
OwnerExec = 1 << 1,
|
||||
OwnerWrite = 1 << 2,
|
||||
OwnerRead = 1 << 3,
|
||||
Archive = 1 << 4,
|
||||
Reentrant = 1 << 5,
|
||||
Script = 1 << 6,
|
||||
Reserved = 1 << 7,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +258,7 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
bool SUSP = false;
|
||||
bool RRIP = false;
|
||||
bool ziso = false;
|
||||
bool Amiga = false;
|
||||
List<ContinuationArea> contareas = new List<ContinuationArea>();
|
||||
List<byte[]> refareas = new List<byte[]>();
|
||||
StringBuilder suspInformation = new StringBuilder();
|
||||
@@ -378,6 +379,7 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
nextSignature == RRIP_Timestamps || nextSignature == RRIP_Sparse;
|
||||
|
||||
ziso |= nextSignature == ziso_Magic;
|
||||
Amiga |= nextSignature == Amiga_Magic;
|
||||
|
||||
sa_off += sa[sa_off + 2];
|
||||
|
||||
@@ -435,6 +437,7 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
nextSignature == RRIP_Timestamps || nextSignature == RRIP_Sparse;
|
||||
|
||||
ziso |= nextSignature == ziso_Magic;
|
||||
Amiga |= nextSignature == Amiga_Magic;
|
||||
|
||||
ca_off += ca_data[ca_off + 2];
|
||||
}
|
||||
|
||||
@@ -632,6 +632,26 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
public uint uncomp_len_be;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct AmigaEntry
|
||||
{
|
||||
public ushort signature;
|
||||
public byte length;
|
||||
public byte version;
|
||||
public AmigaFlags flags;
|
||||
// Followed by AmigaProtection if present
|
||||
// Followed by length-prefixed string for comment if present
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct AmigaProtection
|
||||
{
|
||||
public byte User;
|
||||
public byte Reserved;
|
||||
public AmigaMultiuser Multiuser;
|
||||
public AmigaAttributes Protection;
|
||||
}
|
||||
|
||||
struct DecodedVolumeDescriptor
|
||||
{
|
||||
public string SystemIdentifier;
|
||||
|
||||
Reference in New Issue
Block a user