Make `IDriveLight` optional for cores

This commit is contained in:
YoshiRulz 2024-09-26 13:41:34 +10:00
parent c22f2ab4f5
commit bcd13fe37f
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
35 changed files with 12 additions and 35 deletions

View File

@ -11,7 +11,6 @@ namespace BizHawk.Emulation.Common
typeof(ICodeDataLogger),
typeof(IDebuggable),
typeof(IDisassemblable),
typeof(IDriveLight),
typeof(IInputPollable),
typeof(IMemoryDomains),
typeof(IRegionable),

View File

@ -4,7 +4,7 @@
/// Specifies an interface for returning the state of a LED drive light such as on Disk and CD Drives,
/// If available the client will display a light that turns on and off based on the drive light status
/// </summary>
public interface IDriveLight : IEmulatorService
public interface IDriveLight : ISpecializedEmulatorService
{
/// <summary>
/// Gets a value indicating whether there is currently a Drive light available

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Cores.Components.Z80A;
namespace BizHawk.Emulation.Cores.Calculators.TI83
{
[Core(CoreNames.TI83Hawk, "zeromus")]
[ServiceNotApplicable(new[] { typeof(IBoardInfo), typeof(IDriveLight), typeof(IRegionable), typeof(ISaveRam), typeof(ISoundProvider) })]
[ServiceNotApplicable(new[] { typeof(IBoardInfo), typeof(IRegionable), typeof(ISaveRam), typeof(ISoundProvider) })]
public partial class TI83 : TI83Common, IEmulator, IVideoProvider, IDebuggable, IInputPollable
{
[CoreConstructor(VSystemID.Raw.TI83)]

View File

@ -7,7 +7,6 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.MSX
{
[Core(CoreNames.MSXHawk, "", isReleased: true)]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class MSX : IEmulator, IVideoProvider, ISoundProvider, ISaveRam, IInputPollable, IRegionable, ISettable<MSX.MSXSettings, MSX.MSXSyncSettings>
{
[CoreConstructor(VSystemID.Raw.MSX)]

View File

@ -9,7 +9,6 @@ using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Emulation.Cores.Computers.TIC80
{
[PortedCore(CoreNames.TIC80, "nesbox", "v1.0.2164", "https://tic80.com/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), })]
public sealed partial class TIC80 : WaterboxCore
{
private readonly LibTIC80 _core;

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
[Core(CoreNames.Atari2600Hawk, "Micro500, Alyosha, adelikat, natt")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(ISaveRam) })]
[ServiceNotApplicable(new[] { typeof(ISaveRam) })]
public partial class Atari2600 : IEmulator, IDebuggable, IInputPollable, IBoardInfo, IRomInfo,
IRegionable, ICreateGameDBEntries, ISettable<Atari2600.A2600Settings, Atari2600.A2600SyncSettings>
{

View File

@ -6,7 +6,7 @@ using BizHawk.Common.NumberExtensions;
namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
{
[Core(CoreNames.A7800Hawk, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(ISettable<,>) })]
[ServiceNotApplicable(new[] { typeof(ISettable<,>) })]
public partial class A7800Hawk : IEmulator, ISaveRam, IDebuggable, IInputPollable,
IRegionable, IBoardInfo, ISettable<object, A7800Hawk.A7800SyncSettings>
{

View File

@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
author: "The Stella Team",
// portedVersion: "", //TODO
portedUrl: "https://stella-emu.github.io")]
[ServiceNotApplicable([ typeof(IDriveLight), typeof(ISaveRam) ])]
[ServiceNotApplicable([ typeof(ISaveRam) ])]
public partial class Stella : IRomInfo, IRegionable
{
[CoreConstructor(VSystemID.Raw.A26)]

View File

@ -9,7 +9,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Atari.Lynx
{
[PortedCore(CoreNames.Handy, "K. Wilkins, Mednafen Team", "0.9.34.1", "https://mednafen.github.io/releases/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable), typeof(ISettable<,>) })]
[ServiceNotApplicable(new[] { typeof(IRegionable), typeof(ISettable<,>) })]
public partial class Lynx : IEmulator, IVideoProvider, ISoundProvider, ISaveRam, IStatable, IInputPollable
{
private static readonly LibLynx LibLynx;

View File

@ -4,7 +4,7 @@ using BizHawk.Emulation.Cores.Components.Z80A;
namespace BizHawk.Emulation.Cores.ColecoVision
{
[Core(CoreNames.ColecoHawk, "Vecna")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(ISaveRam) })]
[ServiceNotApplicable(new[] { typeof(ISaveRam) })]
public sealed partial class ColecoVision : IEmulator, IDebuggable, IInputPollable, ISettable<ColecoVision.ColecoSettings, ColecoVision.ColecoSyncSettings>
{
[CoreConstructor(VSystemID.Raw.Coleco)]

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Components.MC6809;
namespace BizHawk.Emulation.Cores.Consoles.Vectrex
{
[Core(CoreNames.VectrexHawk, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class VectrexHawk : IEmulator, ISaveRam, IDebuggable, IInputPollable, IRegionable,
ISettable<object, VectrexHawk.VectrexSyncSettings>
{

View File

@ -4,7 +4,7 @@ using BizHawk.Emulation.Cores.Components.CP1610;
namespace BizHawk.Emulation.Cores.Intellivision
{
[Core(CoreNames.IntelliHawk, "BrandonE, Alyosha")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable), typeof(ISaveRam) })]
[ServiceNotApplicable(new[] { typeof(IRegionable), typeof(ISaveRam) })]
public sealed partial class Intellivision : IEmulator, IInputPollable, IDisassemblable,
IBoardInfo, IDebuggable, ISettable<Intellivision.IntvSettings, Intellivision.IntvSyncSettings>
{

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Components.I8048;
namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
{
[Core(CoreNames.O2Hawk, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class O2Hawk : IEmulator, ISaveRam, IDebuggable, IInputPollable, IRegionable, ISettable<O2Hawk.O2Settings, O2Hawk.O2SyncSettings>, IBoardInfo
{
// memory domains

View File

@ -13,7 +13,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.N3DS
{
[PortedCore(CoreNames.Encore, "", "nightly-2104", "https://github.com/CasualPokePlayer/encore", singleInstance: true)]
[ServiceNotApplicable([ typeof(IDriveLight), typeof(IRegionable) ])]
[ServiceNotApplicable([ typeof(IRegionable) ])]
public partial class Encore
{
private static DynamicLibraryImportResolver _resolver;

View File

@ -9,7 +9,6 @@ using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Ares64
{
[PortedCore(CoreNames.Ares64, "ares team, Near", "v138", "https://ares-emu.net/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), })]
public partial class Ares64 : WaterboxCore, IRegionable
{
private readonly LibAres64 _core;

View File

@ -14,7 +14,6 @@ using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Emulation.Cores.Nintendo.BSNES
{
[PortedCore(CoreNames.Bsnes115, "bsnes team", "v115+", "https://github.com/bsnes-emu/bsnes")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class BsnesCore : IEmulator, IDebuggable, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ISettable<BsnesCore.SnesSettings, BsnesCore.SnesSyncSettings>, IBSNESForGfxDebugger, IBoardInfo
{
[CoreConstructor(VSystemID.Raw.Satellaview)]

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Nintendo.SNES;
namespace BizHawk.Emulation.Cores.Nintendo.BSNES
{
[PortedCore(CoreNames.SubBsnes115, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public class SubBsnesCore : IEmulator, ICycleTiming
{
[CoreConstructor(VSystemID.Raw.Satellaview)]

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.GBA
{
[PortedCore(CoreNames.Mgba, "endrift", "0.11", "https://mgba.io/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable) })]
[ServiceNotApplicable(new[] { typeof(IRegionable) })]
public partial class MGBAHawk
{
private static readonly LibmGBA LibmGBA;

View File

@ -20,7 +20,6 @@ using BizHawk.Common.ReflectionExtensions;
namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
{
[Core(CoreNames.GbHawk, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GBHawk : IEmulator, ISaveRam, IDebuggable, IInputPollable, IRegionable, IGameboyCommon,
ISettable<GBHawk.GBSettings, GBHawk.GBSyncSettings>
{

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Nintendo.GBHawk;
namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
{
[Core(CoreNames.GBHawkLink, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GBHawkLink : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IRegionable, ILinkable,
ISettable<GBHawkLink.GBLinkSettings, GBHawkLink.GBLinkSyncSettings>,
ILinkedGameBoyCommon

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Nintendo.GBHawk;
namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x
{
[Core(CoreNames.GBHawkLink3x, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GBHawkLink3x : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IRegionable,
ISettable<GBHawkLink3x.GBLink3xSettings, GBHawkLink3x.GBLink3xSyncSettings>,
ILinkedGameBoyCommon

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Nintendo.GBHawk;
namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x
{
[Core(CoreNames.GBHawkLink4x, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GBHawkLink4x : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IRegionable,
ISettable<GBHawkLink4x.GBLink4xSettings, GBHawkLink4x.GBLink4xSyncSettings>,
ILinkedGameBoyCommon

View File

@ -13,7 +13,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
/// a gameboy/gameboy color emulator wrapped around native C++ libgambatte
/// </summary>
[PortedCore(CoreNames.Gambatte, "sinamas/PSR org", "r830", "https://github.com/pokemon-speedrunning/gambatte-core")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class Gameboy : IInputPollable, IRomInfo, IGameboyCommon, ICycleTiming, ILinkable
{
/// <remarks>HACK disables BIOS requirement if the environment looks like a test runner...</remarks>

View File

@ -7,7 +7,6 @@ using BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
[PortedCore(CoreNames.GambatteLink, "sinamas/natt")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GambatteLink : ILinkable, ILinkedGameBoyCommon, IRomInfo
{
[CoreConstructor(VSystemID.Raw.GBL)]

View File

@ -7,7 +7,6 @@ using BizHawk.Emulation.Cores.Nintendo.N64.NativeApi;
namespace BizHawk.Emulation.Cores.Nintendo.N64
{
[PortedCore(CoreNames.Mupen64Plus, "", "2.0", "https://code.google.com/p/mupen64plus/", singleInstance: true)]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class N64 : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IDisassemblable, IRegionable,
ISettable<N64Settings, N64SyncSettings>
{

View File

@ -18,7 +18,7 @@ using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
{
[PortedCore(CoreNames.MelonDS, "Arisotura", "0.9.5", "https://melonds.kuribo64.net/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable) })]
[ServiceNotApplicable(new[] { typeof(IRegionable) })]
public sealed partial class NDS : WaterboxCore
{
private readonly LibMelonDS _core;

View File

@ -16,7 +16,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
author: "SergioMartin86, kode54, Blargg",
portedVersion: "1.0.0",
portedUrl: "https://github.com/SergioMartin86/quickerNES")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public sealed partial class QuickNES : IEmulator, IVideoProvider, ISoundProvider, ISaveRam, IInputPollable,
IBoardInfo, IVideoLogicalOffsets, IStatable, IDebuggable,
ISettable<QuickNES.QuickNESSettings, QuickNES.QuickNESSyncSettings>, INESPPUViewable

View File

@ -18,7 +18,6 @@ using BizHawk.Emulation.Cores.Components.W65816;
namespace BizHawk.Emulation.Cores.Nintendo.SNES
{
[PortedCore(CoreNames.Bsnes, "byuu", "v87", "https://github.com/bsnes-emu/bsnes/tree/v087")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public unsafe partial class LibsnesCore : IEmulator, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ICodeDataLogger,
IDebuggable, ISettable<LibsnesCore.SnesSettings, LibsnesCore.SnesSyncSettings>, IBSNESForGfxDebugger
{

View File

@ -8,7 +8,6 @@ using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
{
[PortedCore(CoreNames.Snes9X, "", "e49165c", "https://github.com/snes9xgit/snes9x")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public class Snes9x : WaterboxCore,
ISettable<Snes9x.Settings, Snes9x.SyncSettings>, IRegionable
{

View File

@ -13,7 +13,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy
/// a gameboy/gameboy color emulator wrapped around native C libsameboy
/// </summary>
[PortedCore(CoreNames.Sameboy, "LIJI32", "0.16.3", "https://github.com/LIJI32/SameBoy")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class Sameboy : ICycleTiming, IInputPollable, ILinkable, IRomInfo, IBoardInfo, IGameboyCommon
{
private static readonly LibSameboy LibSameboy;

View File

@ -5,7 +5,6 @@ using BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy;
namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk
{
[Core(CoreNames.SubGbHawk, "")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class SubGBHawk : IEmulator, IStatable, IInputPollable,
ISettable<GBHawk.GBHawk.GBSettings, GBHawk.GBHawk.GBSyncSettings>, IDebuggable, ICycleTiming, IGameboyCommon
{

View File

@ -4,7 +4,6 @@ using BizHawk.Emulation.Cores.Sega.MasterSystem;
namespace BizHawk.Emulation.Cores.Sega.GGHawkLink
{
[Core(CoreNames.GGHawkLink, "", isReleased: false)]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class GGHawkLink : IEmulator, ISaveRam, IDebuggable, IStatable, IInputPollable, IRegionable, ILinkable,
ISettable<GGHawkLink.GGLinkSettings, GGHawkLink.GGLinkSyncSettings>
{

View File

@ -13,7 +13,6 @@ using BizHawk.Emulation.Cores.Components.Z80A;
namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{
[Core(CoreNames.SMSHawk, "Vecna")]
[ServiceNotApplicable(new[] { typeof(IDriveLight) })]
public partial class SMS : IEmulator, ISoundProvider, ISaveRam, IInputPollable, IRegionable,
IDebuggable, ISettable<SMS.SmsSettings, SMS.SmsSyncSettings>, ICodeDataLogger
{

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.WonderSwan
{
[PortedCore(CoreNames.Cygne, "Dox, Mednafen Team", "1.24.3", "https://mednafen.github.io/releases/")]
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable) })]
[ServiceNotApplicable(new[] { typeof(IRegionable) })]
public partial class WonderSwan : IEmulator, IVideoProvider, ISoundProvider,
IInputPollable, IDebuggable
{

View File

@ -11,7 +11,6 @@ namespace BizHawk.Emulation.Cores.Libretro
// nb: multiple libretro cores could theoretically be ran at once
// but all of them would need to be different cores, a core itself is single instance
[PortedCore(CoreNames.Libretro, "CasualPokePlayer", singleInstance: true, isReleased: false)]
[ServiceNotApplicable([ typeof(IDriveLight) ])]
public partial class LibretroHost
{
private static readonly LibretroBridge bridge;