Add project files.

This commit is contained in:
2025-08-09 15:45:34 -06:00
commit c547297c1e
56 changed files with 3908 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B9C0B7E7-FC25-4F96-8115-453D1759E25A}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>AutomatedROMTools</RootNamespace>
<AssemblyName>AutomatedROMTools-CLI</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AutomatedROMTools.cs" />
<Compile Include="CRC32CryptoServiceProvider.cs" />
<Compile Include="DatEmAll.cs" />
<Compile Include="DeheadEmAll.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SortEmAll.cs" />
<Compile Include="SplitEmAll.cs" />
<Compile Include="TrimEmAll.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Resources\Output\Batches\AutomatedROMTools-BuildPatchesDat.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-BuildROMsDat.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-DeheadA78.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-DeheadAll.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-DeheadFDS.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-DeheadLnx.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-DeheadNES.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-PrintHelp.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-PrintLicense.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-PrintVersion.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-SortA2Z.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-SortZ2A.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-Split-%28USA%29.bat" />
<None Include="Resources\Output\Batches\AutomatedROMTools-TrimZerosFromEnd.bat" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="Resources\Output\Batches\put your batches in this directory.txt" />
<Content Include="Resources\Output\DatsSorted\put your sorted dats in this directory.txt" />
<Content Include="Resources\Output\DatsSplit\put your split dats in this directory.txt" />
<Content Include="Resources\Output\Dats\put your dats in this directory.txt" />
<Content Include="Resources\Output\Docs\AutomatedROMTools-Help.txt" />
<Content Include="Resources\Output\Logs\put your logs in this directory.txt" />
<Content Include="Resources\Output\Patches\put your patches in this directory.txt" />
<Content Include="Resources\Output\ROMsDeheaded\put your deheadered roms in this directory.txt" />
<Content Include="Resources\Output\ROMsTrimmed\put your trimmed roms in this directory.txt" />
<Content Include="Resources\Output\ROMs\put your roms in this directory.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,114 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
namespace AutomatedROMTools
{
/// <summary>
/// Implements a 32-bit CRC hash algorithm compatible with Zip etc.
/// </summary>
/// <remarks>
/// If you need to call multiple times for the same data either use the HashAlgorithm
/// interface or remember that the result of one Compute call needs to be ~ (XOR) before
/// being passed in as the seed for the next Compute call.
/// </remarks>
public sealed class CRC32CryptoServiceProvider : HashAlgorithm
{
public const UInt32 DefaultPolynomial = 0xedb88320u;
public const UInt32 DefaultSeed = 0xffffffffu;
static UInt32[] defaultTable;
readonly UInt32 seed;
readonly UInt32[] table;
UInt32 hash;
public CRC32CryptoServiceProvider() : this(DefaultPolynomial, DefaultSeed)
{
}
public CRC32CryptoServiceProvider(UInt32 polynomial, UInt32 seed)
{
table = InitializeTable(polynomial);
this.seed = hash = seed;
}
public override void Initialize()
{
hash = seed;
}
protected override void HashCore(byte[] array, int ibStart, int cbSize)
{
hash = CalculateHash(table, hash, array, ibStart, cbSize);
}
protected override byte[] HashFinal()
{
var hashBuffer = UInt32ToBigEndianBytes(~hash);
HashValue = hashBuffer;
return hashBuffer;
}
public override int HashSize
{
get { return 32; }
}
public static UInt32 Compute(byte[] buffer)
{
return Compute(DefaultSeed, buffer);
}
public static UInt32 Compute(UInt32 seed, byte[] buffer)
{
return Compute(DefaultPolynomial, seed, buffer);
}
public static UInt32 Compute(UInt32 polynomial, UInt32 seed, byte[] buffer)
{
return ~CalculateHash(InitializeTable(polynomial), seed, buffer, 0, buffer.Length);
}
static UInt32[] InitializeTable(UInt32 polynomial)
{
if (polynomial == DefaultPolynomial && defaultTable != null)
return defaultTable;
var createTable = new UInt32[256];
for (var i = 0; i < 256; i++)
{
var entry = (UInt32)i;
for (var j = 0; j < 8; j++)
if ((entry & 1) == 1)
entry = (entry >> 1) ^ polynomial;
else
entry = entry >> 1;
createTable[i] = entry;
}
if (polynomial == DefaultPolynomial)
defaultTable = createTable;
return createTable;
}
static UInt32 CalculateHash(UInt32[] table, UInt32 seed, IList<byte> buffer, int start, int size)
{
var hash = seed;
for (var i = start; i < start + size; i++)
hash = (hash >> 8) ^ table[buffer[i] ^ hash & 0xff];
return hash;
}
static byte[] UInt32ToBigEndianBytes(UInt32 uint32)
{
var result = BitConverter.GetBytes(uint32);
if (BitConverter.IsLittleEndian)
Array.Reverse(result);
return result;
}
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
class DatEmAll
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
class DeheadEmAll
{
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
/// <summary>
/// The Main Program Class.
/// </summary>
class Program
{
static void Main(string[] args)
{
// Create a new program object.
AutomatedROMTools ART = new AutomatedROMTools();
// Input the variables passed from the command line arguments.
ART.SetVariablesFromCLI(args);
// Print the version.
ART.PrintVersion();
// Process the command switch.
ART.ProcessCommandSwitch();
// Output the log to a text file.
ART.SaveLog();
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AutomatedROMTools-CLI")]
[assembly: AssemblyDescription("Automated ROM Tools")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Automated ROM Tools")]
[assembly: AssemblyProduct("AutomatedROMTools-CLI")]
[assembly: AssemblyCopyright("Copyright (c) 2016-2025 Automated ROM Tools")]
[assembly: AssemblyTrademark("Automated ROM Tools")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b9c0b7e7-fc25-4f96-8115-453d1759e25a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.2")]
[assembly: AssemblyFileVersion("0.0.2")]

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -buildpatchesdat
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -buildromsdat "RD:..\ROMs"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -deheada78
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -deheadall
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -deheadfds
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -deheadlnx
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -deheadnes
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -help "LF:..\Logs\Log_ART_00000000_000000.txt"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -license
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -version
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -sorta2z
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -sortz2a
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -split "FT:(USA)"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\AutomatedROMTools-CLI.exe" -trimzerosfromend
rem */ Pause /*
@pause

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1,63 @@
-------------------------------------------------------------------------------
AutomatedROMTools - Help version 20250809
Copyright (c) 2016-2025 AutomatedROMTools - All Rights Reserved
-------------------------------------------------------------------------------
[I] About
[II] Notes
[III] Installation
[IV] Thanks
[V] Disclaimer
[I] About
-------------------------------------------------------------------------------
Automated ROM Tools or ART is The Original Automated ROM Tools. Automated ROM Tools or ART is a suite of automated ROM and datafile software tools.
Here are some of the features of Automated ROM Tools:
* Building dats for patches
* Building dats for ROMs
* Sorting dats
* Splitting dats
* Deheadering ROMs
* Trimming ROMs
* More to come
Automated ROM Tools is mostly unfinished. The GUI does not exist yet.
[II] Notes
-------------------------------------------------------------------------------
1) This software should NOT be used on files that are not backed up!
2) This software should be installed as close to the drive's root directory as possible. The nature of things dictates that there will be very long filenames, on occasion. Keep in mind that some things may not work correctly if you choose too long of a path to put your files.
[III] Installation
-------------------------------------------------------------------------------
Download and unzip the program to any location that you wish to use. However, this software should be installed as close to the drive's root directory as possible.
I like to put my installation in a directory called ART on my C:\ drive. My installation layout looks like this:
C:\ART\Batches\
C:\ART\Dats\
C:\ART\DatsSorted\
C:\ART\DatsSplit\
C:\ART\Docs\
C:\ART\Logs\
C:\ART\Patches\
C:\ART\ROMs\
C:\ART\ROMsDeheaded\
C:\ART\ROMsTrimmed\
C:\ART\AutomatedROMTools-CLI.exe
[IV] Thanks
-------------------------------------------------------------------------------
Thanks to the development team and everyone who inspired or made this possible.
[V] Disclaimer
-------------------------------------------------------------------------------
This software may not be used for any illegal purposes or activities. It is your responsibility to use this software in accordance with all applicable laws.
This software may only be used and/or distributed in accordance with the license with which it is distributed.
This software may only be used on files that you own and/or have the right to use it on.
AutomatedROMTools has not, does not and will not post or host any patches or ROMs.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
class SortEmAll
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
class SplitEmAll
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomatedROMTools
{
class TrimEmAll
{
}
}