mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Move to new folders to reflect names
This commit is contained in:
BIN
SabreTools.Helper/AnyCPU/sqlite3.dll
Normal file
BIN
SabreTools.Helper/AnyCPU/sqlite3.dll
Normal file
Binary file not shown.
254
SabreTools.Helper/Data/Build.cs
Normal file
254
SabreTools.Helper/Data/Build.cs
Normal file
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
public class Build
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if running in a Mono environment
|
||||
/// </summary>
|
||||
public static bool MonoEnvironment
|
||||
{
|
||||
get { return (Type.GetType("Mono.Runtime") != null); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Readies the console and outputs the header
|
||||
/// </summary>
|
||||
/// <param name="name">The name to be displayed as the program</param>
|
||||
/// <remarks>Adapted from http://stackoverflow.com/questions/8200661/how-to-align-string-in-fixed-length-string</remarks>
|
||||
public static void Start(string name)
|
||||
{
|
||||
// Dynamically create the header string
|
||||
string border = "+-----------------------------------------------------------------------------+";
|
||||
string mid = name + " " + Constants.Version;
|
||||
mid = "|" + mid.PadLeft(((77 - mid.Length) / 2) + mid.Length).PadRight(77) + "|";
|
||||
|
||||
// If we're outputting to console, do fancy things
|
||||
if (!Console.IsOutputRedirected)
|
||||
{
|
||||
// Set the console to ready state
|
||||
ConsoleColor formertext = ConsoleColor.White;
|
||||
ConsoleColor formerback = ConsoleColor.Black;
|
||||
if (!MonoEnvironment)
|
||||
{
|
||||
Console.SetBufferSize(Console.BufferWidth, 999);
|
||||
formertext = Console.ForegroundColor;
|
||||
formerback = Console.BackgroundColor;
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.BackgroundColor = ConsoleColor.Blue;
|
||||
}
|
||||
|
||||
Console.Title = "SabreTools-" + name + " " + Constants.Version;
|
||||
|
||||
// Output the header
|
||||
Console.WriteLine(border);
|
||||
Console.WriteLine(mid);
|
||||
Console.WriteLine(border);
|
||||
Console.WriteLine();
|
||||
|
||||
// Return the console to the original text and background colors
|
||||
if (!MonoEnvironment)
|
||||
{
|
||||
Console.ForegroundColor = formertext;
|
||||
Console.BackgroundColor = formerback;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the help dialog for a given class
|
||||
/// </summary>
|
||||
public static void Help()
|
||||
{
|
||||
//http://stackoverflow.com/questions/14849367/how-to-determine-calling-method-and-class-name
|
||||
StackTrace st = new StackTrace();
|
||||
string className = st.GetFrame(1).GetMethod().ReflectedType.Name;
|
||||
|
||||
switch (className)
|
||||
{
|
||||
case "DATabase":
|
||||
Console.Write(@"
|
||||
DATabase - Import and Generate DAT files
|
||||
-----------------------------------------
|
||||
Usage: DATabase [option] [filename|dirname] ...
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show this help
|
||||
-a, --add Add a new system or source to the database
|
||||
-manu= Manufacturer name (system only)
|
||||
-system= System name (system only)
|
||||
-source= Source name (source only)
|
||||
-url= URL (source only)
|
||||
-d, --dfd Enable Dir2DAT mode
|
||||
-nm, --noMD5 Don't include MD5 in output
|
||||
-ns, --noSHA1 Don't include SHA1 in output
|
||||
-b, --bare Don't include date in file name
|
||||
-u, --unzip Force unzipping in created DAT
|
||||
-f, --files Treat archives as files
|
||||
-o, --old Output DAT in CMP format instead of XML
|
||||
-gz, --gz-files Allow reading of GZIP files as archives
|
||||
-ro, --romba Read files from a Romba input
|
||||
-f=, --filename= Set the external name of the DAT
|
||||
-n=, --name= Set the internal name of the DAT
|
||||
-d=, --desc= Set the description of the DAT
|
||||
-c=, --cat= Set the category of the DAT
|
||||
-v=, --version= Set the version of the DAT
|
||||
-au=, --author= Set the author of the DAT
|
||||
-sd, --superdat Enable SuperDAT creation
|
||||
-t=, --temp= Set the temporary directory to use
|
||||
-es, --ext-split Split a DAT by two file extensions
|
||||
-exta= First set of extensions (comma-separated)
|
||||
-extb= Second set of extensions (comma-separated)
|
||||
-out= Output directory
|
||||
-g, --generate Start tool in generate mode
|
||||
-system= System ID to generate from
|
||||
-nr, --no-rename Don't auto-rename games
|
||||
-o, --old Output DAT in CMP format instead of XML
|
||||
-ga, --generate-all Start tool in generate all mode
|
||||
-nr, --no-rename Don't auto-rename games
|
||||
-o, --old Output DAT in CMP format instead of XML
|
||||
-hs, --hash-split Split a DAT or folder by best-available hashes
|
||||
-out= Output directory
|
||||
-i, --import Start tool in import mode
|
||||
-ig, --ignore Don't prompt for new sources
|
||||
-lso, --list-sources List all sources (id <= name)
|
||||
-lsy, --list-systems List all systems (id <= name)
|
||||
-m, --merge Merge one or more DATs
|
||||
-di, --diff Output all diffdats (merge flag not required)
|
||||
-c, --cascade Enable cascaded diffing
|
||||
-ip, --inplace Enable inplace, cascaded diffing
|
||||
-dd, --dedup Enable deduping in the created DAT
|
||||
-b, --bare Don't include date in file name
|
||||
-u, --unzip Force unzipping in created DAT
|
||||
-o, --old Output DAT in CMP format instead of XML
|
||||
-clean Clean game names according to WoD standards
|
||||
-out= Output directory (overridden by --inplace)
|
||||
-sd, --superdat Enable SuperDAT creation
|
||||
-n=, --name= Set the internal name of the DAT
|
||||
-de=, --desc= Set the filename and description of the DAT
|
||||
-ca=, --category= Set the category of the DAT
|
||||
-v=, --version= Set the version of the DAT
|
||||
-au=, --author= Set the author of the DAT
|
||||
-rm, --remove Remove a system or source from the database
|
||||
-system= System ID
|
||||
-source= Source ID
|
||||
-st, --stats Get statistics on all input DATs
|
||||
-si, --single Show individual statistics
|
||||
-tm, --trim-merge Consolidate DAT into a single game and trim entries
|
||||
-rd=, --root-dir= Set the root directory for trimming calculation
|
||||
-nr, --no-rename Keep game names instead of using '!'
|
||||
-df, --disable-force Disable forceunzipping
|
||||
-ud, --update Update a DAT file
|
||||
-oc, --output-cmp Output in CMP format
|
||||
-om, --output-miss Output in Missfile format
|
||||
-r, --roms Output roms to miss instead of sets
|
||||
-gp, --game-prefix Add game name as a prefix to each item
|
||||
-pre=, --prefix= Set prefix for all lines
|
||||
-post=, --postfix= Set postfix for all lines
|
||||
-q, --quotes Put double-quotes around each item
|
||||
-ae=, --add-ext= Add an extension to each item
|
||||
-re=, --rep-ext= Replace all extensions with specified
|
||||
-ro, --romba Output in Romba format (requires SHA-1)
|
||||
-tsv, --tsv Output in Tab-Separated Value format
|
||||
-or, --output-rc Output in RomCenter format
|
||||
-os, --output-sd Output in SabreDAT format
|
||||
-ox, --output-xml Output in Logiqx XML format
|
||||
-f=, --filename= Set a new filename
|
||||
-n=, --name= Set a new internal name
|
||||
-de=, --desc= Set a new description
|
||||
-ca=, --category= Set a new category
|
||||
-v=, --version= Set a new version
|
||||
-da=, --date= Set a new date
|
||||
-au=, --author= Set a new author
|
||||
-em=, --email= Set a new email
|
||||
-hp=, --homepage= Set a new homepage
|
||||
-u=, --url= Set a new URL
|
||||
-co=, --comment= Set a new comment
|
||||
-h=, --header= Set a new header skipper
|
||||
-sd=, --superdat Set SuperDAT type
|
||||
-fm=, --forcemerge= Set force merging
|
||||
Supported values are:
|
||||
None, Split, Full
|
||||
-fn=, --forcend= Set force nodump
|
||||
Supported values are:
|
||||
None, Obsolete, Required, Ignore
|
||||
-fp=, --forcepack= Set force packing
|
||||
Supported values are:
|
||||
None, Zip, Unzip
|
||||
-clean Clean game names according to WoD standards
|
||||
-dd, --dedup Enable deduping in the created DAT
|
||||
-gn=, --game-name= Filter by game name
|
||||
-rn=, --rom-name= Filter by rom name
|
||||
-rt=, --rom-type= Filter by rom type
|
||||
-sgt=, --greater= Filter by size >=
|
||||
-slt=, --less= Filter by size <=
|
||||
-seq=, --equal= Filter by size ==
|
||||
-crc=, --crc= Filter by CRC hash
|
||||
-md5=, --md5= Filter by MD5 hash
|
||||
-sha1=, --sha1= Filter by SHA-1 hash
|
||||
-nd, --nodump Include only match nodump roms
|
||||
-nnd, --not-nodump Exclude all nodump roms
|
||||
-out= Output directory
|
||||
|
||||
Filenames and directories can't start with a reserved string
|
||||
unless prefixed by 'input='
|
||||
|
||||
Filter parameters game name, rom name, CRC, MD5, SHA-1 can
|
||||
do partial matches using asterisks as follows (case insensitive):
|
||||
*00 means ends with '00'
|
||||
00* means starts with '00'
|
||||
*00* means contains '00'
|
||||
00 means exactly equals '00'");
|
||||
break;
|
||||
case "Headerer":
|
||||
Console.WriteLine(@"Headerer - Remove and restore rom headers
|
||||
-----------------------------------------
|
||||
Usage: Headerer [option] [filename|dirname]
|
||||
|
||||
Options:
|
||||
-e Detect and remove mode
|
||||
-r Restore header to file based on SHA-1");
|
||||
break;
|
||||
case "OfflineMerge":
|
||||
Console.WriteLine(@"OfflineMerge - Update DATS for offline arrays
|
||||
-----------------------------------------
|
||||
Usage: OfflineMerge [options] [inputs]
|
||||
|
||||
Options:
|
||||
-h, -?, --help Show this help dialog
|
||||
-f, --fake Replace all hashes and sizes by the default
|
||||
|
||||
Inputs:
|
||||
-com= Complete current DAT
|
||||
-fix= Complete current Missing
|
||||
-new= New Complete DAT
|
||||
|
||||
This program will output the following DATs:
|
||||
(a) Net New - (NewComplete)-(Complete)
|
||||
(b) Unneeded - (Complete)-(NewComplete)
|
||||
(c) New Missing - (Net New)+(Missing-(Unneeded))
|
||||
(d) Have - (NewComplete)-(New Missing)
|
||||
OR (Complete or NewComplete)-(Missing) if one is missing");
|
||||
break;
|
||||
default:
|
||||
Console.Write("This is the default help output");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Credits()
|
||||
{
|
||||
Console.WriteLine(@"-----------------------------------------
|
||||
Credits
|
||||
-----------------------------------------
|
||||
|
||||
Programmer / Lead: Matt Nadareski (darksabre76)
|
||||
Additional code: emuLOAD, @tractivo
|
||||
Testing: emuLOAD, @tractivo, Kludge, Obiwantje, edc
|
||||
Suggestions: edc, AcidX, Amiga12, EliUmniCk
|
||||
Based on work by: The Wizard of DATz");
|
||||
}
|
||||
}
|
||||
}
|
||||
67
SabreTools.Helper/Data/Constants.cs
Normal file
67
SabreTools.Helper/Data/Constants.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
public class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// The current toolset version to be used by all child applications
|
||||
/// </summary>
|
||||
public static string Version = "v0.8.3";
|
||||
|
||||
// 0-byte file constants
|
||||
public static long SizeZero = 0;
|
||||
public static string CRCZero = "00000000";
|
||||
public static string MD5Zero = "d41d8cd98f00b204e9800998ecf8427e";
|
||||
public static string SHA1Zero = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
|
||||
|
||||
// Regex File Name Patterns
|
||||
public static string DefaultPattern = @"^(.+?) - (.+?) \((.*) (.*)\)\.dat$";
|
||||
public static string DefaultSpecialPattern = @"^(.+?) - (.+?) \((.*) (.*)\)\.xml$";
|
||||
public static string GoodPattern = @"^(Good.*?)_.*\.dat";
|
||||
public static string GoodXmlPattern = @"^(Good.*?)_.*\.xml";
|
||||
public static string MamePattern = @"^(.*)\.xml$";
|
||||
public static string MaybeIntroPattern = @"(.*?) \[T-En\].*\((\d{8})\)\.dat$";
|
||||
public static string NoIntroPattern = @"^(.*?) \((\d{8}-\d{6})_CM\).*\.dat$";
|
||||
public static string NoIntroNumberedPattern = @"(.*? - .*?) \(\d.*?_CM\).*.dat";
|
||||
public static string NoIntroSpecialPattern = @"(.*? - .*?) \((\d{8})\).*\.dat";
|
||||
public static string NonGoodPattern = @"^(NonGood.*?)( .*?)?.xml";
|
||||
public static string NonGoodSpecialPattern = @"^(NonGood.*?)( .*)?.dat";
|
||||
public static string RedumpPattern = @"^(.*?) \((\d{8} \d{2}-\d{2}-\d{2})\)\.dat$";
|
||||
public static string RedumpBiosPattern = @"^(.*?) \(\d+\) \((\d{4}-\d{2}-\d{2})\)\.dat$";
|
||||
public static string TosecPattern = @"^(.*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TosecSpecialPatternA = @"^(.*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TosecSpecialPatternB = @"^(.*? - .*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TruripPattern = @"^(.*) - .* \(trurip_XML\)\.dat$";
|
||||
public static string ZandroPattern = @"^SMW-.*.xml";
|
||||
|
||||
// Regex Mapped Name Patterns
|
||||
public static string RemappedPattern = @"^(.*) - (.*)$";
|
||||
|
||||
// Regex Date Patterns
|
||||
public static string DefaultDatePattern = @"(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})";
|
||||
public static string NoIntroDatePattern = @"(\d{4})(\d{2})(\d{2})-(\d{2})(\d{2})(\d{2})";
|
||||
public static string NoIntroSpecialDatePattern = @"(\d{4})(\d{2})(\d{2})";
|
||||
public static string RedumpDatePattern = @"(\d{4})(\d{2})(\d{2}) (\d{2})-(\d{2})-(\d{2})";
|
||||
public static string TosecDatePattern = @"(\d{4})-(\d{2})-(\d{2})";
|
||||
|
||||
// Regex conversion patterns
|
||||
public static string HeaderPatternCMP = @"(^.*?) \($";
|
||||
public static string ItemPatternCMP = @"^\s*(\S*?) (.*)";
|
||||
public static string EndPatternCMP = @"^\s*\)\s*$";
|
||||
|
||||
// Byte (1024-based) size comparisons
|
||||
public static long KibiByte = 1024;
|
||||
public static long MibiByte = (long)Math.Pow(KibiByte, 2);
|
||||
public static long GibiByte = (long)Math.Pow(KibiByte, 3);
|
||||
public static long TibiByte = (long)Math.Pow(KibiByte, 4);
|
||||
public static long PibiByte = (long)Math.Pow(KibiByte, 5);
|
||||
|
||||
// Byte (1000-based) size comparisons
|
||||
public static long KiloByte = 1000;
|
||||
public static long MegaByte = (long)Math.Pow(KiloByte, 2);
|
||||
public static long GigaByte = (long)Math.Pow(KiloByte, 2);
|
||||
public static long TeraByte = (long)Math.Pow(KiloByte, 2);
|
||||
public static long PetaByte = (long)Math.Pow(KiloByte, 2);
|
||||
}
|
||||
}
|
||||
110
SabreTools.Helper/Data/Enums.cs
Normal file
110
SabreTools.Helper/Data/Enums.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Possible DAT import classes
|
||||
/// </summary>
|
||||
public enum DatType
|
||||
{
|
||||
none = 0,
|
||||
Custom,
|
||||
MAME,
|
||||
NoIntro,
|
||||
Redump,
|
||||
TOSEC,
|
||||
TruRip,
|
||||
NonGood,
|
||||
MaybeIntro,
|
||||
Good,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Possible detected header type
|
||||
/// </summary>
|
||||
public enum HeaderType
|
||||
{
|
||||
None = 0,
|
||||
A7800,
|
||||
FDS,
|
||||
Lynx,
|
||||
//N64,
|
||||
NES,
|
||||
PCE,
|
||||
PSID,
|
||||
SNES,
|
||||
SPC,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Severity of the logging statement
|
||||
/// </summary>
|
||||
public enum LogLevel
|
||||
{
|
||||
VERBOSE = 0,
|
||||
USER,
|
||||
WARNING,
|
||||
ERROR,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines which type of duplicate a file is
|
||||
/// </summary>
|
||||
public enum DupeType
|
||||
{
|
||||
None = 0,
|
||||
InternalHash = 1,
|
||||
InternalAll = 2,
|
||||
ExternalHash = 3,
|
||||
ExternalAll = 4,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines forcemerging tag for DAT output
|
||||
/// </summary>
|
||||
public enum ForceMerging
|
||||
{
|
||||
None = 0,
|
||||
Split,
|
||||
Full,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines forcenodump tag for DAT output
|
||||
/// </summary>
|
||||
public enum ForceNodump
|
||||
{
|
||||
None = 0,
|
||||
Obsolete,
|
||||
Required,
|
||||
Ignore,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines forcepacking tag for DAT output
|
||||
/// </summary>
|
||||
public enum ForcePacking
|
||||
{
|
||||
None = 0,
|
||||
Zip,
|
||||
Unzip,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines the DAT output format
|
||||
/// </summary>
|
||||
public enum OutputFormat
|
||||
{
|
||||
None = 0,
|
||||
Xml,
|
||||
ClrMamePro,
|
||||
RomCenter,
|
||||
DOSCenter,
|
||||
MissFile,
|
||||
SabreDat,
|
||||
}
|
||||
}
|
||||
117
SabreTools.Helper/Data/Structs.cs
Normal file
117
SabreTools.Helper/Data/Structs.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Intermediate struct for holding and processing rom data
|
||||
/// </summary>
|
||||
public struct RomData
|
||||
{
|
||||
public string Manufacturer;
|
||||
public string System;
|
||||
public int SystemID;
|
||||
public string Source;
|
||||
public string URL;
|
||||
public int SourceID;
|
||||
public string Game;
|
||||
public string Name;
|
||||
public string Type;
|
||||
public long Size;
|
||||
public string CRC;
|
||||
public string MD5;
|
||||
public string SHA1;
|
||||
public DupeType Dupe;
|
||||
public bool Nodump;
|
||||
public string Date;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intermediate struct for holding DAT information
|
||||
/// </summary>
|
||||
public struct DatData : ICloneable
|
||||
{
|
||||
// Data common to most DAT types
|
||||
public string FileName;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public string Category;
|
||||
public string Version;
|
||||
public string Date;
|
||||
public string Author;
|
||||
public string Email;
|
||||
public string Homepage;
|
||||
public string Url;
|
||||
public string Comment;
|
||||
public string Header;
|
||||
public string Type; // Generally only used for SuperDAT
|
||||
public ForceMerging ForceMerging;
|
||||
public ForceNodump ForceNodump;
|
||||
public ForcePacking ForcePacking;
|
||||
public OutputFormat OutputFormat;
|
||||
public bool MergeRoms;
|
||||
public Dictionary<string, List<RomData>> Roms;
|
||||
|
||||
// Data specific to the Miss DAT type
|
||||
public bool UseGame;
|
||||
public string Prefix;
|
||||
public string Postfix;
|
||||
public bool Quotes;
|
||||
public string RepExt;
|
||||
public string AddExt;
|
||||
public bool GameName;
|
||||
public bool Romba;
|
||||
public bool TSV; // tab-deliminated output
|
||||
|
||||
// Statistical data related to the DAT
|
||||
public long RomCount;
|
||||
public long DiskCount;
|
||||
public long TotalSize;
|
||||
public long CRCCount;
|
||||
public long MD5Count;
|
||||
public long SHA1Count;
|
||||
public long NodumpCount;
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new DatData
|
||||
{
|
||||
FileName = this.FileName,
|
||||
Name = this.Name,
|
||||
Description = this.Description,
|
||||
Category = this.Category,
|
||||
Version = this.Version,
|
||||
Date = this.Date,
|
||||
Author = this.Author,
|
||||
Email = this.Email,
|
||||
Homepage = this.Homepage,
|
||||
Url = this.Url,
|
||||
Comment = this.Comment,
|
||||
Header = this.Header,
|
||||
Type = this.Type,
|
||||
ForceMerging = this.ForceMerging,
|
||||
ForceNodump = this.ForceNodump,
|
||||
ForcePacking = this.ForcePacking,
|
||||
OutputFormat = this.OutputFormat,
|
||||
MergeRoms = this.MergeRoms,
|
||||
Roms = this.Roms,
|
||||
UseGame = this.UseGame,
|
||||
Prefix = this.Prefix,
|
||||
Postfix = this.Postfix,
|
||||
Quotes = this.Quotes,
|
||||
RepExt = this.RepExt,
|
||||
AddExt = this.AddExt,
|
||||
GameName = this.GameName,
|
||||
Romba = this.Romba,
|
||||
TSV = this.TSV,
|
||||
RomCount = this.RomCount,
|
||||
DiskCount = this.DiskCount,
|
||||
TotalSize = this.TotalSize,
|
||||
CRCCount = this.CRCCount,
|
||||
MD5Count = this.MD5Count,
|
||||
SHA1Count = this.SHA1Count,
|
||||
NodumpCount = this.NodumpCount,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
7
SabreTools.Helper/Interfaces/IGenerate.cs
Normal file
7
SabreTools.Helper/Interfaces/IGenerate.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
public interface IGenerate
|
||||
{
|
||||
bool Export();
|
||||
}
|
||||
}
|
||||
7
SabreTools.Helper/Interfaces/IImport.cs
Normal file
7
SabreTools.Helper/Interfaces/IImport.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
public interface IImport
|
||||
{
|
||||
bool UpdateDatabase();
|
||||
}
|
||||
}
|
||||
674
SabreTools.Helper/LICENSE
Normal file
674
SabreTools.Helper/LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
177
SabreTools.Helper/Logger.cs
Normal file
177
SabreTools.Helper/Logger.cs
Normal file
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Log either to file or to the console
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Things to do:
|
||||
/// - Allow for "triggerable" logging done on an interval (async)
|
||||
/// - Log filtering? (#if debug?)
|
||||
/// </remarks>
|
||||
public class Logger
|
||||
{
|
||||
// Private instance variables
|
||||
private bool _tofile;
|
||||
private string _filename;
|
||||
private DateTime _start;
|
||||
private StreamWriter _log;
|
||||
|
||||
// Private required variables
|
||||
private string _basepath = "Logs" + Path.DirectorySeparatorChar;
|
||||
|
||||
// Public wrappers
|
||||
public bool ToFile
|
||||
{
|
||||
get { return _tofile; }
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
_tofile = value;
|
||||
if (_tofile)
|
||||
{
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize a Logger object with the given information
|
||||
/// </summary>
|
||||
/// <param name="tofile">True if file should be written to instead of console</param>
|
||||
/// <param name="filename">Filename representing log location</param>
|
||||
public Logger(bool tofile, string filename)
|
||||
{
|
||||
_tofile = tofile;
|
||||
_filename = Path.GetFileNameWithoutExtension(filename) + " (" + DateTime.Now.ToString("yyyy-MM-dd HHmmss") + ")" + Path.GetExtension(filename);
|
||||
|
||||
if (!Directory.Exists(_basepath))
|
||||
{
|
||||
Directory.CreateDirectory(_basepath);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start logging by opening output file (if necessary)
|
||||
/// </summary>
|
||||
/// <returns>True if the logging was started correctly, false otherwise</returns>
|
||||
public bool Start()
|
||||
{
|
||||
_start = DateTime.Now;
|
||||
if (!_tofile)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_log = new StreamWriter(File.Open(_basepath + _filename, FileMode.OpenOrCreate | FileMode.Append));
|
||||
_log.WriteLine("Logging started " + DateTime.Now);
|
||||
_log.Flush();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// End logging by closing output file (if necessary)
|
||||
/// </summary>
|
||||
/// <returns>True if the logging was ended correctly, false otherwise</returns>
|
||||
public bool Close()
|
||||
{
|
||||
|
||||
TimeSpan span = DateTime.Now.Subtract(_start);
|
||||
string total = span.ToString(@"hh\:mm\:ss\.fffff");
|
||||
if (!_tofile)
|
||||
{
|
||||
Console.WriteLine("Total runtime: " + total);
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_log.WriteLine("Logging ended " + DateTime.Now);
|
||||
_log.WriteLine("Total runtime: " + total);
|
||||
Console.WriteLine("Total runtime: " + total);
|
||||
_log.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <param name="loglevel">Severity of the information being logged</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool Log(string output, LogLevel loglevel = LogLevel.VERBOSE)
|
||||
{
|
||||
// USER and ERROR writes to console
|
||||
if (loglevel == LogLevel.USER || loglevel == LogLevel.ERROR)
|
||||
{
|
||||
Console.WriteLine((loglevel == LogLevel.ERROR ? loglevel.ToString() + " " : "") + output);
|
||||
}
|
||||
|
||||
// If we're writing to file, use the existing stream
|
||||
if (_tofile)
|
||||
{
|
||||
try
|
||||
{
|
||||
_log.WriteLine(loglevel.ToString() + " - " + DateTime.Now + " - " + output);
|
||||
_log.Flush();
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("Could not write to log file!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a user message to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool User(string output)
|
||||
{
|
||||
return Log(output, LogLevel.USER);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given string as a warning to the log output
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool Warning(string output)
|
||||
{
|
||||
return Log(output, LogLevel.WARNING);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the given string as an error in the log
|
||||
/// </summary>
|
||||
/// <param name="output">String to be written log</param>
|
||||
/// <returns>True if the output could be written, false otherwise</returns>
|
||||
public bool Error(string output)
|
||||
{
|
||||
return Log(output, LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
SabreTools.Helper/Mappings/Good.xml
Normal file
37
SabreTools.Helper/Mappings/Good.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="Good2600" to="Atari - 2600" />
|
||||
<mapping from="Good5200" to="Atari - 5200" />
|
||||
<mapping from="Good7800" to="Atari - 7800" />
|
||||
<mapping from="GoodChaF" to="Fairchild - Channel F" />
|
||||
<mapping from="GoodCoCo" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="GoodCol" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="GoodCPC" to="Amstrad - CPC" />
|
||||
<mapping from="GoodGB64" to="Commodore - 64" />
|
||||
<mapping from="GoodGBA" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="GoodGBx" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="GoodGCom" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="GoodGen" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="GoodGG" to="Sega - Game Gear" />
|
||||
<mapping from="GoodINTV" to="Mattel - Intellivision" />
|
||||
<mapping from="GoodJag" to="Atari - Jaguar" />
|
||||
<mapping from="GoodLynx" to="Atari - Lynx" />
|
||||
<mapping from="GoodMO5" to="Thomson - 8bit" />
|
||||
<mapping from="GoodMSX1" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="GoodMSX2" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="GoodMTX" to="Memotech - MTX512" />
|
||||
<mapping from="GoodN64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="GoodNES" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="GoodNGPx" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="GoodOric" to="Tangerine - Oric-1, Oric Atmos" />
|
||||
<mapping from="GoodPCE" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="GoodPico" to="Sega - PICO" />
|
||||
<mapping from="GoodSAMC" to="MGT - Sam Coupe" />
|
||||
<mapping from="GoodSMS" to="Sega - Master System, Mark III" />
|
||||
<mapping from="GoodSNES" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="GoodSV" to="Watara - Supervision" />
|
||||
<mapping from="GoodVBoy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="GoodVect" to="GCE - Vectrex" />
|
||||
<mapping from="GoodWSx" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
</mappings>
|
||||
445
SabreTools.Helper/Mappings/MAME.xml
Normal file
445
SabreTools.Helper/Mappings/MAME.xml
Normal file
@@ -0,0 +1,445 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="32x" to="Sega - 32X" />
|
||||
<mapping from="3do_m2" to="Panasonic - 3DO M2" />
|
||||
<mapping from="a2600" to="Atari - 2600" />
|
||||
<mapping from="a2600_cass" to="Atari - 2600" />
|
||||
<mapping from="a5200" to="Atari - 5200" />
|
||||
<mapping from="a7800" to="Atari - 7800" />
|
||||
<mapping from="a800" to="Atari - 8bit" />
|
||||
<mapping from="a800_flop" to="Atari - 8bit" />
|
||||
<mapping from="abc1600" to="Luxor - ABC 1600" />
|
||||
<mapping from="abc800" to="Luxor - ABC 800" />
|
||||
<mapping from="abc800_hdd" to="Luxor - ABC 800" />
|
||||
<mapping from="abc806" to="Luxor - ABC 806" />
|
||||
<mapping from="abc80_cass" to="Luxor - ABC 80" />
|
||||
<mapping from="abc80_flop" to="Luxor - ABC 80" />
|
||||
<mapping from="adam_cart" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="adam_cass" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="adam_flop" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="advantage" to="NorthStar - Advantage" />
|
||||
<mapping from="advision" to="Entex - Adventure Vision" />
|
||||
<mapping from="aim65_cart" to="Rockwell - AIM 65" />
|
||||
<mapping from="aleste" to="Patisonic - Aleste 520EX" />
|
||||
<mapping from="alice32" to="Matra Hachette - Alice 32 & 90" />
|
||||
<mapping from="alice90" to="Matra Hachette - Alice 32 & 90" />
|
||||
<mapping from="alphatro_flop" to="Triumph-Adler - Alphatronic PC" />
|
||||
<mapping from="altos5" to="Altos Computer Systems - Series 5" />
|
||||
<mapping from="amiga_a1000" to="Commodore - Amiga" />
|
||||
<mapping from="amiga_a3000" to="Commodore - Amiga" />
|
||||
<mapping from="amiga_apps" to="Commodore - Amiga" />
|
||||
<mapping from="amiga_flop" to="Commodore - Amiga" />
|
||||
<mapping from="amiga_hardware" to="Commodore - Amiga" />
|
||||
<mapping from="amiga_workbench" to="Commodore - Amiga" />
|
||||
<mapping from="amigaaga_flop" to="Commodore - Amiga" />
|
||||
<mapping from="amigaecs_flop" to="Commodore - Amiga" />
|
||||
<mapping from="amigaocs_flop" to="Commodore - Amiga" />
|
||||
<mapping from="ampro" to="Ampro - Little Board" />
|
||||
<mapping from="apc" to="NEC - Advanced Personal Computer" />
|
||||
<mapping from="apfimag_cass" to="APF - M-1000" />
|
||||
<mapping from="apfm1000" to="APF - M-1000" />
|
||||
<mapping from="apogee" to="Radio-86RK - Apogej BK-01" />
|
||||
<mapping from="apollo_ctape" to="Hewlett-Packard - Apollo" />
|
||||
<mapping from="apple1" to="Apple - I" />
|
||||
<mapping from="apple2" to="Apple - II" />
|
||||
<mapping from="apple2gs" to="Apple - II" />
|
||||
<mapping from="apple3" to="Apple - III" />
|
||||
<mapping from="aquarius" to="Mattel - Aquarius" />
|
||||
<mapping from="arcadia" to="Emerson - Arcadia 2001" />
|
||||
<mapping from="archimedes" to="Acorn - Archimedes" />
|
||||
<mapping from="astrocde" to="Bally Professional - Arcade, Astrocade" />
|
||||
<mapping from="atom" to="Acorn - Atom" />
|
||||
<mapping from="atom_cass" to="Acorn - Atom" />
|
||||
<mapping from="atom_flop" to="Acorn - Atom" />
|
||||
<mapping from="atom_rom" to="Acorn - Atom" />
|
||||
<mapping from="attache" to="Otrona - Attache" />
|
||||
<mapping from="b2m" to="BNPO - Bashkiria-2M" />
|
||||
<mapping from="bbc_32016_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_65c102_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_68000_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_80186_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_arm_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_32016" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_6502" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_65c102" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_68000" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_80186" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_arm" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_torch" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_flop_z80" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_torch_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbc_z80_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbca_cass" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_cass" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_cass_de" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_de_cass" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_flop_orig" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_flop_us" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_orig_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcb_us_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcbc" to="BBC - Bridge Companion" />
|
||||
<mapping from="bbcm_cart" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcm_cass" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcm_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bbcmc_flop" to="Acorn - BBC, Electron" />
|
||||
<mapping from="bk0010" to="Elektronika - BK-0010" />
|
||||
<mapping from="bml3_flop" to="Hitachi - Basic Master Level 3" />
|
||||
<mapping from="bw12" to="Bondwell - 12" />
|
||||
<mapping from="bw14" to="Bondwell - 14" />
|
||||
<mapping from="bw2" to="Bondwell - 2" />
|
||||
<mapping from="bx256hp_flop" to="Commodore - BX256-80HP, CBM 730" />
|
||||
<mapping from="c128_cart" to="Commodore - 128" />
|
||||
<mapping from="c128_flop" to="Commodore - 128" />
|
||||
<mapping from="c128_rom" to="Commodore - 128" />
|
||||
<mapping from="c64_cart" to="Commodore - 64" />
|
||||
<mapping from="c64_cass" to="Commodore - 64" />
|
||||
<mapping from="c64_flop" to="Commodore - 64" />
|
||||
<mapping from="c65_flop" to="Commodore - 65" />
|
||||
<mapping from="casloopy" to="Casio - Loopy" />
|
||||
<mapping from="cbm2_cart" to="Commodore - CBM-II" />
|
||||
<mapping from="cbm2_flop" to="Commodore - CBM-II" />
|
||||
<mapping from="cbm8096_flop" to="Commodore - 8096" />
|
||||
<mapping from="cbm8296_flop" to="Commodore - 8296" />
|
||||
<mapping from="cc40_cart" to="Texas Instruments - CC-40" />
|
||||
<mapping from="cd32" to="Commodore - Amiga" />
|
||||
<mapping from="cdi" to="Philips - CD-i" />
|
||||
<mapping from="cdtv" to="Commodore - Amiga" />
|
||||
<mapping from="cgenie_cart" to="EACA - EG2000 Colour Genie" />
|
||||
<mapping from="cgenie_cass" to="EACA - EG2000 Colour Genie" />
|
||||
<mapping from="channelf" to="Fairchild - Channel F" />
|
||||
<mapping from="coco_cart" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="coco_flop" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="coleco" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="compclr2_flop" to="ISC - Compucolor II" />
|
||||
<mapping from="compis" to="Telenova - Compis" />
|
||||
<mapping from="comx35_flop" to="COMX - COMX-35" />
|
||||
<mapping from="copera" to="Sega - PICO" />
|
||||
<mapping from="cpc_cass" to="Amstrad - CPC" />
|
||||
<mapping from="cpc_flop" to="Amstrad - CPC" />
|
||||
<mapping from="crvision" to="VTech - CreatiVision" />
|
||||
<mapping from="cx3000tc" to="Palson - CX 3000 Tele Computer" />
|
||||
<mapping from="dai_cass" to="DAI - Personal Computer" />
|
||||
<mapping from="database" to="Voltmace - Database" />
|
||||
<mapping from="dim68k" to="Dimension - 68000" />
|
||||
<mapping from="dmv" to="NCR - Decision Mate V" />
|
||||
<mapping from="dps1" to="Ithaca InterSystems - DPS-1" />
|
||||
<mapping from="ec1841" to="MPO BT - EC 1841" />
|
||||
<mapping from="einstein" to="Tatung - Einstein TC-01" />
|
||||
<mapping from="electron_cart" to="Acorn - BBC, Electron" />
|
||||
<mapping from="electron_cass" to="Acorn - BBC, Electron" />
|
||||
<mapping from="ep64_cart" to="Enterprise - 64, 128" />
|
||||
<mapping from="ep64_cass" to="Enterprise - 64, 128" />
|
||||
<mapping from="ep64_flop" to="Enterprise - 64, 128" />
|
||||
<mapping from="epson_cpm" to="Epson - CPM" />
|
||||
<mapping from="exl100" to="Exelvision - Exeltel, EXL100" />
|
||||
<mapping from="famicom_cass" to="Nintendo - Famicom BASIC" />
|
||||
<mapping from="famicom_flop" to="Nintendo - Famicom Disk System" />
|
||||
<mapping from="fidel_scc" to="Fidelity - SCC" />
|
||||
<mapping from="fm77av" to="Fujitsu - FM-77AV" />
|
||||
<mapping from="fm7_cass" to="Fujitsu - FM-7" />
|
||||
<mapping from="fm7_disk" to="Fujitsu - FM-7" />
|
||||
<mapping from="fmtowns_cd" to="Fujitsu - FM Towns" />
|
||||
<mapping from="g7400" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="galaxy" to="Galaksija - Galaksija, Galaksija Plus" />
|
||||
<mapping from="gamate" to="Bit Corp - Gamate" />
|
||||
<mapping from="gameboy" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="gamecom" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="gamegear" to="Sega - Game Gear" />
|
||||
<mapping from="gameking" to="TimeTop - GameKing" />
|
||||
<mapping from="gameking3" to="TimeTop - GameKing" />
|
||||
<mapping from="gamepock" to="Epoch - Game Pocket Computer" />
|
||||
<mapping from="gba" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="gbcolor" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="genius" to="VTech - Genius" />
|
||||
<mapping from="gimix" to="Gimix - 6809" />
|
||||
<mapping from="gjmovie" to="VTech - Genius" />
|
||||
<mapping from="gl2000" to="VTech - Genius" />
|
||||
<mapping from="gl6000sl" to="VTech - Genius" />
|
||||
<mapping from="glcolor" to="VTech - Genius" />
|
||||
<mapping from="gmaster" to="Hartung - Game Master" />
|
||||
<mapping from="gp32" to="GamePark - GP32" />
|
||||
<mapping from="guab" to="JPM - Give us a Break" />
|
||||
<mapping from="gx4000" to="Amstrad - GX4000" />
|
||||
<mapping from="h21" to="TRQ - Video Computer H-21" />
|
||||
<mapping from="horizon" to="NorthStar - Horizon" />
|
||||
<mapping from="hp9835a_rom" to="Hewlett-Packard - 9835" />
|
||||
<mapping from="hp9845a_rom" to="Hewlett-Packard - 9845" />
|
||||
<mapping from="hp9845b_rom" to="Hewlett-Packard - 9845" />
|
||||
<mapping from="ht68k" to="Hawthorne Technologies - HT68K" />
|
||||
<mapping from="i7000_card" to="Itautec - I-7000" />
|
||||
<mapping from="ibm5140" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibm5150" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibm5150_cass" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibm5160_flop" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibm5170" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibm5170_cdrom" to="IBM - PC Compatibles" />
|
||||
<mapping from="ibmpcjr_cart" to="IBM - PC Jr" />
|
||||
<mapping from="ibmpcjr_flop" to="IBM - PC Jr" />
|
||||
<mapping from="interact" to="Interact - Family Computer" />
|
||||
<mapping from="intv" to="Mattel - Intellivision" />
|
||||
<mapping from="intvecs" to="Mattel - Intellivision" />
|
||||
<mapping from="iq128" to="VTech - Genius" />
|
||||
<mapping from="iq151_cart" to="ZPA Novy Bor - IQ-151" />
|
||||
<mapping from="iq151_flop" to="ZPA Novy Bor - IQ-151" />
|
||||
<mapping from="jaguar" to="Atari - Jaguar" />
|
||||
<mapping from="juicebox" to="Mattel - Juice Box" />
|
||||
<mapping from="jupace_cass" to="Jupiter Cantab - Jupiter Ace" />
|
||||
<mapping from="k28m2" to="Tiger Electronics - K28" />
|
||||
<mapping from="kayproii" to="Kaypro - II" />
|
||||
<mapping from="kc_cart" to="Robotron - KC85" />
|
||||
<mapping from="kc_cass" to="Robotron - KC85" />
|
||||
<mapping from="kc_flop" to="Robotron - KC85" />
|
||||
<mapping from="korvet_flop" to="Moscow State University - Korvet" />
|
||||
<mapping from="lantutor" to="Texas Instruments - Language Tutor" />
|
||||
<mapping from="leapster" to="LeapFrog - Leapster Learning Game System" />
|
||||
<mapping from="lisa" to="Apple - Lisa" />
|
||||
<mapping from="lisa2" to="Apple - Lisa 2" />
|
||||
<mapping from="lviv" to="Lviv - PC-01" />
|
||||
<mapping from="lynx" to="Atari - Lynx" />
|
||||
<mapping from="m20" to="Olivetti - M20" />
|
||||
<mapping from="m5_cart" to="Sord - M5" />
|
||||
<mapping from="m5_cass" to="Sord - M5" />
|
||||
<mapping from="m5_flop" to="Sord - M5" />
|
||||
<mapping from="mac_flop" to="Apple - Macintosh" />
|
||||
<mapping from="mac_hdd" to="Apple - Macintosh" />
|
||||
<mapping from="mbc200" to="Sanyo - MBC-200, MBC-1200" />
|
||||
<mapping from="mbc55x" to="Sanyo - MBC-550, MBC-555" />
|
||||
<mapping from="mc10" to="Tandy Radio Shack - TRS-80 MC-10" />
|
||||
<mapping from="mc1000_cass" to="CCE - MC-1000" />
|
||||
<mapping from="mc1502_flop" to="Elektronika - MC 1502" />
|
||||
<mapping from="md2_flop" to="Morrow - Micro Decision MD-2" />
|
||||
<mapping from="megacd" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="megacdj" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="megadriv" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="megaduck" to="Creatronic - Mega Duck, Cougar Boy" />
|
||||
<mapping from="megapc" to="Amstrad - Mega PC" />
|
||||
<mapping from="megatech" to="Sega - Megatech" />
|
||||
<mapping from="microvision" to="Milton Bradley - MicroVision" />
|
||||
<mapping from="mikro80" to="Radio-86RK - Mikro-80" />
|
||||
<mapping from="mikrosha_cart" to="Radio-86RK - Mikrosha" />
|
||||
<mapping from="mikrosha_cass" to="Radio-86RK - Mikrosha" />
|
||||
<mapping from="misterx" to="Yeno - MisterX" />
|
||||
<mapping from="mm1_flop" to="Nokia - MikroMikko 1" />
|
||||
<mapping from="mo5_cart" to="Thomson - 8bit" />
|
||||
<mapping from="mo5_cass" to="Thomson - 8bit" />
|
||||
<mapping from="mo5_flop" to="Thomson - 8bit" />
|
||||
<mapping from="mo5_qd" to="Thomson - 8bit" />
|
||||
<mapping from="mo6_cass" to="Thomson - 8bit" />
|
||||
<mapping from="mo6_flop" to="Thomson - 8bit" />
|
||||
<mapping from="mpu1000" to="Acetronic - MPU-1000" />
|
||||
<mapping from="mpz80" to="Morrow - MPZ80" />
|
||||
<mapping from="msx1_cart" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx1_cass" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx1_flop" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx2_cart" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx2_cass" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx2_flop" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msx2p_flop" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="msxr_flop" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="mtx_cass" to="Memotech - MTX512" />
|
||||
<mapping from="myvision" to="Nichibutsu - My Vision" />
|
||||
<mapping from="mz2000_cass" to="Sharp - MZ-2000" />
|
||||
<mapping from="mz2000_flop" to="Sharp - MZ-2000" />
|
||||
<mapping from="mz2500" to="Sharp - MZ-2500" />
|
||||
<mapping from="mz700_cass" to="Sharp - MZ-700" />
|
||||
<mapping from="mz800_cass" to="Sharp - MZ-800, MZ-1500" />
|
||||
<mapping from="n64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="n64dd" to="Nintendo - Nintendo 64DD" />
|
||||
<mapping from="nascom_flop" to="Nascom - I, II" />
|
||||
<mapping from="nascom_socket" to="Nascom - I, II" />
|
||||
<mapping from="neocd" to="SNK - Neo Geo" />
|
||||
<mapping from="neogeo" to="SNK - Neo Geo" />
|
||||
<mapping from="nes" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="nes_ade" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="nes_datach" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="nes_kstudio" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="nes_ntbrom" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="next" to="NeXT - NeXT" />
|
||||
<mapping from="ngp" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="ngpc" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="nimbus" to="RM - Nimbus PC" />
|
||||
<mapping from="odyssey2" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="ondra" to="Tesla - Ondra, Ondra ViLi" />
|
||||
<mapping from="orao" to="PEL Varazdin - Orao" />
|
||||
<mapping from="orion_cart" to="Orion - Orion 128, OrionPro" />
|
||||
<mapping from="orion_cass" to="Orion - Orion 128, OrionPro" />
|
||||
<mapping from="orion_flop" to="Orion - Orion 128, OrionPro" />
|
||||
<mapping from="orionpro_flop" to="Orion - Orion 128, OrionPro" />
|
||||
<mapping from="osborne1" to="OCC - Osborne 1, 2, 3, 4" />
|
||||
<mapping from="osborne2" to="OCC - Osborne 1, 2, 3, 4" />
|
||||
<mapping from="p500_flop" to="Commodore - P500" />
|
||||
<mapping from="partner_cass" to="Radio-86RK - Partner-01.01" />
|
||||
<mapping from="partner_flop" to="Radio-86RK - Partner-01.01" />
|
||||
<mapping from="pasogo" to="Koei - PasoGo" />
|
||||
<mapping from="pb2000c" to="Casio - PB-2000C" />
|
||||
<mapping from="pc1000" to="VTech - PreComputer 1000" />
|
||||
<mapping from="pc1512" to="Amstrad - PC1512" />
|
||||
<mapping from="pc1640" to="Amstrad - PC1640" />
|
||||
<mapping from="pc8201" to="NEC - PC-8201" />
|
||||
<mapping from="pc8801_cass" to="NEC - PC-8801" />
|
||||
<mapping from="pc8801_flop" to="NEC - PC-8801" />
|
||||
<mapping from="pc88va" to="NEC - PC-88VA" />
|
||||
<mapping from="pc98" to="NEC - PC-9801" />
|
||||
<mapping from="pce" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="pce_tourvision" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="pcecd" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="pcw" to="Amstrad - PCW" />
|
||||
<mapping from="pcw16" to="Amstrad - PCW" />
|
||||
<mapping from="pecom_cass" to="Elektronska Industrija Nis - PECOM 32, 64" />
|
||||
<mapping from="pegasus_cart" to="Technosys - Aamber Pegasus" />
|
||||
<mapping from="pencil2" to="Hanimex - Pencil II" />
|
||||
<mapping from="pentagon_cass" to="Pentagon - 1024SL" />
|
||||
<mapping from="pet_cass" to="Commodore - PET" />
|
||||
<mapping from="pet_flop" to="Commodore - PET" />
|
||||
<mapping from="pet_hdd" to="Commodore - PET" />
|
||||
<mapping from="pet_rom" to="Commodore - PET" />
|
||||
<mapping from="pico" to="Sega - PICO" />
|
||||
<mapping from="pippin" to="Bandai - Pippin" />
|
||||
<mapping from="pippin_flop" to="Bandai - Pippin" />
|
||||
<mapping from="plus4_cart" to="Commodore - Plus-4" />
|
||||
<mapping from="plus4_cass" to="Commodore - Plus-4" />
|
||||
<mapping from="plus4_flop" to="Commodore - Plus-4" />
|
||||
<mapping from="pmd85_cass" to="Tesla - PMD 85" />
|
||||
<mapping from="pockchalv1" to="Benesse - Pocket Challenge V" />
|
||||
<mapping from="pockchalv2" to="Benesse - Pocket Challenge V" />
|
||||
<mapping from="pockchalw" to="Benesse - Pocket Challenge V" />
|
||||
<mapping from="pokemini" to="Nintendo - Pokemon Mini" />
|
||||
<mapping from="pro128_cart" to="Olivetti - Prodest PC 128" />
|
||||
<mapping from="pro128_cass" to="Olivetti - Prodest PC 128" />
|
||||
<mapping from="pro128_flop" to="Olivetti - Prodest PC 128" />
|
||||
<mapping from="pro128s_flop" to="Olivetti - Prodest PC 128" />
|
||||
<mapping from="prof180" to="Conitec - PROF-180" />
|
||||
<mapping from="prof80" to="Conitec - PROF-80" />
|
||||
<mapping from="psion1" to="Psion - Organiser I" />
|
||||
<mapping from="psion2" to="Psion - Organiser II" />
|
||||
<mapping from="psx" to="Sony - PlayStation" />
|
||||
<mapping from="pt68k2" to="Peripheral Technology - PT68K" />
|
||||
<mapping from="pv1000" to="Casio - PV-1000" />
|
||||
<mapping from="pv2000" to="Casio - PV-2000" />
|
||||
<mapping from="px4_cart" to="Epson - PX-4" />
|
||||
<mapping from="pyl601" to="SASDF - Pyldin-601" />
|
||||
<mapping from="ql_cart" to="Sinclair - QL" />
|
||||
<mapping from="ql_cass" to="Sinclair - QL" />
|
||||
<mapping from="ql_flop" to="Sinclair - QL" />
|
||||
<mapping from="qx10_flop" to="Epson - QX-10" />
|
||||
<mapping from="r9751" to="ROLM - CBX 9751" />
|
||||
<mapping from="radio86_cart" to="Radio-86RK - Radio-86RK" />
|
||||
<mapping from="radio86_cass" to="Radio-86RK - Radio-86RK" />
|
||||
<mapping from="rainbow" to="DEC - Rainbow 100" />
|
||||
<mapping from="rwtrntcs" to="Rowtron - Television Computer System" />
|
||||
<mapping from="rx78" to="Gundam - RX-78" />
|
||||
<mapping from="sage2" to="Sage - Sage II" />
|
||||
<mapping from="samcoupe_cass" to="MGT - Sam Coupe" />
|
||||
<mapping from="samcoupe_flop" to="MGT - Sam Coupe" />
|
||||
<mapping from="sat_cart" to="Sega - Saturn" />
|
||||
<mapping from="sat_vccart" to="Sega - Saturn" />
|
||||
<mapping from="saturn" to="Sega - Saturn" />
|
||||
<mapping from="sawatte" to="Sega - PICO" />
|
||||
<mapping from="sc3000_cart" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="sc3000_cass" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="scv" to="Epoch - Super Cassette Vision" />
|
||||
<mapping from="segacd" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="sf7000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="sg1000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="sgx" to="NEC - Super Grafx" />
|
||||
<mapping from="smc777" to="Sony - SMC777" />
|
||||
<mapping from="sms" to="Sega - Master System, Mark III" />
|
||||
<mapping from="snes" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="snes_bspack" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="snes_strom" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="snes_vkun" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="snotec" to="Bandai - Super Note Club" />
|
||||
<mapping from="snread" to="Texas Instruments - Speak & Read" />
|
||||
<mapping from="snspell" to="Texas Instruments - Speak & Spell" />
|
||||
<mapping from="socrates" to="VTech - Socrates" />
|
||||
<mapping from="softbox" to="SSE - SoftBox" />
|
||||
<mapping from="sol20_cass" to="PTC - Sol Terminal Computer SOL-20" />
|
||||
<mapping from="sorcerer_cart" to="Exidy - Sorcerer" />
|
||||
<mapping from="sorcerer_cass" to="Exidy - Sorcerer" />
|
||||
<mapping from="sorcerer_flop" to="Exidy - Sorcerer" />
|
||||
<mapping from="spc1000_cass" to="Samsung - SPC-1000" />
|
||||
<mapping from="spc1500_cass" to="Samsung - SPC-1500" />
|
||||
<mapping from="special_cass" to="Specialist - Specialist" />
|
||||
<mapping from="special_flop" to="Specialist - Specialist" />
|
||||
<mapping from="specpls3_flop" to="Sinclair - ZX Spectrum" />
|
||||
<mapping from="spectrum_cart" to="Sinclair - ZX Spectrum" />
|
||||
<mapping from="spectrum_cass" to="Sinclair - ZX Spectrum" />
|
||||
<mapping from="st_cart" to="Atari - ST" />
|
||||
<mapping from="st_flop" to="Atari - ST" />
|
||||
<mapping from="studio2" to="RCA - Studio II" />
|
||||
<mapping from="stv" to="Sega - Titan Video" />
|
||||
<mapping from="super6" to="ADC - Super Six" />
|
||||
<mapping from="super80_cass" to="Dick Smith Electronics - Super-80" />
|
||||
<mapping from="superpet_flop" to="Commodore - SuperPET, MMF 9000" />
|
||||
<mapping from="supracan" to="Funtech - Super Acan" />
|
||||
<mapping from="sv8000" to="Bandai - Super Vision 8000" />
|
||||
<mapping from="svi318_cart" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="svi318_cass" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="svi318_flop" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="svision" to="Watara - Supervision" />
|
||||
<mapping from="svmu" to="Sega - Visual Memory System" />
|
||||
<mapping from="tandy200" to="Tandy Radio Shack - TRS-80 Model 200" />
|
||||
<mapping from="tandy2k" to="Tandy Radio Shack - 2000" />
|
||||
<mapping from="tandy6k" to="Tandy Radio Shack - 6000" />
|
||||
<mapping from="tdv2324" to="Tandberg - TDV 2324" />
|
||||
<mapping from="tek4052_cart" to="Tektronix - 4052" />
|
||||
<mapping from="tg16" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="ti74_cart" to="Texas Instruments - TI-74" />
|
||||
<mapping from="ti99_cart" to="Texas Instruments - TI-99 4A" />
|
||||
<mapping from="tiki100" to="Tiki Data - Kontiki-100, Tiki-100" />
|
||||
<mapping from="timex_dock" to="Timex - TS-2068" />
|
||||
<mapping from="tntell" to="Texas Instruments - Touch & Tell" />
|
||||
<mapping from="to_flop" to="Thomson - 8bit" />
|
||||
<mapping from="to770_cart" to="Thomson - 8bit" />
|
||||
<mapping from="to770a_cart" to="Thomson - 8bit" />
|
||||
<mapping from="to7_cart" to="Thomson - 8bit" />
|
||||
<mapping from="to7_cass" to="Thomson - 8bit" />
|
||||
<mapping from="to7_qd" to="Thomson - 8bit" />
|
||||
<mapping from="to8_cass" to="Thomson - 8bit" />
|
||||
<mapping from="to8_qd" to="Thomson - 8bit" />
|
||||
<mapping from="trs80m2" to="Tandy Radio Shack - TRS-80 Model II" />
|
||||
<mapping from="trsm100" to="Tandy Radio Shack - TRS-80 Model 100" />
|
||||
<mapping from="tutor" to="Tomy - Tutor, Pyuuta" />
|
||||
<mapping from="tvc_cart" to="Videoton - TV-Computer" />
|
||||
<mapping from="tvc_cass" to="Videoton - TV-Computer" />
|
||||
<mapping from="tvc_flop" to="Videoton - TV-Computer" />
|
||||
<mapping from="unichamp" to="Unisonic - Champion 2711" />
|
||||
<mapping from="ut88" to="Radio-86RK - YuT-88" />
|
||||
<mapping from="uzebox" to="Uzebox - Uzebox" />
|
||||
<mapping from="v1050_flop" to="Visual Technology - Visual 1050" />
|
||||
<mapping from="v1050_hdd" to="Visual Technology - Visual 1050" />
|
||||
<mapping from="vboy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="vc4000" to="Interton - VC 4000" />
|
||||
<mapping from="vector06_cart" to="Temirazov & Sokolov - Vector-06C" />
|
||||
<mapping from="vectrex" to="GCE - Vectrex" />
|
||||
<mapping from="vg5k" to="Philips - VG 5000" />
|
||||
<mapping from="vic10" to="Commodore - VIC-10" />
|
||||
<mapping from="vic1001_cart" to="Commodore - VIC-20" />
|
||||
<mapping from="vic1001_cass" to="Commodore - VIC-20" />
|
||||
<mapping from="vic1001_flop" to="Commodore - VIC-20" />
|
||||
<mapping from="victor9k_flop" to="Sirius - Victor 9000" />
|
||||
<mapping from="vidbrain" to="VideoBrain - Family Computer" />
|
||||
<mapping from="vii" to="Chintendo - Vii" />
|
||||
<mapping from="vip" to="RCA - Vip" />
|
||||
<mapping from="visicom" to="Toshiba - Visicom" />
|
||||
<mapping from="vixen" to="OCC - Osborne 1, 2, 3, 4" />
|
||||
<mapping from="vreader" to="VTech - V.Reader, Storio" />
|
||||
<mapping from="vsmile_cart" to="VTech - V.Smile, V.Disc" />
|
||||
<mapping from="vsmile_cd" to="VTech - V.Smile, V.Disc" />
|
||||
<mapping from="vz_cass" to="Dick Smith Electronics - VZ-200, VZ-300" />
|
||||
<mapping from="wangpc" to="Wang - PC" />
|
||||
<mapping from="wicat" to="Millennium Systems - Wicat" />
|
||||
<mapping from="wmbullet" to="WaveMate - Bullet" />
|
||||
<mapping from="wscolor" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="wswan" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="x07_card" to="Canon - X-07" />
|
||||
<mapping from="x07_cass" to="Canon - X-07" />
|
||||
<mapping from="x1_cass" to="Sharp - X1" />
|
||||
<mapping from="x1_flop" to="Sharp - X1" />
|
||||
<mapping from="x68k_flop" to="Sharp - X68000" />
|
||||
<mapping from="xegs" to="Atari - 8bit" />
|
||||
<mapping from="xerox820" to="Xerox - 820" />
|
||||
<mapping from="xerox820ii" to="Xerox - 820 II" />
|
||||
</mappings>
|
||||
36
SabreTools.Helper/Mappings/MaybeIntro.xml
Normal file
36
SabreTools.Helper/Mappings/MaybeIntro.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="Bandai WonderSwan Color" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Fujitsu FM Towns" to="Fujitsu - FM Towns" />
|
||||
<mapping from="MSX (Cartridges)" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX (Disks)" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX 2 (Cartridges)" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX 2 (Disks)" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX Turbo-R (Disks)" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="NEC PC Engine CD" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC PC Engine" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC PC-6001" to="NEC - PC-6001" />
|
||||
<mapping from="NEC PC-8801" to="NEC - PC-8801" />
|
||||
<mapping from="NEC PC-9801" to="NEC - PC-9801" />
|
||||
<mapping from="Nintendo 64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="Nintendo DS" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="Nintendo Famicom Disk System" to="Nintendo - Famicom Disk System" />
|
||||
<mapping from="Nintendo Famicom" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo Game Boy Advance" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo Game Boy Color" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo Game Boy" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo Super Famicom" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo Virtual Boy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="Sega Dreamcast" to="Sega - Dreamcast" />
|
||||
<mapping from="Sega Game Gear" to="Sega - Game Gear" />
|
||||
<mapping from="Sega Master System" to="Sega - Master System, Mark III" />
|
||||
<mapping from="Sega Mega Drive" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="Sega Mega-CD" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega Saturn" to="Sega - Saturn" />
|
||||
<mapping from="Sega SG-1000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Sharp X68000" to="Sharp - X68000" />
|
||||
<mapping from="SNK Neo Geo Pocket Color" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="Sony PlayStation 2" to="Sony - PlayStation 2" />
|
||||
<mapping from="Sony PlayStation" to="Sony - PlayStation" />
|
||||
</mappings>
|
||||
90
SabreTools.Helper/Mappings/NoIntro.xml
Normal file
90
SabreTools.Helper/Mappings/NoIntro.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="Atari - 5200" to="Atari - 5200" />
|
||||
<mapping from="Atari - 7800" to="Atari - 7800" />
|
||||
<mapping from="Atari - Jaguar" to="Atari - Jaguar" />
|
||||
<mapping from="Atari - Lynx" to="Atari - Lynx" />
|
||||
<mapping from="Atari - ST" to="Atari - ST" />
|
||||
<mapping from="Bandai - WonderSwan" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Bandai - WonderSwan Color" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Casio - Loopy" to="Casio - Loopy" />
|
||||
<mapping from="Casio - PV-1000" to="Casio - PV-1000" />
|
||||
<mapping from="Coleco - ColecoVision" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="Commodore - 64" to="Commodore - 64" />
|
||||
<mapping from="Commodore - 64 (PP)" to="Commodore - 64" />
|
||||
<mapping from="Commodore - 64 (Tapes)" to="Commodore - 64" />
|
||||
<mapping from="Commodore - Amiga" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore - Plus-4" to="Commodore - Plus-4" />
|
||||
<mapping from="Commodore - VIC-20" to="Commodore - VIC-20" />
|
||||
<mapping from="Emerson - Arcadia 2001" to="Emerson - Arcadia 2001" />
|
||||
<mapping from="Entex - Adventure Vision" to="Entex - Adventure Vision" />
|
||||
<mapping from="Epoch - Super Cassette Vision" to="Epoch - Super Cassette Vision" />
|
||||
<mapping from="Fairchild - Channel F" to="Fairchild - Channel F" />
|
||||
<mapping from="Funtech - Super Acan" to="Funtech - Super Acan" />
|
||||
<mapping from="GamePark - GP32" to="GamePark - GP32" />
|
||||
<mapping from="GCE - Vectrex" to="GCE - Vectrex" />
|
||||
<mapping from="Hartung - Game Master" to="Hartung - Game Master" />
|
||||
<mapping from="LeapFrog - Leapster Learning Game System" to="LeapFrog - Leapster Learning Game System" />
|
||||
<mapping from="Magnavox - Odyssey2" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Microsoft - MSX" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="Microsoft - MSX 2" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="Microsoft - XBOX 360 (DLC)" to="Microsoft - Xbox 360" />
|
||||
<mapping from="Microsoft - XBOX 360 (Games on Demand)" to="Microsoft - Xbox 360" />
|
||||
<mapping from="Microsoft - XBOX 360 (Title Updates)" to="Microsoft - Xbox 360" />
|
||||
<mapping from="NEC - PC Engine - TurboGrafx 16" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC - Super Grafx" to="NEC - Super Grafx" />
|
||||
<mapping from="Nintendo - Famicom Disk System" to="Nintendo - Famicom Disk System" />
|
||||
<mapping from="Nintendo - Game Boy" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo - Game Boy Advance" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Advance (e-Cards)" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Advance MultiBoots" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Color" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo - New Nintendo 3DS" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
<mapping from="Nintendo - New Nintendo 3DS (DLC)" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
<mapping from="Nintendo - Nintendo 3DS" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
<mapping from="Nintendo - Nintendo 3DS (DLC)" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
<mapping from="Nintendo - Nintendo 64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="Nintendo - Nintendo 64DD" to="Nintendo - Nintendo 64DD" />
|
||||
<mapping from="Nintendo - Nintendo DS" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="Nintendo - Nintendo DS Decrypted" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="Nintendo - Nintendo DS Encrypted" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="Nintendo - Nintendo DS (Download Play) (BETA)" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="Nintendo - Nintendo DSi" to="Nintendo - Nintendo DSi" />
|
||||
<mapping from="Nintendo - Nintendo DSi Decrypted" to="Nintendo - Nintendo DSi" />
|
||||
<mapping from="Nintendo - Nintendo DSi Encrypted" to="Nintendo - Nintendo DSi" />
|
||||
<mapping from="Nintendo - Nintendo DSi (DLC)" to="Nintendo - Nintendo DSi" />
|
||||
<mapping from="Nintendo - Nintendo Entertainment System" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo - Nintendo Wii (DLC)" to="Nintendo - Nintendo Wii" />
|
||||
<mapping from="Nintendo - Pokemon Mini" to="Nintendo - Pokemon Mini" />
|
||||
<mapping from="Nintendo - Satellaview" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo - Sufami Turbo" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo - Super Nintendo Entertainment System" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo - Virtual Boy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="Nokia - N-Gage" to="Nokia - N-Gage" />
|
||||
<mapping from="Philips - Videopac+" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="RCA - Studio II" to="RCA - Studio II" />
|
||||
<mapping from="Sega - 32X" to="Sega - 32X" />
|
||||
<mapping from="Sega - Game Gear" to="Sega - Game Gear" />
|
||||
<mapping from="Sega - Master System - Mark III" to="Sega - Master System, Mark III" />
|
||||
<mapping from="Sega - Mega Drive - Genesis" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="Sega - PICO" to="Sega - PICO" />
|
||||
<mapping from="Sega - SG-1000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Sinclair - ZX Spectrum +3" to="Sinclair - ZX Spectrum" />
|
||||
<mapping from="Sony - PlayStation 3 (DLC)" to="Sony - PlayStation 3" />
|
||||
<mapping from="Sony - PlayStation 3 (Downloadable)" to="Sony - PlayStation 3" />
|
||||
<mapping from="Sony - PlayStation 3 (PSN)" to="Sony - PlayStation 3" />
|
||||
<mapping from="Sony - PlayStation Portable" to="Sony - PlayStation Portable" />
|
||||
<mapping from="Sony - PlayStation Portable (DLC)" to="Sony - PlayStation Portable" />
|
||||
<mapping from="Sony - PlayStation Portable (PSN)" to="Sony - PlayStation Portable" />
|
||||
<mapping from="Sony - PlayStation Portable (PSX2PSP)" to="Sony - PlayStation Portable" />
|
||||
<mapping from="Sony - PlayStation Portable (UMD Music)" to="Sony - PlayStation Portable" />
|
||||
<mapping from="Sony - PlayStation Portable (UMD Video)" to="Sony - PlayStation Portable" />
|
||||
<mapping from="SNK - Neo Geo Pocket" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="SNK - Neo Geo Pocket Color" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="Tiger - Game.com" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="Tiger - Gizmondo" to="Tiger Telematics - Gizmondo" />
|
||||
<mapping from="VTech - CreatiVision" to="VTech - CreatiVision" />
|
||||
<mapping from="VTech - V.Smile" to="VTech - V.Smile, V.Disc" />
|
||||
<mapping from="Watara - Supervision" to="Watara - Supervision" />
|
||||
</mappings>
|
||||
43
SabreTools.Helper/Mappings/NonGood.xml
Normal file
43
SabreTools.Helper/Mappings/NonGood.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="NonGood2600" to="Atari - 2600" />
|
||||
<mapping from="NonGood5200" to="Atari - 5200" />
|
||||
<mapping from="NonGood7800" to="Atari - 7800" />
|
||||
<mapping from="NonGoodCHAF" to="Fairchild - Channel F" />
|
||||
<mapping from="NonGoodCol" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="NonGoodCPC" to="Amstrad - CPC" />
|
||||
<mapping from="NonGoodGBAv4" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="NonGoodGBX" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="NonGoodGBX.GB" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="NonGoodGBX.GBC" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="NonGoodGCom" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="NonGoodGen" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="NonGoodGG" to="Sega - Game Gear" />
|
||||
<mapping from="NonGoodINTV" to="Mattel - Intellivision" />
|
||||
<mapping from="NonGoodJag" to="Atari - Jaguar" />
|
||||
<mapping from="NonGoodJAG" to="Atari - Jaguar" />
|
||||
<mapping from="NonGoodLynx" to="Atari - Lynx" />
|
||||
<mapping from="NonGoodMini" to="Nintendo - Pokemon Mini" />
|
||||
<mapping from="NonGoodMSX1" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="NonGoodMSX2" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="NonGoodN64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="NonGoodNDS" to="Nintendo - Nintendo DS" />
|
||||
<mapping from="NonGoodNES" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="NonGoodNES CHINESE" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="NonGoodNGPX" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="NonGoodNGPX.NGP" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="NonGoodNGPX.NGC" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="NonGoodOric" to="Tangerine - Oric-1, Oric Atmos" />
|
||||
<mapping from="NonGoodPCE" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NonGoodPico" to="Sega - PICO" />
|
||||
<mapping from="NonGoodSAMC" to="MGT - Sam Coupe" />
|
||||
<mapping from="NonGoodSMS" to="Sega - Master System, Mark III" />
|
||||
<mapping from="NonGoodSNES" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="NonGoodVboy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="NonGoodVect" to="GCE - Vectrex" />
|
||||
<mapping from="NonGoodVPac" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="NonGoodWSX" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="NonGoodWSX.WS" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="NonGoodWSX.WSC" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
</mappings>
|
||||
44
SabreTools.Helper/Mappings/Redump.xml
Normal file
44
SabreTools.Helper/Mappings/Redump.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="Apple - Macintosh" to="Apple - Macintosh" />
|
||||
<mapping from="Arcade - Namco - Sega - Nintendo - Triforce" to="Namco - Triforce" />
|
||||
<mapping from="Arcade - Sega - Chihiro" to="Sega - Chihiro" />
|
||||
<mapping from="Arcade - Sega - Lindbergh" to="Sega - Lindbergh" />
|
||||
<mapping from="Arcade - Sega - Naomi" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Bandai - Apple - Pippin" to="Bandai - Pippin" />
|
||||
<mapping from="Bandai - Playdia" to="Bandai - Playdia" />
|
||||
<mapping from="Commodore - Amiga CD" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore - Amiga CD32" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore - Amiga CDTV" to="Commodore - Amiga" />
|
||||
<mapping from="Fujitsu - FM-Towns" to="Fujitsu - FM Towns" />
|
||||
<mapping from="IBM - PC compatible" to="IBM - PC Compatibles" />
|
||||
<mapping from="Mattel - HyperScan" to="Mattel - HyperScan" />
|
||||
<mapping from="Microsoft - Xbox - BIOS Images" to="Microsoft - Xbox" />
|
||||
<mapping from="Microsoft - Xbox" to="Microsoft - Xbox" />
|
||||
<mapping from="Microsoft - Xbox 360" to="Microsoft - Xbox 360" />
|
||||
<mapping from="Microsoft - Xbox One" to="Microsoft - Xbox One" />
|
||||
<mapping from="NEC - PC Engine CD - TurboGrafx-CD" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC - PC-88 series" to="NEC - PC-8801" />
|
||||
<mapping from="NEC - PC-98 series" to="NEC - PC-9801" />
|
||||
<mapping from="NEC - PC-FX - PC-FXGA" to="NEC - PC FX, PC FXGA" />
|
||||
<mapping from="Nintendo - GameCube - BIOS Images" to="Nintendo - GameCube" />
|
||||
<mapping from="Nintendo - GameCube" to="Nintendo - GameCube" />
|
||||
<mapping from="Nintendo - Wii" to="Nintendo - Nintendo Wii" />
|
||||
<mapping from="Nintendo - Wii U" to="Nintendo - Nintendo Wii U" />
|
||||
<mapping from="Palm" to="Hewlett-Packard - Palm" />
|
||||
<mapping from="Panasonic - 3DO Interactive Multiplayer" to="Panasonic - 3DO Interactive Multiplayer" />
|
||||
<mapping from="Philips - CD-i" to="Philips - CD-i" />
|
||||
<mapping from="Sega - Dreamcast" to="Sega - Dreamcast" />
|
||||
<mapping from="Sega - Mega-CD - Sega CD" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega - Saturn" to="Sega - Saturn" />
|
||||
<mapping from="SNK - Neo Geo CD" to="SNK - Neo Geo CD" />
|
||||
<mapping from="Sony - PlayStation - BIOS Images" to="Sony - PlayStation" />
|
||||
<mapping from="Sony - PlayStation" to="Sony - PlayStation" />
|
||||
<mapping from="Sony - PlayStation 2 - BIOS Images" to="Sony - PlayStation 2" />
|
||||
<mapping from="Sony - PlayStation 2" to="Sony - PlayStation 2" />
|
||||
<mapping from="Sony - PlayStation 3" to="Sony - PlayStation 3" />
|
||||
<mapping from="Sony - PlayStation 4" to="Sony - PlayStation 4" />
|
||||
<mapping from="Sony - PlayStation Portable" to="Sony - PlayStation Portable" />
|
||||
<mapping from="VTech - V.Flash" to="VTech - V.Flash Home Edutainment System" />
|
||||
</mappings>
|
||||
317
SabreTools.Helper/Mappings/TOSEC.xml
Normal file
317
SabreTools.Helper/Mappings/TOSEC.xml
Normal file
@@ -0,0 +1,317 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="3DO 3DO Interactive Multiplayer" to="Panasonic - 3DO Interactive Multiplayer" />
|
||||
<mapping from="APF Imagination Machine" to="APF - M-1000" />
|
||||
<mapping from="Acorn Archimedes" to="Acorn - Archimedes" />
|
||||
<mapping from="Acorn BBC" to="Acorn - BBC, Electron" />
|
||||
<mapping from="Acorn BBC Micro" to="Acorn - BBC, Electron" />
|
||||
<mapping from="Acorn Electron" to="Acorn - BBC, Electron" />
|
||||
<mapping from="Altos Computer Systems ACS-186, 586 & 986" to="Altos Computer Systems - ACS-186, 586, 986" />
|
||||
<mapping from="Altos Computer Systems ACS-8000" to="Altos Computer Systems - ACS-8000" />
|
||||
<mapping from="Altos Computer Systems Series 5" to="Altos Computer Systems - Series 5" />
|
||||
<mapping from="American Laser Games CD-ROM System" to="American Laser Games - CD-ROM System" />
|
||||
<mapping from="Amstrad CPC" to="Amstrad - CPC" />
|
||||
<mapping from="Amstrad GX4000" to="Amstrad - GX4000" />
|
||||
<mapping from="Amstrad PCW" to="Amstrad - PCW" />
|
||||
<mapping from="Apple 1" to="Apple - I" />
|
||||
<mapping from="Apple I" to="Apple - I" />
|
||||
<mapping from="Apple II" to="Apple - II" />
|
||||
<mapping from="Apple IIGS" to="Apple - II" />
|
||||
<mapping from="Apple III" to="Apple - III" />
|
||||
<mapping from="Apple Lisa" to="Apple - Lisa" />
|
||||
<mapping from="Apple Macintosh" to="Apple - Macintosh" />
|
||||
<mapping from="Applied Technology MicroBee" to="Applied Technology - MicroBee" />
|
||||
<mapping from="Atari 2600 & VCS" to="Atari - 2600" />
|
||||
<mapping from="Atari 5200" to="Atari - 5200" />
|
||||
<mapping from="Atari 7800" to="Atari - 7800" />
|
||||
<mapping from="Atari 8bit" to="Atari - 8bit" />
|
||||
<mapping from="Atari Jaguar CD" to="Atari - Jaguar" />
|
||||
<mapping from="Atari Jaguar" to="Atari - Jaguar" />
|
||||
<mapping from="Atari Lynx" to="Atari - Lynx" />
|
||||
<mapping from="Atari ST" to="Atari - ST" />
|
||||
<mapping from="Bally Midway Astrocade" to="Bally Professional - Arcade, Astrocade" />
|
||||
<mapping from="Bally Professional Arcade & Astrocade" to="Bally Professional - Arcade, Astrocade" />
|
||||
<mapping from="Bandai Pippin @World & Pippin Atmark" to="Bandai - Pippin" />
|
||||
<mapping from="Bandai Pippin Atmark" to="Bandai - Pippin" />
|
||||
<mapping from="Bandai Playdia" to="Bandai - Playdia" />
|
||||
<mapping from="Bandai WonderSwan Color" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Bandai WonderSwan" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Bondwell 12" to="Bondwell - 12" />
|
||||
<mapping from="Bondwell 2" to="Bondwell - 2" />
|
||||
<mapping from="Bondwell Model 2" to="Bondwell - 2" />
|
||||
<mapping from="CBS ColecoVision ADAM" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="CBS ColecoVision" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="Cambridge University EDSAC" to="University of Cambridge - EDSAC" />
|
||||
<mapping from="Camputers Lynx" to="Camputers - Lynx" />
|
||||
<mapping from="Capcom CP System III" to="Capcom - CPS III" />
|
||||
<mapping from="Casio CFX-9850" to="Casio - CFX-9850" />
|
||||
<mapping from="Casio Loopy" to="Casio - Loopy" />
|
||||
<mapping from="Casio PB-1000" to="Casio - PB-1000" />
|
||||
<mapping from="Casio PV-2000" to="Casio - PV-2000" />
|
||||
<mapping from="Coleco ColecoVision ADAM" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="Coleco ColecoVision" to="Coleco - ColecoVision, ColecoVision ADAM" />
|
||||
<mapping from="Commodore Amiga CD32" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore Amiga CDTV" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore Amiga" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore C128" to="Commodore - 128" />
|
||||
<mapping from="Commodore C16, C116 & Plus-4" to="Commodore - Plus-4" />
|
||||
<mapping from="Commodore C64" to="Commodore - 64" />
|
||||
<mapping from="Commodore C64DTV" to="Commodore - 64 DTV" />
|
||||
<mapping from="Commodore C65" to="Commodore - 65" />
|
||||
<mapping from="Commodore MAX Machine & VIC10" to="Commodore - VIC-10" />
|
||||
<mapping from="Commodore PET" to="Commodore - PET" />
|
||||
<mapping from="Commodore VIC10" to="Commodore - VIC-10" />
|
||||
<mapping from="Commodore VIC20" to="Commodore - VIC-20" />
|
||||
<mapping from="Creatronic Mega Duck & Cougar Boy" to="Creatronic - Mega Duck, Cougar Boy" />
|
||||
<mapping from="Cybiko Cybiko" to="Cybiko - Cybiko" />
|
||||
<mapping from="Cybiko Xtreme" to="Cybiko - Xtreme" />
|
||||
<mapping from="DEC PDP-1" to="DEC - PDP-1" />
|
||||
<mapping from="DEC PDP-10" to="DEC - PDP-10" />
|
||||
<mapping from="DEC PDP-11" to="DEC - PDP-11" />
|
||||
<mapping from="DEC PDP-12" to="DEC - PDP-12" />
|
||||
<mapping from="DEC PDP-15" to="DEC - PDP-15" />
|
||||
<mapping from="DEC PDP-7" to="DEC - PDP-7" />
|
||||
<mapping from="DEC PDP-8" to="DEC - PDP-8" />
|
||||
<mapping from="DEC PDP-9" to="DEC - PDP-9" />
|
||||
<mapping from="Dragon 32 & 64" to="Dragon Data - Dragon" />
|
||||
<mapping from="Dragon Data Dragon" to="Dragon Data - Dragon" />
|
||||
<mapping from="EACA Colour Genie EG-2000" to="EACA - EG2000 Colour Genie" />
|
||||
<mapping from="EACA EG2000 Colour Genie" to="EACA - EG2000 Colour Genie" />
|
||||
<mapping from="ETL Mark 2" to="ETL - Mark II" />
|
||||
<mapping from="ETL Mark 4" to="ETL - Mark IV" />
|
||||
<mapping from="ETL Mark 4a" to="ETL - Mark IV A" />
|
||||
<mapping from="ETL Mark II" to="ETL - Mark II" />
|
||||
<mapping from="ETL Mark IV A" to="ETL - Mark IV A" />
|
||||
<mapping from="ETL Mark IV" to="ETL - Mark IV" />
|
||||
<mapping from="Elektronika BK-0010-0011M" to="Elektronika - BK-0010" />
|
||||
<mapping from="Elektronika BK-0011-411" to="Elektronika - BK-0011" />
|
||||
<mapping from="Elektronska Industrija Nis PECOM 32 & 64" to="Elektronska Industrija Nis - PECOM 32, 64" />
|
||||
<mapping from="Emerson Arcadia 2001" to="Emerson - Arcadia 2001" />
|
||||
<mapping from="Enterprise 64 & 128" to="Enterprise - 64, 128" />
|
||||
<mapping from="Entex Adventure Vision" to="Entex - Adventure Vision" />
|
||||
<mapping from="Epoch Super Cassette Vision" to="Epoch - Super Cassette Vision" />
|
||||
<mapping from="Epson PX-8, HC-88 & Geneva" to="Epson - PX-8, HC-88, Geneva" />
|
||||
<mapping from="Exelvision EXL100" to="Exelvision - Exeltel, EXL100" />
|
||||
<mapping from="Exelvision Exeltel" to="Exelvision - Exeltel, EXL100" />
|
||||
<mapping from="Exidy Sorcerer" to="Exidy - Sorcerer" />
|
||||
<mapping from="FM Towns Marty" to="Fujitsu - FM Towns" />
|
||||
<mapping from="Fairchild Channel F" to="Fairchild - Channel F" />
|
||||
<mapping from="Fairchild Saba" to="Fairchild - Channel F" />
|
||||
<mapping from="Fairchild VES & Channel F" to="Fairchild - Channel F" />
|
||||
<mapping from="Front Fareast Magic Drive" to="Front Fareast - Magic Drive" />
|
||||
<mapping from="Fuji C" to="Fuji Photo Film - FUJIC" />
|
||||
<mapping from="Fuji Photo Film FUJIC" to="Fuji Photo Film - FUJIC" />
|
||||
<mapping from="Fujitsu FM Towns" to="Fujitsu - FM Towns" />
|
||||
<mapping from="Fujitsu FM-7" to="Fujitsu - FM-7" />
|
||||
<mapping from="Funtech - Super Acan" to="Funtech - Super Acan" />
|
||||
<mapping from="Funtech Super Acan" to="Funtech - Super Acan" />
|
||||
<mapping from="GCE Vectrex" to="GCE - Vectrex" />
|
||||
<mapping from="Galaksija Galaksija Plus" to="Galaksija - Galaksija, Galaksija Plus" />
|
||||
<mapping from="Galaksija Galaksija" to="Galaksija - Galaksija, Galaksija Plus" />
|
||||
<mapping from="Game Park GP32" to="GamePark - GP32" />
|
||||
<mapping from="Hewlett-Packard HP48" to="Hewlett-Packard - HP48" />
|
||||
<mapping from="Hewlett-Packard HP49" to="Hewlett-Packard - HP49" />
|
||||
<mapping from="HomeLab BraiLab" to="HomeLab - BraiLab" />
|
||||
<mapping from="HomeLab HomeLab" to="HomeLab - HomeLab" />
|
||||
<mapping from="IBM PC Compatible" to="IBM - PC Compatibles" />
|
||||
<mapping from="IBM PC Compatibles" to="IBM - PC Compatibles" />
|
||||
<mapping from="IBM PCjr" to="IBM - PC Jr" />
|
||||
<mapping from="Incredible Technologies Eagle" to="Incredible Technologies - Eagle" />
|
||||
<mapping from="Infocom Z-Machine" to="Infocom - Z-Machine" />
|
||||
<mapping from="Interact Family Computer" to="Interact - Family Computer" />
|
||||
<mapping from="Jupiter Cantab Jupiter Ace" to="Jupiter Cantab - Jupiter Ace" />
|
||||
<mapping from="Kaypro II" to="Kaypro - II" />
|
||||
<mapping from="Keio University K-1" to="University of Keio - K-1" />
|
||||
<mapping from="Konami Bemani System 573 Analog" to="Konami - System 573" />
|
||||
<mapping from="Konami Bemani System 573 Digital" to="Konami - System 573" />
|
||||
<mapping from="Konami System 573" to="Konami - System 573" />
|
||||
<mapping from="Luxor ABC 80" to="Luxor - ABC 80" />
|
||||
<mapping from="Luxor ABC 800" to="Luxor - ABC 800" />
|
||||
<mapping from="Luxor Video Entertainment System" to="Luxor - Video Entertainment System" />
|
||||
<mapping from="MGT Sam Coupe" to="MGT - Sam Coupe" />
|
||||
<mapping from="MITS Altair 8800" to="MITS - Altair 8800" />
|
||||
<mapping from="MSX MSX" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX MSX2" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX MSX2+" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX Turbo-R" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="MSX TurboR" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="Magnavox Odyssey2" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Matra Hachette Alice 32" to="Matra Hachette - Alice 32 & 90" />
|
||||
<mapping from="Matsushita National JR 200" to="Matsushita National - JR 200" />
|
||||
<mapping from="Mattel Aquarius" to="Mattel - Aquarius" />
|
||||
<mapping from="Mattel HyperScan" to="Mattel - HyperScan" />
|
||||
<mapping from="Mattel Intellivision" to="Mattel - Intellivision" />
|
||||
<mapping from="Memorex Video Information System" to="Memorex - Video Information System" />
|
||||
<mapping from="Memotech MTX" to="Memotech - MTX512" />
|
||||
<mapping from="Memotech MTX512" to="Memotech - MTX512" />
|
||||
<mapping from="MicroBee" to="Applied Technology - MicroBee" />
|
||||
<mapping from="Microkey Primo" to="Microkey - Primo" />
|
||||
<mapping from="Miles Gordon Technology Sam Coupe" to="MGT - Sam Coupe" />
|
||||
<mapping from="NCR Decision Mate V" to="NCR - Decision Mate V" />
|
||||
<mapping from="NCR Decision V" to="NCR - Decision Mate V" />
|
||||
<mapping from="NEC PC-6001" to="NEC - PC-6001" />
|
||||
<mapping from="NEC PC-8001" to="NEC - PC-8001" />
|
||||
<mapping from="NEC PC-8201" to="NEC - PC-8201" />
|
||||
<mapping from="NEC PC-8801" to="NEC - PC-8801" />
|
||||
<mapping from="NEC PC-88VA" to="NEC - PC-88VA" />
|
||||
<mapping from="NEC PC-9801" to="NEC - PC-9801" />
|
||||
<mapping from="NEC PC-9821" to="NEC - PC-9801" />
|
||||
<mapping from="NEC PC-Engine & TurboGrafx-16" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC PC-Engine CD & TurboGrafx-16 CD" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC PC-FX" to="NEC - PC FX, PC FXGA" />
|
||||
<mapping from="NEC PC-FXGA" to="NEC - PC FX, PC FXGA" />
|
||||
<mapping from="NEC PC6001" to="NEC - PC-6001" />
|
||||
<mapping from="NEC SuperGrafx" to="NEC - Super Grafx" />
|
||||
<mapping from="Nascom I & II" to="Nascom - I, II" />
|
||||
<mapping from="Nintendo 64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="Nintendo 64DD" to="Nintendo - Nintendo 64DD" />
|
||||
<mapping from="Nintendo Famicom & Entertainment System" to="Nintendo - Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo Famicom Disk System" to="Nintendo - Famicom Disk System" />
|
||||
<mapping from="Nintendo Game Boy Advance" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo Game Boy Color" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo Game Boy" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo GameCube" to="Nintendo - GameCube" />
|
||||
<mapping from="Nintendo N64" to="Nintendo - Nintendo 64" />
|
||||
<mapping from="Nintendo Pokemon Mini" to="Nintendo - Pokemon Mini" />
|
||||
<mapping from="Nintendo Super Famicom & Super Entertainment System" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo Super Famicom" to="Nintendo - Super Nintendo Entertainment System" />
|
||||
<mapping from="Nintendo Virtual Boy" to="Nintendo - Virtual Boy" />
|
||||
<mapping from="OCC Osborne 1 & Osborne Executive" to="OCC - Osborne 1, 2, 3, 4" />
|
||||
<mapping from="OpenPandora Pandora" to="OpenPandora - Pandora" />
|
||||
<mapping from="Osborne OSBORNE 1 & Executive" to="OCC - Osborne 1, 2, 3, 4" />
|
||||
<mapping from="Othello Multivision" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="PEL Varazdin Orao" to="PEL Varazdin - Orao" />
|
||||
<mapping from="PTC Sol Terminal Computer SOL-20" to="PTC - Sol Terminal Computer SOL-20" />
|
||||
<mapping from="Philips CD-i" to="Philips - CD-i" />
|
||||
<mapping from="Philips G7000" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Philips P2000" to="Philips - P2000" />
|
||||
<mapping from="Philips P2000T" to="Philips - P2000" />
|
||||
<mapping from="Philips VG 5000" to="Philips - VG 5000" />
|
||||
<mapping from="Philips Videopac G7000" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Philips Videopac+" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Pioneer LaserActive" to="Pioneer - LaserActive" />
|
||||
<mapping from="RCA Chip-8" to="RCA - Chip-8" />
|
||||
<mapping from="RCA Studio II" to="RCA - Studio II" />
|
||||
<mapping from="RCA Superchip" to="RCA - Superchip" />
|
||||
<mapping from="REAL 3DO Interactive Multiplayer" to="Panasonic - 3DO Interactive Multiplayer" />
|
||||
<mapping from="RM Nimbus PC" to="RM - Nimbus PC" />
|
||||
<mapping from="RM Nimbus PC-186" to="RM - Nimbus PC" />
|
||||
<mapping from="Radica Arcade Legends & Play TV Legends" to="Radica - Arcade Legends, Play TV Legends" />
|
||||
<mapping from="Radio-86RK Apogej BK-01" to="Radio-86RK - Apogej BK-01" />
|
||||
<mapping from="Radio-86RK Mikro-80" to="Radio-86RK - Mikro-80" />
|
||||
<mapping from="Radio-86RK Mikrosha" to="Radio-86RK - Mikrosha" />
|
||||
<mapping from="Radio-86RK Partner-01.01" to="Radio-86RK - Partner-01.01" />
|
||||
<mapping from="Radio-86RK Radio-86RK" to="Radio-86RK - Radio-86RK" />
|
||||
<mapping from="Radio-86RK YuT-88" to="Radio-86RK - YuT-88" />
|
||||
<mapping from="Robotron HC900, KC85 2, KC85 3 & KC85 4" to="Robotron - KC85" />
|
||||
<mapping from="Robotron KC Compact" to="Robotron - KC Compact" />
|
||||
<mapping from="Robotron KC85 2-4" to="Robotron - KC85" />
|
||||
<mapping from="Robotron Z1013" to="Robotron - Z1013" />
|
||||
<mapping from="Robotron Z9001 & KC85 1" to="Robotron - KC85" />
|
||||
<mapping from="Robotron Z9001" to="Robotron - KC85" />
|
||||
<mapping from="SABA Videoplay" to="Fairchild - Channel F" />
|
||||
<mapping from="SNK Hyper Neo-Geo 64" to="SNK - Hyper Neo Geo 64" />
|
||||
<mapping from="SNK Neo-Geo CD" to="SNK - Neo Geo" />
|
||||
<mapping from="SNK Neo-Geo Pocket Color" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="SNK Neo-Geo Pocket" to="SNK - Neo Geo Pocket, Neo Geo Pocket Color" />
|
||||
<mapping from="Sega 32X" to="Sega - 32X" />
|
||||
<mapping from="Sega Computer 3000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Sega Dreamcast" to="Sega - Dreamcast" />
|
||||
<mapping from="Sega Game 1000" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Sega Game Gear" to="Sega - Game Gear" />
|
||||
<mapping from="Sega Mark III & Master System" to="Sega - Master System, Mark III" />
|
||||
<mapping from="Sega Master System & Mark III" to="Sega - Master System, Mark III" />
|
||||
<mapping from="Sega Mega Drive & Genesis" to="Sega - Mega Drive, Genesis" />
|
||||
<mapping from="Sega Mega-CD & Sega CD" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega Mega-CD and Sega CD" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega NAOMI 2" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Sega NAOMI" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Sega NAOMI GD-ROM" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Sega Pico" to="Sega - PICO" />
|
||||
<mapping from="Sega Saturn" to="Sega - Saturn" />
|
||||
<mapping from="Sega Super Control Station" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Sega Visual Memory System" to="Sega - Visual Memory System" />
|
||||
<mapping from="Sega Visual Memory Unit" to="Sega - Visual Memory System" />
|
||||
<mapping from="Sega WonderMega" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sharp MZ-700" to="Sharp - MZ-700" />
|
||||
<mapping from="Sharp MZ-800 & MZ-1500" to="Sharp - MZ-800, MZ-1500" />
|
||||
<mapping from="Sharp X1 Turbo" to="Sharp - X1" />
|
||||
<mapping from="Sharp X1" to="Sharp - X1" />
|
||||
<mapping from="Sharp X68000" to="Sharp - X68000" />
|
||||
<mapping from="Sinclair QL" to="Sinclair - QL" />
|
||||
<mapping from="Sinclair ZX Spectrum" to="Sinclair - ZX Spectrum" />
|
||||
<mapping from="Sinclair ZX-81" to="Sinclair - ZX81" />
|
||||
<mapping from="Sinclair ZX81" to="Sinclair - ZX81" />
|
||||
<mapping from="Sony PlayStation 2" to="Sony - PlayStation 2" />
|
||||
<mapping from="Sony PlayStation" to="Sony - PlayStation" />
|
||||
<mapping from="Sony PocketStation" to="Sony - PocketStation" />
|
||||
<mapping from="Sord M5" to="Sord - M5" />
|
||||
<mapping from="Spectravideo SVI 318 & SVI 328" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="Spectravideo SVI 318-328" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="Spectravideo SVI-318 & SVI-328" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="TESLA PMD-85" to="Tesla - PMD 85" />
|
||||
<mapping from="Tandy MC-10" to="Tandy Radio Shack - TRS-80 MC-10" />
|
||||
<mapping from="Tandy Radio Shack - CoCo" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 - Model 1" to="Tandy Radio Shack - TRS-80 Model I" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 - Model 3" to="Tandy Radio Shack - TRS-80 Model III" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 - Model 4" to="Tandy Radio Shack - TRS-80 Model IV" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 Color Computer" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 MC-10" to="Tandy Radio Shack - TRS-80 MC-10" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 Model 4" to="Tandy Radio Shack - TRS-80 Model IV" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 Model I" to="Tandy Radio Shack - TRS-80 Model I" />
|
||||
<mapping from="Tandy Radio Shack - TRS-80 Model III" to="Tandy Radio Shack - TRS-80 Model III" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 Color Computer" to="Tandy Radio Shack - TRS-80 Color Computer" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 MC-10" to="Tandy Radio Shack - TRS-80 MC-10" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 Model 100" to="Tandy Radio Shack - TRS-80 Model 100" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 Model 4" to="Tandy Radio Shack - TRS-80 Model IV" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 Model I" to="Tandy Radio Shack - TRS-80 Model I" />
|
||||
<mapping from="Tandy Radio Shack TRS-80 Model III" to="Tandy Radio Shack - TRS-80 Model III" />
|
||||
<mapping from="Tangerine MICROTAN 65" to="Tangerine - Microtan 65" />
|
||||
<mapping from="Tangerine Microtan 65" to="Tangerine - Microtan 65" />
|
||||
<mapping from="Tangerine ORIC 1-Atmos-Telestrat" to="Tangerine - Oric-1, Oric Atmos" />
|
||||
<mapping from="Tangerine Oric-1 & Atmos" to="Tangerine - Oric-1, Oric Atmos" />
|
||||
<mapping from="Tangerine Oric-1 & Oric Atmos" to="Tangerine - Oric-1, Oric Atmos" />
|
||||
<mapping from="Tatung Einstein TC-01" to="Tatung - Einstein TC-01" />
|
||||
<mapping from="Technosys Aamber Pegasus" to="Technosys - Aamber Pegasus" />
|
||||
<mapping from="Tesla PMD 85" to="Tesla - PMD 85" />
|
||||
<mapping from="Texas Instruments CC-40" to="Texas Instruments - CC-40" />
|
||||
<mapping from="Texas Instruments TI-73" to="Texas Instruments - TI-73" />
|
||||
<mapping from="Texas Instruments TI-80" to="Texas Instruments - TI-80" />
|
||||
<mapping from="Texas Instruments TI-81" to="Texas Instruments - TI-81" />
|
||||
<mapping from="Texas Instruments TI-82" to="Texas Instruments - TI-82" />
|
||||
<mapping from="Texas Instruments TI-83" to="Texas Instruments - TI-83" />
|
||||
<mapping from="Texas Instruments TI-85" to="Texas Instruments - TI-85" />
|
||||
<mapping from="Texas Instruments TI-86" to="Texas Instruments - TI-86" />
|
||||
<mapping from="Texas Instruments TI-89" to="Texas Instruments - TI-89" />
|
||||
<mapping from="Texas Instruments TI-92" to="Texas Instruments - TI-92" />
|
||||
<mapping from="Texas Instruments TI-99 4A" to="Texas Instruments - TI-99 4A" />
|
||||
<mapping from="Texas Instruments TI-99-4A+" to="Texas Instruments - TI-99 4A" />
|
||||
<mapping from="Texas Instruments TI73" to="Texas Instruments - TI-73" />
|
||||
<mapping from="Texas Instruments TI80" to="Texas Instruments - TI-80" />
|
||||
<mapping from="Thomson MO5" to="Thomson - 8bit" />
|
||||
<mapping from="Thomson MO6" to="Thomson - 8bit" />
|
||||
<mapping from="Thomson TO7" to="Thomson - 8bit" />
|
||||
<mapping from="Thomson TO8" to="Thomson - 8bit" />
|
||||
<mapping from="Thomson TO9+" to="Thomson - 8bit" />
|
||||
<mapping from="Tiger Game.com" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="Tiki Data Kontiki-100 & Tiki-100" to="Tiki Data - Kontiki-100, Tiki-100" />
|
||||
<mapping from="Tomy KISS-Site" to="Tomy - Kiss-site" />
|
||||
<mapping from="Tomy Tutor & Pyuuta" to="Tomy - Tutor, Pyuuta" />
|
||||
<mapping from="Tsukuda Original Othello Multivision" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Tsukuda Othello Multivision" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="University of Cambridge EDSAC" to="University of Cambridge - EDSAC" />
|
||||
<mapping from="University of Tokyo PC-1" to="University of Tokyo - PC-1" />
|
||||
<mapping from="VM Labs Nuon" to="VM Labs - Nuon" />
|
||||
<mapping from="VTech Creativision" to="VTech - CreatiVision" />
|
||||
<mapping from="VTech Laser 200" to="VTech - Laser" />
|
||||
<mapping from="VTech Laser 2001 & CreatiVision" to="VTech - CreatiVision" />
|
||||
<mapping from="VTech Laser 310" to="VTech - Laser" />
|
||||
<mapping from="VTech V.Flash Home Edutainment System" to="VTech - V.Flash Home Edutainment System" />
|
||||
<mapping from="Videoton TV Computer 64" to="Videoton - TV-Computer" />
|
||||
<mapping from="Videoton TV-Computer" to="Videoton - TV-Computer" />
|
||||
<mapping from="Visual Technology Visual 1050" to="Visual Technology - Visual 1050" />
|
||||
<mapping from="Wang VS" to="Wang - VS" />
|
||||
<mapping from="Watara Supervision" to="Watara - Supervision" />
|
||||
<mapping from="ZAPiT Games Game Wave Family Entertainment System" to="ZAPiT Games - Game Wave Family Entertainment System" />
|
||||
</mappings>
|
||||
71
SabreTools.Helper/Mappings/TruRip.xml
Normal file
71
SabreTools.Helper/Mappings/TruRip.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<mappings>
|
||||
<mapping from="Acorn Archimedes" to="Acorn - Archimedes" />
|
||||
<mapping from="Acorn Archimedes CD" to="Acorn - Archimedes" />
|
||||
<mapping from="Acorn BBC Microcomputer System" to="Acorn - BBC, Electron" />
|
||||
<mapping from="American Laser Games American Laser Games (Arcade)" to="American Laser Games - CD-ROM System" />
|
||||
<mapping from="Amstrad GX4000" to="Amstrad - GX4000" />
|
||||
<mapping from="Andamiro Pump It Up (Arcade)" to="Andamiro - Pump It Up" />
|
||||
<mapping from="Apple Macintosh CD" to="Apple - Macintosh" />
|
||||
<mapping from="Atari 5200" to="Atari - 5200" />
|
||||
<mapping from="Atari 7800" to="Atari - 7800" />
|
||||
<mapping from="Atari Jaguar CD" to="Atari - Jaguar" />
|
||||
<mapping from="Atari Lynx" to="Atari - Lynx" />
|
||||
<mapping from="Bandai Pippin @World & Atmark" to="Bandai - Pippin" />
|
||||
<mapping from="Bandai Playdia" to="Bandai - Playdia" />
|
||||
<mapping from="Bandai WonderSwan Color (SwanCrystal)" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Bandai WonderSwan" to="Bandai - WonderSwan, WonderSwan Color" />
|
||||
<mapping from="Capcom CP SYSTEM III" to="Capcom - CPS III" />
|
||||
<mapping from="Capcom CP SYSTEM III (CPS3)" to="Capcom - CPS III" />
|
||||
<mapping from="Commodore Amiga CD" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore Amiga CD32" to="Commodore - Amiga" />
|
||||
<mapping from="Commodore Amiga CDTV" to="Commodore - Amiga" />
|
||||
<mapping from="Fairchild Channel F (Video Entertainment System)" to="Fairchild - Channel F" />
|
||||
<mapping from="Fujitsu FM Towns (Marty)" to="Fujitsu - FM Towns" />
|
||||
<mapping from="IBM Compatible IBM PC compatible" to="IBM - PC Compatibles" />
|
||||
<mapping from="IBM PC Compatible IBM PC compatible" to="IBM - PC Compatibles" />
|
||||
<mapping from="Incredible Technologies IT Eagle" to="Incredible Technologies - Eagle" />
|
||||
<mapping from="Incredible Technologies IT PC" to="Incredible Technologies - PC" />
|
||||
<mapping from="Konami Bemani FireBeat" to="Konami - Bemani FireBeat" />
|
||||
<mapping from="Konami Bemani Twinkle" to="Konami - Bemani Twinkle" />
|
||||
<mapping from="Konami M2" to="Panasonic - 3DO M2" />
|
||||
<mapping from="Konami System 573" to="Konami - System 573" />
|
||||
<mapping from="Mattel HyperScan" to="Mattel - HyperScan" />
|
||||
<mapping from="Memorex VIS interactive Video Information" to="Memorex - Video Information System" />
|
||||
<mapping from="MSX MSX CD" to="Microsoft - MSX, MSX 2" />
|
||||
<mapping from="Namco - Sega - Nintendo Triforce" to="Namco - Triforce" />
|
||||
<mapping from="Namco System 2x6" to="Namco - System 246, System 256" />
|
||||
<mapping from="NCR Decision Mate V" to="NCR - Decision Mate V" />
|
||||
<mapping from="NEC PC Engine CD & TurboGrafx CD" to="NEC - PC Engine, TurboGrafx 16" />
|
||||
<mapping from="NEC PC-FX" to="NEC - PC FX, PC FXGA" />
|
||||
<mapping from="NEC PC-FXGA" to="NEC - PC FX, PC FXGA" />
|
||||
<mapping from="Panasonic 3DO Interactive Multiplayer" to="Panasonic - 3DO Interactive Multiplayer" />
|
||||
<mapping from="Philips CD-i & VCD" to="Philips - CD-i" />
|
||||
<mapping from="Philips Videopac + G7400" to="Philips - Videopac+, Odyssey2" />
|
||||
<mapping from="Sega Chihiro" to="Sega - Chihiro" />
|
||||
<mapping from="Sega Dreamcast" to="Sega - Dreamcast" />
|
||||
<mapping from="Sega Lindbergh" to="Sega - Lindbergh" />
|
||||
<mapping from="Sega Mega-CD & Sega CD" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega Mega-CD & Sega CD - Games" to="Sega - Mega-CD, Sega CD" />
|
||||
<mapping from="Sega NAOMI 2" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Sega NAOMI" to="Sega - Naomi, Naomi 2, Atomiswave" />
|
||||
<mapping from="Sega RingWide" to="Sega - RingWide" />
|
||||
<mapping from="Sega Saturn" to="Sega - Saturn" />
|
||||
<mapping from="Sharp X1" to="Sharp - X1" />
|
||||
<mapping from="SNK Neo-Geo CD" to="SNK - Neo Geo" />
|
||||
<mapping from="Sony PlayStation & PSone" to="Sony - PlayStation" />
|
||||
<mapping from="Sord CGL M 5 (M 5, Game M 5)" to="Sord - M5" />
|
||||
<mapping from="Spectravideo SV-318 & SV-328" to="Spectravideo - SVI-318, SVI-328" />
|
||||
<mapping from="Tesla PMD-85" to="Tesla - PMD 85" />
|
||||
<mapping from="Tiger Game.com" to="Tiger Electronics - Game.com" />
|
||||
<mapping from="Tomy Grandstand Tutor (Tutor, Pyuuta)" to="Tomy - Tutor, Pyuuta" />
|
||||
<mapping from="Tomy Kiss-site" to="Tomy - Kiss-site" />
|
||||
<mapping from="Tsukuda Original Othello Multivision" to="Sega - SG-1000, SC-3000, SF-7000, Othello Multivision" />
|
||||
<mapping from="Videoton TV-Computer" to="Videoton - TV-Computer" />
|
||||
<mapping from="VM Labs Nuon" to="VM Labs - Nuon" />
|
||||
<mapping from="VTech V.Flash Home Edutainment System" to="VTech - V.Flash Home Edutainment System" />
|
||||
<mapping from="Wang VS" to="Wang - VS" />
|
||||
<mapping from="Watara SuperVision (Quickshot, Hartung SV-100, HiperVision, Tiger Boy)" to="Watara - Supervision" />
|
||||
<mapping from="ZAPiT Games Game Wave Family Entertainment System" to="ZAPiT Games - Game Wave Family Entertainment System" />
|
||||
</mappings>
|
||||
36
SabreTools.Helper/Properties/AssemblyInfo.cs
Normal file
36
SabreTools.Helper/Properties/AssemblyInfo.cs
Normal 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("SabreHelper")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SabreHelper")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[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("225a1afd-0890-44e8-b779-7502665c23a5")]
|
||||
|
||||
// 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("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
249
SabreTools.Helper/Remapping.cs
Normal file
249
SabreTools.Helper/Remapping.cs
Normal file
@@ -0,0 +1,249 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains all remappings of known import classes
|
||||
/// </summary>
|
||||
public class Remapping
|
||||
{
|
||||
// Remapping classes represented by dictionaries (from, to)
|
||||
public static Dictionary<string, string> Good = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> MAME = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> MaybeIntro = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> NoIntro = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> NonGood = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> Redump = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> TOSEC = new Dictionary<string, string>();
|
||||
public static Dictionary<string, string> TruRip = new Dictionary<string, string>();
|
||||
|
||||
// Header skip classes represented by dictionaries (header, size)
|
||||
public static Dictionary<string, int> A7800 = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> FDS = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> Lynx = new Dictionary<string, int>();
|
||||
//public static Dictionary<string, int> N64 = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> NES = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> PCE = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> PSID = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> SNES = new Dictionary<string, int>();
|
||||
public static Dictionary<string, int> SPC = new Dictionary<string, int>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create all remappings to be used by the program
|
||||
/// </summary>
|
||||
public static void CreateRemappings()
|
||||
{
|
||||
// Create array of dictionary names
|
||||
string[] remappings =
|
||||
{
|
||||
"Good", "MAME", "MaybeIntro", "NoIntro", "NonGood", "Redump", "TOSEC", "TruRip",
|
||||
};
|
||||
|
||||
// Loop through and add all remappings
|
||||
foreach (string remapping in remappings)
|
||||
{
|
||||
RemappingHelper(remapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a remapping from XML
|
||||
/// </summary>
|
||||
/// <param name="mapping">Name of the mapping to be populated</param>
|
||||
private static void RemappingHelper(string mapping)
|
||||
{
|
||||
// Read in remapping from file
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
doc.LoadXml(File.ReadAllText("Mappings/" + mapping + ".xml"));
|
||||
}
|
||||
catch (XmlException ex)
|
||||
{
|
||||
Console.WriteLine(mapping + " remappings could not be loaded! " + ex.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the mappings parent node
|
||||
XmlNode node = doc.FirstChild;
|
||||
while (node.Name != "mappings")
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
|
||||
// If the node is empty, just return so it doesn't crash
|
||||
if (!node.HasChildNodes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the first mapping node
|
||||
node = node.FirstChild;
|
||||
while (node.NodeType != XmlNodeType.Element && node.Name != "mapping")
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
|
||||
// Now read in the mappings
|
||||
while (node != null && node.Name == "mapping")
|
||||
{
|
||||
switch (mapping)
|
||||
{
|
||||
case "Good":
|
||||
Good.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "MAME":
|
||||
MAME.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "MaybeIntro":
|
||||
MaybeIntro.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "NoIntro":
|
||||
NoIntro.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "NonGood":
|
||||
NonGood.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "Redump":
|
||||
Redump.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "TOSEC":
|
||||
TOSEC.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
case "TruRip":
|
||||
TruRip.Add(node.Attributes["from"].Value, node.Attributes["to"].Value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Get the next node and skip over anything that's not an element
|
||||
node = node.NextSibling;
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
while (node.NodeType != XmlNodeType.Element && node.Name != "mapping")
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create all header mappings to be used by the program
|
||||
/// </summary>
|
||||
public static void CreateHeaderSkips()
|
||||
{
|
||||
// Create array of dictionary names
|
||||
string[] skippers =
|
||||
{
|
||||
"a7800", "fds", "lynx", /* "n64", */ "nes", "pce", "psid", "snes", "spc",
|
||||
};
|
||||
|
||||
// Loop through and add all remappings
|
||||
foreach (string skipper in skippers)
|
||||
{
|
||||
SkipperHelper(skipper);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a remapping from XML
|
||||
/// </summary>
|
||||
/// <param name="skipper">Name of the header skipper to be populated</param>
|
||||
private static void SkipperHelper(string skipper)
|
||||
{
|
||||
// Read in remapping from file
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
doc.LoadXml(File.ReadAllText("Skippers/" + skipper + ".xml"));
|
||||
}
|
||||
catch (XmlException ex)
|
||||
{
|
||||
Console.WriteLine(skipper + " header skippers could not be loaded! " + ex.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the detector parent node
|
||||
XmlNode node = doc.FirstChild;
|
||||
while (node.Name != "detector")
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
|
||||
// Get the first rule node
|
||||
node = node.SelectSingleNode("rule");
|
||||
|
||||
// Now read in the rules
|
||||
while (node != null && node.Name == "rule")
|
||||
{
|
||||
// Size is the offset for the actual game data
|
||||
int size = (node.Attributes["start_offset"] != null ? Convert.ToInt32(node.Attributes["start_offset"].Value, 16) : 0);
|
||||
|
||||
// Each rule set can have more than one data rule. We can't really use multiples right now
|
||||
if (node.SelectNodes("data") != null)
|
||||
{
|
||||
foreach (XmlNode child in node.SelectNodes("data"))
|
||||
{
|
||||
// Add an offset to the match if one exists
|
||||
string header = (child.Attributes["offset"] != null && child.Attributes["offset"].Value != "0" ? "^.{" + (Convert.ToInt32(child.Attributes["offset"].Value, 16) * 2) + "}" : "^");
|
||||
header += child.Attributes["value"].Value;
|
||||
|
||||
// Now add the header and value to the appropriate skipper dictionary
|
||||
switch (skipper)
|
||||
{
|
||||
case "a7800":
|
||||
A7800.Add(header, size);
|
||||
break;
|
||||
case "fds":
|
||||
FDS.Add(header, size);
|
||||
break;
|
||||
case "lynx":
|
||||
Lynx.Add(header, size);
|
||||
break;
|
||||
/*
|
||||
case "n64":
|
||||
N64.Add(header, size);
|
||||
break;
|
||||
*/
|
||||
case "nes":
|
||||
NES.Add(header, size);
|
||||
break;
|
||||
case "pce":
|
||||
PCE.Add(header, size);
|
||||
break;
|
||||
case "psid":
|
||||
PSID.Add(header, size);
|
||||
break;
|
||||
case "snes":
|
||||
SNES.Add(header, size);
|
||||
break;
|
||||
case "spc":
|
||||
SPC.Add(header, size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get the next node and skip over anything that's not an element
|
||||
node = node.NextSibling;
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
while (node.NodeType != XmlNodeType.Element && node.Name != "rule")
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
149
SabreTools.Helper/SabreTools.Helper.csproj
Normal file
149
SabreTools.Helper/SabreTools.Helper.csproj
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{225A1AFD-0890-44E8-B779-7502665C23A5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SabreTools.Helper</RootNamespace>
|
||||
<AssemblyName>SabreTools</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\Debug-x64\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>..\..\Release-x64\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\Mono.Data.Sqlite.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SharpCompress, Version=0.11.6.0, Culture=neutral, PublicKeyToken=beaf6f427e128133, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\sharpcompress.0.11.6\lib\net40\SharpCompress.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.Portable, Version=4.0.0.0, Culture=neutral, PublicKeyToken=59e704a76bc4613a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Data.Portable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Transactions.Portable, Version=4.0.0.0, Culture=neutral, PublicKeyToken=59e704a76bc4613a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Transactions.Portable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<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="Data\Constants.cs" />
|
||||
<Compile Include="Tools\CRC32.cs" />
|
||||
<Compile Include="Tools\Database.cs" />
|
||||
<Compile Include="Data\Enums.cs" />
|
||||
<Compile Include="Interfaces\IGenerate.cs" />
|
||||
<Compile Include="Interfaces\IImport.cs" />
|
||||
<Compile Include="Logger.cs" />
|
||||
<Compile Include="Tools\Output.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Remapping.cs" />
|
||||
<Compile Include="Tools\DatTools.cs" />
|
||||
<Compile Include="Data\Structs.cs" />
|
||||
<Compile Include="Tools\Stats.cs" />
|
||||
<Compile Include="Tools\Style.cs" />
|
||||
<Compile Include="Data\Build.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="dats.sqlite">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="LICENSE">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Mappings\*.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Skippers\*.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="*.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets" Condition="Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" />
|
||||
<Target Name="EnsureMonoDataSqlitePortableImported" BeforeTargets="BeforeBuild" Condition="'$(MonoDataSqlitePortableImported)' == ''">
|
||||
<Error Condition="!Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them." />
|
||||
<Error Condition="Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build." />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>xcopy /s /e /y "$(SolutionDir)$(ProjectName)\$(PlatformName)\*.dll" "$(SolutionDir)$(ProjectName)"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
17
SabreTools.Helper/Skippers/a7800.xml
Normal file
17
SabreTools.Helper/Skippers/a7800.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Atari 7800</name>
|
||||
<author>Roman Scherzer</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<rule start_offset="80" end_offset="EOF" operation="none">
|
||||
<data offset="1" value="415441524937383030" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="80" end_offset="EOF" operation="none">
|
||||
<data offset="64" value="41435455414C20434152542044415441205354415254532048455245" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
25
SabreTools.Helper/Skippers/fds.xml
Normal file
25
SabreTools.Helper/Skippers/fds.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>fds</name>
|
||||
<author>Yori Yoshizuki</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<rule start_offset="10">
|
||||
<data offset="0" value="4644531A010000000000000000000000"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="10">
|
||||
<data offset="0" value="4644531A020000000000000000000000"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="10">
|
||||
<data offset="0" value="4644531A030000000000000000000000"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="10">
|
||||
<data offset="0" value="4644531A040000000000000000000000"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
17
SabreTools.Helper/Skippers/lynx.xml
Normal file
17
SabreTools.Helper/Skippers/lynx.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Atari Lynx</name>
|
||||
<author>Roman Scherzer</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<rule start_offset="40" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="4C594E58" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="40" end_offset="EOF" operation="none">
|
||||
<data offset="6" value="425339" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
24
SabreTools.Helper/Skippers/n64.xml
Normal file
24
SabreTools.Helper/Skippers/n64.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Nintendo 64 - ABCD</name>
|
||||
<author>CUE</author>
|
||||
<version>1.1</version>
|
||||
|
||||
<!-- V64 format -->
|
||||
<rule start_offset="0" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="80371240" result="true"/>
|
||||
</rule>
|
||||
|
||||
<!-- Z64 format -->
|
||||
<rule start_offset="0" end_offset="EOF" operation="byteswap">
|
||||
<data offset="0" value="37804012" result="true"/>
|
||||
</rule>
|
||||
|
||||
<!-- N64 format? -->
|
||||
<rule start_offset="0" end_offset="EOF" operation="wordswap">
|
||||
<data offset="0" value="40123780" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
13
SabreTools.Helper/Skippers/nes.xml
Normal file
13
SabreTools.Helper/Skippers/nes.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Nintendo Famicon/NES</name>
|
||||
<author>Roman Scherzer</author>
|
||||
<version>1.1</version>
|
||||
|
||||
<rule start_offset="10" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="4E45531A" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
13
SabreTools.Helper/Skippers/pce.xml
Normal file
13
SabreTools.Helper/Skippers/pce.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>NEC TurboGrafx-16/PC-Engine</name>
|
||||
<author>Matt Nadareski (darksabre76)</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<rule start_offset="200">
|
||||
<data offset="0" value="4000000000000000AABB02"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
29
SabreTools.Helper/Skippers/psid.xml
Normal file
29
SabreTools.Helper/Skippers/psid.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>psid</name>
|
||||
<author>Yori Yoshizuki</author>
|
||||
<version>1.2</version>
|
||||
|
||||
<rule start_offset="76" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="5053494400010076" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="76" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="505349440003007c" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="7c" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="505349440002007c" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="7c" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="505349440001007c" result="true"/>
|
||||
</rule>
|
||||
|
||||
<rule start_offset="7c" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="525349440002007c" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
24
SabreTools.Helper/Skippers/snes.xml
Normal file
24
SabreTools.Helper/Skippers/snes.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Nintendo Super Famicom/SNES</name>
|
||||
<author>Matt Nadareski (darksabre76)</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<!-- fig header -->
|
||||
<rule start_offset="200">
|
||||
<data offset="16" value="0000000000000000"/>
|
||||
</rule>
|
||||
|
||||
<!-- smc header -->
|
||||
<rule start_offset="200">
|
||||
<data offset="16" value="AABB040000000000"/>
|
||||
</rule>
|
||||
|
||||
<!-- ufo header -->
|
||||
<rule start_offset="200">
|
||||
<data offset="16" value="535550455255464F"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
13
SabreTools.Helper/Skippers/spc.xml
Normal file
13
SabreTools.Helper/Skippers/spc.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<detector>
|
||||
|
||||
<name>Nintendo Super Famicon SPC</name>
|
||||
<author>Yori Yoshizuki</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<rule start_offset="00100" end_offset="EOF" operation="none">
|
||||
<data offset="0" value="534E45532D535043" result="true"/>
|
||||
</rule>
|
||||
|
||||
</detector>
|
||||
119
SabreTools.Helper/Tools/CRC32.cs
Normal file
119
SabreTools.Helper/Tools/CRC32.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
// Copyright (c) Damien Guard. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Originally published at http://damieng.com/blog/2006/08/08/calculating_crc32_in_c_and_net
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DamienG.Security.Cryptography
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a 32-bit CRC hash algorithm compatible with Zip etc.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Crc32 should only be used for backward compatibility with older file formats
|
||||
/// and algorithms. It is not secure enough for new applications.
|
||||
/// 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 Crc32 : HashAlgorithm
|
||||
{
|
||||
public const UInt32 DefaultPolynomial = 0xedb88320u;
|
||||
public const UInt32 DefaultSeed = 0xffffffffu;
|
||||
|
||||
static UInt32[] defaultTable;
|
||||
|
||||
readonly UInt32 seed;
|
||||
readonly UInt32[] table;
|
||||
UInt32 hash;
|
||||
|
||||
public Crc32()
|
||||
: this(DefaultPolynomial, DefaultSeed)
|
||||
{
|
||||
}
|
||||
|
||||
public Crc32(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 crc = seed;
|
||||
for (var i = start; i < size - start; i++)
|
||||
crc = (crc >> 8) ^ table[buffer[i] ^ crc & 0xff];
|
||||
return crc;
|
||||
}
|
||||
|
||||
static byte[] UInt32ToBigEndianBytes(UInt32 uint32)
|
||||
{
|
||||
var result = BitConverter.GetBytes(uint32);
|
||||
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
1931
SabreTools.Helper/Tools/DatTools.cs
Normal file
1931
SabreTools.Helper/Tools/DatTools.cs
Normal file
File diff suppressed because it is too large
Load Diff
215
SabreTools.Helper/Tools/Database.cs
Normal file
215
SabreTools.Helper/Tools/Database.cs
Normal file
@@ -0,0 +1,215 @@
|
||||
using System;
|
||||
using Mono.Data.Sqlite;
|
||||
using System.IO;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// All general database operations
|
||||
/// </summary>
|
||||
public class Database
|
||||
{
|
||||
/// <summary>
|
||||
/// Ensure that the databse exists and has the proper schema
|
||||
/// </summary>
|
||||
/// <param name="db">Name of the databse</param>
|
||||
/// <param name="connectionString">Connection string for SQLite</param>
|
||||
public static void EnsureDatabase(string db, string connectionString)
|
||||
{
|
||||
// Make sure the file exists
|
||||
if (!File.Exists(db))
|
||||
{
|
||||
SqliteConnection.CreateFile(db);
|
||||
}
|
||||
|
||||
//Get "type" from the filename
|
||||
string type = Path.GetFileNameWithoutExtension(db);
|
||||
|
||||
// Connect to the file
|
||||
SqliteConnection dbc = new SqliteConnection(connectionString);
|
||||
dbc.Open();
|
||||
|
||||
// Make sure the database has the correct schema
|
||||
try
|
||||
{
|
||||
if (type == "Headerer")
|
||||
{
|
||||
string query = @"
|
||||
CREATE TABLE IF NOT EXISTS data (
|
||||
'sha1' TEXT NOT NULL,
|
||||
'header' TEXT NOT NULL,
|
||||
'type' TEXT NOT NULL,
|
||||
PRIMARY KEY (sha1, header, type)
|
||||
)";
|
||||
SqliteCommand slc = new SqliteCommand(query, dbc);
|
||||
slc.ExecuteNonQuery();
|
||||
}
|
||||
else if (type == "dats")
|
||||
{
|
||||
string query = @"
|
||||
CREATE TABLE IF NOT EXISTS dats (
|
||||
'id' INTEGER PRIMARY KEY NOT NULL,
|
||||
'size' INTEGER NOT NULL DEFAULT -1,
|
||||
'sha1' TEXT NOT NULL,
|
||||
'name' TEXT NOT NULL
|
||||
)";
|
||||
SqliteCommand slc = new SqliteCommand(query, dbc);
|
||||
slc.ExecuteNonQuery();
|
||||
|
||||
query = @"
|
||||
CREATE TABLE IF NOT EXISTS datsdata (
|
||||
'id' INTEGER NOT NULL,
|
||||
'key' TEXT NOT NULL,
|
||||
'value' TEXT,
|
||||
PRIMARY KEY (id, key, value)
|
||||
)";
|
||||
slc = new SqliteCommand(query, dbc);
|
||||
slc.ExecuteNonQuery();
|
||||
|
||||
query = @"
|
||||
CREATE TABLE IF NOT EXISTS source (
|
||||
'id' INTEGER PRIMARY KEY NOT NULL,
|
||||
'name' TEXT NOT NULL UNIQUE,
|
||||
'url' TEXT NOT NULL
|
||||
)";
|
||||
slc = new SqliteCommand(query, dbc);
|
||||
slc.ExecuteNonQuery();
|
||||
|
||||
query = @"
|
||||
CREATE TABLE IF NOT EXISTS system (
|
||||
'id' INTEGER PRIMARY KEY NOT NULL,
|
||||
'manufacturer' TEXT NOT NULL,
|
||||
'name' TEXT NOT NULL
|
||||
)";
|
||||
slc = new SqliteCommand(query, dbc);
|
||||
slc.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Close and return the database connection
|
||||
dbc.Close();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a new source to the database if it doesn't already exist
|
||||
/// </summary>
|
||||
/// <param name="name">Source name</param>
|
||||
/// <param name="url">Source URL(s)</param>
|
||||
/// <param name="connectionString">Connection string for SQLite</param>
|
||||
/// <returns>True if the source existed or could be added, false otherwise</returns>
|
||||
public static bool AddSource(string name, string url, string connectionString)
|
||||
{
|
||||
string query = "SELECT id, name, url FROM source WHERE name='" + name + "'";
|
||||
using (SqliteConnection dbc = new SqliteConnection(connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
using (SqliteCommand slc = new SqliteCommand(query, dbc))
|
||||
{
|
||||
using (SqliteDataReader sldr = slc.ExecuteReader())
|
||||
{
|
||||
// If nothing is found, add the source
|
||||
if (!sldr.HasRows)
|
||||
{
|
||||
string squery = "INSERT INTO source (name, url) VALUES ('" + name + "', '" + url + "')";
|
||||
using (SqliteCommand sslc = new SqliteCommand(squery, dbc))
|
||||
{
|
||||
return sslc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
// Otherwise, update the source URL if it's different
|
||||
else
|
||||
{
|
||||
sldr.Read();
|
||||
if (url != sldr.GetString(2))
|
||||
{
|
||||
string squery = "UPDATE source SET url='" + url + "' WHERE id=" + sldr.GetInt32(0);
|
||||
using (SqliteCommand sslc = new SqliteCommand(squery, dbc))
|
||||
{
|
||||
return sslc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an existing source from the database
|
||||
/// </summary>
|
||||
/// <param name="id">Source ID to be removed from the database</param>
|
||||
/// <param name="connectionString">Connection string for SQLite</param>
|
||||
/// <returns>True if the source was removed, false otherwise</returns>
|
||||
public static bool RemoveSource(int id, string connectionString)
|
||||
{
|
||||
string query = "DELETE FROM source WHERE id=" + id;
|
||||
using (SqliteConnection dbc = new SqliteConnection(connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
using (SqliteCommand slc = new SqliteCommand(query, dbc))
|
||||
{
|
||||
return slc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a new system to the database if it doesn't already exist
|
||||
/// </summary>
|
||||
/// <param name="manufacturer">Manufacturer name</param>
|
||||
/// <param name="system">System name</param>
|
||||
/// <param name="connectionString">Connection string for SQLite</param>
|
||||
/// <returns>True if the system existed or could be added, false otherwise</returns>
|
||||
public static bool AddSystem(string manufacturer, string system, string connectionString)
|
||||
{
|
||||
string query = "SELECT id, manufacturer, name FROM system WHERE manufacturer='" + manufacturer + "' AND system='" + system + "'";
|
||||
using (SqliteConnection dbc = new SqliteConnection(connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
using (SqliteCommand slc = new SqliteCommand(query, dbc))
|
||||
{
|
||||
using (SqliteDataReader sldr = slc.ExecuteReader())
|
||||
{
|
||||
// If nothing is found, add the system
|
||||
if (!sldr.HasRows)
|
||||
{
|
||||
string squery = "INSERT INTO name (manufacturer, system) VALUES ('" + manufacturer + "', '" + system + "')";
|
||||
using (SqliteCommand sslc = new SqliteCommand(squery, dbc))
|
||||
{
|
||||
return sslc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an existing system from the database
|
||||
/// </summary>
|
||||
/// <param name="id">System ID to be removed from the database</param>
|
||||
/// <param name="connectionString">Connection string for SQLite</param>
|
||||
/// <returns>True if the system was removed, false otherwise</returns>
|
||||
public static bool RemoveSystem(int id, string connectionString)
|
||||
{
|
||||
string query = "DELETE FROM system WHERE id=" + id;
|
||||
using (SqliteConnection dbc = new SqliteConnection(connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
using (SqliteCommand slc = new SqliteCommand(query, dbc))
|
||||
{
|
||||
return slc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
564
SabreTools.Helper/Tools/Output.cs
Normal file
564
SabreTools.Helper/Tools/Output.cs
Normal file
@@ -0,0 +1,564 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
public class Output
|
||||
{
|
||||
/// <summary>
|
||||
/// Create and open an output file for writing direct from a dictionary
|
||||
/// </summary>
|
||||
/// <param name="datdata">All information for creating the datfile header</param>
|
||||
/// <param name="outDir">Set the output directory</param>
|
||||
/// <param name="logger">Logger object for console and/or file output</param>
|
||||
/// <param name="norename">True if games should only be compared on game and file name (default), false if system and source are counted</param>
|
||||
/// <param name="stats">True if DAT statistics should be output on write, false otherwise (default)</param>
|
||||
/// <returns>True if the DAT was written correctly, false otherwise</returns>
|
||||
/// <remarks>
|
||||
/// The following features have been requested for file output:
|
||||
/// - Have the ability to strip special (non-ASCII) characters from rom information
|
||||
/// - Add a flag for ignoring roms with blank sizes
|
||||
/// </remarks>
|
||||
public static bool WriteDatfile(DatData datdata, string outDir, Logger logger, bool norename = true, bool stats = false)
|
||||
{
|
||||
// Output initial statistics, for kicks
|
||||
if (stats)
|
||||
{
|
||||
Stats.OutputStats(datdata, logger, (datdata.RomCount + datdata.DiskCount == 0));
|
||||
}
|
||||
|
||||
// Bucket roms by game name and optionally dedupe
|
||||
SortedDictionary<string, List<RomData>> sortable = DatTools.BucketByGame(datdata.Roms, datdata.MergeRoms, norename, logger);
|
||||
|
||||
// Now write out to file
|
||||
// If it's empty, use the current folder
|
||||
if (outDir.Trim() == "")
|
||||
{
|
||||
outDir = Environment.CurrentDirectory;
|
||||
}
|
||||
|
||||
// Create the output directory if it doesn't already exist
|
||||
Directory.CreateDirectory(outDir);
|
||||
|
||||
// Get the outfile name
|
||||
string outfile = Style.CreateOutfileName(outDir, datdata);
|
||||
|
||||
logger.User("Opening file for writing: " + outfile);
|
||||
|
||||
try
|
||||
{
|
||||
FileStream fs = File.Create(outfile);
|
||||
StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);
|
||||
|
||||
// Write out the header
|
||||
WriteHeader(sw, datdata, logger);
|
||||
|
||||
// Write out each of the machines and roms
|
||||
int depth = 2, last = -1;
|
||||
string lastgame = null;
|
||||
List<string> splitpath = new List<string>();
|
||||
foreach (List<RomData> roms in sortable.Values)
|
||||
{
|
||||
for (int index = 0; index < roms.Count; index++)
|
||||
{
|
||||
RomData rom = roms[index];
|
||||
List<string> newsplit = rom.Game.Split('\\').ToList();
|
||||
|
||||
// If we have a different game and we're not at the start of the list, output the end of last item
|
||||
if (lastgame != null && lastgame.ToLowerInvariant() != rom.Game.ToLowerInvariant())
|
||||
{
|
||||
depth = WriteEndGame(sw, rom, splitpath, newsplit, lastgame, datdata, depth, out last, logger);
|
||||
}
|
||||
|
||||
// If we have a new game, output the beginning of the new item
|
||||
if (lastgame == null || lastgame.ToLowerInvariant() != rom.Game.ToLowerInvariant())
|
||||
{
|
||||
depth = WriteStartGame(sw, rom, newsplit, lastgame, datdata, depth, last, logger);
|
||||
}
|
||||
|
||||
// If we have a "null" game (created by DATFromDir or something similar), log it to file
|
||||
if (rom.Name == "null" && rom.Size == -1 && rom.CRC == "null" && rom.MD5 == "null" && rom.SHA1 == "null")
|
||||
{
|
||||
logger.Log("Empty folder found: " + rom.Game);
|
||||
|
||||
// If we're in a mode that doesn't allow for actual empty folders, add the blank info
|
||||
if (datdata.OutputFormat != OutputFormat.SabreDat && datdata.OutputFormat != OutputFormat.MissFile)
|
||||
{
|
||||
rom.Name = "-";
|
||||
rom.Size = Constants.SizeZero;
|
||||
rom.CRC = Constants.CRCZero;
|
||||
rom.MD5 = Constants.MD5Zero;
|
||||
rom.SHA1 = Constants.SHA1Zero;
|
||||
}
|
||||
|
||||
// Otherwise, set the new path and such, write out, and continue
|
||||
else
|
||||
{
|
||||
splitpath = newsplit;
|
||||
lastgame = rom.Game;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Now, output the rom data
|
||||
WriteRomData(sw, rom, lastgame, datdata, depth, logger);
|
||||
|
||||
// Set the new data to compare against
|
||||
splitpath = newsplit;
|
||||
lastgame = rom.Game;
|
||||
}
|
||||
}
|
||||
|
||||
// Write the file footer out
|
||||
WriteFooter(sw, datdata, depth, logger);
|
||||
|
||||
logger.Log("File written!" + Environment.NewLine);
|
||||
sw.Close();
|
||||
fs.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out DAT header using the supplied StreamWriter
|
||||
/// </summary>
|
||||
/// <param name="sw">StreamWriter to output to</param>
|
||||
/// <param name="datdata">DatData object representing DAT information</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>True if the data was written, false on error</returns>
|
||||
public static bool WriteHeader(StreamWriter sw, DatData datdata, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
string header = "";
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
header = "clrmamepro (\n" +
|
||||
"\tname \"" + datdata.Name + "\"\n" +
|
||||
"\tdescription \"" + datdata.Description + "\"\n" +
|
||||
"\tcategory \"" + datdata.Category + "\"\n" +
|
||||
"\tversion \"" + datdata.Version + "\"\n" +
|
||||
"\tdate \"" + datdata.Date + "\"\n" +
|
||||
"\tauthor \"" + datdata.Author + "\"\n" +
|
||||
"\temail \"" + datdata.Email + "\"\n" +
|
||||
"\thomepage \"" + datdata.Homepage + "\"\n" +
|
||||
"\turl \"" + datdata.Url + "\"\n" +
|
||||
"\tcomment \"" + datdata.Comment + "\"\n" +
|
||||
(datdata.ForcePacking == ForcePacking.Unzip ? "\tforcezipping no\n" : "") +
|
||||
")\n";
|
||||
break;
|
||||
case OutputFormat.MissFile:
|
||||
if (datdata.TSV)
|
||||
{
|
||||
header = "File Name\tInternal Name\tDescription\tGame Name\tGame Description\tType\t" +
|
||||
"Rom Name\tDisk Name\tSize\tCRC\tMD5\tSHA1\tNodump\n";
|
||||
}
|
||||
break;
|
||||
case OutputFormat.RomCenter:
|
||||
header = "[CREDITS]\n" +
|
||||
"author=" + datdata.Author + "\n" +
|
||||
"version=" + datdata.Version + "\n" +
|
||||
"comment=" + datdata.Comment + "\n" +
|
||||
"[DAT]\n" +
|
||||
"version=2.50\n" +
|
||||
"split=" + (datdata.ForceMerging == ForceMerging.Split ? "1" : "0") + "\n" +
|
||||
"merge=" + (datdata.ForceMerging == ForceMerging.Full ? "1" : "0") + "\n" +
|
||||
"[EMULATOR]\n" +
|
||||
"refname=" + datdata.Name + "\n" +
|
||||
"version=" + datdata.Description + "\n" +
|
||||
"[GAMES]\n";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<!DOCTYPE datafile PUBLIC \"-//Logiqx//DTD ROM Management Datafile//EN\" \"http://www.logiqx.com/Dats/datafile.dtd\">\n\n" +
|
||||
"<datafile>\n" +
|
||||
"\t<header>\n" +
|
||||
"\t\t<name>" + HttpUtility.HtmlEncode(datdata.Name) + "</name>\n" +
|
||||
"\t\t<description>" + HttpUtility.HtmlEncode(datdata.Description) + "</description>\n" +
|
||||
"\t\t<category>" + HttpUtility.HtmlEncode(datdata.Category) + "</category>\n" +
|
||||
"\t\t<version>" + HttpUtility.HtmlEncode(datdata.Version) + "</version>\n" +
|
||||
"\t\t<date>" + HttpUtility.HtmlEncode(datdata.Date) + "</date>\n" +
|
||||
"\t\t<author>" + HttpUtility.HtmlEncode(datdata.Author) + "</author>\n" +
|
||||
"\t\t<comment>" + HttpUtility.HtmlEncode(datdata.Comment) + "</comment>\n" +
|
||||
(!String.IsNullOrEmpty(datdata.Type) && datdata.ForcePacking != ForcePacking.Unzip ?
|
||||
"\t\t<flags>\n" +
|
||||
(!String.IsNullOrEmpty(datdata.Type) ? "\t\t\t<flag name=\"type\" value=\"" + datdata.Type + "\"/>\n" : "") +
|
||||
(datdata.ForcePacking == ForcePacking.Unzip ? "\t\t\t<flag name=\"forcepacking\" value=\"unzip\"/>\n" : "") +
|
||||
"\t\t</flags>\n" : "") +
|
||||
"\t</header>\n" +
|
||||
"\t<data>\n";
|
||||
break;
|
||||
case OutputFormat.Xml:
|
||||
header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<!DOCTYPE datafile PUBLIC \"-//Logiqx//DTD ROM Management Datafile//EN\" \"http://www.logiqx.com/Dats/datafile.dtd\">\n\n" +
|
||||
"<datafile>\n" +
|
||||
"\t<header>\n" +
|
||||
"\t\t<name>" + HttpUtility.HtmlEncode(datdata.Name) + "</name>\n" +
|
||||
"\t\t<description>" + HttpUtility.HtmlEncode(datdata.Description) + "</description>\n" +
|
||||
"\t\t<category>" + HttpUtility.HtmlEncode(datdata.Category) + "</category>\n" +
|
||||
"\t\t<version>" + HttpUtility.HtmlEncode(datdata.Version) + "</version>\n" +
|
||||
"\t\t<date>" + HttpUtility.HtmlEncode(datdata.Date) + "</date>\n" +
|
||||
"\t\t<author>" + HttpUtility.HtmlEncode(datdata.Author) + "</author>\n" +
|
||||
"\t\t<email>" + HttpUtility.HtmlEncode(datdata.Email) + "</email>\n" +
|
||||
"\t\t<homepage>" + HttpUtility.HtmlEncode(datdata.Homepage) + "</homepage>\n" +
|
||||
"\t\t<url>" + HttpUtility.HtmlEncode(datdata.Url) + "</url>\n" +
|
||||
"\t\t<comment>" + HttpUtility.HtmlEncode(datdata.Comment) + "</comment>\n" +
|
||||
(!String.IsNullOrEmpty(datdata.Type) ? "\t\t<type>" + datdata.Type + "</type>\n" : "") +
|
||||
(datdata.ForcePacking == ForcePacking.Unzip ? "\t\t<clrmamepro forcepacking=\"unzip\" />\n" : "") +
|
||||
"\t</header>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
// Write the header out
|
||||
sw.Write(header);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out Game start using the supplied StreamWriter
|
||||
/// </summary>
|
||||
/// <param name="sw">StreamWriter to output to</param>
|
||||
/// <param name="rom">RomData object to be output</param>
|
||||
/// <param name="newsplit">Split path representing the parent game (SabreDAT only)</param>
|
||||
/// <param name="lastgame">The name of the last game to be output</param>
|
||||
/// <param name="datdata">DatData object representing DAT information</param>
|
||||
/// <param name="depth">Current depth to output file at (SabreDAT only)</param>
|
||||
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>The new depth of the tag</returns>
|
||||
public static int WriteStartGame(StreamWriter sw, RomData rom, List<string> newsplit, string lastgame, DatData datdata, int depth, int last, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
// No game should start with a path separator
|
||||
if (rom.Game.StartsWith(Path.DirectorySeparatorChar.ToString()))
|
||||
{
|
||||
rom.Game = rom.Game.Substring(1);
|
||||
}
|
||||
|
||||
string state = "";
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
state += "game (\n\tname \"" + rom.Game + "\"\n" +
|
||||
"\tdescription \"" + rom.Game + "\"\n";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
for (int i = (last == -1 ? 0 : last); i < newsplit.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < depth - last + i - (lastgame == null ? 1 : 0); j++)
|
||||
{
|
||||
state += "\t";
|
||||
}
|
||||
state += "<directory name=\"" + HttpUtility.HtmlEncode(newsplit[i]) + "\" description=\"" +
|
||||
HttpUtility.HtmlEncode(newsplit[i]) + "\">\n";
|
||||
}
|
||||
depth = depth - (last == -1 ? 0 : last) + newsplit.Count;
|
||||
break;
|
||||
case OutputFormat.Xml:
|
||||
state += "\t<machine name=\"" + HttpUtility.HtmlEncode(rom.Game) + "\">\n" +
|
||||
"\t\t<description>" + HttpUtility.HtmlEncode(rom.Game) + "</description>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
sw.Write(state);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return depth;
|
||||
}
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out Game start using the supplied StreamWriter
|
||||
/// </summary>
|
||||
/// <param name="sw">StreamWriter to output to</param>
|
||||
/// <param name="rom">RomData object to be output</param>
|
||||
/// <param name="splitpath">Split path representing last kwown parent game (SabreDAT only)</param>
|
||||
/// <param name="newsplit">Split path representing the parent game (SabreDAT only)</param>
|
||||
/// <param name="lastgame">The name of the last game to be output</param>
|
||||
/// <param name="datdata">DatData object representing DAT information</param>
|
||||
/// <param name="depth">Current depth to output file at (SabreDAT only)</param>
|
||||
/// <param name="last">Last known depth to cycle back from (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>The new depth of the tag</returns>
|
||||
public static int WriteEndGame(StreamWriter sw, RomData rom, List<string> splitpath, List<string> newsplit, string lastgame, DatData datdata, int depth, out int last, Logger logger)
|
||||
{
|
||||
last = 0;
|
||||
|
||||
try
|
||||
{
|
||||
string state = "";
|
||||
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
state += ")\n";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
if (splitpath != null)
|
||||
{
|
||||
for (int i = 0; i < newsplit.Count && i < splitpath.Count; i++)
|
||||
{
|
||||
// Always keep track of the last seen item
|
||||
last = i;
|
||||
|
||||
// If we find a difference, break
|
||||
if (newsplit[i] != splitpath[i])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Now that we have the last known position, take down all open folders
|
||||
for (int i = depth - 1; i > last + 1; i--)
|
||||
{
|
||||
// Print out the number of tabs and the end folder
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
state += "\t";
|
||||
}
|
||||
state += "</directory>\n";
|
||||
}
|
||||
|
||||
// Reset the current depth
|
||||
depth = 2 + last;
|
||||
}
|
||||
break;
|
||||
case OutputFormat.Xml:
|
||||
state += "\t</machine>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
sw.Write(state);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return depth;
|
||||
}
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out RomData using the supplied StreamWriter
|
||||
/// </summary>
|
||||
/// <param name="sw">StreamWriter to output to</param>
|
||||
/// <param name="rom">RomData object to be output</param>
|
||||
/// <param name="lastgame">The name of the last game to be output</param>
|
||||
/// <param name="datdata">DatData object representing DAT information</param>
|
||||
/// <param name="depth">Current depth to output file at (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>True if the data was written, false on error</returns>
|
||||
public static bool WriteRomData(StreamWriter sw, RomData rom, string lastgame, DatData datdata, int depth, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
string state = "";
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
state += "\t" + rom.Type + " ( name \"" + rom.Name + "\"" +
|
||||
(rom.Size != -1 ? " size " + rom.Size : "") +
|
||||
(!String.IsNullOrEmpty(rom.CRC) ? " crc " + rom.CRC.ToLowerInvariant() : "") +
|
||||
(!String.IsNullOrEmpty(rom.MD5) ? " md5 " + rom.MD5.ToLowerInvariant() : "") +
|
||||
(!String.IsNullOrEmpty(rom.SHA1) ? " sha1 " + rom.SHA1.ToLowerInvariant() : "") +
|
||||
(!String.IsNullOrEmpty(rom.Date) ? " date \"" + rom.Date + "\"" : "") +
|
||||
(rom.Nodump ? " flags nodump" : "") +
|
||||
" )\n";
|
||||
break;
|
||||
case OutputFormat.MissFile:
|
||||
string pre = datdata.Prefix + (datdata.Quotes || datdata.TSV ? "\"" : "");
|
||||
string post = (datdata.Quotes || datdata.TSV ? "\"" : "") + datdata.Postfix;
|
||||
|
||||
// Check for special strings in prefix and postfix
|
||||
pre = pre.Replace("%crc%", rom.CRC).Replace("%md5%", rom.MD5).Replace("%sha1%", rom.SHA1).Replace("%size%", rom.Size.ToString());
|
||||
post = post.Replace("%crc%", rom.CRC).Replace("%md5%", rom.MD5).Replace("%sha1%", rom.SHA1).Replace("%size%", rom.Size.ToString());
|
||||
|
||||
// If we're in Romba mode, the state is consistent
|
||||
if (datdata.Romba)
|
||||
{
|
||||
// We can only write out if there's a SHA-1
|
||||
if (rom.SHA1 != "")
|
||||
{
|
||||
string name = rom.SHA1.Substring(0, 2) + "/" + rom.SHA1.Substring(2, 2) + "/" + rom.SHA1.Substring(4, 2) + "/" +
|
||||
rom.SHA1.Substring(6, 2) + "/" + rom.SHA1 + ".gz";
|
||||
state += pre + name + post + "\n";
|
||||
}
|
||||
}
|
||||
// If we're in TSV mode, similarly the state is consistent
|
||||
else if (datdata.TSV)
|
||||
{
|
||||
string inline = datdata.FileName + "\t" + datdata.Name + "\t" + datdata.Description + "\t" + rom.Game + "\t" + rom.Game + "\t" +
|
||||
rom.Type + "\t" + (rom.Type == "rom" ? rom.Name : "") + "\t" + (rom.Type == "disk" ? rom.Name : "") + "\t" + rom.Size + "\t" +
|
||||
rom.CRC + "\t" + rom.MD5 + "\t" + rom.SHA1 + "\t" + (rom.Nodump ? "Nodump" : "");
|
||||
state += pre + inline + post + "\n";
|
||||
}
|
||||
// Otherwise, use any flags
|
||||
else
|
||||
{
|
||||
string name = (datdata.UseGame ? rom.Game : rom.Name);
|
||||
if (datdata.RepExt != "")
|
||||
{
|
||||
string dir = Path.GetDirectoryName(name);
|
||||
dir = (dir.EndsWith(Path.DirectorySeparatorChar.ToString()) ? dir : dir + Path.DirectorySeparatorChar);
|
||||
dir = (dir.StartsWith(Path.DirectorySeparatorChar.ToString()) ? dir.Remove(0, 1) : dir);
|
||||
name = dir + Path.GetFileNameWithoutExtension(name) + datdata.RepExt;
|
||||
}
|
||||
if (datdata.AddExt != "")
|
||||
{
|
||||
name += datdata.AddExt;
|
||||
}
|
||||
if (!datdata.UseGame && datdata.GameName)
|
||||
{
|
||||
name = (rom.Game.EndsWith(Path.DirectorySeparatorChar.ToString()) ? rom.Game : rom.Game + Path.DirectorySeparatorChar) + name;
|
||||
}
|
||||
|
||||
if (datdata.UseGame && rom.Game != lastgame)
|
||||
{
|
||||
state += pre + name + post + "\n";
|
||||
lastgame = rom.Game;
|
||||
}
|
||||
else if (!datdata.UseGame)
|
||||
{
|
||||
state += pre + name + post + "\n";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OutputFormat.RomCenter:
|
||||
state += "¬¬¬" + HttpUtility.HtmlEncode(rom.Game) +
|
||||
"¬" + HttpUtility.HtmlEncode(rom.Game) +
|
||||
"¬" + HttpUtility.HtmlEncode(rom.Name) +
|
||||
"¬" + rom.CRC.ToLowerInvariant() +
|
||||
"¬" + (rom.Size != -1 ? rom.Size.ToString() : "") + "¬¬¬\n";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
string prefix = "";
|
||||
for (int i = 0; i < depth; i++)
|
||||
{
|
||||
prefix += "\t";
|
||||
}
|
||||
|
||||
state += prefix;
|
||||
state += "<file type=\"" + rom.Type + "\" name=\"" + HttpUtility.HtmlEncode(rom.Name) + "\"" +
|
||||
(rom.Size != -1 ? " size=\"" + rom.Size + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.CRC) ? " crc=\"" + rom.CRC.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.MD5) ? " md5=\"" + rom.MD5.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.SHA1) ? " sha1=\"" + rom.SHA1.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.Date) ? " date=\"" + rom.Date + "\"" : "") +
|
||||
(rom.Nodump ? prefix + "/>\n" + prefix + "\t<flags>\n" +
|
||||
prefix + "\t\t<flag name=\"status\" value=\"nodump\"/>\n" +
|
||||
prefix + "\t</flags>\n" +
|
||||
prefix + "</file>\n" :
|
||||
"/>\n");
|
||||
break;
|
||||
case OutputFormat.Xml:
|
||||
state += "\t\t<" + rom.Type + " name=\"" + HttpUtility.HtmlEncode(rom.Name) + "\"" +
|
||||
(rom.Size != -1 ? " size=\"" + rom.Size + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.CRC) ? " crc=\"" + rom.CRC.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.MD5) ? " md5=\"" + rom.MD5.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.SHA1) ? " sha1=\"" + rom.SHA1.ToLowerInvariant() + "\"" : "") +
|
||||
(!String.IsNullOrEmpty(rom.Date) ? " date=\"" + rom.Date + "\"" : "") +
|
||||
(rom.Nodump ? " status=\"nodump\"" : "") +
|
||||
"/>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
sw.Write(state);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out DAT footer using the supplied StreamWriter
|
||||
/// </summary>
|
||||
/// <param name="sw">StreamWriter to output to</param>
|
||||
/// <param name="datdata">DatData object representing DAT information</param>
|
||||
/// /// <param name="depth">Current depth to output file at (SabreDAT only)</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
/// <returns>True if the data was written, false on error</returns>
|
||||
public static bool WriteFooter(StreamWriter sw, DatData datdata, int depth, Logger logger)
|
||||
{
|
||||
try
|
||||
{
|
||||
string footer = "";
|
||||
|
||||
// If we have roms, output the full footer
|
||||
if (datdata.Roms != null && datdata.Roms.Count > 0)
|
||||
{
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
footer = ")";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
for (int i = depth - 1; i >= 2; i--)
|
||||
{
|
||||
// Print out the number of tabs and the end folder
|
||||
for (int j = 0; j < i; j++)
|
||||
{
|
||||
footer += "\t";
|
||||
}
|
||||
footer += "</directory>\n";
|
||||
}
|
||||
footer += "\t</data>\n</datafile>";
|
||||
break;
|
||||
case OutputFormat.Xml:
|
||||
footer = "\t</machine>\n</datafile>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise, output the abbreviated form
|
||||
else
|
||||
{
|
||||
switch (datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.SabreDat:
|
||||
case OutputFormat.Xml:
|
||||
footer = "</datafile>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Write the footer out
|
||||
sw.Write(footer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
147
SabreTools.Helper/Tools/Stats.cs
Normal file
147
SabreTools.Helper/Tools/Stats.cs
Normal file
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using SabreTools.Helper;
|
||||
|
||||
namespace SabreTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Get statistics on one or more DAT files
|
||||
/// </summary>
|
||||
public class Stats
|
||||
{
|
||||
// Private instance variables
|
||||
private List<String> _inputs;
|
||||
private bool _single;
|
||||
private Logger _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Create a new UncompressedSize object
|
||||
/// </summary>
|
||||
/// <param name="inputs">List of files and folders to parse</param>
|
||||
/// <param name="single">True if single DAT stats are output, false otherwise</param>
|
||||
/// <param name="logger">Logger object for file and console output</param>
|
||||
public Stats(List<String> inputs, bool single, Logger logger)
|
||||
{
|
||||
_inputs = inputs;
|
||||
_single = single;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Output all requested statistics
|
||||
/// </summary>
|
||||
/// <returns>True if output succeeded, false otherwise</returns>
|
||||
public bool Process()
|
||||
{
|
||||
// Init all total variables
|
||||
long totalSize = 0;
|
||||
long totalGame = 0;
|
||||
long totalRom = 0;
|
||||
long totalDisk = 0;
|
||||
long totalCRC = 0;
|
||||
long totalMD5 = 0;
|
||||
long totalSHA1 = 0;
|
||||
long totalNodump = 0;
|
||||
|
||||
/// Now process each of the input files
|
||||
foreach (string filename in _inputs)
|
||||
{
|
||||
_logger.User("Beginning stat collection for '" + filename + "'");
|
||||
List<String> games = new List<String>();
|
||||
DatData datdata = new DatData();
|
||||
datdata = DatTools.Parse(filename, 0, 0, datdata, _logger);
|
||||
SortedDictionary<string, List<RomData>> newroms = DatTools.BucketByGame(datdata.Roms, false, true, _logger);
|
||||
|
||||
// Output single DAT stats (if asked)
|
||||
if (_single)
|
||||
{
|
||||
_logger.User(@"\nFor file '" + filename + @"':
|
||||
--------------------------------------------------");
|
||||
OutputStats(datdata, _logger);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.User("\nAdding stats for file '" + filename + "'");
|
||||
}
|
||||
|
||||
// Add single DAT stats to totals
|
||||
totalSize += datdata.TotalSize;
|
||||
totalGame += newroms.Count;
|
||||
totalRom += datdata.RomCount;
|
||||
totalDisk += datdata.DiskCount;
|
||||
totalCRC += datdata.CRCCount;
|
||||
totalMD5 += datdata.MD5Count;
|
||||
totalSHA1 += datdata.SHA1Count;
|
||||
totalNodump += datdata.NodumpCount;
|
||||
}
|
||||
|
||||
// Output total DAT stats
|
||||
if (!_single) { _logger.User(""); }
|
||||
DatData totaldata = new DatData
|
||||
{
|
||||
TotalSize = totalSize,
|
||||
RomCount = totalRom,
|
||||
DiskCount = totalDisk,
|
||||
CRCCount = totalCRC,
|
||||
MD5Count = totalMD5,
|
||||
SHA1Count = totalSHA1,
|
||||
NodumpCount = totalNodump,
|
||||
};
|
||||
_logger.User(@"For ALL DATs found
|
||||
--------------------------------------------------");
|
||||
OutputStats(totaldata, _logger);
|
||||
_logger.User(@"
|
||||
Please check the log folder if the stats scrolled offscreen");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Output the stats in a human-readable format
|
||||
/// </summary>
|
||||
/// <param name="datdata">DatData object to read stats from</param>
|
||||
/// <param name="logger">Logger object for file and console writing</param>
|
||||
/// <param name="recalculate">True if numbers should be recalculated for the DAT, false otherwise (default)</param>
|
||||
public static void OutputStats(DatData datdata, Logger logger, bool recalculate = false)
|
||||
{
|
||||
if (recalculate)
|
||||
{
|
||||
// Wipe out any stats already there
|
||||
datdata.RomCount = 0;
|
||||
datdata.DiskCount = 0;
|
||||
datdata.TotalSize = 0;
|
||||
datdata.CRCCount = 0;
|
||||
datdata.MD5Count = 0;
|
||||
datdata.SHA1Count = 0;
|
||||
datdata.NodumpCount = 0;
|
||||
|
||||
// Loop through and add
|
||||
foreach (List<RomData> roms in datdata.Roms.Values)
|
||||
{
|
||||
foreach (RomData rom in roms)
|
||||
{
|
||||
datdata.RomCount += (rom.Type == "rom" ? 1 : 0);
|
||||
datdata.DiskCount += (rom.Type == "disk" ? 1 : 0);
|
||||
datdata.TotalSize += rom.Size;
|
||||
datdata.CRCCount += (String.IsNullOrEmpty(rom.CRC) ? 0 : 1);
|
||||
datdata.MD5Count += (String.IsNullOrEmpty(rom.MD5) ? 0 : 1);
|
||||
datdata.SHA1Count += (String.IsNullOrEmpty(rom.SHA1) ? 0 : 1);
|
||||
datdata.NodumpCount += (rom.Nodump ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SortedDictionary<string, List<RomData>> newroms = DatTools.BucketByGame(datdata.Roms, false, true, logger);
|
||||
logger.User(@" Uncompressed size: " + Style.GetBytesReadable(datdata.TotalSize) + @"
|
||||
Games found: " + newroms.Count + @"
|
||||
Roms found: " + datdata.RomCount + @"
|
||||
Disks found: " + datdata.DiskCount + @"
|
||||
Roms with CRC: " + datdata.CRCCount + @"
|
||||
Roms with MD5: " + datdata.MD5Count + @"
|
||||
Roms with SHA-1: " + datdata.SHA1Count + @"
|
||||
Roms with Nodump status: " + datdata.NodumpCount + @"
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
||||
256
SabreTools.Helper/Tools/Style.cs
Normal file
256
SabreTools.Helper/Tools/Style.cs
Normal file
@@ -0,0 +1,256 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
|
||||
namespace SabreTools.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Include character normalization and replacement mappings
|
||||
/// </summary>
|
||||
public class Style
|
||||
{
|
||||
/// <summary>
|
||||
/// Replace accented characters
|
||||
/// </summary>
|
||||
/// <param name="input">String to be parsed</param>
|
||||
/// <returns>String with characters replaced</returns>
|
||||
public static string NormalizeChars(string input)
|
||||
{
|
||||
string[,] charmap = {
|
||||
{ "Á", "A" }, { "á", "a" },
|
||||
{ "À", "A" }, { "à", "a" },
|
||||
{ "Â", "A" }, { "â", "a" },
|
||||
{ "Ä", "Ae" }, { "ä", "ae" },
|
||||
{ "Ã", "A" }, { "ã", "a" },
|
||||
{ "Å", "A" }, { "å", "a" },
|
||||
{ "Æ", "Ae" }, { "æ", "ae" },
|
||||
{ "Ç", "C" }, { "ç", "c" },
|
||||
{ "Ð", "D" }, { "ð", "d" },
|
||||
{ "É", "E" }, { "é", "e" },
|
||||
{ "È", "E" }, { "è", "e" },
|
||||
{ "Ê", "E" }, { "ê", "e" },
|
||||
{ "Ë", "E" }, { "ë", "e" },
|
||||
{ "ƒ", "f" },
|
||||
{ "Í", "I" }, { "í", "i" },
|
||||
{ "Ì", "I" }, { "ì", "i" },
|
||||
{ "Î", "I" }, { "î", "i" },
|
||||
{ "Ï", "I" }, { "ï", "i" },
|
||||
{ "Ñ", "N" }, { "ñ", "n" },
|
||||
{ "Ó", "O" }, { "ó", "o" },
|
||||
{ "Ò", "O" }, { "ò", "o" },
|
||||
{ "Ô", "O" }, { "ô", "o" },
|
||||
{ "Ö", "Oe" }, { "ö", "oe" },
|
||||
{ "Õ", "O" }, { "õ", "o" },
|
||||
{ "Ø", "O" }, { "ø", "o" },
|
||||
{ "Š", "S" }, { "š", "s" },
|
||||
{ "ß", "ss" },
|
||||
{ "Þ", "B" }, { "þ", "b" },
|
||||
{ "Ú", "U" }, { "ú", "u" },
|
||||
{ "Ù", "U" }, { "ù", "u" },
|
||||
{ "Û", "U" }, { "û", "u" },
|
||||
{ "Ü", "Ue" }, { "ü", "ue" },
|
||||
{ "ÿ", "y" },
|
||||
{ "Ý", "Y" }, { "ý", "y" },
|
||||
{ "Ž", "Z" }, { "ž", "z" },
|
||||
};
|
||||
|
||||
for (int i = 0; i < charmap.GetLength(0); i++)
|
||||
{
|
||||
input = input.Replace(charmap[i, 0], charmap[i, 1]);
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replace special characters and patterns
|
||||
/// </summary>
|
||||
/// <param name="input">String to be parsed</param>
|
||||
/// <returns>String with characters replaced</returns>
|
||||
public static string SearchPattern(string input)
|
||||
{
|
||||
string[,] charmap = {
|
||||
{ @"~", " - " },
|
||||
{ @"_", " " },
|
||||
{ @":", " " },
|
||||
{ @">", ")" },
|
||||
{ @"<", "(" },
|
||||
{ @"\|", "-" },
|
||||
{ "\"", "'" },
|
||||
{ @"\*", "." },
|
||||
{ @"\\", "-" },
|
||||
{ @"/", "-" },
|
||||
{ @"\?", " " },
|
||||
{ @"\(([^)(]*)\(([^)]*)\)([^)(]*)\)", " " },
|
||||
{ @"\(([^)]+)\)", " " },
|
||||
{ @"\[([^]]+)\]", " " },
|
||||
{ @"\{([^}]+)\}", " " },
|
||||
{ @"(ZZZJUNK|ZZZ-UNK-|ZZZ-UNK |zzz unknow |zzz unk |Copy of |[.][a-z]{3}[.][a-z]{3}[.]|[.][a-z]{3}[.])", " " },
|
||||
{ @" (r|rev|v|ver)\s*[\d\.]+[^\s]*", " " },
|
||||
{ @"(( )|(\A))(\d{6}|\d{8})(( )|(\Z))", " " },
|
||||
{ @"(( )|(\A))(\d{1,2})-(\d{1,2})-(\d{4}|\d{2})", " " },
|
||||
{ @"(( )|(\A))(\d{4}|\d{2})-(\d{1,2})-(\d{1,2})", " " },
|
||||
{ @"[-]+", "-" },
|
||||
{ @"\A\s*\)", " " },
|
||||
{ @"\A\s*(,|-)", " " },
|
||||
{ @"\s+", " " },
|
||||
{ @"\s+,", "," },
|
||||
{ @"\s*(,|-)\s*\Z", " " },
|
||||
};
|
||||
|
||||
for (int i = 0; i < charmap.GetLength(0); i++)
|
||||
{
|
||||
input = Regex.Replace(input, charmap[i, 0], charmap[i, 1]);
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert Cyrillic lettering to Latin lettering
|
||||
/// </summary>
|
||||
/// <param name="input">String to be parsed</param>
|
||||
/// <returns>String with characters replaced</returns>
|
||||
public static string RussianToLatin(string input)
|
||||
{
|
||||
string [,] charmap = {
|
||||
{ "А", "A" }, { "Б", "B" }, { "В", "V" }, { "Г", "G" }, { "Д", "D" },
|
||||
{ "Е", "E" }, { "Ё", "Yo" }, { "Ж", "Zh" }, { "З", "Z" }, { "И", "I" },
|
||||
{ "Й", "J" }, { "К", "K" }, { "Л", "L" }, { "М", "M" }, { "Н", "N" },
|
||||
{ "О", "O" }, { "П", "P" }, { "Р", "R" }, { "С", "S" }, { "Т", "T" },
|
||||
{ "У", "U" }, { "Ф", "f" }, { "Х", "Kh" }, { "Ц", "Ts" }, { "Ч", "Ch" },
|
||||
{ "Ш", "Sh" }, { "Щ", "Sch" }, { "Ъ", "" }, { "Ы", "y" }, { "Ь", "" },
|
||||
{ "Э", "e" }, { "Ю", "yu" }, { "Я", "ya" }, { "а", "a" }, { "б", "b" },
|
||||
{ "в", "v" }, { "г", "g" }, { "д", "d" }, { "е", "e" }, { "ё", "yo" },
|
||||
{ "ж", "zh" }, { "з", "z" }, { "и", "i" }, { "й", "j" }, { "к", "k" },
|
||||
{ "л", "l" }, { "м", "m" }, { "н", "n" }, { "о", "o" }, { "п", "p" },
|
||||
{ "р", "r" }, { "с", "s" }, { "т", "t" }, { "у", "u" }, { "ф", "f" },
|
||||
{ "х", "kh" }, { "ц", "ts" }, { "ч", "ch" }, { "ш", "sh" }, { "щ", "sch" },
|
||||
{ "ъ", "" }, { "ы", "y" }, { "ь", "" }, { "э", "e" }, { "ю", "yu" },
|
||||
{ "я", "ya" },
|
||||
};
|
||||
|
||||
for (int i = 0; i < charmap.GetLength(0); i++)
|
||||
{
|
||||
input = input.Replace(charmap[i, 0], charmap[i, 1]);
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a proper outfile name based on a DAT and output directory
|
||||
/// </summary>
|
||||
/// <param name="outDir">Output directory</param>
|
||||
/// <param name="datdata">DAT information</param>
|
||||
/// <returns>String representing the proper name</returns>
|
||||
public static string CreateOutfileName(string outDir, DatData datdata)
|
||||
{
|
||||
// Double check the outdir for the end delim
|
||||
if (!outDir.EndsWith(Path.DirectorySeparatorChar.ToString()))
|
||||
{
|
||||
outDir += Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
// Get the extension from the output type
|
||||
string extension = "";
|
||||
switch(datdata.OutputFormat)
|
||||
{
|
||||
case OutputFormat.ClrMamePro:
|
||||
case OutputFormat.DOSCenter:
|
||||
case OutputFormat.RomCenter:
|
||||
extension = ".dat";
|
||||
break;
|
||||
case OutputFormat.MissFile:
|
||||
extension = ".txt";
|
||||
break;
|
||||
case OutputFormat.SabreDat:
|
||||
case OutputFormat.Xml:
|
||||
extension = ".xml";
|
||||
break;
|
||||
}
|
||||
string filename = (String.IsNullOrEmpty(datdata.FileName) ? datdata.Description : datdata.FileName);
|
||||
string outfile = outDir + filename + extension;
|
||||
outfile = (outfile.Contains(Path.DirectorySeparatorChar.ToString() + Path.DirectorySeparatorChar.ToString()) ?
|
||||
outfile.Replace(Path.DirectorySeparatorChar.ToString() + Path.DirectorySeparatorChar.ToString(), Path.DirectorySeparatorChar.ToString()) :
|
||||
outfile);
|
||||
|
||||
Console.WriteLine(outfile);
|
||||
|
||||
return outfile;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the human-readable file size for an arbitrary, 64-bit file size
|
||||
/// The default format is "0.### XB", e.g. "4.2 KB" or "1.434 GB"
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns>Human-readable file size</returns>
|
||||
/// <link>http://www.somacon.com/p576.php</link>
|
||||
public static string GetBytesReadable(long input)
|
||||
{
|
||||
// Get absolute value
|
||||
long absolute_i = (input < 0 ? -input : input);
|
||||
// Determine the suffix and readable value
|
||||
string suffix;
|
||||
double readable;
|
||||
if (absolute_i >= 0x1000000000000000) // Exabyte
|
||||
{
|
||||
suffix = "EB";
|
||||
readable = (input >> 50);
|
||||
}
|
||||
else if (absolute_i >= 0x4000000000000) // Petabyte
|
||||
{
|
||||
suffix = "PB";
|
||||
readable = (input >> 40);
|
||||
}
|
||||
else if (absolute_i >= 0x10000000000) // Terabyte
|
||||
{
|
||||
suffix = "TB";
|
||||
readable = (input >> 30);
|
||||
}
|
||||
else if (absolute_i >= 0x40000000) // Gigabyte
|
||||
{
|
||||
suffix = "GB";
|
||||
readable = (input >> 20);
|
||||
}
|
||||
else if (absolute_i >= 0x100000) // Megabyte
|
||||
{
|
||||
suffix = "MB";
|
||||
readable = (input >> 10);
|
||||
}
|
||||
else if (absolute_i >= 0x400) // Kilobyte
|
||||
{
|
||||
suffix = "KB";
|
||||
readable = input;
|
||||
}
|
||||
else
|
||||
{
|
||||
return input.ToString("0 B"); // Byte
|
||||
}
|
||||
// Divide by 1024 to get fractional value
|
||||
readable = (readable / 1024);
|
||||
// Return formatted number with suffix
|
||||
return readable.ToString("0.### ") + suffix;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a string to sentence case.
|
||||
/// </summary>
|
||||
/// <param name="input">The string to convert.</param>
|
||||
/// <returns>A string representing a sentence case string</returns>
|
||||
/// <remarks>http://stackoverflow.com/questions/3141426/net-method-to-convert-a-string-to-sentence-case</remarks>
|
||||
public static string SentenceCase(string input)
|
||||
{
|
||||
if (input.Length < 1)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
string sentence = input.ToLower();
|
||||
return sentence[0].ToString().ToUpper() + sentence.Substring(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
SabreTools.Helper/dats.sqlite
Normal file
BIN
SabreTools.Helper/dats.sqlite
Normal file
Binary file not shown.
6
SabreTools.Helper/packages.config
Normal file
6
SabreTools.Helper/packages.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
|
||||
<package id="Mono.Data.Sqlite.Portable" version="1.0.3.5" targetFramework="net452" />
|
||||
<package id="sharpcompress" version="0.11.6" targetFramework="net452" />
|
||||
</packages>
|
||||
BIN
SabreTools.Helper/sqlite3.dll
Normal file
BIN
SabreTools.Helper/sqlite3.dll
Normal file
Binary file not shown.
BIN
SabreTools.Helper/x64/sqlite3.dll
Normal file
BIN
SabreTools.Helper/x64/sqlite3.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user