// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Structs.cs
// Version : 1.0
// Author(s) : Natalia Portillo
//
// Component : Component
//
// Revision : $Revision$
// Last change by : $Author$
// Date : $Date$
//
// --[ Description ] ----------------------------------------------------------
//
// Description
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// ----------------------------------------------------------------------------
// Copyright (C) 2011-2015 Claunia.com
// ****************************************************************************/
// //$Id$
using System;
namespace DiscImageChef.Filesystems.LisaFS
{
partial class LisaFS : Filesystem
{
struct Lisa_MDDF
{
/// 0x00, Filesystem version
public UInt16 fsversion;
/// 0x02, Volume ID
public UInt64 volid;
/// 0x0A, Volume sequence number
public UInt16 volnum;
/// 0x0C, Pascal string, 32+1 bytes, volume name
public string volname;
/// 0x2D, unknown, possible padding
public byte unknown1;
/// 0x2E, Pascal string, 32+1 bytes, password
public string password;
/// 0x4F, unknown, possible padding
public byte unknown2;
/// 0x50, Lisa serial number that init'ed this disk
public UInt32 machine_id;
/// 0x54, ID of the master copy ? no idea really
public UInt32 master_copy_id;
/// 0x58, Date of volume creation
public DateTime dtvc;
/// 0x5C, Date...
public DateTime dtcc;
/// 0x60, Date of volume backup
public DateTime dtvb;
/// 0x64, Date of volume scavenging
public DateTime dtvs;
/// 0x68, unknown
public UInt32 unknown3;
/// 0x6C, block the MDDF is residing on
public UInt32 mddf_block;
/// 0x70, volsize-1
public UInt32 volsize_minus_one;
/// 0x74, volsize-1-mddf_block
public UInt32 volsize_minus_mddf_minus_one;
/// 0x78, Volume size in blocks
public UInt32 vol_size;
/// 0x7C, Blocks size of underlying drive (data+tags)
public UInt16 blocksize;
/// 0x7E, Data only block size
public UInt16 datasize;
/// 0x80, unknown
public UInt16 unknown4;
/// 0x82, unknown
public UInt32 unknown5;
/// 0x86, unknown
public UInt32 unknown6;
/// 0x8A, Size in sectors of filesystem clusters
public UInt16 clustersize;
/// 0x8C, Filesystem size in blocks
public UInt32 fs_size;
/// 0x90, unknown
public UInt32 unknown7;
/// 0x94, unknown
public UInt32 unknown8;
/// 0x98, unknown
public UInt32 unknown9;
/// 0x9C, unknown
public UInt32 unknown10;
/// 0xA0, unknown
public UInt32 unknown11;
/// 0xA4, unknown
public UInt32 unknown12;
/// 0xA8, unknown
public UInt32 unknown13;
/// 0xAC, unknown
public UInt32 unknown14;
/// 0xB0, Files in volume
public UInt16 filecount;
/// 0xB2, unknown
public UInt32 unknown15;
/// 0xB6, unknown
public UInt32 unknown16;
/// 0xBA, Free blocks
public UInt32 freecount;
/// 0xBE, unknown
public UInt16 unknown17;
/// 0xC0, unknown
public UInt32 unknown18;
/// 0xC4, no idea
public UInt64 overmount_stamp;
/// 0xCC, serialization, lisa serial number authorized to use blocked software on this volume
public UInt32 serialization;
/// 0xD0, unknown
public UInt32 unknown19;
/// 0xD4, unknown, possible timestamp
public UInt32 unknown_timestamp;
/// 0xD8, unknown
public UInt32 unknown20;
/// 0xDC, unknown
public UInt32 unknown21;
/// 0xE0, unknown
public UInt32 unknown22;
/// 0xE4, unknown
public UInt32 unknown23;
/// 0xE8, unknown
public UInt32 unknown24;
/// 0xEC, unknown
public UInt32 unknown25;
/// 0xF0, unknown
public UInt32 unknown26;
/// 0xF4, unknown
public UInt32 unknown27;
/// 0xF8, unknown
public UInt32 unknown28;
/// 0xFC, unknown
public UInt32 unknown29;
/// 0x100, unknown
public UInt32 unknown30;
/// 0x104, unknown
public UInt32 unknown31;
/// 0x108, unknown
public UInt32 unknown32;
/// 0x10C, unknown
public UInt32 unknown33;
/// 0x110, unknown
public UInt32 unknown34;
/// 0x114, unknown
public UInt32 unknown35;
/// 0x118, ID of volume where this volume was backed up
public UInt64 backup_volid;
/// 0x120, Size of LisaInfo label
public UInt16 label_size;
/// 0x122, not clear
public UInt16 fs_overhead;
/// 0x124, Return code of Scavenger
public UInt16 result_scavenge;
/// 0x126, No idea
public UInt16 boot_code;
/// 0x128, No idea
public UInt16 boot_environ;
/// 0x12A, unknown
public UInt32 unknown36;
/// 0x12E, unknown
public UInt32 unknown37;
/// 0x132, unknown
public UInt32 unknown38;
/// 0x136, Total volumes in sequence
public UInt16 vol_sequence;
/// 0x138, Volume is dirty?
public byte vol_left_mounted;
/// Is password present? (On-disk position unknown)
public byte passwd_present;
/// Opened files (memory-only?) (On-disk position unknown)
public UInt32 opencount;
/// No idea (On-disk position unknown)
public UInt32 copy_thread;
// Flags are boolean, but Pascal seems to use them as full unsigned 8 bit values
/// No idea (On-disk position unknown)
public byte privileged;
/// Read-only volume (On-disk position unknown)
public byte write_protected;
/// Master disk (On-disk position unknown)
public byte master;
/// Copy disk (On-disk position unknown)
public byte copy;
/// No idea (On-disk position unknown)
public byte copy_flag;
/// No idea (On-disk position unknown)
public byte scavenge_flag;
}
struct Lisa_Tag
{
/// 0x00 Unknown
public UInt16 unknown;
/// 0x02 File type
public UInt16 fileType;
/// 0x04 File ID. Negative numbers are extents for the file with same absolute value number
public Int16 fileID;
/// 0x06 Relative block
public UInt16 relBlock;
/// 0x08 Next block for this file. 0x8000 bit seems always set, 0x07FF means this is last block
public UInt16 nextBlock;
/// 0x0A Previous block for this file. 0x07FF means this is first block.
public UInt16 prevBlock;
}
}
}