diff --git a/SabreTools.Helper/Data/Build.cs b/SabreTools.Helper/Data/Build.cs
index 1af58575..1e9ce2cd 100644
--- a/SabreTools.Helper/Data/Build.cs
+++ b/SabreTools.Helper/Data/Build.cs
@@ -365,6 +365,8 @@ namespace SabreTools.Helper.Data
helptext.Add(" -ngt=, --not-gtype= Exclude only games with a given type");
helptext.Add(" Supported values are:");
helptext.Add(" None, Bios, Device, Mechanical");
+ helptext.Add(" -run, --runnable Include only items that are marked runnable");
+ helptext.Add(" -nrun, --not-run Include only items that are marked unrunnable");
helptext.Add(" -out= Output directory (overridden by --inplace)");
helptext.Add(" -mt={4} Amount of threads to use (-1 unlimted)");
diff --git a/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs b/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs
index 8a199423..1a341c94 100644
--- a/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs
+++ b/SabreTools.Helper/Dats/Partials/DatFile.Parsers.cs
@@ -1254,7 +1254,7 @@ namespace SabreTools.Helper.Dats
xtr.GetAttribute("isdevice") == "yes" ? MachineType.Device :
xtr.GetAttribute("ismechanical") == "yes" ? MachineType.Mechanical :
MachineType.None,
- Runnable = xtr.GetAttribute("runnable") == "yes",
+ Runnable = xtr.GetAttribute("runnable") == "yes" || xtr.GetAttribute("runnable") == null,
};
if (subreader.GetAttribute("supported") != null)
diff --git a/SabreTools.Helper/README.1ST b/SabreTools.Helper/README.1ST
index 37cc489e..ef08ea59 100644
--- a/SabreTools.Helper/README.1ST
+++ b/SabreTools.Helper/README.1ST
@@ -836,6 +836,12 @@ Options:
Exclude items with one of the supported values:
None, Bios, Device, Mechanical
+ -run, --runnable Include only items that are marked runnable
+ This allows users to include only verified runnable games
+
+ -nrun, --not-run Include only items that are not marked runnable
+ This allows users to include only unrunnable games
+
-out= Set the name of the output directory
This sets an output folder to be used when the files are created. If a path
is not defined, the application directory is used instead.
diff --git a/SabreTools/Partials/SabreTools_Inits.cs b/SabreTools/Partials/SabreTools_Inits.cs
index cfed6c07..d6cfe9a5 100644
--- a/SabreTools/Partials/SabreTools_Inits.cs
+++ b/SabreTools/Partials/SabreTools_Inits.cs
@@ -446,6 +446,7 @@ namespace SabreTools
/// SHA-1 of the rom to match (can use asterisk-partials)
/// Select roms without the given item status
/// Select games without the given type
+ /// Select games with the given runability
/// /* Trimming info */
/// True if we are supposed to trim names to NTFS length, false otherwise
/// True if all games should be replaced by '!', false otherwise
@@ -517,6 +518,7 @@ namespace SabreTools
string notsha1,
string notstatus,
string notgametype,
+ bool? runnable,
/* Trimming info */
bool trim,
@@ -732,7 +734,7 @@ namespace SabreTools
// Create the Filter object to be used
Filter filter = new Filter(gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, itemStatus, machineType,
- notgamename, notromname, notromtype, notcrc, notmd5, notsha1, itemNotStatus, machineNotType);
+ notgamename, notromname, notromtype, notcrc, notmd5, notsha1, itemNotStatus, machineNotType, runnable);
userInputDat.DetermineUpdateType(inputs, outDir, merge, diffMode, inplace, skip, bare, clean, softlist,
filter, trim, single, root, maxDegreeOfParallelism, _logger);
diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs
index 321b5727..b97d9dde 100644
--- a/SabreTools/SabreTools.cs
+++ b/SabreTools/SabreTools.cs
@@ -98,6 +98,7 @@ namespace SabreTools
skip = false,
updateDat = false, // SimpleSort
usegame = true;
+ bool? runnable = null;
DatFormat datFormat = 0x0;
DiffMode diffMode = 0x0;
OutputFormat outputFormat = OutputFormat.Folder;
@@ -306,6 +307,10 @@ namespace SabreTools
case "--noMD5":
noMD5 = true;
break;
+ case "-nrun":
+ case "--not-run":
+ runnable = false;
+ break;
case "-ns":
case "--noSHA1":
noSHA1 = true;
@@ -394,6 +399,10 @@ namespace SabreTools
case "--romba":
romba = true;
break;
+ case "-run":
+ case "--runnable":
+ runnable = true;
+ break;
case "-s":
case "--short":
shortname = true;
@@ -1057,7 +1066,7 @@ namespace SabreTools
superdat, forcemerge, forcend, forcepack, excludeOf, datFormat, usegame, prefix,
postfix, quotes, repext, addext, remext, datPrefix, romba, merge, diffMode, inplace, skip, removeDateFromAutomaticName,
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, status, gametype,
- notgamename, notromname, notromtype, notcrc, notmd5, notsha1, notstatus, notgametype,
+ notgamename, notromname, notromtype, notcrc, notmd5, notsha1, notstatus, notgametype, runnable,
trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism);
}