remove derelict CoreVersion/Introspection stuff
This commit is contained in:
parent
4018452f21
commit
b33fc4982c
|
@ -8,7 +8,6 @@ using BizHawk.Emulation.CPUs.Z80;
|
|||
|
||||
namespace BizHawk.Emulation.Consoles.Calculator
|
||||
{
|
||||
[CoreVersion("0.8.1", FriendlyName = "TI-83")]
|
||||
public class TI83 : IEmulator
|
||||
{
|
||||
//hardware
|
||||
|
|
|
@ -8,7 +8,6 @@ using BizHawk.Emulation.CPUs.M6502;
|
|||
|
||||
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||
{
|
||||
[CoreVersion("0.9.9.9",FriendlyName="NESHawk")]
|
||||
public partial class NES : IEmulator
|
||||
{
|
||||
//hardware/state
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
{
|
||||
public enum NecSystemType { TurboGrafx, TurboCD, SuperGrafx }
|
||||
|
||||
[CoreVersion("1.2.1", FriendlyName = "TurboHawk16")]
|
||||
public sealed partial class PCEngine : IEmulator
|
||||
{
|
||||
// ROM
|
||||
|
|
|
@ -11,7 +11,6 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace BizHawk.Emulation.Consoles.Sega
|
||||
{
|
||||
[CoreVersion("0.0.0.1", FriendlyName = "MegaHawk")]
|
||||
public sealed partial class Genesis : IEmulator
|
||||
{
|
||||
private int _lagcount = 0;
|
||||
|
|
|
@ -16,7 +16,6 @@ using BizHawk.Emulation.Sound;
|
|||
|
||||
namespace BizHawk.Emulation.Consoles.Sega
|
||||
{
|
||||
[CoreVersion("1.0.1", FriendlyName = "Sega 8-bit")]
|
||||
public sealed partial class SMS : IEmulator
|
||||
{
|
||||
// Constants
|
||||
|
|
|
@ -43,44 +43,6 @@ namespace BizHawk
|
|||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class CoreVersion : Attribute
|
||||
{
|
||||
public CoreVersion(string version)
|
||||
{
|
||||
this.Version = version;
|
||||
}
|
||||
|
||||
public string Version { get; set; }
|
||||
public string FriendlyName { get; set; }
|
||||
}
|
||||
|
||||
public static class Introspection
|
||||
{
|
||||
public class CoreInfo
|
||||
{
|
||||
public string ClassName, Version, FriendlyName;
|
||||
}
|
||||
|
||||
public static List<CoreInfo> GetCoreInfo()
|
||||
{
|
||||
var ret = new List<CoreInfo>();
|
||||
//scan types in this assembly to find ones that implement boards to add them to the list
|
||||
foreach (Type type in Assembly.GetExecutingAssembly().GetTypes())
|
||||
{
|
||||
var attrs = type.GetCustomAttributes(typeof(CoreVersion), true);
|
||||
if (attrs.Length == 0) continue;
|
||||
var cv = (CoreVersion)attrs[0];
|
||||
var ci = new CoreInfo();
|
||||
ci.ClassName = type.Name;
|
||||
ci.FriendlyName = cv.FriendlyName;
|
||||
if (string.IsNullOrEmpty(ci.FriendlyName)) ci.FriendlyName = ci.ClassName;
|
||||
ci.Version = cv.Version;
|
||||
ret.Add(ci);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
|
|
|
@ -122,12 +122,6 @@ namespace BizHawk.MultiClient
|
|||
Global.CoreInputComm = new CoreInputComm();
|
||||
SyncCoreInputComm();
|
||||
|
||||
Console.WriteLine("Scanning cores:");
|
||||
foreach (var ci in Introspection.GetCoreInfo())
|
||||
{
|
||||
Console.WriteLine("{0} - {1} ({2})", ci.FriendlyName, ci.Version, ci.ClassName);
|
||||
}
|
||||
|
||||
Database.LoadDatabase(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb.txt"));
|
||||
|
||||
SyncPresentationMode();
|
||||
|
|
Loading…
Reference in New Issue