Add MS-DOS stub to NE/LE/LX/PE builders

This commit is contained in:
Matt Nadareski
2022-11-05 23:52:16 -07:00
parent a4e55a328c
commit 9a4e6de5f9
3 changed files with 24 additions and 0 deletions

View File

@@ -30,6 +30,14 @@ namespace BurnOutSharp.Builder
// Create a new executable to fill
var executable = new Executable();
// Parse the MS-DOS stub
var stub = MSDOS.ParseExecutable(data, offset);
if (stub?.Header == null || stub.Header.NewExeHeaderAddr == 0)
return null;
// Set the MS-DOS stub
executable.Stub = stub;
// TODO: Implement LE/LX parsing
return null;
}

View File

@@ -30,6 +30,14 @@ namespace BurnOutSharp.Builder
// Create a new executable to fill
var executable = new Executable();
// Parse the MS-DOS stub
var stub = MSDOS.ParseExecutable(data, offset);
if (stub?.Header == null || stub.Header.NewExeHeaderAddr == 0)
return null;
// Set the MS-DOS stub
executable.Stub = stub;
// TODO: Implement NE parsing
return null;
}

View File

@@ -30,6 +30,14 @@ namespace BurnOutSharp.Builder
// Create a new executable to fill
var executable = new Executable();
// Parse the MS-DOS stub
var stub = MSDOS.ParseExecutable(data, offset);
if (stub?.Header == null || stub.Header.NewExeHeaderAddr == 0)
return null;
// Set the MS-DOS stub
executable.Stub = stub;
// TODO: Implement PE parsing
return null;
}