diff --git a/BurnOutSharp/ExecutableType/Microsoft/NewRlc.cs b/BurnOutSharp/ExecutableType/Microsoft/NewRlc.cs deleted file mode 100644 index 1f0cccaf..00000000 --- a/BurnOutSharp/ExecutableType/Microsoft/NewRlc.cs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * NEWEXE.H (C) Copyright Microsoft Corp 1984-1987 - * - * Data structure definitions for the OS/2 & Windows - * executable file format. - * - * Modified by IVS on 24-Jan-1991 for Resource DeCompiler - * (C) Copyright IVS 1991 - * - * http://csn.ul.ie/~caolan/pub/winresdump/winresdump/newexe.h - */ - -using System; -using System.IO; -using System.Runtime.InteropServices; -using BurnOutSharp.Tools; - -namespace BurnOutSharp.ExecutableType.Microsoft -{ - /// - /// Relocation item - /// - /// TODO: Fix this because Marshal will not work since it's not a direct read - [StructLayout(LayoutKind.Sequential)] - internal class NewRlc - { - public char SourceType; // Source type - public char Flags; // Flag byte - public ushort SourceOffset; // Source offset - - // nr_intref - Internal Reference - public char TargetSegmentNumber; // Target segment number - public char Reserved1; // Reserved - public ushort TargetEntryTableOffset; // Target Entry Table offset - - // nr_import - Import - public ushort ModuleReferenceTableIndex; // Index into Module Reference Table - public ushort ProcedureOffset; // Procedure ordinal or name offset - - // nr_osfix - Operating system fixup - public ushort OperatingSystemFixupType; // OSFIXUP type - public ushort Reserved2; // Reserved - - public static NewRlc Deserialize(Stream stream) - { - var nr = new NewRlc(); - - nr.SourceType = stream.ReadChar(); - nr.Flags = stream.ReadChar(); - nr.SourceOffset = stream.ReadUInt16(); - - // nr_intref - nr.TargetSegmentNumber = stream.ReadChar(); - nr.Reserved1 = stream.ReadChar(); - nr.TargetEntryTableOffset = stream.ReadUInt16(); - - // nr_import - nr.ModuleReferenceTableIndex = BitConverter.ToUInt16(new byte[] { (byte)nr.SourceType, (byte)nr.Flags }, 0); - nr.ProcedureOffset = nr.TargetEntryTableOffset; - - // nr_osfix - nr.OperatingSystemFixupType = nr.ModuleReferenceTableIndex; - nr.Reserved2 = nr.ProcedureOffset; - - return nr; - } - } -} \ No newline at end of file diff --git a/BurnOutSharp/ExecutableType/Microsoft/NewRlcInfo.cs b/BurnOutSharp/ExecutableType/Microsoft/NewRlcInfo.cs deleted file mode 100644 index 790c5303..00000000 --- a/BurnOutSharp/ExecutableType/Microsoft/NewRlcInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * NEWEXE.H (C) Copyright Microsoft Corp 1984-1987 - * - * Data structure definitions for the OS/2 & Windows - * executable file format. - * - * Modified by IVS on 24-Jan-1991 for Resource DeCompiler - * (C) Copyright IVS 1991 - * - * http://csn.ul.ie/~caolan/pub/winresdump/winresdump/newexe.h - */ - -using System.IO; -using System.Runtime.InteropServices; -using BurnOutSharp.Tools; - -namespace BurnOutSharp.ExecutableType.Microsoft -{ - /// - /// Relocation info - /// - [StructLayout(LayoutKind.Sequential)] - internal class NewRlcInfo - { - /// - /// Number of relocation items that follow - /// - public ushort RelocationItemCount; - - public static NewRlcInfo Deserialize(Stream stream) - { - var nri = new NewRlcInfo(); - - nri.RelocationItemCount = stream.ReadUInt16(); - - return nri; - } - } -} \ No newline at end of file diff --git a/BurnOutSharp/ExecutableType/Microsoft/NewSegdata.cs b/BurnOutSharp/ExecutableType/Microsoft/NewSegdata.cs deleted file mode 100644 index ccd5ea55..00000000 --- a/BurnOutSharp/ExecutableType/Microsoft/NewSegdata.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * NEWEXE.H (C) Copyright Microsoft Corp 1984-1987 - * - * Data structure definitions for the OS/2 & Windows - * executable file format. - * - * Modified by IVS on 24-Jan-1991 for Resource DeCompiler - * (C) Copyright IVS 1991 - * - * http://csn.ul.ie/~caolan/pub/winresdump/winresdump/newexe.h - */ - -using System; -using System.IO; -using System.Runtime.InteropServices; -using BurnOutSharp.Tools; - -namespace BurnOutSharp.ExecutableType.Microsoft -{ - /// - /// Segment data - /// - /// TODO: Fix this because Marshal will not work since it's not a direct read - [StructLayout(LayoutKind.Sequential)] - internal class NewSegdata - { - #region ns_iter - - /// - /// Number of iterations - /// - public ushort Iterations; - - /// - /// Number of bytes - /// - public ushort TotalBytes; - - /// - /// Iterated data bytes - /// - public char IteratedDataBytes; - - #endregion - - #region ns_noiter - - /// - /// Data bytes - /// - public char DataBytes; - - #endregion - - public static NewSegdata Deserialize(Stream stream) - { - var nsd = new NewSegdata(); - - nsd.Iterations = stream.ReadUInt16(); - nsd.TotalBytes = stream.ReadUInt16(); - nsd.IteratedDataBytes = stream.ReadChar(); - nsd.DataBytes = (char)BitConverter.GetBytes(nsd.Iterations)[0]; - - return nsd; - } - } -} diff --git a/BurnOutSharp/ExecutableType/Microsoft/RsrcNameInfo.cs b/BurnOutSharp/ExecutableType/Microsoft/RsrcNameInfo.cs deleted file mode 100644 index b3e066c5..00000000 --- a/BurnOutSharp/ExecutableType/Microsoft/RsrcNameInfo.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * NEWEXE.H (C) Copyright Microsoft Corp 1984-1987 - * - * Data structure definitions for the OS/2 & Windows - * executable file format. - * - * Modified by IVS on 24-Jan-1991 for Resource DeCompiler - * (C) Copyright IVS 1991 - * - * http://csn.ul.ie/~caolan/pub/winresdump/winresdump/newexe.h - */ - -using System.IO; -using System.Runtime.InteropServices; -using BurnOutSharp.Tools; - -namespace BurnOutSharp.ExecutableType.Microsoft -{ - /// - /// Resource name information block - /// - [StructLayout(LayoutKind.Sequential)] - internal class RsrcNameInfo - { - /* - * The following two fields must be shifted left by the value of - * the rs_align field to compute their actual value. This allows - * resources to be larger than 64k, but they do not need to be - * aligned on 512 byte boundaries, the way segments are. - */ - - /// - /// File offset to resource data - /// - public ushort Offset; - - /// - /// Length of resource data - /// - public ushort Length; - - /// - /// Resource flags - /// - public ushort Flags; - - /// - /// Resource name id - /// - public ushort NameID; - - /// - /// If loaded, then global handle - /// - public ushort Handle; - - /// - /// Initially zero. Number of times the handle for this resource has been given out - /// - public ushort UsageCount; - - public static RsrcNameInfo Deserialize(Stream stream) - { - var rni = new RsrcNameInfo(); - - rni.Offset = stream.ReadUInt16(); - rni.Length = stream.ReadUInt16(); - rni.Flags = stream.ReadUInt16(); - rni.NameID = stream.ReadUInt16(); - rni.Handle = stream.ReadUInt16(); - rni.UsageCount = stream.ReadUInt16(); - - return rni; - } - } -} \ No newline at end of file