LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

EmulatorPlugin13.15

Obsolete since 14.1 Beta

EmulatorPlugin is the schema version 1 compatibility base. Schema version 2 emulator integrations should implement IEmulatorIntegration and only the optional capability interfaces they support.

C#
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

C#
protected EmulatorPlugin()

A summary has not been written for this member.

Properties

EmulatorName 13.15

C#
public abstract string EmulatorName { get; }
Display name of the emulator this controller is for

Methods

AddSaveFile 13.16

C#
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.
args 13.16
The save and optional overwrite decision callback.

Returns

The save result. The default implementation reports that the feature is unsupported.

FireEmulatorImportAction 13.15

C#
public virtual Unbroken.LaunchBox.Plugins.PluginResponse FireEmulatorImportAction(Unbroken.LaunchBox.Plugins.ImportActionArgs args)
Runs logic for user selected import action
args 13.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 ran

GetApplicableEmulators 13.15

C#
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
emulators 13.15
The users existing emulators

Returns

A collection of emulators that this controller can operate against

GetBiosFilesForPlatform 13.15

C#
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
platform 13.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 combination

GetBiosFilesForPlatform 13.15

C#
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
emulatorApplicationPath 13.15
The application path of the emulator asking for BIOS information
platform 13.15
The platform for which the BIOS file would be used for
commandLine 13.15
The current platform specific commandline being used by the emulator

Returns

The BIOS file descriptions for the emulator and platform.

GetCompanionSaveFiles 13.27

C#
public virtual System.Collections.Generic.IReadOnlyList<string> GetCompanionSaveFiles(string primaryFilePath)
Returns companion save files that should be associated with the primary save file.
primaryFilePath 13.27
The primary save file path.

Returns

A list of companion save file paths.

GetCurrentVersion 13.15

C#
public abstract string? GetCurrentVersion(string applicationPath)
Gets the current version of the installed emulator
applicationPath 13.15
Path to the emulator executable

Returns

If version can get determined the version number, else null

GetImportActions 13.15

C#
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 selects

GetInstallableVersions 13.15

C#
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 emulator

GetPotentialSaveSlots 13.16

C#
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 slot

GetSaves 13.16

C#
public virtual Unbroken.LaunchBox.Plugins.GetSavesResponse GetSaves(Unbroken.LaunchBox.Plugins.GetSavesArgs args)
Gets a list of saves for the emulator/game in question
args 13.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 success

InjectRetroAchievementsCredentials 13.22

C#
public virtual Unbroken.LaunchBox.Plugins.PluginResponse InjectRetroAchievementsCredentials(Unbroken.LaunchBox.Plugins.InjectRetroAchievementsCredentialsArgs args)
Inject the RetroAchievements credentials from LaunchBox into the emulator
args 13.22
The target emulator, credentials, and optional achievement settings to apply.

Returns

The success status and any related message.

InstallEmulator 13.15

C#
public abstract Unbroken.LaunchBox.Plugins.EmulatorInstallResponse InstallEmulator(Unbroken.LaunchBox.Plugins.InstallEmulatorArgs args)
Install the emulator
args 13.15
Context regarding the installation of the emulator

Returns

Appropriate response for the request

IsPlatformSupported 13.15

C#
public abstract Unbroken.LaunchBox.Plugins.EmulatorSupportResponse IsPlatformSupported(string platform)
Does this emulator support this platform?
platform 13.15
The platform in question

Returns

Response that indicates if the platform is supported, and if this emulator is recommended for it

IsSaveActive 13.27

C#
public virtual bool IsSaveActive(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save, string emulatorApplicationPath)
Checks whether a save is currently active for the emulator.
save 13.27
The save to check.
emulatorApplicationPath 13.27
The application path of the emulator in question.

Returns

True if the save should be treated as active.

IsSaveContainer 13.27

C#
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.
save 13.27
The save to check.

Returns

True if the save is stored inside a shared container.

IsSecondarySaveFile 13.27

C#
public virtual bool IsSecondarySaveFile(string filePath)
Indicates whether a save file is a secondary file within a multi-file save set.
filePath 13.27
The save file path to check.

Returns

True if the file should be skipped as a secondary save file.

IsUpdateAvailable 13.15

C#
public virtual bool IsUpdateAvailable(string? emulatorAppPath, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)
Checks whether an existing installation can be updated to a newer one.
emulatorAppPath 13.15
The application path of the emulator in question
version 13.15
The name of the version to be used in a message box explaining an update was found

Returns

True if this emulator can be updated, otherwise false

IsUpdateAvailable 13.15

C#
public virtual bool IsUpdateAvailable(Unbroken.LaunchBox.Plugins.Data.IEmulator? emulator, out Unbroken.LaunchBox.Plugins.EmulatorControllerVersion? version)
Checks whether an existing installation can be updated to a newer one.
emulator 13.15
The emulator in question
version 13.15
The name of the version to be used in a message box explaining an update was found

Returns

True if this emulator can be updated, otherwise false

NormalizeCommandLineForExecutable 13.27

C#
public virtual string NormalizeCommandLineForExecutable(string commandLine, string applicationPath)
Allows an emulator plugin to normalize the command line based on the executable path.
commandLine 13.27
The command line to normalize.
applicationPath 13.27
The emulator executable path.

Returns

The normalized command line.

PrepareEmulatorForLaunch 13.22

C#
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.
args 13.22
Details regarding what emulator and game/app is about to be launched

Returns

Return success if we can launch the game

RemoveSave 13.16

C#
public virtual Unbroken.LaunchBox.Plugins.PluginResponse RemoveSave(Unbroken.LaunchBox.Plugins.Data.GameSaveBase? save)
Deletes a save file through the schema version 1 compatibility API.
save 13.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

C#
public virtual Unbroken.LaunchBox.Plugins.RetroAchievementSupportResponse SupportsRetroAchievements(string emulatorApplicationPath)
Does this plugin support injecting LaunchBox RetroAchievements credentials into emulator
emulatorApplicationPath 13.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 now

SupportsSaveManagement 13.16

C#
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 not

TryBackupSave 13.27

C#
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.
save 13.27
The save to back up.
emulatorApplicationPath 13.27
The application path of the emulator in question.
destinationFolder 13.27
Destination folder to place extracted save data.
error 13.27
The error message if the backup fails.

Returns

True if the backup was created, false otherwise.

TryComputeSaveSignature 13.27

C#
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).
save 13.27
The save to compute the signature for.
emulatorApplicationPath 13.27
The application path of the emulator in question.
signature 13.27
The computed signature, if available.

Returns

True if a signature was computed, false otherwise.

TryGetSaveGroupInfo 13.27

C#
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.
save 13.27
The save to group.
primaryFilePath 13.27
The primary save file path.
saveGroupId 13.27
The resolved save group id.
saveGroupName 13.27
The resolved save group name.

Returns

True if grouping information was resolved.

UseSaveGroupIdForPersistedMatch 13.27

C#
public virtual bool UseSaveGroupIdForPersistedMatch(Unbroken.LaunchBox.Plugins.Data.GameSaveBase save)
Indicates whether a save should be matched to persisted metadata by SaveGroupId first.
save 13.27
The save to check.

Returns

True if SaveGroupId should be used for persisted matching.