mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Separated Apple MFS plugin in different files.
This commit is contained in:
52
DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs
Normal file
52
DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : AppleMFS.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Constructors and common variables for the Apple Lisa filesystem plugin.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
public AppleMFS()
|
||||||
|
{
|
||||||
|
Name = "Apple Macintosh File System";
|
||||||
|
PluginUUID = new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppleMFS(ImagePlugins.ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
||||||
|
{
|
||||||
|
Name = "Apple Macintosh File System";
|
||||||
|
PluginUUID = new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
43
DiscImageChef.Filesystems/AppleMFS/Consts.cs
Normal file
43
DiscImageChef.Filesystems/AppleMFS/Consts.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Consts.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Apple Lisa filesystem constants.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
const ushort MFS_MAGIC = 0xD2D7;
|
||||||
|
// "LK"
|
||||||
|
const ushort MFSBB_MAGIC = 0x4C4B;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
46
DiscImageChef.Filesystems/AppleMFS/Dir.cs
Normal file
46
DiscImageChef.Filesystems/AppleMFS/Dir.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Dir.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Methods to handle Apple Lisa filesystem catalogs (aka directories).
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
public override Errno ReadDir(string path, ref List<string> contents)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
40
DiscImageChef.Filesystems/AppleMFS/Encoding.cs
Normal file
40
DiscImageChef.Filesystems/AppleMFS/Encoding.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Encoding.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Apple LisaRoman to Unicode converters.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
64
DiscImageChef.Filesystems/AppleMFS/File.cs
Normal file
64
DiscImageChef.Filesystems/AppleMFS/File.cs
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : File.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Methods to handle files.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
public override Errno MapBlock(string path, long fileBlock, ref long deviceBlock)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno GetAttributes(string path, ref FileAttributes attributes)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno Read(string path, long offset, long size, ref byte[] buf)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno Stat(string path, ref FileEntryInfo stat)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno ReadLink(string path, ref string dest)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
// /***************************************************************************
|
// /***************************************************************************
|
||||||
// The Disc Image Chef
|
// The Disc Image Chef
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Filename : AppleMFS.cs
|
// Filename : Info.cs
|
||||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
//
|
//
|
||||||
// Component : Apple Macintosh File System filesystem plugin.
|
// Component : Apple Macintosh File System plugin.
|
||||||
//
|
//
|
||||||
// --[ Description ] ----------------------------------------------------------
|
// --[ Description ] ----------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -32,29 +32,12 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace DiscImageChef.Filesystems
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
{
|
{
|
||||||
// Information from Inside Macintosh
|
// Information from Inside Macintosh Volume II
|
||||||
class AppleMFS : Filesystem
|
partial class AppleMFS : Filesystem
|
||||||
{
|
{
|
||||||
const ushort MFS_MAGIC = 0xD2D7;
|
|
||||||
// "LK"
|
|
||||||
const ushort MFSBB_MAGIC = 0x4C4B;
|
|
||||||
|
|
||||||
public AppleMFS()
|
|
||||||
{
|
|
||||||
Name = "Apple Macintosh File System";
|
|
||||||
PluginUUID = new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
|
|
||||||
}
|
|
||||||
|
|
||||||
public AppleMFS(ImagePlugins.ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
|
||||||
{
|
|
||||||
Name = "Apple Macintosh File System";
|
|
||||||
PluginUUID = new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
public override bool Identify(ImagePlugins.ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
||||||
{
|
{
|
||||||
ushort drSigWord;
|
ushort drSigWord;
|
||||||
@@ -219,143 +202,6 @@ namespace DiscImageChef.Filesystems
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Master Directory Block, should be at offset 0x0400 bytes in volume
|
|
||||||
/// </summary>
|
|
||||||
struct MFS_MasterDirectoryBlock
|
|
||||||
{
|
|
||||||
/// <summary>0x000, Signature, 0xD2D7</summary>
|
|
||||||
public ushort drSigWord;
|
|
||||||
/// <summary>0x002, Volume creation date</summary>
|
|
||||||
public uint drCrDate;
|
|
||||||
/// <summary>0x006, Volume last backup date</summary>
|
|
||||||
public uint drLsBkUp;
|
|
||||||
/// <summary>0x00A, Volume attributes</summary>
|
|
||||||
public ushort drAtrb;
|
|
||||||
/// <summary>0x00C, Volume number of files</summary>
|
|
||||||
public ushort drNmFls;
|
|
||||||
/// <summary>0x00E, First directory block</summary>
|
|
||||||
public ushort drDirSt;
|
|
||||||
/// <summary>0x010, Length of directory in blocks</summary>
|
|
||||||
public ushort drBlLen;
|
|
||||||
/// <summary>0x012, Volume allocation blocks</summary>
|
|
||||||
public ushort drNmAlBlks;
|
|
||||||
/// <summary>0x014, Size of allocation blocks</summary>
|
|
||||||
public uint drAlBlkSiz;
|
|
||||||
/// <summary>0x018, Number of bytes to allocate</summary>
|
|
||||||
public uint drClpSiz;
|
|
||||||
/// <summary>0x01C, First allocation block in block map</summary>
|
|
||||||
public ushort drAlBlSt;
|
|
||||||
/// <summary>0x01E. Next unused file number</summary>
|
|
||||||
public uint drNxtFNum;
|
|
||||||
/// <summary>0x022, Number of unused allocation blocks</summary>
|
|
||||||
public ushort drFreeBks;
|
|
||||||
/// <summary>0x024, Length of volume name</summary>
|
|
||||||
public byte drVNSiz;
|
|
||||||
/// <summary>0x025, Characters of volume name</summary>
|
|
||||||
public string drVN;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Should be at offset 0x0000 in volume, followed by boot code
|
|
||||||
/// </summary>
|
|
||||||
struct MFS_BootBlock
|
|
||||||
{
|
|
||||||
/// <summary>0x000, Signature, 0x4C4B if bootable</summary>
|
|
||||||
public ushort signature;
|
|
||||||
/// <summary>0x002, Branch</summary>
|
|
||||||
public uint branch;
|
|
||||||
/// <summary>0x006, Boot block flags</summary>
|
|
||||||
public byte boot_flags;
|
|
||||||
/// <summary>0x007, Boot block version</summary>
|
|
||||||
public byte boot_version;
|
|
||||||
/// <summary>0x008, Allocate secondary buffers</summary>
|
|
||||||
public short sec_sv_pages;
|
|
||||||
/// <summary>0x00A, System file name (16 bytes)</summary>
|
|
||||||
public string system_name;
|
|
||||||
/// <summary>0x01A, Finder file name (16 bytes)</summary>
|
|
||||||
public string finder_name;
|
|
||||||
/// <summary>0x02A, Debugger file name (16 bytes)</summary>
|
|
||||||
public string debug_name;
|
|
||||||
/// <summary>0x03A, Disassembler file name (16 bytes)</summary>
|
|
||||||
public string disasm_name;
|
|
||||||
/// <summary>0x04A, Startup screen file name (16 bytes)</summary>
|
|
||||||
public string stupscr_name;
|
|
||||||
/// <summary>0x05A, First program to execute on boot (16 bytes)</summary>
|
|
||||||
public string bootup_name;
|
|
||||||
/// <summary>0x06A, Clipboard file name (16 bytes)</summary>
|
|
||||||
public string clipbrd_name;
|
|
||||||
/// <summary>0x07A, 1/4 of maximum opened at a time files</summary>
|
|
||||||
public ushort max_files;
|
|
||||||
/// <summary>0x07C, Event queue size</summary>
|
|
||||||
public ushort queue_size;
|
|
||||||
/// <summary>0x07E, Heap size on a Mac with 128KiB of RAM</summary>
|
|
||||||
public uint heap_128k;
|
|
||||||
/// <summary>0x082, Heap size on a Mac with 256KiB of RAM</summary>
|
|
||||||
public uint heap_256k;
|
|
||||||
/// <summary>0x086, Heap size on a Mac with 512KiB of RAM or more</summary>
|
|
||||||
public uint heap_512k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno Mount()
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno Mount(bool debug)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno Unmount()
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno MapBlock(string path, long fileBlock, ref long deviceBlock)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno GetAttributes(string path, ref FileAttributes attributes)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno ListXAttr(string path, ref List<string> xattrs)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno GetXattr(string path, string xattr, ref byte[] buf)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno Read(string path, long offset, long size, ref byte[] buf)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno ReadDir(string path, ref List<string> contents)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno StatFs(ref FileSystemInfo stat)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno Stat(string path, ref FileEntryInfo stat)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Errno ReadLink(string path, ref string dest)
|
|
||||||
{
|
|
||||||
return Errno.NotImplemented;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
117
DiscImageChef.Filesystems/AppleMFS/Structs.cs
Normal file
117
DiscImageChef.Filesystems/AppleMFS/Structs.cs
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Structs.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Apple Lisa filesystem structures.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Master Directory Block, should be at offset 0x0400 bytes in volume
|
||||||
|
/// </summary>
|
||||||
|
struct MFS_MasterDirectoryBlock
|
||||||
|
{
|
||||||
|
/// <summary>0x000, Signature, 0xD2D7</summary>
|
||||||
|
public ushort drSigWord;
|
||||||
|
/// <summary>0x002, Volume creation date</summary>
|
||||||
|
public uint drCrDate;
|
||||||
|
/// <summary>0x006, Volume last backup date</summary>
|
||||||
|
public uint drLsBkUp;
|
||||||
|
/// <summary>0x00A, Volume attributes</summary>
|
||||||
|
public ushort drAtrb;
|
||||||
|
/// <summary>0x00C, Volume number of files</summary>
|
||||||
|
public ushort drNmFls;
|
||||||
|
/// <summary>0x00E, First directory block</summary>
|
||||||
|
public ushort drDirSt;
|
||||||
|
/// <summary>0x010, Length of directory in blocks</summary>
|
||||||
|
public ushort drBlLen;
|
||||||
|
/// <summary>0x012, Volume allocation blocks</summary>
|
||||||
|
public ushort drNmAlBlks;
|
||||||
|
/// <summary>0x014, Size of allocation blocks</summary>
|
||||||
|
public uint drAlBlkSiz;
|
||||||
|
/// <summary>0x018, Number of bytes to allocate</summary>
|
||||||
|
public uint drClpSiz;
|
||||||
|
/// <summary>0x01C, First allocation block in block map</summary>
|
||||||
|
public ushort drAlBlSt;
|
||||||
|
/// <summary>0x01E. Next unused file number</summary>
|
||||||
|
public uint drNxtFNum;
|
||||||
|
/// <summary>0x022, Number of unused allocation blocks</summary>
|
||||||
|
public ushort drFreeBks;
|
||||||
|
/// <summary>0x024, Length of volume name</summary>
|
||||||
|
public byte drVNSiz;
|
||||||
|
/// <summary>0x025, Characters of volume name</summary>
|
||||||
|
public string drVN;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should be at offset 0x0000 in volume, followed by boot code
|
||||||
|
/// </summary>
|
||||||
|
struct MFS_BootBlock
|
||||||
|
{
|
||||||
|
/// <summary>0x000, Signature, 0x4C4B if bootable</summary>
|
||||||
|
public ushort signature;
|
||||||
|
/// <summary>0x002, Branch</summary>
|
||||||
|
public uint branch;
|
||||||
|
/// <summary>0x006, Boot block flags</summary>
|
||||||
|
public byte boot_flags;
|
||||||
|
/// <summary>0x007, Boot block version</summary>
|
||||||
|
public byte boot_version;
|
||||||
|
/// <summary>0x008, Allocate secondary buffers</summary>
|
||||||
|
public short sec_sv_pages;
|
||||||
|
/// <summary>0x00A, System file name (16 bytes)</summary>
|
||||||
|
public string system_name;
|
||||||
|
/// <summary>0x01A, Finder file name (16 bytes)</summary>
|
||||||
|
public string finder_name;
|
||||||
|
/// <summary>0x02A, Debugger file name (16 bytes)</summary>
|
||||||
|
public string debug_name;
|
||||||
|
/// <summary>0x03A, Disassembler file name (16 bytes)</summary>
|
||||||
|
public string disasm_name;
|
||||||
|
/// <summary>0x04A, Startup screen file name (16 bytes)</summary>
|
||||||
|
public string stupscr_name;
|
||||||
|
/// <summary>0x05A, First program to execute on boot (16 bytes)</summary>
|
||||||
|
public string bootup_name;
|
||||||
|
/// <summary>0x06A, Clipboard file name (16 bytes)</summary>
|
||||||
|
public string clipbrd_name;
|
||||||
|
/// <summary>0x07A, 1/4 of maximum opened at a time files</summary>
|
||||||
|
public ushort max_files;
|
||||||
|
/// <summary>0x07C, Event queue size</summary>
|
||||||
|
public ushort queue_size;
|
||||||
|
/// <summary>0x07E, Heap size on a Mac with 128KiB of RAM</summary>
|
||||||
|
public uint heap_128k;
|
||||||
|
/// <summary>0x082, Heap size on a Mac with 256KiB of RAM</summary>
|
||||||
|
public uint heap_256k;
|
||||||
|
/// <summary>0x086, Heap size on a Mac with 512KiB of RAM or more</summary>
|
||||||
|
public uint heap_512k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
59
DiscImageChef.Filesystems/AppleMFS/Super.cs
Normal file
59
DiscImageChef.Filesystems/AppleMFS/Super.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Super.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Handles mounting and umounting the Apple Lisa filesystem.
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
public override Errno Mount()
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno Mount(bool debug)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno Unmount()
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno StatFs(ref FileSystemInfo stat)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
52
DiscImageChef.Filesystems/AppleMFS/Xattr.cs
Normal file
52
DiscImageChef.Filesystems/AppleMFS/Xattr.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Xattr.cs
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// Component : Apple Macintosh File System plugin.
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Methods to handle Apple Lisa extended attributes (label, tags, serial,
|
||||||
|
// etc).
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation; either version 2.1 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library 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
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2011-2016 Natalia Portillo
|
||||||
|
// ****************************************************************************/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Filesystems.AppleMFS
|
||||||
|
{
|
||||||
|
// Information from Inside Macintosh Volume II
|
||||||
|
partial class AppleMFS : Filesystem
|
||||||
|
{
|
||||||
|
public override Errno ListXAttr(string path, ref List<string> xattrs)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Errno GetXattr(string path, string xattr, ref byte[] buf)
|
||||||
|
{
|
||||||
|
return Errno.NotImplemented;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
|
2016-08-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Dir.cs:
|
||||||
|
* Info.cs:
|
||||||
|
* File.cs:
|
||||||
|
* Xattr.cs:
|
||||||
|
* Super.cs:
|
||||||
|
* Consts.cs:
|
||||||
|
* Structs.cs:
|
||||||
|
* Encoding.cs:
|
||||||
|
* AppleMFS.cs:
|
||||||
|
* DiscImageChef.Filesystems.csproj: Separated Apple MFS plugin
|
||||||
|
in different files.
|
||||||
|
|
||||||
2016-08-01 Natalia Portillo <claunia@claunia.com>
|
2016-08-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* SysV.cs: Detect older version of the XENIX superblock (found
|
* SysV.cs: Detect older version of the XENIX superblock (found
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
<Compile Include="AmigaDOS.cs" />
|
<Compile Include="AmigaDOS.cs" />
|
||||||
<Compile Include="AppleHFS.cs" />
|
<Compile Include="AppleHFS.cs" />
|
||||||
<Compile Include="AppleHFSPlus.cs" />
|
<Compile Include="AppleHFSPlus.cs" />
|
||||||
<Compile Include="AppleMFS.cs" />
|
|
||||||
<Compile Include="BFS.cs" />
|
<Compile Include="BFS.cs" />
|
||||||
<Compile Include="ext2FS.cs" />
|
<Compile Include="ext2FS.cs" />
|
||||||
<Compile Include="extFS.cs" />
|
<Compile Include="extFS.cs" />
|
||||||
@@ -78,6 +77,15 @@
|
|||||||
<Compile Include="UCSDPascal\Structs.cs" />
|
<Compile Include="UCSDPascal\Structs.cs" />
|
||||||
<Compile Include="UCSDPascal\Super.cs" />
|
<Compile Include="UCSDPascal\Super.cs" />
|
||||||
<Compile Include="UCSDPascal\Dir.cs" />
|
<Compile Include="UCSDPascal\Dir.cs" />
|
||||||
|
<Compile Include="AppleMFS\AppleMFS.cs" />
|
||||||
|
<Compile Include="AppleMFS\Consts.cs" />
|
||||||
|
<Compile Include="AppleMFS\Dir.cs" />
|
||||||
|
<Compile Include="AppleMFS\Encoding.cs" />
|
||||||
|
<Compile Include="AppleMFS\File.cs" />
|
||||||
|
<Compile Include="AppleMFS\Info.cs" />
|
||||||
|
<Compile Include="AppleMFS\Structs.cs" />
|
||||||
|
<Compile Include="AppleMFS\Super.cs" />
|
||||||
|
<Compile Include="AppleMFS\Xattr.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -113,6 +121,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="LisaFS\" />
|
<Folder Include="LisaFS\" />
|
||||||
<Folder Include="UCSDPascal\" />
|
<Folder Include="UCSDPascal\" />
|
||||||
|
<Folder Include="AppleMFS\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="..\LICENSE.LGPL">
|
<EmbeddedResource Include="..\LICENSE.LGPL">
|
||||||
|
|||||||
Reference in New Issue
Block a user