14.1 Beta 1 SDK
EmulatorPlugin13.15
Obsolete since 14.1 Beta
public abstract class Unbroken.LaunchBox.Plugins.EmulatorPlugin
Provides the schema version 1 base class for emulator integrations.
Remarks
Schema version 2 emulator integrations implement Unbroken.LaunchBox.Plugins.Emulators.IEmulatorIntegration and only the optional capability interfaces they support.Constructors
EmulatorPlugin 13.15
protected EmulatorPlugin()A summary has not been written for this member.
Properties
EmulatorName 13.15
public abstract string EmulatorName { get; }
Display name of the emulator this controller is for
Methods
public virtual Unbroken.LaunchBox.Plugins.AddSaveResponse AddSaveFile(Unbroken.LaunchBox.Plugins.AddSaveArgs args)public virtual Unbroken.LaunchBox.Plugins.PluginResponse FireEmulatorImportAction(Unbroken.LaunchBox.Plugins.ImportActionArgs args)public abstract System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.Data.IEmulator> GetApplicableEmulators(System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.Data.IEmulator> emulators)public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorBiosFile> GetBiosFilesForPlatform(string platform)public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorBiosFile> GetBiosFilesForPlatform(string emulatorApplicationPath, string platform, string commandLine)public virtual System.Collections.Generic.IReadOnlyList<string> GetCompanionSaveFiles(string primaryFilePath)public abstract string? GetCurrentVersion(string applicationPath)public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorImportAction> GetImportActions()public abstract System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorControllerVersion>? GetInstallableVersions()public virtual System.Collections.Generic.IReadOnlyDictionary<int, string> GetPotentialSaveSlots()public virtual Unbroken.LaunchBox.Plugins.GetSavesResponse GetSaves(Unbroken.LaunchBox.Plugins.GetSavesArgs args)public virtual Unbroken.LaunchBox.Plugins.PluginResponse InjectRetroAchievementsCredentials(Unbroken.LaunchBox.Plugins.InjectRetroAchievementsCredentialsArgs args)public abstract Unbroken.LaunchBox.Plugins.EmulatorInstallResponse InstallEmulator(Unbroken.LaunchBox.Plugins.InstallEmulatorArgs args)public abstract Unbroken.LaunchBox.Plugins.EmulatorSupportResponse IsPlatformSupported(string platform)public virtual bool IsSaveActive(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath)public virtual bool IsSaveContainer(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save)public virtual bool IsSecondarySaveFile(string filePath)public virtual bool IsUpdateAvailable(string? emulatorAppPath, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)public virtual bool IsUpdateAvailable(Unbroken.LaunchBox.Plugins.Data.IEmulator? emulator, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)public virtual string NormalizeCommandLineForExecutable(string commandLine, string applicationPath)public virtual Unbroken.LaunchBox.Plugins.PrepareForLaunchResponse PrepareEmulatorForLaunch(Unbroken.LaunchBox.Plugins.PrepareForLaunchArgs args)public virtual Unbroken.LaunchBox.Plugins.PluginResponse RemoveSave(Unbroken.LaunchBox.Plugins.Data.GameSaveBase? save)public virtual Unbroken.LaunchBox.Plugins.RetroAchievementSupportResponse SupportsRetroAchievements(string emulatorApplicationPath)public virtual bool SupportsSaveManagement()public virtual bool TryBackupSave(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath, string destinationFolder, out string? error)public virtual bool TryComputeSaveSignature(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath, out string? signature)public virtual bool TryGetSaveGroupInfo(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string primaryFilePath, out string? saveGroupId, out string? saveGroupName)public virtual bool UseSaveGroupIdForPersistedMatch(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save)
AddSaveFile 13.16
public virtual Unbroken.LaunchBox.Plugins.AddSaveResponse AddSaveFile(Unbroken.LaunchBox.Plugins.AddSaveArgs args)Adds a save to the emulator through the schema version 1 compatibility API.
args13.16- The save and optional overwrite decision callback.
Returns
The save result. The default implementation reports that the feature is unsupported.FireEmulatorImportAction 13.15
public virtual Unbroken.LaunchBox.Plugins.PluginResponse FireEmulatorImportAction(Unbroken.LaunchBox.Plugins.ImportActionArgs args)
Runs logic for user selected import action
args13.15- Arguments containing details on which action to fire and against the list of imported games
Returns
The response in whether the action was successfully ranGetApplicableEmulators 13.15
public abstract System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.Data.IEmulator> GetApplicableEmulators(System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.Data.IEmulator> emulators)
Determine which emulators can be associated to this controller
emulators13.15- The users existing emulators
Returns
A collection of emulators that this controller can operate againstGetBiosFilesForPlatform 13.15
public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorBiosFile> GetBiosFilesForPlatform(string platform)
Returns information on what BIOS files can or should be used with this emulator/platform combination
platform13.15- The platform for which the BIOS file would be used for
Returns
A collection of BIOS files that are associated to this emulator/platform combinationGetBiosFilesForPlatform 13.15
public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorBiosFile> GetBiosFilesForPlatform(string emulatorApplicationPath, string platform, string commandLine)
Returns information on what BIOS files can or should be used with this emulator/platform combination
emulatorApplicationPath13.15- The application path of the emulator asking for BIOS information
platform13.15- The platform for which the BIOS file would be used for
commandLine13.15- The current platform specific commandline being used by the emulator
Returns
The BIOS file descriptions for the emulator and platform.GetCompanionSaveFiles 13.27
public virtual System.Collections.Generic.IReadOnlyList<string> GetCompanionSaveFiles(string primaryFilePath)
Returns companion save files that should be associated with the primary save file.
primaryFilePath13.27- The primary save file path.
Returns
A list of companion save file paths.GetCurrentVersion 13.15
public abstract string? GetCurrentVersion(string applicationPath)
Gets the current version of the installed emulator
applicationPath13.15- Path to the emulator executable
Returns
If version can get determined the version number, else nullGetImportActions 13.15
public virtual System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorImportAction> GetImportActions()
Gets a list of options to be displayed in the ROM import wizard when this emulator is selected to be used
Returns
A collection of actions to be listed. LaunchBox will call FireImportAction after the import for any option the user selectsGetInstallableVersions 13.15
public abstract System.Collections.Generic.IEnumerable<Unbroken.LaunchBox.Plugins.EmulatorControllerVersion>? GetInstallableVersions()
Gets a list of installable versions of the emulator
Returns
A collection of installable versions of this emulatorGetPotentialSaveSlots 13.16
public virtual System.Collections.Generic.IReadOnlyDictionary<int, string> GetPotentialSaveSlots()
Get a list of save slots this emulator supports
Returns
Should return a dictionary where the key is the slot number that will be past in the GameSaveBase model used elsewhere in the plugin. The value is the label string for that slotGetSaves 13.16
public virtual Unbroken.LaunchBox.Plugins.GetSavesResponse GetSaves(Unbroken.LaunchBox.Plugins.GetSavesArgs args)
Gets a list of saves for the emulator/game in question
args13.16- Argument containing information about the game or app this request is for, as well as the emulator it's using
Returns
Response that indicates success or failure, with a list of found files on successInjectRetroAchievementsCredentials 13.22
public virtual Unbroken.LaunchBox.Plugins.PluginResponse InjectRetroAchievementsCredentials(Unbroken.LaunchBox.Plugins.InjectRetroAchievementsCredentialsArgs args)
Inject the RetroAchievements credentials from LaunchBox into the emulator
args13.22- The target emulator, credentials, and optional achievement settings to apply.
Returns
The success status and any related message.InstallEmulator 13.15
public abstract Unbroken.LaunchBox.Plugins.EmulatorInstallResponse InstallEmulator(Unbroken.LaunchBox.Plugins.InstallEmulatorArgs args)
Install the emulator
args13.15- Context regarding the installation of the emulator
Returns
Appropriate response for the requestIsPlatformSupported 13.15
public abstract Unbroken.LaunchBox.Plugins.EmulatorSupportResponse IsPlatformSupported(string platform)
Does this emulator support this platform?
platform13.15- The platform in question
Returns
Response that indicates if the platform is supported, and if this emulator is recommended for itIsSaveActive 13.27
public virtual bool IsSaveActive(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath)IsSaveContainer 13.27
public virtual bool IsSaveContainer(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save)
Indicates whether the save is stored inside a container that should remain on disk after removing the save.
save13.27- The save to check.
Returns
True if the save is stored inside a shared container.IsSecondarySaveFile 13.27
public virtual bool IsSecondarySaveFile(string filePath)
Indicates whether a save file is a secondary file within a multi-file save set.
filePath13.27- The save file path to check.
Returns
True if the file should be skipped as a secondary save file.IsUpdateAvailable 13.15
public virtual bool IsUpdateAvailable(string? emulatorAppPath, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)IsUpdateAvailable 13.15
public virtual bool IsUpdateAvailable(Unbroken.LaunchBox.Plugins.Data.IEmulator? emulator, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)NormalizeCommandLineForExecutable 13.27
public virtual string NormalizeCommandLineForExecutable(string commandLine, string applicationPath)PrepareEmulatorForLaunch 13.22
public virtual Unbroken.LaunchBox.Plugins.PrepareForLaunchResponse PrepareEmulatorForLaunch(Unbroken.LaunchBox.Plugins.PrepareForLaunchArgs args)
Called right before LaunchBox attempts to start the emulator to play the ROM in question. Used to ensure all configuration requirements are done before the game is launched.
args13.22- Details regarding what emulator and game/app is about to be launched
Returns
Return success if we can launch the gameRemoveSave 13.16
public virtual Unbroken.LaunchBox.Plugins.PluginResponse RemoveSave(Unbroken.LaunchBox.Plugins.Data.GameSaveBase? save)Deletes a save file through the schema version 1 compatibility API.
save13.16- The save to remove. Null or an empty file location requires no deletion.
Returns
Success when no deletion is needed or the file is deleted; otherwise a failure result.SupportsRetroAchievements 13.22
public virtual Unbroken.LaunchBox.Plugins.RetroAchievementSupportResponse SupportsRetroAchievements(string emulatorApplicationPath)
Does this plugin support injecting LaunchBox RetroAchievements credentials into emulator
emulatorApplicationPath13.22- The application path of the emulator in question
Returns
Response that tells LaunchBox if the plugin supports this functionality, as well as what the current values in the emulator are nowSupportsSaveManagement 13.16
public virtual bool SupportsSaveManagement()
Does this plugin allow the user to manage their game save files?
Returns
True if this plugin supports save management features, false if notTryBackupSave 13.27
public virtual bool TryBackupSave(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath, string destinationFolder, out string? error)
Attempts to extract a save into a destination folder for backup.
save13.27- The save to back up.
emulatorApplicationPath13.27- The application path of the emulator in question.
destinationFolder13.27- Destination folder to place extracted save data.
error13.27- The error message if the backup fails.
Returns
True if the backup was created, false otherwise.TryComputeSaveSignature 13.27
public virtual bool TryComputeSaveSignature(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath, out string? signature)
Attempts to compute a signature for a save (used for comparing save content).
save13.27- The save to compute the signature for.
emulatorApplicationPath13.27- The application path of the emulator in question.
signature13.27- The computed signature, if available.
Returns
True if a signature was computed, false otherwise.TryGetSaveGroupInfo 13.27
public virtual bool TryGetSaveGroupInfo(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string primaryFilePath, out string? saveGroupId, out string? saveGroupName)
Attempts to resolve persisted grouping information for a save based on its primary file path.
save13.27- The save to group.
primaryFilePath13.27- The primary save file path.
saveGroupId13.27- The resolved save group id.
saveGroupName13.27- The resolved save group name.
Returns
True if grouping information was resolved.UseSaveGroupIdForPersistedMatch 13.27
public virtual bool UseSaveGroupIdForPersistedMatch(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save)
Indicates whether a save should be matched to persisted metadata by SaveGroupId first.
save13.27- The save to check.