diff --git a/DiscImageChef.Filesystems/LisaFS/Info.cs b/DiscImageChef.Filesystems/LisaFS/Info.cs index 2bbc873f..dfb9d2b3 100644 --- a/DiscImageChef.Filesystems/LisaFS/Info.cs +++ b/DiscImageChef.Filesystems/LisaFS/Info.cs @@ -72,7 +72,7 @@ namespace DiscImageChef.Filesystems.LisaFS if(fileid == FILEID_MDDF) { byte[] sector = imagePlugin.ReadSector((ulong)i); - Lisa_MDDF mddf = new Lisa_MDDF(); + MDDF mddf = new MDDF(); mddf.mddf_block = BigEndianBitConverter.ToUInt32(sector, 0x6C); mddf.volsize_minus_one = BigEndianBitConverter.ToUInt32(sector, 0x70); @@ -156,7 +156,7 @@ namespace DiscImageChef.Filesystems.LisaFS if(fileid == FILEID_MDDF) { byte[] sector = imagePlugin.ReadSector((ulong)i); - Lisa_MDDF mddf = new Lisa_MDDF(); + MDDF mddf = new MDDF(); byte[] pString = new byte[33]; UInt32 lisa_time; diff --git a/DiscImageChef.Filesystems/LisaFS/Structs.cs b/DiscImageChef.Filesystems/LisaFS/Structs.cs index 00d5f95c..a29914ce 100644 --- a/DiscImageChef.Filesystems/LisaFS/Structs.cs +++ b/DiscImageChef.Filesystems/LisaFS/Structs.cs @@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.LisaFS { partial class LisaFS : Filesystem { - struct Lisa_MDDF + struct MDDF { /// 0x00, Filesystem version public UInt16 fsversion; @@ -203,12 +203,14 @@ namespace DiscImageChef.Filesystems.LisaFS public byte scavenge_flag; } - struct Lisa_Tag + struct Tag { /// 0x00 Unknown public UInt16 unknown; /// 0x02 File type - public UInt16 fileType; + public byte fileType; + /// Seems to be always zero + public byte zero; /// 0x04 File ID. Negative numbers are extents for the file with same absolute value number public Int16 fileID; /// 0x06 Relative block @@ -218,6 +220,90 @@ namespace DiscImageChef.Filesystems.LisaFS /// 0x0A Previous block for this file. 0x07FF means this is first block. public UInt16 prevBlock; } + + struct CatalogEntry + { + /// 0x00, seems to be 0x24 when the entry is valid + public byte marker; + /// 0x01, seems to be always zero + public ushort zero; + /// 0x03, filename, 32-bytes, null-padded + public byte[] filename; + /// 0x23, seems to be always zero + public byte padding; + /// + /// At 0x24 + /// 0x03 here for entries 64 bytes long + /// 0x08 here for entries 78 bytes long + /// 0x7C here for entries 50 bytes long + /// This is incomplete, may fail, mostly works... + /// + public byte fileType; + /// 0x25, lot of values found here, unknown + public byte unknown; + /// 0x26, file ID, must be positive and bigger than 4 + public Int16 fileID; + /// 0x28, creation date + public UInt32 dtc; + /// 0x2C, last modification date + public UInt32 dtm; + /// 0x30, file length in bytes, including wasted block space + public Int32 wasted; + /// 0x34, file length in bytes + public Int32 length; + /// 0x38, unknown + public byte[] tail; + } + + struct Extent + { + public Int32 start; + public Int16 length; + } + + struct ExtentFile + { + /// 0x00, filename length + public byte filenameLen; + /// 0x01, filename + public byte[] filename; + /// 0x20, unknown timestamp + public UInt32 timestamp; + /// 0x24, 3 bytes, unknown + public byte[] unknown1; + /// 0x27, 3 bytes, machine serial number + public byte[] serial; + /// 0x2A, 4 bytes, unknown + public uint unknown2; + /// 0x2E, creation time + public UInt32 dtc; + /// 0x32, last access time + public UInt32 dta; + /// 0x36, modification time + public UInt32 dtm; + /// 0x3A, backup time + public UInt32 dtb; + /// 0x3E, scavenge time + public UInt32 dts; + /// 0x42, unknown, 32 bytes + public byte[] unknown3; + /// 0x62, flags?, 0x08 set if password is valid + public byte flags; + /// 0x63, 8 bytes, scrambled password + public byte[] password; + /// 0x6B, 21 bytes, unknown + public byte[] unknown4; + /// 0x80, file length in blocks + public Int32 length; + /// 0x84, unknown + public Int32 unknown5; + /// 0x88, extents, can contain up to 41 extents, dunno LisaOS maximum (never seen more than 3) + public Extent[] extents; + /// 0x17E, unknown, empty, padding? + public short unknown6; + /// 0x180, 128 bytes + public byte[] LisaInfo; + } } }