diff --git a/.global.editorconfig.ini b/.global.editorconfig.ini index 0849584d616..53b716af918 100644 --- a/.global.editorconfig.ini +++ b/.global.editorconfig.ini @@ -1,8 +1,59 @@ is_global = true +## misc. C# compiler/language warnings + # Obsolete member 'memberA' overrides non-obsolete member 'memberB' (this simply doesn't work, see https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0809#methods-recognized-as-obsolete) dotnet_diagnostic.CS0809.severity = error +## CLS compliance (F#/VB.NET compatibility) warnings + +# `__arglist` in CLS-compliant context +dotnet_diagnostic.CS3000.severity = error +# illegal parameter type (e.g. `uint`) in CLS-compliant context +dotnet_diagnostic.CS3001.severity = error +# illegal member return type (e.g. `uint`) in CLS-compliant context +dotnet_diagnostic.CS3002.severity = error +# illegal field(?) type (e.g. `uint`) in CLS-compliant context +dotnet_diagnostic.CS3003.severity = error +# type and member identifiers in CLS-compliant context can only contain certain characters(?) +dotnet_diagnostic.CS3004.severity = error +# type or member identifier collision in CLS-compliant context (case-insensitive comparison) +dotnet_diagnostic.CS3005.severity = error +# type or member identifier may not begin with '_' in CLS-compliant context +dotnet_diagnostic.CS3008.severity = error +# type with non-CLS-compliant supertype cannot be CLS-compliant +dotnet_diagnostic.CS3009.severity = error +# CLS-compliant interface may not have non-CLS-compliant members +dotnet_diagnostic.CS3010.severity = error +# member of CLS-compliant type must be CLS-compliant and/or concrete (non-`abstract`) +dotnet_diagnostic.CS3011.severity = error +# `[module:CLSCompliant]` compiled without `/target:module` +dotnet_diagnostic.CS3012.severity = error +# `[module:CLSCompliant]` missing when `[assembly:CLSCompliant]` present +dotnet_diagnostic.CS3013.severity = error +# `[CLSCompliant]` applied to member without `[assembly:CLSCompliant]` present +dotnet_diagnostic.CS3014.severity = error +# CLS-compliant `Attribute` subclass declares a constructor with illegal parameter types (e.g. `int[]`) +dotnet_diagnostic.CS3015.severity = error +# `[module:CLSCompliant]` doesn't match `[assembly:CLSCompliant]` +dotnet_diagnostic.CS3017.severity = error +# inner type with non-CLS-compliant outer type cannot be CLS-compliant +dotnet_diagnostic.CS3018.severity = error +# `[CLSCompliant]` applied to `internal` type or member +dotnet_diagnostic.CS3019.severity = error +# `[CLSCompliant]` applied to type without `[assembly:CLSCompliant]` present +dotnet_diagnostic.CS3021.severity = error +# `[CLSCompliant]` applied to parameter +dotnet_diagnostic.CS3022.severity = error +# `[CLSCompliant]` applied to member return type +dotnet_diagnostic.CS3023.severity = error +# type with non-CLS-compliant type parameter constraint cannot be CLS-compliant +dotnet_diagnostic.CS3024.severity = error +# `volatile` in CLS-compliant context +dotnet_diagnostic.CS3026.severity = error +# interface with non-CLS-compliant superinterface cannot be CLS-compliant +dotnet_diagnostic.CS3027.severity = error + ## BizHawk internal rules # Do not use anonymous delegates @@ -73,6 +124,8 @@ dotnet_diagnostic.BHI3300.severity = error # Do not declare static members on generic types dotnet_diagnostic.CA1000.severity = error +# Mark assemblies with CLSCompliantAttribute +#dotnet_diagnostic.CA1014.severity = warning # Properties should not be write only dotnet_diagnostic.CA1044.severity = error # Do not raise exceptions in unexpected locations diff --git a/ExternalProjects/AnalyzersCommon/DiagnosticDescriptorExtensions.cs b/ExternalProjects/AnalyzersCommon/DiagnosticDescriptorExtensions.cs index 034b1df8548..5405c2462f8 100644 --- a/ExternalProjects/AnalyzersCommon/DiagnosticDescriptorExtensions.cs +++ b/ExternalProjects/AnalyzersCommon/DiagnosticDescriptorExtensions.cs @@ -6,6 +6,7 @@ namespace BizHawk.Analyzers; using MI = System.Runtime.CompilerServices.MethodImplAttribute; using OAC = Microsoft.CodeAnalysis.Diagnostics.OperationAnalysisContext; using SNAC = Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext; +using SPC = Microsoft.CodeAnalysis.SourceProductionContext; public static class DDExtensions { @@ -91,6 +92,10 @@ public static void ReportAt(this DD diag, Location location, OAC ctx, object?[]? public static void ReportAt(this DD diag, Location location, SNAC ctx, object?[]? messageArgs = null) => ctx.ReportDiagnostic(Diagnostic.Create(diag, location, messageArgs: messageArgs)); + [MI(AggressiveInlining)] + public static void ReportAt(this DD diag, Location location, SPC ctx, object?[]? messageArgs = null) + => ctx.ReportDiagnostic(Diagnostic.Create(diag, location, messageArgs: messageArgs)); + [MI(AggressiveInlining)] public static void ReportAt(this DD diag, Location location, OAC ctx, string message) => diag.ReportAt(location, ctx, [ message ]); @@ -167,6 +172,10 @@ public static void ReportAt(this DD diag, SyntaxNode location, OAC ctx, object?[ public static void ReportAt(this DD diag, SyntaxNode location, SNAC ctx, object?[]? messageArgs = null) => diag.ReportAt(location.GetLocation(), ctx, messageArgs); + [MI(AggressiveInlining)] + public static void ReportAt(this DD diag, SyntaxNode location, SPC ctx, object?[]? messageArgs = null) + => diag.ReportAt(location.GetLocation(), ctx, messageArgs); + [MI(AggressiveInlining)] public static void ReportAt(this DD diag, SyntaxNode location, OAC ctx, string message) => diag.ReportAt(location, ctx, [ message ]); @@ -175,6 +184,10 @@ public static void ReportAt(this DD diag, SyntaxNode location, OAC ctx, string m public static void ReportAt(this DD diag, SyntaxNode location, SNAC ctx, string message) => diag.ReportAt(location, ctx, [ message ]); + [MI(AggressiveInlining)] + public static void ReportAt(this DD diag, SyntaxNode location, SPC ctx, string message) + => diag.ReportAt(location, ctx, [ message ]); + [MI(AggressiveInlining)] public static void ReportAt( this DD diag, diff --git a/ExternalProjects/AnalyzersCommon/RoslynUtils.cs b/ExternalProjects/AnalyzersCommon/RoslynUtils.cs index 06396f021fd..9de9bb17959 100644 --- a/ExternalProjects/AnalyzersCommon/RoslynUtils.cs +++ b/ExternalProjects/AnalyzersCommon/RoslynUtils.cs @@ -50,9 +50,7 @@ public static IEnumerable AllEnclosingTypes(this ITypeSymbol? typeS public static bool? GetIsCLSCompliant(this ITypeSymbol typeSym, ISymbol clsCompliantAttrSym) => typeSym.AllEnclosingTypes().Prepend(typeSym) - .Select(typeSym1 => typeSym1.GetAttributes() - .FirstOrDefault(ad => clsCompliantAttrSym.Matches(ad.AttributeClass)) - ?.ConstructorArguments[0].Value as bool?) + .Select(typeSym1 => typeSym1.GetOwnCLSCompliantValue(clsCompliantAttrSym)) .FirstOrDefault(static tristate => tristate is not null); public static string GetMethodName(this ConversionOperatorDeclarationSyntax cods) @@ -112,6 +110,10 @@ public static string GetMethodName(this OperatorDeclarationSyntax ods) _ => throw new ArgumentException(paramName: nameof(ods), message: "pretend this is a BHI6660 unexpected token in AST (in this case, a new kind of operator was added to C#)"), }; + public static bool? GetOwnCLSCompliantValue(this ITypeSymbol typeSym, ISymbol clsCompliantAttrSym) + => typeSym.GetAttributes().FirstOrDefault(ad => clsCompliantAttrSym.Matches(ad.AttributeClass)) + ?.ConstructorArguments[0].Value as bool?; + private static ITypeSymbol? GetThrownExceptionType(this SemanticModel model, ExpressionSyntax exprSyn) => exprSyn is ObjectCreationExpressionSyntax ? model.GetTypeInfo(exprSyn).Type diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/.gitignore b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/.gitignore new file mode 100644 index 00000000000..4c7473dedd6 --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/.gitignore @@ -0,0 +1,2 @@ +/bin +/obj diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/AutoderiveCLSComplianceAttribute.cs b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/AutoderiveCLSComplianceAttribute.cs new file mode 100644 index 00000000000..cc959355072 --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/AutoderiveCLSComplianceAttribute.cs @@ -0,0 +1,11 @@ +#pragma warning disable +#nullable enable // for when this file is embedded + +using System; + +namespace BizHawk.SrcGen.CLSCompliance +{ + [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Class)] + public sealed class AutoderiveCLSComplianceAttribute : Attribute {} +} +#pragma warning restore diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/BizHawk.SrcGen.CLSCompliance.csproj b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/BizHawk.SrcGen.CLSCompliance.csproj new file mode 100644 index 00000000000..46dbd2596aa --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/BizHawk.SrcGen.CLSCompliance.csproj @@ -0,0 +1,6 @@ + + + netstandard2.0 + + + diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/CLSComplianceGenerator.cs b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/CLSComplianceGenerator.cs new file mode 100644 index 00000000000..02cd188d835 --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/CLSComplianceGenerator.cs @@ -0,0 +1,108 @@ +namespace BizHawk.SrcGen.CLSCompliance; + +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Text; + +using BizHawk.Analyzers; + +[Generator] +public sealed class CLSComplianceGenerator : IIncrementalGenerator +{ + private static readonly DiagnosticDescriptor DiagTest = new( + id: "BHI1337", + title: "test", + messageFormat: "{0}", + category: "Usage", + defaultSeverity: DiagnosticSeverity.Warning, + isEnabledByDefault: true); + + public void Initialize(IncrementalGeneratorInitializationContext context) + { + var declSyns0 = context.SyntaxProvider.CreateSyntaxProvider( + predicate: static (syntaxNode, _) => syntaxNode is TypeDeclarationSyntax, // excludes enums because they can't be `partial`; you'll have to add the attribute explicitly + transform: static (ctx, _) => (TypeDeclarationSyntax) ctx.Node); + context.RegisterSourceOutput(context.CompilationProvider.Combine(declSyns0.Collect()), Execute); + } + + private static void Execute( + SourceProductionContext context, + (Compilation Compilation, ImmutableArray DeclSyns) receiver) + { + var clsCompliantAttrSym = receiver.Compilation.GetTypeByMetadataName(typeof(CLSCompliantAttribute).FullName)!; + bool? InheritedCLSCompliant(ITypeSymbol typeSym) + => typeSym.AllBaseTypes().Select(typeSym1 => typeSym1.GetOwnCLSCompliantValue(clsCompliantAttrSym)) + .FirstOrDefault(static tristate => tristate is not null); + string? NodesToNamespaceBlock( + IGrouping group) + { + StringBuilder sb = new(); + HashSet seen = new(); // `DistinctBy` only exists in .NET Core >:( + foreach (var (syn, sym, _) in group) + { + if (!seen.Add(sym.Name)) continue; // dedup partials + if (sym.GetIsCLSCompliant(clsCompliantAttrSym) is not null) continue; // already set explicitly + var accessMod = "internal"; + var hasPartial = false; + foreach (var mod in syn.Modifiers) + { + if (mod.Text is "public" or "internal" or "protected" or "private") + { + accessMod = mod.Text; + if (accessMod is not "public") break; + } + else if (mod.Text is "partial") hasPartial = true; // initially set this up for `static class`, `readonly struct`, etc. but it turns out you don't need to repeat them + } + if (accessMod is not "public") continue; + if (!hasPartial) + { +// DiagTest.ReportAt(syn, context, "make this type partial"); + continue; + } + sb.AppendFormat( + "\t[CLSCompliant({0})]\n\t{1} partial {2} {3}{4} {{}}\n\n", + (InheritedCLSCompliant(sym) ?? true).ToString().ToLowerInvariant(), + accessMod, + syn switch + { + ClassDeclarationSyntax => "class", + InterfaceDeclarationSyntax => "interface", + RecordDeclarationSyntax rds => $"record {rds.ClassOrStructKeyword.Text}", + StructDeclarationSyntax => "struct", + _ => throw new InvalidOperationException("pretend this is a BHI6660 unexpected node in AST (in this case, a new kind of type declaration was added to C#)"), + }, + syn.Identifier.Text, + syn.TypeParameterList?.ToString() ?? string.Empty); + } + return sb.Length is 0 ? null : $"\n\nnamespace {group.Key}\n{{\n{sb}}}"; + } + + var compilation = receiver.Compilation; + var clsCompliantSym = compilation.GetTypeByMetadataName(typeof(CLSCompliantAttribute).FullName)!; + List<(TypeDeclarationSyntax Syn, INamedTypeSymbol Sym, string Namespace)> typeDecls = new(); + foreach (var tuple in receiver.DeclSyns + .Select(tds => (Syn: tds, Sym: compilation.GetSemanticModel(tds.SyntaxTree)!.GetDeclaredSymbol(tds, context.CancellationToken)!)) + .Where(tuple => tuple.Sym.GetIsCLSCompliant(clsCompliantSym) is null)) + { + var parentSyn = tuple.Syn.Parent; + var nds = parentSyn as NamespaceDeclarationSyntax; + if (nds is not null) + { + typeDecls.Add(( + tuple.Syn, + tuple.Sym, + nds.Name.ToMetadataNameStr() ?? string.Empty)); + } + else if (parentSyn is not null) // must be a type decl. with this as its inner class/struct + { + //TODO warn + } + } + var src = $"#pragma warning disable MA0104{string.Concat( + typeDecls.GroupBy(static tuple => tuple.Namespace) + .Select(NodesToNamespaceBlock) + .Where(static s => s is not null))}"; + context.AddSource("CLSCompliance.cs", SourceText.From(src, Encoding.UTF8)); + } +} diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_debug.sh b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_debug.sh new file mode 120000 index 00000000000..c2127aded12 --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_debug.sh @@ -0,0 +1 @@ +../.build_debug.sh \ No newline at end of file diff --git a/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_release.sh b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_release.sh new file mode 120000 index 00000000000..801b8e5998a --- /dev/null +++ b/ExternalProjects/BizHawk.SrcGen.CLSCompliance/build_release.sh @@ -0,0 +1 @@ +../.build_release.sh \ No newline at end of file diff --git a/References/BizHawk.SrcGen.CLSCompliance.dll b/References/BizHawk.SrcGen.CLSCompliance.dll new file mode 100644 index 00000000000..aed511afe76 Binary files /dev/null and b/References/BizHawk.SrcGen.CLSCompliance.dll differ diff --git a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs index 510e23f39b4..b67862a97b1 100644 --- a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs +++ b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs @@ -422,6 +422,7 @@ private void LoadInternal(Stream stream, Bitmap bitmap, BitmapLoadOptions option /// /// Loads the BitmapBuffer from a source buffer, which is expected to be the right pixel format /// + [CLSCompliant(false)] public void LoadFrom(int width, int stride, int height, byte* data, BitmapLoadOptions options) { var cleanup = options.CleanupAlpha0; diff --git a/src/BizHawk.Bizware.Input/OSTailoredKeyInputAdapter.cs b/src/BizHawk.Bizware.Input/OSTailoredKeyInputAdapter.cs index 761351d3b9e..d96d0290304 100644 --- a/src/BizHawk.Bizware.Input/OSTailoredKeyInputAdapter.cs +++ b/src/BizHawk.Bizware.Input/OSTailoredKeyInputAdapter.cs @@ -14,6 +14,7 @@ namespace BizHawk.Bizware.Input public abstract class OSTailoredKeyMouseInputAdapter : IHostInputAdapter { private IKeyMouseInput? _keyMouseInput; + [CLSCompliant(false)] //TODO just needs renaming protected Func? _getHandleAlternateKeyboardLayouts; public abstract string Desc { get; } diff --git a/src/BizHawk.Client.Common/Api/ApiContainer.cs b/src/BizHawk.Client.Common/Api/ApiContainer.cs index d8f1d37e7c6..79e6d0d1e58 100644 --- a/src/BizHawk.Client.Common/Api/ApiContainer.cs +++ b/src/BizHawk.Client.Common/Api/ApiContainer.cs @@ -14,6 +14,7 @@ public ICommApi Comm public IEmuClientApi EmuClient => Get(); + [CLSCompliant(false)] public IEmulationApi Emulation => Get(); // requires IEmulator @@ -26,15 +27,18 @@ public IInputApi Input public IJoypadApi Joypad => Get(); + [CLSCompliant(false)] public IMemoryApi Memory => Get(); // requires IEmulator + [CLSCompliant(false)] public IMemoryEventsApi? MemoryEvents => TryGet(); // requires IDebuggable public IMemorySaveStateApi? MemorySaveState => TryGet(); // requires IStatable + [CLSCompliant(false)] public IMovieApi Movie => Get(); diff --git a/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs b/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs index 6a55b209d83..0174b41a381 100644 --- a/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/EmulationApi.cs @@ -18,6 +18,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] [Description("A library for interacting with the currently loaded emulator core")] public sealed class EmulationApi : IEmulationApi { diff --git a/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs b/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs index 1bfbba7315d..0906912b4b3 100644 --- a/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs @@ -12,6 +12,7 @@ public sealed class JoypadApi : IJoypadApi private readonly Action LogCallback; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public JoypadApi(Action logCallback, InputManager inputManager, IMovieSession movieSession) { LogCallback = logCallback; diff --git a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs index 9683945b313..abb6ffe3fc3 100644 --- a/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public sealed class MemoryApi : IMemoryApi { [RequiredService] diff --git a/src/BizHawk.Client.Common/Api/Classes/MemoryEventsApi.cs b/src/BizHawk.Client.Common/Api/Classes/MemoryEventsApi.cs index 443ed473742..6a1901f00f2 100644 --- a/src/BizHawk.Client.Common/Api/Classes/MemoryEventsApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/MemoryEventsApi.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public sealed class MemoryEventsApi : IMemoryEventsApi { [RequiredService] diff --git a/src/BizHawk.Client.Common/Api/Classes/MovieApi.cs b/src/BizHawk.Client.Common/Api/Classes/MovieApi.cs index 50672fb7965..f73fa8f3cf9 100644 --- a/src/BizHawk.Client.Common/Api/Classes/MovieApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/MovieApi.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public sealed class MovieApi : IMovieApi { private readonly IMainFormForApi _mainForm; diff --git a/src/BizHawk.Client.Common/Api/Classes/UserDataApi.cs b/src/BizHawk.Client.Common/Api/Classes/UserDataApi.cs index 0fc959b340c..3093491db1b 100644 --- a/src/BizHawk.Client.Common/Api/Classes/UserDataApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/UserDataApi.cs @@ -21,6 +21,7 @@ public KeyCollectionType Keys } } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public UserDataApi(IMovieSession movieSession) => _movieSession = movieSession; /// type of cannot be used in userdata diff --git a/src/BizHawk.Client.Common/Api/ExternalToolAttributes.cs b/src/BizHawk.Client.Common/Api/ExternalToolAttributes.cs index 27f63855f87..c01ee6fa0ec 100644 --- a/src/BizHawk.Client.Common/Api/ExternalToolAttributes.cs +++ b/src/BizHawk.Client.Common/Api/ExternalToolAttributes.cs @@ -35,6 +35,7 @@ public override bool NotApplicableTo(string romHash, string? sysID) } [AttributeUsage(AttributeTargets.Class)] + [CLSCompliant(false)] //TODO make [ExternalToolApplicability.SingleRom] multi-application public sealed class RomList : ExternalToolApplicabilityAttributeBase { private readonly IList _romHashes; diff --git a/src/BizHawk.Client.Common/Api/Interfaces/IEmulationApi.cs b/src/BizHawk.Client.Common/Api/Interfaces/IEmulationApi.cs index 885706661ee..42d95e0a242 100644 --- a/src/BizHawk.Client.Common/Api/Interfaces/IEmulationApi.cs +++ b/src/BizHawk.Client.Common/Api/Interfaces/IEmulationApi.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public interface IEmulationApi : IExternalApi { void DisplayVsync(bool enabled); diff --git a/src/BizHawk.Client.Common/Api/Interfaces/IMemoryApi.cs b/src/BizHawk.Client.Common/Api/Interfaces/IMemoryApi.cs index ae644937a04..1024b49a8a5 100644 --- a/src/BizHawk.Client.Common/Api/Interfaces/IMemoryApi.cs +++ b/src/BizHawk.Client.Common/Api/Interfaces/IMemoryApi.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public interface IMemoryApi : IExternalApi { string MainMemoryName { get; } diff --git a/src/BizHawk.Client.Common/Api/Interfaces/IMemoryEventsApi.cs b/src/BizHawk.Client.Common/Api/Interfaces/IMemoryEventsApi.cs index 8ef6d711a96..a0c09b57f9a 100644 --- a/src/BizHawk.Client.Common/Api/Interfaces/IMemoryEventsApi.cs +++ b/src/BizHawk.Client.Common/Api/Interfaces/IMemoryEventsApi.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public interface IMemoryEventsApi : IExternalApi { void AddReadCallback(MemoryCallbackDelegate cb, uint? address, string domain); diff --git a/src/BizHawk.Client.Common/Api/Interfaces/IMovieApi.cs b/src/BizHawk.Client.Common/Api/Interfaces/IMovieApi.cs index 8aac52f0d17..df0d1160fb3 100644 --- a/src/BizHawk.Client.Common/Api/Interfaces/IMovieApi.cs +++ b/src/BizHawk.Client.Common/Api/Interfaces/IMovieApi.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public interface IMovieApi : IExternalApi { bool StartsFromSavestate(); diff --git a/src/BizHawk.Client.Common/Api/SocketServer.cs b/src/BizHawk.Client.Common/Api/SocketServer.cs index 6aed56d0d5d..765fa723ab3 100644 --- a/src/BizHawk.Client.Common/Api/SocketServer.cs +++ b/src/BizHawk.Client.Common/Api/SocketServer.cs @@ -37,6 +37,7 @@ public string IP } } + [CLSCompliant(false)] public ushort Port { get => _targetAddr.Port; @@ -47,6 +48,7 @@ public ushort Port } } + [CLSCompliant(false)] public (string HostIP, ushort Port) TargetAddress { get => _targetAddr; @@ -65,6 +67,7 @@ public ushort Port public bool Successful { get; private set; } + [CLSCompliant(false)] public SocketServer(Func takeScreenshotCallback, ProtocolType protocol, string ip, ushort port) { _protocol = protocol; diff --git a/src/BizHawk.Client.Common/ArgParser.cs b/src/BizHawk.Client.Common/ArgParser.cs index 72d4bf76348..7c858340f50 100644 --- a/src/BizHawk.Client.Common/ArgParser.cs +++ b/src/BizHawk.Client.Common/ArgParser.cs @@ -14,6 +14,7 @@ namespace BizHawk.Client.Common { /// Parses command-line flags into a struct. + [CLSCompliant(false)] public static class ArgParser { private sealed class BespokeOption : Option diff --git a/src/BizHawk.Client.Common/BreakpointList.cs b/src/BizHawk.Client.Common/BreakpointList.cs index dcc02be5887..d0cf37b3051 100644 --- a/src/BizHawk.Client.Common/BreakpointList.cs +++ b/src/BizHawk.Client.Common/BreakpointList.cs @@ -6,8 +6,10 @@ namespace BizHawk.Client.Common { public class BreakpointList : List { + [CLSCompliant(false)] public MemoryCallbackDelegate Callback { get; set; } + [CLSCompliant(false)] public void Add(IDebuggable core, string scope, uint address, uint mask, MemoryCallbackType type) { Add(new Breakpoint(core, scope, Callback, address, mask, type)); @@ -68,6 +70,7 @@ public class Breakpoint private bool _active; private readonly IDebuggable _core; + [CLSCompliant(false)] public Breakpoint(bool readOnly, IDebuggable core, string scope, MemoryCallbackDelegate callBack, uint address, uint mask, MemoryCallbackType type, bool enabled = true) { Scope = scope; @@ -82,6 +85,7 @@ public Breakpoint(bool readOnly, IDebuggable core, string scope, MemoryCallbackD ReadOnly = readOnly; } + [CLSCompliant(false)] public Breakpoint(IDebuggable core, string scope, MemoryCallbackDelegate callBack, uint address, uint mask, MemoryCallbackType type, bool enabled = true) { Scope = scope; @@ -95,6 +99,7 @@ public Breakpoint(IDebuggable core, string scope, MemoryCallbackDelegate callBac Active = enabled; } + [CLSCompliant(false)] public Breakpoint(string name, bool readOnly, IDebuggable core, string scope, MemoryCallbackDelegate callBack, uint address, uint mask, MemoryCallbackType type, bool enabled = true) { Scope = scope; @@ -110,8 +115,14 @@ public Breakpoint(string name, bool readOnly, IDebuggable core, string scope, Me } public string Scope { get; } + + [CLSCompliant(false)] public MemoryCallbackDelegate Callback { get; } + + [CLSCompliant(false)] public uint? Address { get; set; } + + [CLSCompliant(false)] public uint? AddressMask { get; set; } public MemoryCallbackType Type { get; set; } public string Name { get; } @@ -119,6 +130,7 @@ public Breakpoint(string name, bool readOnly, IDebuggable core, string scope, Me public bool ReadOnly { get; set; } // Adds an existing callback + [CLSCompliant(false)] public Breakpoint(IDebuggable core, IMemoryCallback callback) { _core = core; diff --git a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs index 1bcda6bc00a..16e08aab444 100644 --- a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs +++ b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs @@ -48,6 +48,7 @@ public DisplayManagerRenderTargetProvider(Func callback) private IEmulator GlobalEmulator; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] protected DisplayManagerBase( Config config, IEmulator emulator, @@ -153,6 +154,7 @@ public void Dispose() } // rendering resources: + [CLSCompliant(false)] //TODO just needs renaming protected readonly IGL _gl; private StringRenderer _theOneFont; @@ -183,6 +185,7 @@ private StringRenderer Font private readonly IGuiRenderer _renderer; // layer resources + [CLSCompliant(false)] //TODO just needs renaming protected FilterProgram _currentFilterProgram; /// @@ -202,6 +205,7 @@ private StringRenderer Font private readonly TextureFrugalizer _videoTextureFrugalizer; + [CLSCompliant(false)] //TODO just needs renaming protected readonly RenderTargetFrugalizer[] _shaderChainFrugalizers; private readonly RetroShaderChain _shaderChainHq2X; diff --git a/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs b/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs index 5900e8ca4fb..beedcbf3d38 100644 --- a/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs +++ b/src/BizHawk.Client.Common/DisplayManager/Filters/Gui.cs @@ -207,6 +207,7 @@ public class ScreenControl3DS : BaseFilter { private readonly Encore _encore; + [CLSCompliant(false)] public ScreenControl3DS(Encore encore) { _encore = encore; diff --git a/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs b/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs index 1ab1aec2b0c..af376bb027c 100644 --- a/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs +++ b/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs @@ -18,6 +18,7 @@ public class OSDManager private readonly IMovieSession _movieSession; + [CLSCompliant(false)] public OSDManager(Config config, IEmulator emulator, InputManager inputManager, IMovieSession movieSession) { _config = config; diff --git a/src/BizHawk.Client.Common/OpenAdvanced.cs b/src/BizHawk.Client.Common/OpenAdvanced.cs index e8c309a4882..2d4e3b7cae6 100644 --- a/src/BizHawk.Client.Common/OpenAdvanced.cs +++ b/src/BizHawk.Client.Common/OpenAdvanced.cs @@ -100,6 +100,7 @@ public struct Token public string Path, CorePath; } + [CLSCompliant(false)] public Token token; public string TypeName => "Libretro"; diff --git a/src/BizHawk.Client.Common/ParsedCLIFlags.cs b/src/BizHawk.Client.Common/ParsedCLIFlags.cs index 81dd4aa8b97..53f73ab27c4 100644 --- a/src/BizHawk.Client.Common/ParsedCLIFlags.cs +++ b/src/BizHawk.Client.Common/ParsedCLIFlags.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public readonly struct ParsedCLIFlags { public readonly int? cmdLoadSlot; diff --git a/src/BizHawk.Client.Common/SaveSlotManager.cs b/src/BizHawk.Client.Common/SaveSlotManager.cs index ea95e684f86..b4da815edbc 100644 --- a/src/BizHawk.Client.Common/SaveSlotManager.cs +++ b/src/BizHawk.Client.Common/SaveSlotManager.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public class SaveSlotManager { private readonly bool[] _slots = new bool[10]; diff --git a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs index ad32e56beeb..ab5741aeec4 100644 --- a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs +++ b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs @@ -230,6 +230,7 @@ public static string RomAbsolutePath(this PathEntryCollection collection, string return collection.AbsolutePathFor(path.Path, systemId); } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public static string SaveRamAbsolutePath(this PathEntryCollection collection, IGameInfo game, IMovie movie) { var name = game.FilesystemSafeName(); @@ -273,6 +274,7 @@ public static string RetroSystemAbsolutePath(this PathEntryCollection collection return Path.Combine(collection.AbsolutePathFor(pathEntry.Path, game.System), name); } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public static string AutoSaveRamAbsolutePath(this PathEntryCollection collection, IGameInfo game, IMovie movie) { var path = collection.SaveRamAbsolutePath(game, movie); diff --git a/src/BizHawk.Client.Common/input/InputEvent.cs b/src/BizHawk.Client.Common/input/InputEvent.cs index be1c58fee47..d91e89c7ffd 100644 --- a/src/BizHawk.Client.Common/input/InputEvent.cs +++ b/src/BizHawk.Client.Common/input/InputEvent.cs @@ -26,12 +26,16 @@ public enum InputEventType public struct LogicalButton { + [CLSCompliant(false)] public const uint MASK_ALT = 1U << 2; + [CLSCompliant(false)] public const uint MASK_CTRL = 1U << 1; + [CLSCompliant(false)] public const uint MASK_SHIFT = 1U << 3; + [CLSCompliant(false)] public const uint MASK_WIN = 1U << 0; public static bool operator ==(LogicalButton lhs, LogicalButton rhs) @@ -44,8 +48,10 @@ public struct LogicalButton public readonly string Button; + [CLSCompliant(false)] public readonly uint Modifiers; + [CLSCompliant(false)] public LogicalButton(string button, uint modifiers, Func> getEffectiveModListCallback) { _getEffectiveModListCallback = getEffectiveModListCallback; diff --git a/src/BizHawk.Client.Common/input/PolarRectConversion.cs b/src/BizHawk.Client.Common/input/PolarRectConversion.cs index 26de6170bd3..7be86bddae9 100644 --- a/src/BizHawk.Client.Common/input/PolarRectConversion.cs +++ b/src/BizHawk.Client.Common/input/PolarRectConversion.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public static class PolarRectConversion { /// radial displacement in range 0..181 (this is not asserted) diff --git a/src/BizHawk.Client.Common/inputAdapters/InputManager.cs b/src/BizHawk.Client.Common/inputAdapters/InputManager.cs index 04cdbd8cfe7..1cc722b9135 100644 --- a/src/BizHawk.Client.Common/inputAdapters/InputManager.cs +++ b/src/BizHawk.Client.Common/inputAdapters/InputManager.cs @@ -55,6 +55,7 @@ public class InputManager public Func<(Point Pos, long Scroll, bool LMB, bool MMB, bool RMB, bool X1MB, bool X2MB)> GetMainFormMouseInfo { get; set; } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public void SyncControls(IEmulator emulator, IMovieSession session, Config config) { var def = emulator.ControllerDefinition; diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/ClientLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/ClientLuaLibrary.cs index 7e0a05c037e..463d0e098b6 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/ClientLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/ClientLuaLibrary.cs @@ -15,7 +15,7 @@ namespace BizHawk.Client.Common { [Description("A library for manipulating the EmuHawk client UI")] - public sealed class ClientLuaLibrary : LuaLibraryBase + public sealed partial class ClientLuaLibrary : LuaLibraryBase { [OptionalService] private IVideoProvider VideoProvider { get; set; } diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/CommLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/CommLuaLibrary.cs index 81b34a90173..298d415f787 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/CommLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/CommLuaLibrary.cs @@ -8,7 +8,7 @@ namespace BizHawk.Client.Common { [Description("A library for communicating with other programs")] - public sealed class CommLuaLibrary : LuaLibraryBase + public sealed partial class CommLuaLibrary : LuaLibraryBase { private readonly IDictionary _websockets = new Dictionary(); diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/EmulationLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/EmulationLuaLibrary.cs index aa25df18682..94766d8dacc 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/EmulationLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/EmulationLuaLibrary.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { [Description("A library for interacting with the currently loaded emulator core")] - public sealed class EmulationLuaLibrary : LuaLibraryBase + public sealed partial class EmulationLuaLibrary : LuaLibraryBase { public Action FrameAdvanceCallback { get; set; } public Action YieldCallback { get; set; } diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/GameInfoLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/GameInfoLuaLibrary.cs index d9b38b8271d..2283df956cd 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/GameInfoLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/GameInfoLuaLibrary.cs @@ -6,7 +6,7 @@ // ReSharper disable UnusedAutoPropertyAccessor.Local namespace BizHawk.Client.Common { - public sealed class GameInfoLuaLibrary : LuaLibraryBase + public sealed partial class GameInfoLuaLibrary : LuaLibraryBase { public GameInfoLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/GuiLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/GuiLuaLibrary.cs index 1a2bf002a69..37d9c16730f 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/GuiLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/GuiLuaLibrary.cs @@ -5,7 +5,7 @@ namespace BizHawk.Client.Common { - public sealed class GuiLuaLibrary : LuaLibraryBase, IDisposable + public sealed partial class GuiLuaLibrary : LuaLibraryBase, IDisposable { private DisplaySurfaceID _rememberedSurfaceID = DisplaySurfaceID.EmuCore; diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/InputLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/InputLuaLibrary.cs index de722ce6188..457ab159fc8 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/InputLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/InputLuaLibrary.cs @@ -2,7 +2,7 @@ namespace BizHawk.Client.Common { - public sealed class InputLuaLibrary : LuaLibraryBase + public sealed partial class InputLuaLibrary : LuaLibraryBase { public InputLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/JoypadLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/JoypadLuaLibrary.cs index eccc2680427..f8e9969a109 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/JoypadLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/JoypadLuaLibrary.cs @@ -5,7 +5,7 @@ // ReSharper disable UnusedMember.Global namespace BizHawk.Client.Common { - public sealed class JoypadLuaLibrary : LuaLibraryBase + public sealed partial class JoypadLuaLibrary : LuaLibraryBase { public JoypadLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/MemoryLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/MemoryLuaLibrary.cs index ccf8e70ee56..b75270665c4 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/MemoryLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/MemoryLuaLibrary.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { [Description("These functions behavior identically to the mainmemory functions but the user can set the memory domain to read and write from. The default domain is the system bus. Use getcurrentmemorydomain(), and usememorydomain() to control which domain is used. Each core has its own set of valid memory domains. Use getmemorydomainlist() to get a list of memory domains for the current core loaded.")] - public sealed class MemoryLuaLibrary : LuaLibraryBase + public sealed partial class MemoryLuaLibrary : LuaLibraryBase { public MemoryLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/MemorySavestateLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/MemorySavestateLuaLibrary.cs index 08789b65fb7..ec5b3fd3f89 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/MemorySavestateLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/MemorySavestateLuaLibrary.cs @@ -2,7 +2,7 @@ // ReSharper disable UnusedAutoPropertyAccessor.Local namespace BizHawk.Client.Common { - public sealed class MemorySavestateLuaLibrary : LuaLibraryBase + public sealed partial class MemorySavestateLuaLibrary : LuaLibraryBase { public MemorySavestateLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/MovieLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/MovieLuaLibrary.cs index b2060e62ba4..0134059071b 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/MovieLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/MovieLuaLibrary.cs @@ -5,7 +5,7 @@ // ReSharper disable UnusedMember.Global namespace BizHawk.Client.Common { - public sealed class MovieLuaLibrary : LuaLibraryBase + public sealed partial class MovieLuaLibrary : LuaLibraryBase { public MovieLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs index 958ed59c539..5d2a8baf063 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/SQLiteLuaLibrary.cs @@ -5,7 +5,7 @@ namespace BizHawk.Client.Common { [Description("A library for performing SQLite operations.")] - public sealed class SQLiteLuaLibrary : LuaLibraryBase + public sealed partial class SQLiteLuaLibrary : LuaLibraryBase { public SQLiteLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/SaveStateLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/SaveStateLuaLibrary.cs index 0891b38ced2..f78b236f878 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/SaveStateLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/SaveStateLuaLibrary.cs @@ -1,6 +1,6 @@ namespace BizHawk.Client.Common { - public sealed class SaveStateLuaLibrary : LuaLibraryBase + public sealed partial class SaveStateLuaLibrary : LuaLibraryBase { public SaveStateLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/CommonLibs/UserDataLuaLibrary.cs b/src/BizHawk.Client.Common/lua/CommonLibs/UserDataLuaLibrary.cs index f24185f39f5..633a97f545f 100644 --- a/src/BizHawk.Client.Common/lua/CommonLibs/UserDataLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/CommonLibs/UserDataLuaLibrary.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { [Description("A library for setting and retrieving dynamic data that will be saved and loaded with savestates")] - public sealed class UserDataLuaLibrary : LuaLibraryBase + public sealed partial class UserDataLuaLibrary : LuaLibraryBase { public UserDataLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/ILuaLibraries.cs b/src/BizHawk.Client.Common/lua/ILuaLibraries.cs index 6825004aafd..6b517456b8a 100644 --- a/src/BizHawk.Client.Common/lua/ILuaLibraries.cs +++ b/src/BizHawk.Client.Common/lua/ILuaLibraries.cs @@ -1,5 +1,6 @@ namespace BizHawk.Client.Common { + [CLSCompliant(NLuaTableHelper.CLS_LUATABLE)] public interface ILuaLibraries { /// pretty hacky... we don't want a lua script to be able to restart itself by rebooting the core diff --git a/src/BizHawk.Client.Common/lua/INamedLuaFunction.cs b/src/BizHawk.Client.Common/lua/INamedLuaFunction.cs index c3878b15537..bab61b635d0 100644 --- a/src/BizHawk.Client.Common/lua/INamedLuaFunction.cs +++ b/src/BizHawk.Client.Common/lua/INamedLuaFunction.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(false)] public interface INamedLuaFunction { Action InputCallback { get; } diff --git a/src/BizHawk.Client.Common/lua/LuaFile.cs b/src/BizHawk.Client.Common/lua/LuaFile.cs index 0d777f186a9..c61bddf43dd 100644 --- a/src/BizHawk.Client.Common/lua/LuaFile.cs +++ b/src/BizHawk.Client.Common/lua/LuaFile.cs @@ -2,8 +2,11 @@ namespace BizHawk.Client.Common { + [CLSCompliant(CLS_NLUA)] public class LuaFile { + public const bool CLS_NLUA = false; + public LuaFile(string path) { Name = ""; diff --git a/src/BizHawk.Client.Common/lua/LuaFileList.cs b/src/BizHawk.Client.Common/lua/LuaFileList.cs index 13784bf6f8e..3c8e2ccb296 100644 --- a/src/BizHawk.Client.Common/lua/LuaFileList.cs +++ b/src/BizHawk.Client.Common/lua/LuaFileList.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(LuaFile.CLS_NLUA)] public class LuaFileList : List { private bool _changes; diff --git a/src/BizHawk.Client.Common/lua/LuaFunctionList.cs b/src/BizHawk.Client.Common/lua/LuaFunctionList.cs index 780d061af8e..c195068face 100644 --- a/src/BizHawk.Client.Common/lua/LuaFunctionList.cs +++ b/src/BizHawk.Client.Common/lua/LuaFunctionList.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(LuaFile.CLS_NLUA)] public class LuaFunctionList : IEnumerable { private readonly List _functions = new List(); diff --git a/src/BizHawk.Client.Common/lua/LuaHelper.cs b/src/BizHawk.Client.Common/lua/LuaHelper.cs index ed74fbd78ad..5099091212c 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelper.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelper.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.Common { public static class LuaExtensions { + [CLSCompliant(NLuaTableHelper.CLS_LUATABLE)] public static LuaTable EnumerateToLuaTable(this NLuaTableHelper tableHelper, IEnumerable list, int indexFrom = 1) => tableHelper.ListToTable(list as IReadOnlyList ?? list.ToList(), indexFrom); } diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/BitLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/BitLuaLibrary.cs index 99424486739..75dd0371073 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/BitLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/BitLuaLibrary.cs @@ -5,7 +5,7 @@ namespace BizHawk.Client.Common { [Description("A library for performing standard bitwise operations.")] - public sealed class BitLuaLibrary : LuaLibraryBase + public sealed partial class BitLuaLibrary : LuaLibraryBase { public BitLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs index fe24ce68a66..f23fe6eaa85 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.Common { [Description("A library for registering lua functions to emulator events.\n All events support multiple registered methods.\nAll registered event methods can be named and return a Guid when registered")] - public sealed class EventsLuaLibrary : LuaLibraryBase + public sealed partial class EventsLuaLibrary : LuaLibraryBase { public delegate INamedLuaFunction NLFAddCallback( LuaFunction function, diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/GenesisLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/GenesisLuaLibrary.cs index ddd35e91b34..1be7d28bb3b 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/GenesisLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/GenesisLuaLibrary.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.Common { [Description("Functions specific to GenesisHawk (functions may not run when an Genesis game is not loaded)")] - public sealed class GenesisLuaLibrary : LuaLibraryBase + public sealed partial class GenesisLuaLibrary : LuaLibraryBase { private const string ERR_MSG_UNSUPPORTED_CORE = $"`genesis.*` functions can only be used with {CoreNames.Gpgx}"; diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/MainMemoryLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/MainMemoryLuaLibrary.cs index e4ffb27be03..9d47e983478 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/MainMemoryLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/MainMemoryLuaLibrary.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.Common { [Description("Main memory library reads and writes from the Main memory domain (the default memory domain set by any given core)")] - public sealed class MainMemoryLuaLibrary : LuaLibraryBase + public sealed partial class MainMemoryLuaLibrary : LuaLibraryBase { public MainMemoryLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NDSLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NDSLuaLibrary.cs index 0a4fda66e95..15735aa3fef 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NDSLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NDSLuaLibrary.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { [Description("Functions specific to NDSHawk (functions may not run when an NDS game is not loaded)")] - public sealed class NDSLuaLibrary : LuaLibraryBase + public sealed partial class NDSLuaLibrary : LuaLibraryBase { public NDSLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs index ed9ee963db2..35ab487affc 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/NESLuaLibrary.cs @@ -12,7 +12,7 @@ namespace BizHawk.Client.Common /// that would be completely arbitrary and would remove the whole requirement for this mess /// [Description("Functions related specifically to Nes Cores")] - public sealed class NESLuaLibrary : LuaLibraryBase + public sealed partial class NESLuaLibrary : LuaLibraryBase { public NESLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/SNESLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/SNESLuaLibrary.cs index 0bfa8be5636..402aedcdec2 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/SNESLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/SNESLuaLibrary.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { [Description("Functions specific to SNESHawk (functions may not run when an SNES game is not loaded)")] - public sealed class SNESLuaLibrary : LuaLibraryBase + public sealed partial class SNESLuaLibrary : LuaLibraryBase { public SNESLuaLibrary(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) : base(luaLibsImpl, apiContainer, logOutputCallback) {} diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/StringLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/StringLuaLibrary.cs index 817e0cfb42f..594c5508af5 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/StringLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/StringLuaLibrary.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.Common { [Description("A library exposing standard .NET string methods")] - public sealed class StringLuaLibrary : LuaLibraryBase + public sealed partial class StringLuaLibrary : LuaLibraryBase { public override string Name => "bizstring"; diff --git a/src/BizHawk.Client.Common/lua/LuaLibraryBase.cs b/src/BizHawk.Client.Common/lua/LuaLibraryBase.cs index 805c07f2da2..c93cd1aa89e 100644 --- a/src/BizHawk.Client.Common/lua/LuaLibraryBase.cs +++ b/src/BizHawk.Client.Common/lua/LuaLibraryBase.cs @@ -4,8 +4,11 @@ namespace BizHawk.Client.Common { + [CLSCompliant(CLS_LUALIBRARYBASE)] public abstract class LuaLibraryBase { + public const bool CLS_LUALIBRARYBASE = false; + public PathEntryCollection PathEntries { get; set; } protected LuaLibraryBase(ILuaLibraries luaLibsImpl, ApiContainer apiContainer, Action logOutputCallback) diff --git a/src/BizHawk.Client.Common/lua/LuaSandbox.cs b/src/BizHawk.Client.Common/lua/LuaSandbox.cs index 2d909ad20b2..339a0deb055 100644 --- a/src/BizHawk.Client.Common/lua/LuaSandbox.cs +++ b/src/BizHawk.Client.Common/lua/LuaSandbox.cs @@ -5,6 +5,7 @@ // TODO - evaluate for re-entrancy problems namespace BizHawk.Client.Common { + [CLSCompliant(LuaFile.CLS_NLUA)] public class LuaSandbox { private static readonly ConditionalWeakTable SandboxForThread = new(); diff --git a/src/BizHawk.Client.Common/lua/NLuaTableHelper.cs b/src/BizHawk.Client.Common/lua/NLuaTableHelper.cs index 31ae8a4255e..6a6f6d226bb 100644 --- a/src/BizHawk.Client.Common/lua/NLuaTableHelper.cs +++ b/src/BizHawk.Client.Common/lua/NLuaTableHelper.cs @@ -7,8 +7,11 @@ namespace BizHawk.Client.Common { + [CLSCompliant(CLS_LUATABLE)] public sealed class NLuaTableHelper { + public const bool CLS_LUATABLE = false; + private readonly Action _logCallback; private readonly Lua _lua; diff --git a/src/BizHawk.Client.Common/lua/NamedLuaFunction.cs b/src/BizHawk.Client.Common/lua/NamedLuaFunction.cs index 514ec258958..972fb67520a 100644 --- a/src/BizHawk.Client.Common/lua/NamedLuaFunction.cs +++ b/src/BizHawk.Client.Common/lua/NamedLuaFunction.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(LuaFile.CLS_NLUA)] public sealed class NamedLuaFunction : INamedLuaFunction { public const string EVENT_TYPE_CONSOLECLOSE = "OnConsoleClose"; diff --git a/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs b/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs index ebc7571938c..f27c42bb318 100644 --- a/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs +++ b/src/BizHawk.Client.Common/movie/BasicMovieInfo.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieExtensions.CLS_IBASICMOVIEINFO)] public class BasicMovieInfo : IBasicMovieInfo { private string _filename; diff --git a/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs b/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs index 945a216c7a8..2cf33a60142 100644 --- a/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs +++ b/src/BizHawk.Client.Common/movie/MovieConversionExtensions.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.Common { public static class MovieConversionExtensions { + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public static ITasMovie ToTasMovie(this IMovie old) { string newFilename = ConvertFileNameToTasMovie(old.Filename); @@ -40,6 +41,7 @@ public static ITasMovie ToTasMovie(this IMovie old) return tas; } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public static IMovie ToBk2(this IMovie old) { var bk2 = old.Session.Get(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension)); @@ -71,6 +73,7 @@ public static IMovie ToBk2(this IMovie old) return bk2; } + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public static ITasMovie ConvertToSavestateAnchoredMovie(this ITasMovie old, int frame, byte[] savestate) { string newFilename = ConvertFileNameToTasMovie(old.Filename); @@ -119,6 +122,7 @@ public static ITasMovie ConvertToSavestateAnchoredMovie(this ITasMovie old, int return tas; } + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public static ITasMovie ConvertToSaveRamAnchoredMovie(this ITasMovie old, byte[] saveRam) { string newFilename = ConvertFileNameToTasMovie(old.Filename); diff --git a/src/BizHawk.Client.Common/movie/MovieSession.cs b/src/BizHawk.Client.Common/movie/MovieSession.cs index eaaeef1fdc5..8cbc65ddc1a 100644 --- a/src/BizHawk.Client.Common/movie/MovieSession.cs +++ b/src/BizHawk.Client.Common/movie/MovieSession.cs @@ -16,8 +16,11 @@ public enum MovieEndAction Finish, } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public class MovieSession : IMovieSession { + public const bool CLS_IMOVIESESSION = false; + private readonly IDialogParent _dialogParent; private readonly Action _pauseCallback; diff --git a/src/BizHawk.Client.Common/movie/Subtitle.cs b/src/BizHawk.Client.Common/movie/Subtitle.cs index b8e7c2afe06..4a21da0569d 100644 --- a/src/BizHawk.Client.Common/movie/Subtitle.cs +++ b/src/BizHawk.Client.Common/movie/Subtitle.cs @@ -29,6 +29,8 @@ public Subtitle(Subtitle s) public int X { get; set; } public int Y { get; set; } public int Duration { get; set; } + + [CLSCompliant(false)] public uint Color { get; set; } public override string ToString() diff --git a/src/BizHawk.Client.Common/movie/import/IMovieImport.cs b/src/BizHawk.Client.Common/movie/import/IMovieImport.cs index 91a30f734fa..bb9ff32947b 100644 --- a/src/BizHawk.Client.Common/movie/import/IMovieImport.cs +++ b/src/BizHawk.Client.Common/movie/import/IMovieImport.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public interface IMovieImport { ImportResult Import( @@ -141,6 +142,7 @@ protected static string NullTerminated(string str) } } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public class ImportResult { public IList Warnings { get; } = new List(); diff --git a/src/BizHawk.Client.Common/movie/import/MovieImport.cs b/src/BizHawk.Client.Common/movie/import/MovieImport.cs index 05076528e0a..608a358cf0d 100644 --- a/src/BizHawk.Client.Common/movie/import/MovieImport.cs +++ b/src/BizHawk.Client.Common/movie/import/MovieImport.cs @@ -28,6 +28,7 @@ public static bool IsValidMovieExtension(string extension) .ToArray()); // Attempt to import another type of movie file into a movie object. + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public static ImportResult ImportFile( IDialogParent dialogParent, IMovieSession session, diff --git a/src/BizHawk.Client.Common/movie/interfaces/IBasicMovieInfo.cs b/src/BizHawk.Client.Common/movie/interfaces/IBasicMovieInfo.cs index f02ed54a452..7de0a84d0ac 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/IBasicMovieInfo.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/IBasicMovieInfo.cs @@ -2,6 +2,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieExtensions.CLS_IBASICMOVIEINFO)] //TODO only because of `Rerecords`, probably want to change that so movies are usable public interface IBasicMovieInfo { // Filename of the movie, settable by the client diff --git a/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs index c6b9d68c80a..2a4f66e6857 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs @@ -31,6 +31,7 @@ public enum MovieMode // TODO: message callback / event handler // TODO: consider other event handlers, switching modes? + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public interface IMovie : IBasicMovieInfo { /// @@ -197,8 +198,15 @@ public interface IMovie : IBasicMovieInfo void CopyLog(IEnumerable log); } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public static class MovieExtensions { + public const bool CLS_IBASICMOVIEINFO = false; + + public const bool CLS_IMOVIE = false; + + public const bool CLS_ITASMOVIE = false; + public static FilesystemFilterSet GetFSFilterSet(this IMovie/*?*/ movie) => new(new FilesystemFilter("Movie Files", new[] { movie?.PreferredExtension ?? MovieService.StandardMovieExtension })); diff --git a/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs b/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs index 908f3b75ed9..82a025c2ec4 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public interface IMovieSession { IMovieConfig Settings { get; } diff --git a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs index 9ea994305be..5f711178cba 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.Common { + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public interface ITasMovie : IMovie, INotifyPropertyChanged, IDisposable { bool BindMarkersToInput { get; set; } diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs b/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs index bd077eef2a8..4a52436f84e 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasBranch.cs @@ -32,6 +32,8 @@ public ForSerialization(int frame, DateTime timeStamp, Guid uniqueIdentifier) public IStringLog InputLog { get; set; } public BitmapBuffer CoreFrameBuffer { get; set; } public BitmapBuffer OSDFrameBuffer { get; set; } + + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public TasMovieChangeLog ChangeLog { get; set; } public DateTime TimeStamp { get; set; } public TasMovieMarkerList Markers { get; set; } @@ -43,6 +45,7 @@ public ForSerialization(int frame, DateTime timeStamp, Guid uniqueIdentifier) public TasBranch Clone() => (TasBranch)MemberwiseClone(); } + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public interface ITasBranchCollection : IList { int Current { get; set; } @@ -52,9 +55,11 @@ public interface ITasBranchCollection : IList void Replace(TasBranch old, TasBranch newBranch); void Save(ZipStateSaver bs); + void Load(ZipStateLoader bl, ITasMovie movie); } + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public class TasBranchCollection : List, ITasBranchCollection { private readonly ITasMovie _movie; diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index d8f804f5b28..592e00e3d8a 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -82,6 +82,7 @@ public interface IMovieChangeLog void AddExtend(int originalLength, int count, string inputs); } + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public class TasMovieChangeLog : IMovieChangeLog { public TasMovieChangeLog(ITasMovie movie) @@ -418,6 +419,7 @@ public void AddExtend(int originalLength, int count, string inputs) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public interface IMovieAction { void Undo(ITasMovie movie); @@ -427,8 +429,11 @@ public interface IMovieAction int LastFrame { get; } } + [CLSCompliant(CLS_IMOVIEACTION)] public class MovieAction : IMovieAction { + internal const bool CLS_IMOVIEACTION = false; + public int FirstFrame { get; } public int LastFrame { get; } @@ -518,6 +523,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public sealed class MovieActionMarker : IMovieAction { public int FirstFrame { get; } @@ -577,6 +583,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionFrameEdit : IMovieAction { public int FirstFrame { get; } @@ -630,6 +637,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionPaint : IMovieAction { public int FirstFrame { get; } @@ -699,6 +707,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionBindInput : IMovieAction { public int FirstFrame { get; } @@ -752,6 +761,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionInsertFrames : IMovieAction { public int FirstFrame { get; } @@ -808,6 +818,7 @@ public void Redo(ITasMovie movie) } } + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionRemoveFrames : IMovieAction { public int FirstFrame { get; } @@ -845,7 +856,7 @@ public void Redo(ITasMovie movie) } } - + [CLSCompliant(MovieAction.CLS_IMOVIEACTION)] public class MovieActionExtend : IMovieAction { public int FirstFrame { get; } diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs index 04e976d9ca6..b8fe71e321e 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs @@ -82,6 +82,7 @@ public class TasMovieMarkerList : List { private readonly ITasMovie _movie; + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public TasMovieMarkerList(ITasMovie movie) { _movie = movie; diff --git a/src/BizHawk.Client.Common/savestates/SavestateFile.cs b/src/BizHawk.Client.Common/savestates/SavestateFile.cs index d2558a9b044..50cbf4f51a1 100644 --- a/src/BizHawk.Client.Common/savestates/SavestateFile.cs +++ b/src/BizHawk.Client.Common/savestates/SavestateFile.cs @@ -31,6 +31,7 @@ public class SavestateFile private readonly IDictionary _userBag; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public SavestateFile( IEmulator emulator, IMovieSession movieSession, diff --git a/src/BizHawk.Client.Common/tools/Cheat.cs b/src/BizHawk.Client.Common/tools/Cheat.cs index bae019699e3..ba2b4d6a7ac 100644 --- a/src/BizHawk.Client.Common/tools/Cheat.cs +++ b/src/BizHawk.Client.Common/tools/Cheat.cs @@ -20,6 +20,7 @@ public enum CompareType private int _val; private bool _enabled; + [CLSCompliant(Watch.CLS_WATCH)] public Cheat(Watch watch, int value, int? compare = null, bool enabled = true, CompareType comparisonType = CompareType.None) { _enabled = enabled; @@ -320,6 +321,7 @@ public override int GetHashCode() return !(a == b); } + [CLSCompliant(Watch.CLS_WATCH)] public static bool operator ==(Cheat a, Watch b) { // If one is null, but not both, return false. @@ -331,6 +333,7 @@ public override int GetHashCode() return a.Domain == b.Domain && a.Address == b.Address; } + [CLSCompliant(Watch.CLS_WATCH)] public static bool operator !=(Cheat a, Watch b) { return !(a == b); diff --git a/src/BizHawk.Client.Common/tools/CheatList.cs b/src/BizHawk.Client.Common/tools/CheatList.cs index a9cca688a9a..a4f92f750e5 100644 --- a/src/BizHawk.Client.Common/tools/CheatList.cs +++ b/src/BizHawk.Client.Common/tools/CheatList.cs @@ -199,6 +199,7 @@ public void RemoveRange(IEnumerable cheats) Changes = true; } + [CLSCompliant(Watch.CLS_WATCH)] public void RemoveRange(IEnumerable watches) { _cheatList.RemoveAll(cheat => watches.Any(w => w == cheat)); diff --git a/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs b/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs index 19a9f802f8e..16bc364126d 100644 --- a/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs +++ b/src/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs @@ -32,6 +32,7 @@ public RamSearchEngine(SearchEngineSettings settings, IMemoryDomains memoryDomai }; } + [CLSCompliant(false)] public RamSearchEngine(SearchEngineSettings settings, IMemoryDomains memoryDomains, Compare compareTo, uint? compareValue, uint? differentBy) : this(settings, memoryDomains) { @@ -104,6 +105,7 @@ public void Start() /// /// Exposes the current watch state based on index /// + [CLSCompliant(Watch.CLS_WATCH)] public Watch this[int index] => Watch.GenerateWatch( _settings.Domain, @@ -185,6 +187,7 @@ public Compare CompareTo } } + [CLSCompliant(false)] public uint? CompareValue { get; set; } public ComparisonOperator Operator { get; set; } @@ -193,6 +196,7 @@ public Compare CompareTo /// zero 07-sep-2014 - this isn't ideal. but don't bother changing it (to a long, for instance) until it can support floats. maybe store it as a double here.
/// it already supported floats by way of reinterpret-cast, it just wasn't implemented correctly on this side --yoshi /// + [CLSCompliant(false)] public uint? DifferentBy { get; set; } public void Update() @@ -238,6 +242,7 @@ public void ClearChangeCounts() /// Remove a set of watches /// However, this should not be used with large data sets (100k or more) as it uses a contains logic to perform the task ///
+ [CLSCompliant(Watch.CLS_WATCH)] public void RemoveSmallWatchRange(IEnumerable watches) { if (UndoEnabled) diff --git a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs index 93b67aae859..dcfe1baeece 100644 --- a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common /// /// This class holds a byte (8 bits) /// - public sealed class ByteWatch : Watch + public sealed partial class ByteWatch : Watch { private byte _previous; private byte _value; diff --git a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs index 0a058dbdaeb..e5c47c49a02 100644 --- a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs @@ -8,7 +8,7 @@ namespace BizHawk.Client.Common /// /// This class holds a double word (32 bits) /// - public sealed class DWordWatch : Watch + public sealed partial class DWordWatch : Watch { private uint _value; private uint _previous; diff --git a/src/BizHawk.Client.Common/tools/Watch/SeparatorWatch.cs b/src/BizHawk.Client.Common/tools/Watch/SeparatorWatch.cs index 7bec65af711..e27cefb2c65 100644 --- a/src/BizHawk.Client.Common/tools/Watch/SeparatorWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/SeparatorWatch.cs @@ -6,7 +6,7 @@ namespace BizHawk.Client.Common /// This class holds a separator for RamWatch /// Use the static property Instance to get it ///
- public sealed class SeparatorWatch : Watch + public sealed partial class SeparatorWatch : Watch { public static readonly IReadOnlyList ValidTypes = [ WatchDisplayType.Separator ]; diff --git a/src/BizHawk.Client.Common/tools/Watch/Watch.cs b/src/BizHawk.Client.Common/tools/Watch/Watch.cs index 32c81f9a570..81d00b59406 100644 --- a/src/BizHawk.Client.Common/tools/Watch/Watch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/Watch.cs @@ -13,12 +13,15 @@ namespace BizHawk.Client.Common /// with a specific size (8, 16 or 32bits). /// This is an abstract class /// + [CLSCompliant(CLS_WATCH)] [DebuggerDisplay("Note={Notes}, Value={ValueString}")] public abstract class Watch : IEquatable, IEquatable, IComparable { + public const bool CLS_WATCH = false; + private MemoryDomain _domain; private WatchDisplayType _type; diff --git a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs index 0a3e12d913c..aa54ec84569 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs @@ -14,6 +14,7 @@ namespace BizHawk.Client.Common /// This class hold a collection /// Different memory domain can be mixed /// + [CLSCompliant(Watch.CLS_WATCH)] public sealed partial class WatchList : IList { diff --git a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs index bb4d6355b1d..22691dfd238 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common /// /// This class holds a word (16 bits) /// - public sealed class WordWatch : Watch + public sealed partial class WordWatch : Watch { private ushort _previous; private ushort _value; diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs b/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs index 22252dc2762..883acd99dbe 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AVSync.cs @@ -3,7 +3,7 @@ namespace BizHawk.Client.EmuHawk { - public class AudioStretcher : AVStretcher + public sealed partial class AudioStretcher : AVStretcher { public AudioStretcher(IVideoWriter w) { @@ -42,7 +42,7 @@ public void DumpAV(IVideoProvider v, ISoundProvider asyncSoundProvider, out shor } } - public class VideoStretcher : AVStretcher + public sealed partial class VideoStretcher : AVStretcher { public VideoStretcher(IVideoWriter w) { @@ -131,6 +131,7 @@ public void DumpAV(IVideoProvider v, ISoundProvider syncSoundProvider, out short } } + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public abstract class AVStretcher : VwWrap, IVideoWriter { protected int FpsNum; @@ -202,6 +203,7 @@ public abstract class AVStretcher : VwWrap, IVideoWriter } } + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public abstract class VwWrap : IVideoWriter { protected IVideoWriter W; diff --git a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriter.cs index abf463493ed..2fe6683035c 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriter.cs @@ -13,6 +13,7 @@ namespace BizHawk.Client.EmuHawk /// /// uses pipes to launch an external ffmpeg process and encode /// + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("ffmpeg", "FFmpeg writer", "Uses an external FFMPEG process to encode video and audio. Various formats supported. Splits on resolution change.")] public class FFmpegWriter : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs index e4a0d281f75..8f49948fcea 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs @@ -8,6 +8,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("gif", "GIF writer", "Creates an animated .gif")] public class GifWriter : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs index 908ca35fbc6..5f788ef2a59 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/GifWriterForm.cs @@ -10,6 +10,7 @@ public GifWriterForm() InitializeComponent(); } + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public static GifWriter.GifToken DoTokenForm(IWin32Window parent, Config config) { using var dlg = new GifWriterForm diff --git a/src/BizHawk.Client.EmuHawk/AVOut/IVideoWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/IVideoWriter.cs index 743649930ea..ef162e48a66 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/IVideoWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/IVideoWriter.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] // only `SetMetaData`, but these A/V-related classes aren't really important public interface IVideoWriter : IDisposable { /// @@ -116,6 +117,7 @@ public class VideoWriterInfo(VideoWriterAttribute attribs, Type type) public VideoWriterAttribute Attribs { get; } = attribs; /// parent for if the user is shown config dialog + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public IVideoWriter Create(IDialogParent dialogParent) => (IVideoWriter) ( type.GetConstructor(CTOR_TYPES_A) ?.Invoke([ dialogParent ]) @@ -129,6 +131,8 @@ public IVideoWriter Create(IDialogParent dialogParent) => (IVideoWriter) ( /// public static class VideoWriterInventory { + internal const bool CLS_IVIDEOWRITER = false; + private static readonly Dictionary VideoWriters = [ ]; private static readonly VideoWriterInfo[] VideoWritersOrdered; @@ -168,6 +172,7 @@ static VideoWriterInventory() /// find an IVideoWriter by its short name /// /// parent for if the user is shown config dialog + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public static IVideoWriter GetVideoWriter(string name, IDialogParent dialogParent) { return VideoWriters.TryGetValue(name, out var ret) diff --git a/src/BizHawk.Client.EmuHawk/AVOut/ImageSequenceWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/ImageSequenceWriter.cs index 62e49dfbcb9..6100ab9deaa 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/ImageSequenceWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/ImageSequenceWriter.cs @@ -12,6 +12,7 @@ namespace BizHawk.Client.EmuHawk /// /// Writes a sequence of 24bpp PNG or JPG files /// + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("imagesequence", "Image sequence writer", "Writes a sequence of 24bpp PNG or JPG files (default compression quality)")] public class ImageSequenceWriter : IDisposable, IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/JMDWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/JMDWriter.cs index 864e056892d..413df3ff7e6 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/JMDWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/JMDWriter.cs @@ -19,6 +19,7 @@ namespace BizHawk.Client.EmuHawk /// so each dump is always one file /// they can be processed with JPC-rr streamtools or JMDSource (avisynth) /// + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("jmd", "JMD writer", "Writes a JPC-rr multidump file (JMD). These can be read and further processed with jpc-streamtools. One JMD file contains all audio (uncompressed) and video (compressed).")] public class JmdWriter : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/NutWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/NutWriter.cs index 08734b59b18..2a3db82129d 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/NutWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/NutWriter.cs @@ -10,6 +10,7 @@ namespace BizHawk.Client.EmuHawk /// dumps in the "nut" container format /// uncompressed video and audio /// + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("nut", "NUT writer", "Writes a series of .nut files to disk, a container format which can be opened by ffmpeg. All data is uncompressed. Splits occur on resolution changes. NOT RECOMMENDED FOR USE.")] public class NutWriter : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecorder.cs b/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecorder.cs index 7dc76f9606a..61efbb5b81d 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecorder.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecorder.cs @@ -10,6 +10,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("syncless", "Syncless Recording", "Writes each frame to a directory as a PNG and WAV pair, identified by frame number. The results can be exported into one video file.")] public class SynclessRecorder : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs index 5f7b1a7e282..38df46cdf77 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs @@ -56,6 +56,7 @@ private VideoWriterChooserForm(IMainFormForTools mainForm, IEmulator emulator, C /// parent window /// The current emulator /// user choice, or null on Cancel\Close\invalid + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] public static IVideoWriter DoVideoWriterChooserDlg( IEnumerable list, T owner, diff --git a/src/BizHawk.Client.EmuHawk/AVOut/WavWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/WavWriter.cs index 51e50491dd3..7313bc97c04 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/WavWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/WavWriter.cs @@ -210,6 +210,7 @@ public WavWriter(IEnumerator ss, int sampleRate, int numChannels) /// /// slim wrapper on WavWriter that implements IVideoWriter (discards all video!) /// + [CLSCompliant(VideoWriterInventory.CLS_IVIDEOWRITER)] [VideoWriter("wave", "WAV writer", "Writes a series of standard RIFF wav files containing uncompressed audio. Does not write video. Splits every 2G.")] public class WavWriterV : IVideoWriter { diff --git a/src/BizHawk.Client.EmuHawk/Api/ApiManager.cs b/src/BizHawk.Client.EmuHawk/Api/ApiManager.cs index 7716d31a434..7892b46cd1a 100644 --- a/src/BizHawk.Client.EmuHawk/Api/ApiManager.cs +++ b/src/BizHawk.Client.EmuHawk/Api/ApiManager.cs @@ -67,6 +67,7 @@ private static ApiContainer Register( })); } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public static IExternalApiProvider Restart( IEmulatorServiceProvider serviceProvider, IMainFormForApi mainForm, @@ -83,6 +84,7 @@ public static IExternalApiProvider Restart( return new BasicApiProvider(_container); } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public static ApiContainer RestartLua( IEmulatorServiceProvider serviceProvider, Action logCallback, diff --git a/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs b/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs index 37f6120a426..2f812e33b5e 100644 --- a/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs +++ b/src/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs @@ -30,9 +30,8 @@ public CoreInfo(IEmulator emu) .Select(t => new ServiceInfo(t, ser.GetService(t))) .OrderBy(si => si.TypeName) .ToDictionary(static si => si.TypeName); - var notApplicableAttribute = ((ServiceNotApplicableAttribute)Attribute - .GetCustomAttribute(emu.GetType(), typeof(ServiceNotApplicableAttribute))); - NotApplicableTypes = (notApplicableAttribute?.NotApplicableTypes ?? [ ]) + NotApplicableTypes = emu.GetType().GetCustomAttributes() + .SelectMany(static attr => attr.NotApplicableTypes) .Select(static x => x.ToString()).Order().ToList(); } } diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs b/src/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs index 5b872b7c60b..e240d7dbd6e 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs @@ -171,6 +171,7 @@ public void SetFromLong(long val) Text = string.Format(_addressFormatStr, val); } + [CLSCompliant(false)] public void SetFromU64(ulong? val) => Text = val is null ? string.Empty : string.Format(_addressFormatStr, val.Value); @@ -189,6 +190,7 @@ public void SetFromU64(ulong? val) return long.Parse(Text, NumberStyles.HexNumber); } + [CLSCompliant(false)] public ulong? ToU64() => ulong.TryParse(Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out var l) ? l diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs index 0034e9519c3..43431f71fdf 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs @@ -926,6 +926,7 @@ public void ScrollToIndex(int index) PointMouseToNewCell(); } + [CLSCompliant(false)] public bool _programmaticallyChangingRow = false; /// diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 308b1326cd3..ed97e98b24c 100644 --- a/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/src/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -46,6 +46,7 @@ static DisplayManager() private GraphicsControl _graphicsControl => _presentationPanel.GraphicsControl; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public DisplayManager( Config config, IEmulator emulator, diff --git a/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs b/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs index 63b9052336e..04ca1226c6e 100644 --- a/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/Extensions/ToolExtensions.cs @@ -210,6 +210,7 @@ public static ToolStripItem[] RecentMenu( return items.ToArray(); } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public static void HandleLoadError(this RecentFiles recent, IMainFormForTools mainForm, string path, string encodedPath = null) { mainForm.DoWithTempMute(() => diff --git a/src/BizHawk.Client.EmuHawk/IMainFormForTools.cs b/src/BizHawk.Client.EmuHawk/IMainFormForTools.cs index 3a2649872b9..7be483e7b80 100644 --- a/src/BizHawk.Client.EmuHawk/IMainFormForTools.cs +++ b/src/BizHawk.Client.EmuHawk/IMainFormForTools.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public interface IMainFormForTools : IDialogController { CheatCollection CheatList { get; } diff --git a/src/BizHawk.Client.EmuHawk/Input/Input.cs b/src/BizHawk.Client.EmuHawk/Input/Input.cs index bf49e055f47..d80c0bf8d47 100644 --- a/src/BizHawk.Client.EmuHawk/Input/Input.cs +++ b/src/BizHawk.Client.EmuHawk/Input/Input.cs @@ -368,6 +368,7 @@ public string GetNextBindEvent(ref InputEvent lastPress) //controls whether modifier keys will be ignored as key press events //this should be used by hotkey binders, but we may want modifier key events //to get triggered in the main form + [CLSCompliant(false)] public volatile bool EnableIgnoreModifiers = false; } } diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Movie.cs b/src/BizHawk.Client.EmuHawk/MainForm.Movie.cs index f97519c3651..9a59153f10f 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Movie.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Movie.cs @@ -21,6 +21,7 @@ namespace BizHawk.Client.EmuHawk { public partial class MainForm { + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public bool StartNewMovie(IMovie movie, bool newMovie) { if (movie is null) throw new ArgumentNullException(paramName: nameof(movie)); diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 114e781ccc5..5a1b84d6685 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -435,6 +435,7 @@ private void SetImages() CloseRomContextMenuItem.Image = Properties.Resources.Close; } + [CLSCompliant(false)] public MainForm( ParsedCLIFlags cliFlags, IGL gl, @@ -1211,6 +1212,7 @@ private set private OSDManager OSD => DisplayManager.OSD; + [CLSCompliant(Client.Common.MovieSession.CLS_IMOVIESESSION)] public IMovieSession MovieSession { get; } public GameInfo Game { get; private set; } diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/IMainFormForRetroAchievements.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/IMainFormForRetroAchievements.cs index 221b2062981..fb25ea03c9d 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/IMainFormForRetroAchievements.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/IMainFormForRetroAchievements.cs @@ -3,6 +3,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(Client.Common.MovieSession.CLS_IMOVIESESSION)] public interface IMainFormForRetroAchievements { LoadRomArgs CurrentlyOpenRomArgs { get; } diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/LibRCheevos.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/LibRCheevos.cs index 11337d13a94..d3c3cec89a5 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/LibRCheevos.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/LibRCheevos.cs @@ -14,6 +14,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public abstract class LibRCheevos { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RAIntegration.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RAIntegration.cs index e53479612f3..d47908506c9 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RAIntegration.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RAIntegration.cs @@ -12,6 +12,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public partial class RAIntegration : RetroAchievements { private readonly RAInterface RA; diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RAInterface.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RAInterface.cs index 9251f4ba6a8..ba9c622a988 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RAInterface.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RAInterface.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public abstract class RAInterface { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.cs index 07019847e85..d82c64cffdd 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevos.cs @@ -13,6 +13,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public partial class RCheevos : RetroAchievements { internal static readonly LibRCheevos _lib; diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementForm.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementForm.cs index e17ea086734..dd02bf6da62 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementForm.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementForm.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.EmuHawk /// /// Shows information about a specific achievement /// + [CLSCompliant(false)] public partial class RCheevosAchievementForm : Form { public int OrderByKey() diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementListForm.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementListForm.cs index 9dc2db82eb7..04d9b47e45f 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementListForm.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosAchievementListForm.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.EmuHawk /// /// Shows a list of a user's current achievements /// + [CLSCompliant(false)] public partial class RCheevosAchievementListForm : Form { public bool IsShown { get; private set; } diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardForm.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardForm.cs index ff963d6bc13..2b1cd5fafe7 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardForm.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardForm.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.EmuHawk /// /// Shows information about a specific leaderboard /// + [CLSCompliant(false)] public partial class RCheevosLeaderboardForm : Form { private readonly RCheevos.LBoard _lboard; diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardListForm.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardListForm.cs index c7fd886ede2..1e69464daa3 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardListForm.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RCheevosLeaderboardListForm.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.EmuHawk /// /// Shows a list of a user's current leaderboards /// + [CLSCompliant(false)] public partial class RCheevosLeaderboardListForm : Form { public bool IsShown { get; private set; } diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.cs index 9f6cc380491..033b7190368 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.cs @@ -7,6 +7,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public abstract partial class RetroAchievements : IRetroAchievements { protected readonly IDialogParent _dialogParent; diff --git a/src/BizHawk.Client.EmuHawk/ToolAttribute.cs b/src/BizHawk.Client.EmuHawk/ToolAttribute.cs index 77e19b7ce3c..2064964a56f 100644 --- a/src/BizHawk.Client.EmuHawk/ToolAttribute.cs +++ b/src/BizHawk.Client.EmuHawk/ToolAttribute.cs @@ -6,6 +6,7 @@ namespace BizHawk.Client.EmuHawk [AttributeUsage(AttributeTargets.Class)] public sealed class ToolAttribute : Attribute { + [CLSCompliant(false)] public ToolAttribute(bool released, string[] supportedSystems, string[] unsupportedCores) { Released = released; @@ -13,8 +14,11 @@ public ToolAttribute(bool released, string[] supportedSystems, string[] unsuppor UnsupportedCores = unsupportedCores ?? Enumerable.Empty(); } + [CLSCompliant(false)] public ToolAttribute(bool released, string[] supportedSystems) : this(released, supportedSystems, null) {} + public ToolAttribute(bool released) : this(released, null, null) {} + public bool Released { get; } public IEnumerable SupportedSystems { get; } diff --git a/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs b/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs index 8cff7e8ca0c..a75b238b6bd 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs @@ -94,6 +94,7 @@ public unsafe void Clear() Refresh(); } + [CLSCompliant(false)] public static unsafe void Clear_Selected_Region(byte* base_pos, uint num_bytes) { for (uint i = 0; i < num_bytes; i++) { base_pos[i] = 0xFF; } diff --git a/src/BizHawk.Client.EmuHawk/config/GB/CGBColorChooserForm.cs b/src/BizHawk.Client.EmuHawk/config/GB/CGBColorChooserForm.cs index ee111c42aba..fb5cde21a04 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/CGBColorChooserForm.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/CGBColorChooserForm.cs @@ -124,6 +124,7 @@ private void RadioButton1_CheckedChanged(object sender, EventArgs e) } } + [CLSCompliant(false)] public static void DoCGBColorChooserFormDialog(IDialogParent parent, Gameboy.GambatteSettings s) { using var dlg = new CGBColorChooserForm(); diff --git a/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs b/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs index 0fcb641db4e..2dddf7c799a 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs @@ -237,6 +237,7 @@ private void SetAllColors(int[] colors) RefreshAllBackdrops(); } + [CLSCompliant(false)] public static void DoColorChooserFormDialog(IDialogParent parent, Config config, IGameInfo game, Gameboy.GambatteSettings s) { using var dlg = new ColorChooserForm(parent.DialogController, config, game); diff --git a/src/BizHawk.Client.EmuHawk/config/GB/GBLPrefs.cs b/src/BizHawk.Client.EmuHawk/config/GB/GBLPrefs.cs index 6fc315e3bbe..f53adb1c80c 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/GBLPrefs.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/GBLPrefs.cs @@ -48,6 +48,7 @@ private void GetSettings(out GambatteLink.GambatteLinkSettings s, out GambatteLi private bool SyncSettingsChanged => gbPrefControl1.SyncSettingsChanged || gbPrefControl2.SyncSettingsChanged || gbPrefControl3.SyncSettingsChanged || gbPrefControl4.SyncSettingsChanged; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public static DialogResult DoGBLPrefsDialog( Config config, IDialogParent dialogParent, diff --git a/src/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs b/src/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs index 30efb9fa44f..d5365962159 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs @@ -28,6 +28,7 @@ public GBPrefControl() private Gameboy.GambatteSettings _s; private Gameboy.GambatteSyncSettings _ss; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public void PutSettings(Config config, IGameInfo game, IMovieSession movieSession, Gameboy.GambatteSettings s, Gameboy.GambatteSyncSettings ss) { _game = game; @@ -42,6 +43,7 @@ public void PutSettings(Config config, IGameInfo game, IMovieSession movieSessio cbShowBorder.Checked = _s.ShowBorder; } + [CLSCompliant(false)] public void GetSettings(out Gameboy.GambatteSettings s, out Gameboy.GambatteSyncSettings ss) { s = _s; diff --git a/src/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs b/src/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs index d29ffd71b8f..49bcd8433d1 100644 --- a/src/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs +++ b/src/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs @@ -17,6 +17,7 @@ private GBPrefs(IDialogController dialogController) Icon = Properties.Resources.GambatteIcon; } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public static DialogResult DoGBPrefsDialog( Config config, IDialogParent dialogParent, diff --git a/src/BizHawk.Client.EmuHawk/config/PSX/PSXHashDiscs.cs b/src/BizHawk.Client.EmuHawk/config/PSX/PSXHashDiscs.cs index 22f2600179d..3c3a3a186da 100644 --- a/src/BizHawk.Client.EmuHawk/config/PSX/PSXHashDiscs.cs +++ b/src/BizHawk.Client.EmuHawk/config/PSX/PSXHashDiscs.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.EmuHawk [SpecializedTool("Hash Discs")] // puts this in Nymashock's VSystem menu (the generic one), though when opened that way it's not modal public partial class PSXHashDiscs : ToolFormBase { + [CLSCompliant(false)] [RequiredService] public IRedumpDiscChecksumInfo _psx { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs b/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs index aa2b85f7492..72e0b45f6b7 100644 --- a/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs +++ b/src/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs @@ -81,6 +81,7 @@ private void BtnNiceDisplayConfig_Click(object sender, EventArgs e) DialogController.ShowMessageBox("Finetuned Display Options will take effect if you OK from PSX Options"); } + [CLSCompliant(false)] public static DialogResult DoSettingsDialog( Config config, IDialogParent dialogParent, diff --git a/src/BizHawk.Client.EmuHawk/movie/EditCommentsForm.cs b/src/BizHawk.Client.EmuHawk/movie/EditCommentsForm.cs index 0ddb2e07fa3..322d9871cdf 100644 --- a/src/BizHawk.Client.EmuHawk/movie/EditCommentsForm.cs +++ b/src/BizHawk.Client.EmuHawk/movie/EditCommentsForm.cs @@ -12,6 +12,7 @@ public partial class EditCommentsForm : Form private bool _sortReverse; private readonly bool _dispose; + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public EditCommentsForm(IMovie movie, bool readOnly, bool disposeOnClose = false) { _movie = movie; diff --git a/src/BizHawk.Client.EmuHawk/movie/EditSubtitlesForm.cs b/src/BizHawk.Client.EmuHawk/movie/EditSubtitlesForm.cs index 9ac8dc3f28d..128c4bd333b 100644 --- a/src/BizHawk.Client.EmuHawk/movie/EditSubtitlesForm.cs +++ b/src/BizHawk.Client.EmuHawk/movie/EditSubtitlesForm.cs @@ -20,6 +20,7 @@ public partial class EditSubtitlesForm : Form, IDialogParent public IDialogController DialogController { get; } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public EditSubtitlesForm(IDialogController dialogController, IMovie movie, PathEntryCollection pathEntries, bool readOnly, bool disposeOnClose = false) { _pathEntries = pathEntries; diff --git a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs index 7c5caa593da..ca92d6f20e4 100644 --- a/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs +++ b/src/BizHawk.Client.EmuHawk/movie/PlayMovie.cs @@ -39,6 +39,7 @@ public partial class PlayMovie : Form, IDialogParent public IDialogController DialogController => _mainForm; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public PlayMovie( IMainFormForTools mainForm, Config config, diff --git a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs index 716d39e679d..bb7dfee1bd1 100644 --- a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs +++ b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs @@ -36,6 +36,7 @@ public sealed class RecordMovie : Form, IDialogParent public IDialogController DialogController => _mainForm; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public RecordMovie( IMainFormForTools mainForm, Config config, diff --git a/src/BizHawk.Client.EmuHawk/tools/CDL.cs b/src/BizHawk.Client.EmuHawk/tools/CDL.cs index 5c12ce5572e..7dde39683a0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/CDL.cs +++ b/src/BizHawk.Client.EmuHawk/tools/CDL.cs @@ -51,6 +51,7 @@ private void SetCurrentFilename(string fname) UpdateWindowTitle(); } + [CLSCompliant(false)] [RequiredService] public ICodeDataLogger/*?*/ _cdlCore { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/AddBreakpointDialog.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/AddBreakpointDialog.cs index 834922c386b..dde270ba2d9 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/AddBreakpointDialog.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/AddBreakpointDialog.cs @@ -4,6 +4,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public partial class AddBreakpointDialog : Form { public AddBreakpointDialog(BreakpointOperation op) diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/BreakpointControl.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/BreakpointControl.cs index 8202c661319..a0d66248468 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/BreakpointControl.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/BreakpointControl.cs @@ -10,6 +10,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] public partial class BreakpointControl : UserControl, IDialogParent { public IMainFormForTools MainForm { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs index 982195a310f..209cf364e04 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.cs @@ -286,6 +286,7 @@ private void RefreshMenuItem_Click(object sender, EventArgs e) FullUpdate(); } + [CLSCompliant(false)] public void AddBreakpoint(uint address, uint mask, MemoryCallbackType type) { this.BreakPointControl1.AddBreakpoint(address, mask, type); diff --git a/src/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs b/src/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs index 293b626ce6a..16f52cff347 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs @@ -9,6 +9,7 @@ namespace BizHawk.Client.EmuHawk { public partial class RegisterBoxControl : UserControl { + [CLSCompliant(false)] public IDebuggable Core { get; set; } public GenericDebugger ParentDebugger { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs b/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs index ef2619446c8..ecce8d3588e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GB/GBGPUView.cs @@ -15,6 +15,7 @@ public partial class GbGpuView : ToolFormBase, IToolFormAutoConfig public static Icon ToolIcon => Properties.Resources.GambatteIcon; + [CLSCompliant(false)] [RequiredService] public IGameboyCommon/*?*/ _gbCore { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/GB/GBPrinterView.cs b/src/BizHawk.Client.EmuHawk/tools/GB/GBPrinterView.cs index ce543bc3330..5e0e051575a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GB/GBPrinterView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GB/GBPrinterView.cs @@ -20,6 +20,7 @@ public static Icon ToolIcon private readonly ColorMatrix _paperAdjustment; + [CLSCompliant(false)] [RequiredService] public IGameboyCommon/*?*/ _gbCore { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs index 27cfd8a96ed..6a48243ca28 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs @@ -16,6 +16,7 @@ public partial class GbaGpuView : ToolFormBase, IToolFormAutoConfig public static Icon ToolIcon => Properties.Resources.GbaIcon.Value; + [CLSCompliant(false)] [RequiredService] public IGBAGPUViewable/*?*/ _gbaCore { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/GameShark.cs b/src/BizHawk.Client.EmuHawk/tools/GameShark.cs index e926964be1f..c427bd96be3 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GameShark.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GameShark.cs @@ -12,6 +12,7 @@ // SNES: GoldFinger (Action Replay II) Support? namespace BizHawk.Client.EmuHawk { + [CLSCompliant(false)] [Tool( released: true, supportedSystems: new[] { VSystemID.Raw.GB, VSystemID.Raw.GBA, VSystemID.Raw.GEN, VSystemID.Raw.N64, VSystemID.Raw.NES, VSystemID.Raw.PSX, VSystemID.Raw.SAT, VSystemID.Raw.SGB, VSystemID.Raw.SMS, VSystemID.Raw.SNES }, diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs index 47d64a655c3..2adcf1ab111 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/ConsoleLuaLibrary.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.EmuHawk { - public sealed class ConsoleLuaLibrary : LuaLibraryBase + public sealed partial class ConsoleLuaLibrary : LuaLibraryBase { public Lazy AllAPINames { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs index f92a4f7ca9c..d5be9fdaa0c 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/FormsLuaLibrary.cs @@ -12,7 +12,7 @@ namespace BizHawk.Client.EmuHawk { [Description("A library for creating and managing custom dialogs")] - public sealed class FormsLuaLibrary : LuaLibraryBase + public sealed partial class FormsLuaLibrary : LuaLibraryBase { private const string DESC_LINE_OPT_CTRL_POS = " If the x and y parameters are both nil/unset, the control's Location property won't be set. If both are specified, the control will be positioned at (x, y) within the given form."; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs index a8b45ea4edf..9081d7b3e9a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs @@ -14,7 +14,7 @@ namespace BizHawk.Client.EmuHawk { [Description("A library for manipulating the Tastudio dialog of the EmuHawk client")] [LuaLibrary(released: true)] - public sealed class TAStudioLuaLibrary : LuaLibraryBase + public sealed partial class TAStudioLuaLibrary : LuaLibraryBase { private const string DESC_LINE_EDIT_QUEUE_APPLY = " Edits will take effect once you call {{tastudio.applyinputchanges}}."; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs index 8b103066604..b24b073c941 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaCanvas.cs @@ -11,6 +11,7 @@ // ReSharper disable UnusedMember.Global namespace BizHawk.Client.EmuHawk { + [CLSCompliant(LuaFile.CLS_NLUA)] [Description("Represents a canvas object returned by the gui.createcanvas() method")] public sealed class LuaCanvas : Form { diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs index 0c8ae836d7d..c2115d2e963 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaLibraries.cs @@ -15,6 +15,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(NLuaTableHelper.CLS_LUATABLE)] public class LuaLibraries : ILuaLibraries { public static readonly bool IsAvailable = LuaNativeMethodLoader.EnsureNativeMethodsLoaded(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs index 3e1ba9268ae..c263ec36c73 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs @@ -10,6 +10,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(LuaFile.CLS_NLUA)] public class LuaPictureBox : PictureBox { private readonly Dictionary _imageCache = new Dictionary(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaRegisteredFunctionsList.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaRegisteredFunctionsList.cs index b45014be279..f34de6d81c0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaRegisteredFunctionsList.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaRegisteredFunctionsList.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(LuaFile.CLS_NLUA)] public partial class LuaRegisteredFunctionsList : Form { private readonly IMainFormForApi _mainForm; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaWinform.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaWinform.cs index e8052cb9adf..ddb47d8e095 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaWinform.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaWinform.cs @@ -5,6 +5,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(LuaFile.CLS_NLUA)] public partial class LuaWinform : Form { public List ControlEvents { get; } = new List(); diff --git a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs index 7d2e46f7e10..7435737b8be 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.EmuHawk { - [Tool(false, null)] + [Tool(false)] public partial class MacroInputTool : ToolFormBase, IToolFormAutoConfig { [RequiredService] diff --git a/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs b/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs index 208899b3c49..f5b17071c0c 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Macros/MovieZone.cs @@ -16,6 +16,7 @@ public class MovieZone private string _inputKey; private IMovieController _controller; + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public MovieZone(IEmulator emulator, ToolManager tools, IMovieSession movieSession, int start, int length, string key = "") : this(emulator, tools, movieSession) { @@ -127,6 +128,7 @@ private void ReSetLog() _controller = newController; } + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public void PlaceZone(IMovie movie, Config config) { if (movie is ITasMovie tasMovie) @@ -214,6 +216,7 @@ public void Save(string fileName) File.AppendAllLines(fileName, _log); } + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public MovieZone(string fileName, IDialogController dialogController, IEmulator emulator, IMovieSession movieSession, ToolManager tools) : this(emulator, tools, movieSession) { diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs index f9e03ec0e15..6e8de44468a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs @@ -16,12 +16,14 @@ public partial class NESNameTableViewer : ToolFormBase, IToolFormAutoConfig public static Icon ToolIcon => Properties.Resources.NesControllerIcon; + [CLSCompliant(false)] [RequiredService] public INESPPUViewable _nesCore { get; set; } private INESPPUViewable _ppu => _nesCore!; + [CLSCompliant(false)] [RequiredService] public IEmulator _core { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs index 543589ae794..adf2030a8b0 100644 --- a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs +++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs @@ -27,12 +27,14 @@ public static Icon ToolIcon private Bitmap _zoomBoxDefaultImage = new Bitmap(64, 64); private bool _forceChange; + [CLSCompliant(false)] [RequiredService] public INESPPUViewable _nesCore { get; set; } private INESPPUViewable _ppu => _nesCore!; + [CLSCompliant(false)] [RequiredService] public IEmulator _core { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.cs index c21bf8530e9..8c1335214e6 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCEBGViewer.cs @@ -14,6 +14,7 @@ public partial class PceBgViewer : ToolFormBase, IToolFormAutoConfig public static Icon ToolIcon => Properties.Resources.PceIcon; + [CLSCompliant(false)] [RequiredService] public IPceGpuView Viewer { get; private set; } [RequiredService] diff --git a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs index 4cb7fe41fb3..d992dd339f7 100644 --- a/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/PCE/PCETileViewer.cs @@ -14,6 +14,7 @@ public partial class PceTileViewer : ToolFormBase, IToolFormAutoConfig public static Icon ToolIcon => Properties.Resources.PceIcon; + [CLSCompliant(false)] [RequiredService] public IPceGpuView Viewer { get; private set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/HeaderEditor.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/HeaderEditor.cs index b0f5c86aa1e..109ef709324 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/HeaderEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/HeaderEditor.cs @@ -9,6 +9,7 @@ public partial class MovieHeaderEditor : Form private readonly IBasicMovieInfo _movie; private readonly Config _config; + [CLSCompliant(MovieExtensions.CLS_IBASICMOVIEINFO)] public MovieHeaderEditor(IBasicMovieInfo movie, Config config) { _movie = movie; diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index f7478709aaf..f44fe0968af 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -22,11 +22,14 @@ public static Icon ToolIcon public override bool BlocksInputWhenFocused => IsInMenuLoop; + [CLSCompliant(MovieExtensions.CLS_IMOVIE)] public new IMainFormForTools MainForm => base.MainForm; + [CLSCompliant(Client.Common.MovieSession.CLS_IMOVIESESSION)] public new IMovieSession MovieSession => base.MovieSession; // TODO: UI flow that conveniently allows to start from savestate + [CLSCompliant(MovieExtensions.CLS_ITASMOVIE)] public ITasMovie CurrentTasMovie => MovieSession.Movie as ITasMovie; public bool IsInMenuLoop { get; private set; } @@ -105,6 +108,8 @@ public TAStudioSettings() public int ScrollSpeed { get; set; } public bool FollowCursorAlwaysScroll { get; set; } public string FollowCursorScrollMethod { get; set; } + + [CLSCompliant(false)] public uint AutosaveInterval { get; set; } public bool AutosaveAsBk2 { get; set; } public bool AutosaveAsBackupFile { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs index 176a21d712b..8c24825440b 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs @@ -18,8 +18,10 @@ public class ToolFormBase : FormBase, IToolForm, IDialogParent protected InputManager InputManager { get; private set; } + [CLSCompliant(false)] protected IMainFormForTools MainForm { get; private set; } + [CLSCompliant(Client.Common.MovieSession.CLS_IMOVIESESSION)] protected IMovieSession MovieSession { get; private set; } protected IGameInfo Game { get; private set; } @@ -33,6 +35,7 @@ public class ToolFormBase : FormBase, IToolForm, IDialogParent public virtual void Restart() {} + [CLSCompliant(Client.Common.MovieSession.CLS_IMOVIESESSION)] public void SetToolFormBaseProps( DisplayManager displayManager, InputManager inputManager, diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs index bec31d413cb..4c1cc7a1502 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -38,6 +38,7 @@ public class ToolManager /// /// Initializes a new instance of the class. /// + [CLSCompliant(MovieSession.CLS_IMOVIESESSION)] public ToolManager( MainForm owner, Config config, @@ -859,6 +860,7 @@ public bool IsAvailable(Type tool) return tool; } + [CLSCompliant(Watch.CLS_WATCH)] public RamWatch RamWatch => GetTool(); public RamSearch RamSearch => GetTool(); diff --git a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs index 912bf1d3d69..939d12c6efa 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs @@ -20,6 +20,7 @@ public static Icon ToolIcon new FilesystemFilter("Log Files", new[] { "log" }), FilesystemFilter.TextFiles); + [CLSCompliant(false)] [RequiredService] public ITraceable _tracerCore { get; set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs index 5d6847c9012..21808c5e7e1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs @@ -8,6 +8,7 @@ namespace BizHawk.Client.EmuHawk { // TODO: don't use textboxes as labels + [CLSCompliant(Watch.CLS_WATCH)] public partial class RamPoke : Form, IDialogParent { private readonly List _watchList; diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index e54bf3a62ff..fa74b43f328 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -17,6 +17,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(Watch.CLS_WATCH)] public partial class RamWatch : ToolFormBase, IToolFormAutoConfig { public static Icon ToolIcon diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs index 88e6c05b9ac..bf2a05b1d60 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs @@ -11,6 +11,7 @@ namespace BizHawk.Client.EmuHawk { + [CLSCompliant(Watch.CLS_WATCH)] public sealed class WatchEditor : Form { public enum Mode diff --git a/src/BizHawk.Common/BPSPatcher.cs b/src/BizHawk.Common/BPSPatcher.cs index 68b0c50f8f4..5747eb10119 100644 --- a/src/BizHawk.Common/BPSPatcher.cs +++ b/src/BizHawk.Common/BPSPatcher.cs @@ -5,7 +5,7 @@ namespace BizHawk.Common { - public static class BPSPatcher + public static partial class BPSPatcher { /// /// constructor assumes valid header/footer
diff --git a/src/BizHawk.Common/Bit.cs b/src/BizHawk.Common/Bit.cs index 7b911596c35..ce3a0a1c14e 100644 --- a/src/BizHawk.Common/Bit.cs +++ b/src/BizHawk.Common/Bit.cs @@ -3,6 +3,7 @@ namespace BizHawk.Common { // I think this is a little faster with uint than with byte + [CLSCompliant(false)] public readonly record struct Bit(uint _val) { public static implicit operator Bit(int rhs) diff --git a/src/BizHawk.Common/BitReverse.cs b/src/BizHawk.Common/BitReverse.cs index 870af5af79a..ad60278926e 100644 --- a/src/BizHawk.Common/BitReverse.cs +++ b/src/BizHawk.Common/BitReverse.cs @@ -1,5 +1,6 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class BitReverse { static BitReverse() diff --git a/src/BizHawk.Common/Colors.cs b/src/BizHawk.Common/Colors.cs index 4149e3b8973..d7dffbe8ddc 100644 --- a/src/BizHawk.Common/Colors.cs +++ b/src/BizHawk.Common/Colors.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { #pragma warning disable MA0104 // unlikely to conflict with System.Windows.Media.Colors - public static class Colors + public static partial class Colors #pragma warning restore MA0104 { /// This is just Color.FromArgb(alpha, red, green, blue).ToArgb() with extra steps. diff --git a/src/BizHawk.Common/CustomCollections.cs b/src/BizHawk.Common/CustomCollections.cs index a8ad7ee5661..e9411d160b1 100644 --- a/src/BizHawk.Common/CustomCollections.cs +++ b/src/BizHawk.Common/CustomCollections.cs @@ -4,13 +4,14 @@ namespace BizHawk.Common { - public class SortedList : IList, IList, IReadOnlyList + public partial class SortedList : IList, IList, IReadOnlyList where T : IComparable { private const string ERR_MSG_OUT_OF_ORDER = "setting/inserting elements must preserve ordering"; private const string ERR_MSG_WRONG_TYPE = "wrong type"; + [CLSCompliant(false)] //TODO just needs renaming protected readonly List _list; public virtual int Count => _list.Count; diff --git a/src/BizHawk.Common/DeepEquality.cs b/src/BizHawk.Common/DeepEquality.cs index 7a3ac6872d2..fafd9ab4386 100644 --- a/src/BizHawk.Common/DeepEquality.cs +++ b/src/BizHawk.Common/DeepEquality.cs @@ -7,11 +7,9 @@ namespace BizHawk.Common { /// Annotated fields will not be used by for comparison. [AttributeUsage(AttributeTargets.Field)] - public sealed class DeepEqualsIgnoreAttribute : Attribute - { - } + public sealed partial class DeepEqualsIgnoreAttribute : Attribute {} - public static class DeepEquality + public static partial class DeepEquality { /// /// return true if an array type is not 0-based diff --git a/src/BizHawk.Common/DeltaSerializer.cs b/src/BizHawk.Common/DeltaSerializer.cs index 40b48412a33..e6b722978b0 100644 --- a/src/BizHawk.Common/DeltaSerializer.cs +++ b/src/BizHawk.Common/DeltaSerializer.cs @@ -18,7 +18,7 @@ namespace BizHawk.Common /// Subsequently, it may not mind putting some identical bytes within the negative header's block. /// XORing the same values result in 0, so doing this will not leave trace of the original data. /// - public static class DeltaSerializer + public static partial class DeltaSerializer { public static ReadOnlySpan GetDelta(ReadOnlySpan original, ReadOnlySpan current) where T : unmanaged diff --git a/src/BizHawk.Common/EndiannessUtils.cs b/src/BizHawk.Common/EndiannessUtils.cs index af30ffc8998..e39117d7381 100644 --- a/src/BizHawk.Common/EndiannessUtils.cs +++ b/src/BizHawk.Common/EndiannessUtils.cs @@ -2,7 +2,7 @@ namespace BizHawk.Common { - public static unsafe class EndiannessUtils + public static unsafe partial class EndiannessUtils { /// reverses pairs of octets in-place: 0xAABBIIJJPPQQYYZZ <=> 0xBBAAJJIIQQPPZZYY public static void MutatingByteSwap16(Span a) diff --git a/src/BizHawk.Common/Extensions/BufferExtensions.cs b/src/BizHawk.Common/Extensions/BufferExtensions.cs index 662270d524b..d68c89cd433 100644 --- a/src/BizHawk.Common/Extensions/BufferExtensions.cs +++ b/src/BizHawk.Common/Extensions/BufferExtensions.cs @@ -5,7 +5,7 @@ namespace BizHawk.Common.BufferExtensions { - public static class BufferExtensions + public static partial class BufferExtensions { private static readonly char[] HexConvArr = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; diff --git a/src/BizHawk.Common/Extensions/CollectionExtensions.cs b/src/BizHawk.Common/Extensions/CollectionExtensions.cs index c61e2972785..d996649f4b5 100644 --- a/src/BizHawk.Common/Extensions/CollectionExtensions.cs +++ b/src/BizHawk.Common/Extensions/CollectionExtensions.cs @@ -7,7 +7,7 @@ namespace BizHawk.Common.CollectionExtensions { #pragma warning disable MA0104 // unlikely to conflict with System.Collections.Generic.CollectionExtensions - public static class CollectionExtensions + public static partial class CollectionExtensions #pragma warning restore MA0104 { private struct EnumeratorAsEnumerable : IEnumerable diff --git a/src/BizHawk.Common/Extensions/IOExtensions.cs b/src/BizHawk.Common/Extensions/IOExtensions.cs index 5b93f8e634d..affaa725084 100644 --- a/src/BizHawk.Common/Extensions/IOExtensions.cs +++ b/src/BizHawk.Common/Extensions/IOExtensions.cs @@ -3,6 +3,7 @@ namespace BizHawk.Common.IOExtensions { + [CLSCompliant(false)] public static class IOExtensions { private static Encoding? _shiftJIS = null; diff --git a/src/BizHawk.Common/Extensions/NumberExtensions.cs b/src/BizHawk.Common/Extensions/NumberExtensions.cs index 2d459f999f7..565eec0dcd1 100644 --- a/src/BizHawk.Common/Extensions/NumberExtensions.cs +++ b/src/BizHawk.Common/Extensions/NumberExtensions.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common.NumberExtensions { - public static class NumberExtensions + public static partial class NumberExtensions { private const string ERR_MSG_PRECISION_LOSS = "unable to convert from decimal without loss of precision"; @@ -12,6 +12,7 @@ public static string ToHexString(this int n, int numDigits) return string.Format($"{{0:X{numDigits}}}", n); } + [CLSCompliant(false)] public static string ToHexString(this uint n, int numDigits) { return string.Format($"{{0:X{numDigits}}}", n); @@ -22,6 +23,7 @@ public static string ToHexString(this long n, int numDigits) return string.Format($"{{0:X{numDigits}}}", n); } + [CLSCompliant(false)] public static string ToHexString(this ulong n, int numDigits) { return string.Format($"{{0:X{numDigits}}}", n); @@ -37,6 +39,7 @@ public static bool Bit(this int b, int index) return (b & (1 << index)) != 0; } + [CLSCompliant(false)] public static bool Bit(this ushort b, int index) { return (b & (1 << index)) != 0; @@ -219,6 +222,7 @@ public static T Clamp(this T val, T min, T max) where T : IComparable public static IntPtr Plus(this IntPtr p, int offset) => p + offset; + [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr Plus(this IntPtr p, uint offset) { @@ -254,9 +258,11 @@ public static void RotateRightU8(ref byte b, int shift) #pragma warning disable RCS1224 // don't want extension on nonspecific `float`/`uint` /// Reinterprets the byte representation of as a float + [CLSCompliant(false)] public static float ReinterpretAsF32(uint value) => Unsafe.As(ref value); /// Reinterprets the byte representation of as a uint + [CLSCompliant(false)] public static uint ReinterpretAsUInt32(float value) => Unsafe.As(ref value); #pragma warning restore RCS1224 } diff --git a/src/BizHawk.Common/Extensions/NumericStringExtensions.cs b/src/BizHawk.Common/Extensions/NumericStringExtensions.cs index 23f60fe5c1a..75a134e8bac 100644 --- a/src/BizHawk.Common/Extensions/NumericStringExtensions.cs +++ b/src/BizHawk.Common/Extensions/NumericStringExtensions.cs @@ -5,7 +5,7 @@ namespace BizHawk.Common.StringExtensions { /// TODO how many of these methods can be replaced with int.TryParse or similar? --yoshi - public static class NumericStringExtensions + public static partial class NumericStringExtensions { /// iff is either '0' or '1' public static bool IsBinary(this char c) => c == '0' || c == '1'; @@ -52,15 +52,19 @@ public static string CleanHex(this string? raw) #pragma warning disable RCS1224 // don't want extension on nonspecific `string`/`ReadOnlySpan` #if NET7_0_OR_GREATER + [CLSCompliant(false)] public static ushort ParseU16FromHex(ReadOnlySpan str) => ushort.Parse(str, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture); + [CLSCompliant(false)] public static byte ParseU8FromHex(ReadOnlySpan str) => byte.Parse(str, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture); #else + [CLSCompliant(false)] public static ushort ParseU16FromHex(ReadOnlySpan str) => ParseU16FromHex(str.ToString()); + [CLSCompliant(false)] public static ushort ParseU16FromHex(string str) => ushort.Parse(str, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture); diff --git a/src/BizHawk.Common/Extensions/PathExtensions.cs b/src/BizHawk.Common/Extensions/PathExtensions.cs index 235cb8ab29c..5ede96f132f 100644 --- a/src/BizHawk.Common/Extensions/PathExtensions.cs +++ b/src/BizHawk.Common/Extensions/PathExtensions.cs @@ -4,7 +4,7 @@ namespace BizHawk.Common.PathExtensions { - public static class PathExtensions + public static partial class PathExtensions { /// iff indicates a child of , with being returned if either path is /// algorithm for Windows taken from https://stackoverflow.com/a/7710620/7467292 @@ -174,7 +174,7 @@ public static (string? Dir, string FileNoExt, string? FileExt) SplitPathToDirFil : null); } - public static class PathUtils + public static partial class PathUtils { /// absolute path of the user data dir $BIZHAWK_DATA_HOME, or fallback value equal to /// diff --git a/src/BizHawk.Common/Extensions/ReflectionExtensions.cs b/src/BizHawk.Common/Extensions/ReflectionExtensions.cs index 36d04e4d702..52e52cabb11 100644 --- a/src/BizHawk.Common/Extensions/ReflectionExtensions.cs +++ b/src/BizHawk.Common/Extensions/ReflectionExtensions.cs @@ -8,7 +8,7 @@ namespace BizHawk.Common.ReflectionExtensions /// /// Reflection based helper methods /// - public static class ReflectionExtensions + public static partial class ReflectionExtensions { /// filter used when looking for [RequiredApi] et al. by reflection for dependency injection public const BindingFlags DI_TARGET_PROPS = BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic; diff --git a/src/BizHawk.Common/Extensions/SpanSplit.cs b/src/BizHawk.Common/Extensions/SpanSplit.cs index cebec691477..57490a18d3e 100644 --- a/src/BizHawk.Common/Extensions/SpanSplit.cs +++ b/src/BizHawk.Common/Extensions/SpanSplit.cs @@ -16,7 +16,7 @@ namespace BizHawk.Common { - public static class MemoryExtensionsBackports + public static partial class MemoryExtensionsBackports { /// /// Returns a type that allows for enumeration of each element within a split span diff --git a/src/BizHawk.Common/Extensions/StringExtensions.cs b/src/BizHawk.Common/Extensions/StringExtensions.cs index 8fb0ac0c62e..503f01e37fb 100644 --- a/src/BizHawk.Common/Extensions/StringExtensions.cs +++ b/src/BizHawk.Common/Extensions/StringExtensions.cs @@ -7,7 +7,7 @@ namespace BizHawk.Common.StringExtensions { - public static class StringExtensions + public static partial class StringExtensions { /// based on public static char[] CommonPrefix(params string[] strings) diff --git a/src/BizHawk.Common/FFmpegService.cs b/src/BizHawk.Common/FFmpegService.cs index 3fe869332ca..d20c03e2322 100644 --- a/src/BizHawk.Common/FFmpegService.cs +++ b/src/BizHawk.Common/FFmpegService.cs @@ -11,7 +11,7 @@ namespace BizHawk.Common { - public static class FFmpegService + public static partial class FFmpegService { private const string BIN_HOST_URI_LINUX_X64 = "https://github.com/TASEmulators/ffmpeg-binaries/raw/master/ffmpeg-4.4.1-static-linux-x64.7z"; diff --git a/src/BizHawk.Common/FPCtrl.cs b/src/BizHawk.Common/FPCtrl.cs index e52089226ee..29ce02d132f 100644 --- a/src/BizHawk.Common/FPCtrl.cs +++ b/src/BizHawk.Common/FPCtrl.cs @@ -14,7 +14,7 @@ namespace BizHawk.Common // Of course in practice, this only applies to any code using long double, which is rarely used typically // But musl (used for waterbox cores) does end up using it for float formating in the printf family // This can extend to issues in games: https://github.com/TASEmulators/BizHawk/issues/3726 - public static class FPCtrl + public static partial class FPCtrl { [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void FixFPCtrlDelegate(); diff --git a/src/BizHawk.Common/HawkFile/HawkArchiveFileItem.cs b/src/BizHawk.Common/HawkFile/HawkArchiveFileItem.cs index 325af6eb940..b330568eb81 100644 --- a/src/BizHawk.Common/HawkFile/HawkArchiveFileItem.cs +++ b/src/BizHawk.Common/HawkFile/HawkArchiveFileItem.cs @@ -1,7 +1,7 @@ namespace BizHawk.Common { /// Used by to represent archive members. - public readonly struct HawkArchiveFileItem + public readonly partial struct HawkArchiveFileItem { /// the index of the member within the archive, not to be confused with /// this is for implementations to use internally diff --git a/src/BizHawk.Common/HawkFile/HawkFile.cs b/src/BizHawk.Common/HawkFile/HawkFile.cs index c48b1951ad7..1a6d365f07a 100644 --- a/src/BizHawk.Common/HawkFile/HawkFile.cs +++ b/src/BizHawk.Common/HawkFile/HawkFile.cs @@ -20,7 +20,7 @@ namespace BizHawk.Common /// TODO split into "bind" and "open <the bound thing>"
/// TODO scan archive to flatten interior directories down to a path (maintain our own archive item list) /// - public sealed class HawkFile : IDisposable + public sealed partial class HawkFile : IDisposable { [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool PathContainsPipe(string s) diff --git a/src/BizHawk.Common/HawkFile/HawkFilePathAttribute.cs b/src/BizHawk.Common/HawkFile/HawkFilePathAttribute.cs index 54cee27c318..c1b9b103e79 100644 --- a/src/BizHawk.Common/HawkFile/HawkFilePathAttribute.cs +++ b/src/BizHawk.Common/HawkFile/HawkFilePathAttribute.cs @@ -9,5 +9,5 @@ namespace BizHawk.Common /// TODO how are local (\\?\C:\file.txt) and remote (\\?\UNC\Server\Share\file.txt) UNCs treated by WinForms, and are we able to handle at least the valid ones? --yoshi /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue)] - public sealed class HawkFilePathAttribute : Attribute {} + public sealed partial class HawkFilePathAttribute : Attribute {} } diff --git a/src/BizHawk.Common/HawkFile/IFileDearchivalMethod.cs b/src/BizHawk.Common/HawkFile/IFileDearchivalMethod.cs index 54f2c8df94f..2902f176fb1 100644 --- a/src/BizHawk.Common/HawkFile/IFileDearchivalMethod.cs +++ b/src/BizHawk.Common/HawkFile/IFileDearchivalMethod.cs @@ -4,7 +4,7 @@ namespace BizHawk.Common { /// Used by to delegate archive management. - public interface IFileDearchivalMethod where T : IHawkArchiveFile + public partial interface IFileDearchivalMethod where T : IHawkArchiveFile { /// TODO could this receive a itself? possibly handy, in very clever scenarios of mounting fake files bool CheckSignature(string fileName, out int offset, out bool isExecutable); diff --git a/src/BizHawk.Common/HawkFile/IHawkArchiveFile.cs b/src/BizHawk.Common/HawkFile/IHawkArchiveFile.cs index 069d012d46c..027abb2cc5f 100644 --- a/src/BizHawk.Common/HawkFile/IHawkArchiveFile.cs +++ b/src/BizHawk.Common/HawkFile/IHawkArchiveFile.cs @@ -4,7 +4,7 @@ namespace BizHawk.Common { /// - public interface IHawkArchiveFile : IDisposable + public partial interface IHawkArchiveFile : IDisposable { void ExtractFile(int index, Stream stream); diff --git a/src/BizHawk.Common/IImportResolver.cs b/src/BizHawk.Common/IImportResolver.cs index 017b4a784bf..151a46fc489 100644 --- a/src/BizHawk.Common/IImportResolver.cs +++ b/src/BizHawk.Common/IImportResolver.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { /// Implementors are able to provide pointers to functions in dynamically-linked libraries, which are loaded through some undefined mechanism. - public interface IImportResolver + public partial interface IImportResolver { IntPtr GetProcAddrOrZero(string entryPoint); @@ -11,7 +11,7 @@ public interface IImportResolver IntPtr GetProcAddrOrThrow(string entryPoint); } - public class DynamicLibraryImportResolver : IDisposable, IImportResolver + public partial class DynamicLibraryImportResolver : IDisposable, IImportResolver { private IntPtr _p; diff --git a/src/BizHawk.Common/IMonitor.cs b/src/BizHawk.Common/IMonitor.cs index 48f3c793d51..b4a69cacad6 100644 --- a/src/BizHawk.Common/IMonitor.cs +++ b/src/BizHawk.Common/IMonitor.cs @@ -1,13 +1,13 @@ namespace BizHawk.Common { - public interface IMonitor + public partial interface IMonitor { void Enter(); void Exit(); } - public static class MonitorExtensions + public static partial class MonitorExtensions { public static EnterExitWrapper EnterExit(this IMonitor m) => new(m); diff --git a/src/BizHawk.Common/LSB/DlfcnImports.cs b/src/BizHawk.Common/LSB/DlfcnImports.cs index b42ef7263c3..82bcf784e6c 100644 --- a/src/BizHawk.Common/LSB/DlfcnImports.cs +++ b/src/BizHawk.Common/LSB/DlfcnImports.cs @@ -7,7 +7,7 @@ namespace BizHawk.Common /// For Linux, these come from libdl historically /// (Although since glibc 2.34 these are just in libc, with libdl just calling into libc) ///
- public static class LinuxDlfcnImports + public static partial class LinuxDlfcnImports { public const int RTLD_NOW = 2; diff --git a/src/BizHawk.Common/LSB/XFixesImports.cs b/src/BizHawk.Common/LSB/XFixesImports.cs index e2cbb464ee9..0bb33be7302 100644 --- a/src/BizHawk.Common/LSB/XFixesImports.cs +++ b/src/BizHawk.Common/LSB/XFixesImports.cs @@ -2,7 +2,7 @@ namespace BizHawk.Common { - public static class XfixesImports + public static partial class XfixesImports { private const string XFIXES = "libXfixes.so.3"; diff --git a/src/BizHawk.Common/LSB/XInput2Imports.cs b/src/BizHawk.Common/LSB/XInput2Imports.cs index 507d08fe362..5a2aeec6a27 100644 --- a/src/BizHawk.Common/LSB/XInput2Imports.cs +++ b/src/BizHawk.Common/LSB/XInput2Imports.cs @@ -2,6 +2,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class XInput2Imports { private const string XI2 = "libXi.so.6"; diff --git a/src/BizHawk.Common/LSB/XlibImports.cs b/src/BizHawk.Common/LSB/XlibImports.cs index 23cdcbb297f..11bb64b2f8a 100644 --- a/src/BizHawk.Common/LSB/XlibImports.cs +++ b/src/BizHawk.Common/LSB/XlibImports.cs @@ -4,6 +4,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class XlibImports { private const string XLIB = "libX11.so.6"; diff --git a/src/BizHawk.Common/Log.cs b/src/BizHawk.Common/Log.cs index d729e8d43f7..f177b925cb8 100644 --- a/src/BizHawk.Common/Log.cs +++ b/src/BizHawk.Common/Log.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { - public static class Log + public static partial class Log { static Log() { diff --git a/src/BizHawk.Common/MemoryBlock/IMemoryBlockPal.cs b/src/BizHawk.Common/MemoryBlock/IMemoryBlockPal.cs index 3355fde7163..45912e5d98e 100644 --- a/src/BizHawk.Common/MemoryBlock/IMemoryBlockPal.cs +++ b/src/BizHawk.Common/MemoryBlock/IMemoryBlockPal.cs @@ -3,6 +3,7 @@ namespace BizHawk.Common /// /// Platform abstraction layer over mmap like functionality /// + [CLSCompliant(false)] public interface IMemoryBlockPal : IDisposable { ulong Start { get; } diff --git a/src/BizHawk.Common/MemoryBlock/MemoryBlock.cs b/src/BizHawk.Common/MemoryBlock/MemoryBlock.cs index f7b416c36d8..2e3f3d53d9c 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryBlock.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryBlock.cs @@ -2,6 +2,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public class MemoryBlock : IDisposable { /// allocate bytes diff --git a/src/BizHawk.Common/MemoryBlock/MemoryBlockUtils.cs b/src/BizHawk.Common/MemoryBlock/MemoryBlockUtils.cs index 6364ed5a841..e7a1823c397 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryBlockUtils.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryBlockUtils.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { - public static class MemoryBlockUtils + public static partial class MemoryBlockUtils { /// /// copy `len` bytes from `src` to `dest` @@ -45,6 +45,7 @@ public static void CopySome(Stream src, Stream dst, long len) /// /// bitmask corresponding to PageSize /// + [CLSCompliant(false)] public const ulong PageMask = PageSize - 1; static MemoryBlockUtils() @@ -61,24 +62,28 @@ static MemoryBlockUtils() /// /// true if addr is aligned /// + [CLSCompliant(false)] public static bool Aligned(ulong addr) => (addr & PageMask) == 0; /// /// align address down to previous page boundary /// + [CLSCompliant(false)] public static ulong AlignDown(ulong addr) => addr & ~PageMask; /// /// align address up to next page boundary /// + [CLSCompliant(false)] public static ulong AlignUp(ulong addr) => ((addr - 1) | PageMask) + 1; /// /// return the minimum number of pages needed to hold size /// + [CLSCompliant(false)] public static int PagesNeeded(ulong size) => (int)((size + PageMask) >> PageShift); } @@ -87,8 +92,9 @@ public static int PagesNeeded(ulong size) // So we store them as long/ulong instead in many places, and use these helpers // to convert to IntPtr when needed - public static class Z + public static partial class Z { + [CLSCompliant(false)] public static IntPtr US(ulong l) { if (IntPtr.Size == 8) @@ -97,6 +103,7 @@ public static IntPtr US(ulong l) return (IntPtr)(int)l; } + [CLSCompliant(false)] public static UIntPtr UU(ulong l) { if (UIntPtr.Size == 8) @@ -113,6 +120,7 @@ public static IntPtr SS(long l) return (IntPtr)(int)l; } + [CLSCompliant(false)] public static UIntPtr SU(long l) { if (UIntPtr.Size == 8) diff --git a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs index d82d00d6172..ca4fdf9d8b2 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs @@ -6,7 +6,7 @@ namespace BizHawk.Common /// Create a stream that allows read/write over a set of unmanaged memory pointers /// The validity and lifetime of those pointers is YOUR responsibility /// - public unsafe class MemoryViewStream : Stream, ISpanStream + public unsafe partial class MemoryViewStream : Stream, ISpanStream { public MemoryViewStream(bool readable, bool writable, long ptr, long length) { diff --git a/src/BizHawk.Common/MultiPredicateSort.cs b/src/BizHawk.Common/MultiPredicateSort.cs index bfb8f8b7f68..4f719f8b948 100644 --- a/src/BizHawk.Common/MultiPredicateSort.cs +++ b/src/BizHawk.Common/MultiPredicateSort.cs @@ -6,7 +6,7 @@ namespace BizHawk.Common #if false /// Sorts using a reorderable list of predicates. /// - public sealed class MultiPredicateSort + public sealed partial class MultiPredicateSort { private readonly int _count; @@ -43,7 +43,7 @@ public List AppliedTo(IReadOnlyCollection list) #if false /// #endif - public sealed class RigidMultiPredicateSort + public sealed partial class RigidMultiPredicateSort { private readonly IReadOnlyDictionary> _predicates; diff --git a/src/BizHawk.Common/OSTailoredCode.cs b/src/BizHawk.Common/OSTailoredCode.cs index f5c4f2e2ea6..90f504d849d 100644 --- a/src/BizHawk.Common/OSTailoredCode.cs +++ b/src/BizHawk.Common/OSTailoredCode.cs @@ -7,7 +7,7 @@ namespace BizHawk.Common { - public static class OSTailoredCode + public static partial class OSTailoredCode { public static readonly DistinctOS CurrentOS; public static readonly bool IsUnixHost; @@ -90,6 +90,7 @@ static OSTailoredCode() private static readonly Lazy _isWSL = new(static () => IsUnixHost && SimpleSubshell(cmd: "uname", args: "-r", noOutputMsg: "missing uname?").ContainsIgnoreCase("microsoft")); + [CLSCompliant(false)] public static (WindowsVersion Version, Version? Win10PlusVersion)? HostWindowsVersion => _HostWindowsVersion.Value; public static bool IsWSL => _isWSL.Value; @@ -247,6 +248,7 @@ public enum DistinctOS : byte Unknown, } + [CLSCompliant(false)] public enum WindowsVersion { XP, diff --git a/src/BizHawk.Common/POSIX/DlfcnImports.cs b/src/BizHawk.Common/POSIX/DlfcnImports.cs index 8d4cc5ad660..106eecbe06e 100644 --- a/src/BizHawk.Common/POSIX/DlfcnImports.cs +++ b/src/BizHawk.Common/POSIX/DlfcnImports.cs @@ -8,7 +8,7 @@ namespace BizHawk.Common /// Linux is a partial exception, as they weren't in libc until glibc 2.34 /// (For reference, Debian 10, the current Debian oldoldstable, is on glibc 2.28) ///
- public static class PosixDlfcnImports + public static partial class PosixDlfcnImports { public const int RTLD_NOW = 2; diff --git a/src/BizHawk.Common/POSIX/MmanImports.cs b/src/BizHawk.Common/POSIX/MmanImports.cs index 43f5f0e715d..8131173a338 100644 --- a/src/BizHawk.Common/POSIX/MmanImports.cs +++ b/src/BizHawk.Common/POSIX/MmanImports.cs @@ -2,6 +2,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class MmanImports { [Flags] diff --git a/src/BizHawk.Common/PropertyGridConverters/BizDateTimeConverter.cs b/src/BizHawk.Common/PropertyGridConverters/BizDateTimeConverter.cs index 970cab5f2e1..e5fc5d032e5 100644 --- a/src/BizHawk.Common/PropertyGridConverters/BizDateTimeConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/BizDateTimeConverter.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { - public class BizDateTimeConverter : DateTimeConverter + public partial class BizDateTimeConverter : DateTimeConverter { public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType) { diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs index dd234622974..75dae18073f 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs @@ -9,7 +9,7 @@ namespace BizHawk.Common /// /// Used in conjunction with the will perform range validation against a float value using PropertyGrid /// - public class ConstrainedFloatConverter : TypeConverter + public partial class ConstrainedFloatConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs index b5033c90308..47bb8b5d60d 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs @@ -9,7 +9,7 @@ namespace BizHawk.Common /// /// Used in conjunction with the will perform range validation against an int value using PropertyGrid /// - public class ConstrainedIntConverter : TypeConverter + public partial class ConstrainedIntConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs index aaf7e392634..13a75cfed2d 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs @@ -9,7 +9,7 @@ namespace BizHawk.Common /// /// Used in conjunction with the will perform max length validation against a string value using PropertyGrid /// - public class ConstrainedStringConverter : TypeConverter + public partial class ConstrainedStringConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) { diff --git a/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs b/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs index c894f4d6ed9..195d0c3ee02 100644 --- a/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs @@ -6,7 +6,7 @@ namespace BizHawk.Common { - public class DescribableEnumConverter : EnumConverter + public partial class DescribableEnumConverter : EnumConverter { private readonly Type enumType; diff --git a/src/BizHawk.Common/PtrToStringUtf8.cs b/src/BizHawk.Common/PtrToStringUtf8.cs index 3d655682b88..197ed99c31f 100644 --- a/src/BizHawk.Common/PtrToStringUtf8.cs +++ b/src/BizHawk.Common/PtrToStringUtf8.cs @@ -2,7 +2,7 @@ namespace BizHawk.Common { - public static class Mershul + public static partial class Mershul { /// /// TODO: Update to a version of .nyet that includes this diff --git a/src/BizHawk.Common/Ranges.cs b/src/BizHawk.Common/Ranges.cs index a25774ac599..607198882a3 100644 --- a/src/BizHawk.Common/Ranges.cs +++ b/src/BizHawk.Common/Ranges.cs @@ -7,7 +7,7 @@ namespace BizHawk.Common { /// represents a closed range of (class invariant: ) #pragma warning disable CA1715 // breaks IInterface convention - public interface Range where T : unmanaged, IComparable + public partial interface Range where T : unmanaged, IComparable #pragma warning restore CA1715 { T Start { get; } @@ -16,7 +16,7 @@ public interface Range where T : unmanaged, IComparable } /// represents a closed range of which can be grown or shrunk (class invariant: ) - public class MutableRange : Range where T : unmanaged, IComparable + public partial class MutableRange : Range where T : unmanaged, IComparable { private (T Start, T EndInclusive) r; @@ -65,7 +65,7 @@ public void Overwrite(T start, T endInclusive) /// non-generic overloads are used where the method requires an increment or decrement
/// TODO which Enumerate algorithm is faster - yield return in loop or ? ///
- public static class RangeExtensions + public static partial class RangeExtensions { private const ulong MIN_LONG_NEGATION_AS_ULONG = 9223372036854775808UL; @@ -82,27 +82,35 @@ public static T ConstrainWithin(this T value, Range range) where T : unman /// true iff is contained in ( is considered to be in the range if it's exactly equal to either bound) public static bool Contains(this Range range, T value) where T : unmanaged, IComparable => !(value.CompareTo(range.Start) < 0 || range.EndInclusive.CompareTo(value) < 0); + [CLSCompliant(false)] public static uint Count(this Range range) => (uint) (range.EndInclusive - range.Start + 1); /// beware integer overflow when contains every value + [CLSCompliant(false)] public static uint Count(this Range range) => (uint) ((long) range.EndInclusive - range.Start) + 1U; /// + [CLSCompliant(false)] public static ulong Count(this Range range) => (range.Contains(0L) ? (range.Start == long.MinValue ? MIN_LONG_NEGATION_AS_ULONG : (ulong) -range.Start) + (ulong) range.EndInclusive : (ulong) (range.EndInclusive - range.Start) ) + 1UL; + [CLSCompliant(false)] public static uint Count(this Range range) => (uint) (range.EndInclusive - range.Start + 1); + [CLSCompliant(false)] public static uint Count(this Range range) => (uint) (range.EndInclusive - range.Start + 1); /// + [CLSCompliant(false)] public static uint Count(this Range range) => range.EndInclusive - range.Start + 1U; /// + [CLSCompliant(false)] public static ulong Count(this Range range) => range.EndInclusive - range.Start + 1UL; + [CLSCompliant(false)] public static uint Count(this Range range) => (uint) (range.EndInclusive - range.Start + 1); public static void Deconstruct(this Range range, out T start, out T endInclusive) @@ -152,10 +160,12 @@ public static IEnumerable Enumerate(this Range range) yield return l; } + [CLSCompliant(false)] public static IEnumerable Enumerate(this Range range) => Enumerable.Range(range.Start, (int) range.Count()).Select(i => (sbyte) i); public static IEnumerable Enumerate(this Range range) => Enumerable.Range(range.Start, (int) range.Count()).Select(i => (short) i); + [CLSCompliant(false)] public static IEnumerable Enumerate(this Range range) { var i = range.Start; @@ -163,6 +173,7 @@ public static IEnumerable Enumerate(this Range range) yield return i; } + [CLSCompliant(false)] public static IEnumerable Enumerate(this Range range) { var l = range.Start; @@ -170,6 +181,7 @@ public static IEnumerable Enumerate(this Range range) yield return l; } + [CLSCompliant(false)] public static IEnumerable Enumerate(this Range range) => Enumerable.Range(range.Start, (int) range.Count()).Select(i => (ushort) i); public static Range GetImmutableCopy(this Range range) where T : unmanaged, IComparable => GetMutableCopy(range); @@ -195,6 +207,7 @@ public static MutableRange MutableRangeToExclusive(this long start, long e : new MutableRange(start, endExclusive - 1L); /// + [CLSCompliant(false)] public static MutableRange MutableRangeToExclusive(this sbyte start, sbyte endExclusive) => endExclusive == sbyte.MinValue ? throw ExclusiveRangeMinValExc : new MutableRange(start, (sbyte) (endExclusive - 1)); @@ -205,16 +218,19 @@ public static MutableRange MutableRangeToExclusive(this short start, shor : new MutableRange(start, (short) (endExclusive - 1)); /// + [CLSCompliant(false)] public static MutableRange MutableRangeToExclusive(this uint start, uint endExclusive) => endExclusive == uint.MinValue ? throw ExclusiveRangeMinValExc : new MutableRange(start, endExclusive - 1U); /// + [CLSCompliant(false)] public static MutableRange MutableRangeToExclusive(this ulong start, ulong endExclusive) => endExclusive == ulong.MinValue ? throw ExclusiveRangeMinValExc : new MutableRange(start, endExclusive - 1UL); /// + [CLSCompliant(false)] public static MutableRange MutableRangeToExclusive(this ushort start, ushort endExclusive) => endExclusive == ushort.MinValue ? throw ExclusiveRangeMinValExc : new MutableRange(start, (ushort) (endExclusive - 1U)); @@ -233,18 +249,22 @@ public static MutableRange MutableRangeToExclusive(this ushort start, us public static Range RangeToExclusive(this long start, long endExclusive) => MutableRangeToExclusive(start, endExclusive); /// + [CLSCompliant(false)] public static Range RangeToExclusive(this sbyte start, sbyte endExclusive) => MutableRangeToExclusive(start, endExclusive); /// public static Range RangeToExclusive(this short start, short endExclusive) => MutableRangeToExclusive(start, endExclusive); /// + [CLSCompliant(false)] public static Range RangeToExclusive(this uint start, uint endExclusive) => MutableRangeToExclusive(start, endExclusive); /// + [CLSCompliant(false)] public static Range RangeToExclusive(this ulong start, ulong endExclusive) => MutableRangeToExclusive(start, endExclusive); /// + [CLSCompliant(false)] public static Range RangeToExclusive(this ushort start, ushort endExclusive) => MutableRangeToExclusive(start, endExclusive); /// true iff is strictly contained in ( is considered to be OUTSIDE the range if it's exactly equal to either bound) diff --git a/src/BizHawk.Common/SecretStrings.cs b/src/BizHawk.Common/SecretStrings.cs index b39edd7f799..d630aea9793 100644 --- a/src/BizHawk.Common/SecretStrings.cs +++ b/src/BizHawk.Common/SecretStrings.cs @@ -15,7 +15,7 @@ namespace BizHawk.Common /// 5. In the case Environment.MachineName is the only thing available, the protection is low for a skilled attack, but sufficient for low grade attacks. /// (Probably should just keep these strings outside of the main config file, but still protect them as to prevent secrets being present as plaintext) /// - public static class SecretStrings + public static partial class SecretStrings { private static readonly Aes _aes; diff --git a/src/BizHawk.Common/Serializer.cs b/src/BizHawk.Common/Serializer.cs index 07302f92607..91ec8826762 100644 --- a/src/BizHawk.Common/Serializer.cs +++ b/src/BizHawk.Common/Serializer.cs @@ -10,7 +10,7 @@ namespace BizHawk.Common { - public class Serializer + public partial class Serializer { public Serializer() { } @@ -255,6 +255,7 @@ public void Sync(string name, ref short[] val, bool useNull) } } + [CLSCompliant(false)] public void Sync(string name, ref ushort[] val, bool useNull) { if (IsText) @@ -293,6 +294,7 @@ public void SyncText(string name, ref short[] val, bool useNull) } } + [CLSCompliant(false)] public void SyncText(string name, ref ushort[] val, bool useNull) { if (IsReader) @@ -353,6 +355,7 @@ public void SyncText(string name, ref int[] val, bool useNull) } } + [CLSCompliant(false)] public void Sync(string name, ref uint[] val, bool useNull) { if (IsText) @@ -369,6 +372,7 @@ public void Sync(string name, ref uint[] val, bool useNull) } } + [CLSCompliant(false)] public void SyncText(string name, ref uint[] val, bool useNull) { if (IsReader) @@ -467,6 +471,7 @@ public void SyncText(string name, ref double[] val, bool useNull) } } + [CLSCompliant(false)] public void Sync(string name, ref Bit val) { if (IsText) @@ -483,6 +488,7 @@ public void Sync(string name, ref Bit val) } } + [CLSCompliant(false)] public void SyncText(string name, ref Bit val) { if (IsReader) @@ -511,6 +517,7 @@ public void Sync(string name, ref byte val) } } + [CLSCompliant(false)] public void Sync(string name, ref ushort val) { if (IsText) @@ -527,6 +534,7 @@ public void Sync(string name, ref ushort val) } } + [CLSCompliant(false)] public void Sync(string name, ref uint val) { if (IsText) @@ -543,6 +551,7 @@ public void Sync(string name, ref uint val) } } + [CLSCompliant(false)] public void Sync(string name, ref sbyte val) { if (IsText) @@ -607,6 +616,7 @@ public void Sync(string name, ref long val) } } + [CLSCompliant(false)] public void Sync(string name, ref ulong val) { if (IsText) diff --git a/src/BizHawk.Common/SimpleTime.cs b/src/BizHawk.Common/SimpleTime.cs index 521d8e2c60e..0e806030e6a 100644 --- a/src/BizHawk.Common/SimpleTime.cs +++ b/src/BizHawk.Common/SimpleTime.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { /// Create a new instance of this class in a block, and it will measure the time elapsed until the block finishes executing. Provide a label to print to stdout or provide a callback for custom behaviour. - public class SimpleTime : IDisposable + public partial class SimpleTime : IDisposable { private readonly Action _callback; diff --git a/src/BizHawk.Common/SpanStream.cs b/src/BizHawk.Common/SpanStream.cs index 4a604d5c35a..6d520337634 100644 --- a/src/BizHawk.Common/SpanStream.cs +++ b/src/BizHawk.Common/SpanStream.cs @@ -6,12 +6,12 @@ namespace BizHawk.Common /// /// TODO: Switch to dotnet core and remove this junkus /// - public interface ISpanStream + public partial interface ISpanStream { void Write(ReadOnlySpan buffer); int Read(Span buffer); } - public static class SpanStream + public static partial class SpanStream { /// a stream in spanstream mode, or a newly-created wrapper which provides that functionality public static ISpanStream GetOrBuild(Stream s) diff --git a/src/BizHawk.Common/TempFileManager.cs b/src/BizHawk.Common/TempFileManager.cs index bacbb91c2aa..217cc24022d 100644 --- a/src/BizHawk.Common/TempFileManager.cs +++ b/src/BizHawk.Common/TempFileManager.cs @@ -13,7 +13,7 @@ namespace BizHawk.Common /// Files shouldn't be named that unless they're safe to delete, but notably, they may still be in use. That won't hurt this component. /// When they're no longer in use, this component will then be able to delete them. /// - public static class TempFileManager + public static partial class TempFileManager { // TODO - manage paths other than %temp%, make not static, or allow adding multiple paths to static instance diff --git a/src/BizHawk.Common/UndoHistory.cs b/src/BizHawk.Common/UndoHistory.cs index 88969c92fba..28d132831dd 100644 --- a/src/BizHawk.Common/UndoHistory.cs +++ b/src/BizHawk.Common/UndoHistory.cs @@ -2,7 +2,7 @@ namespace BizHawk.Common { - public class UndoHistory + public partial class UndoHistory { private readonly T _blankState; diff --git a/src/BizHawk.Common/Util.cs b/src/BizHawk.Common/Util.cs index 883f1f2ec58..371a596c863 100644 --- a/src/BizHawk.Common/Util.cs +++ b/src/BizHawk.Common/Util.cs @@ -13,7 +13,7 @@ namespace BizHawk.Common { - public static class Util + public static partial class Util { [Conditional("DEBUG")] public static void BreakDebuggerIfAttached() diff --git a/src/BizHawk.Common/VersionInfo.cs b/src/BizHawk.Common/VersionInfo.cs index d850319fedf..fc52a1c8050 100644 --- a/src/BizHawk.Common/VersionInfo.cs +++ b/src/BizHawk.Common/VersionInfo.cs @@ -65,6 +65,7 @@ public static string GetEmuVersion() => DeveloperBuild ? $"GIT {GIT_BRANCH}#{GIT_SHORTHASH}" : $"Version {MainVersion}"; // intentionally leaving '#' here to differentiate it from the "proper" one in `Help` > `About...` --yoshi /// "2.5.1" => 0x02050100 + [CLSCompliant(false)] public static uint VersionStrToInt(string s) { var a = s.Split('.'); diff --git a/src/BizHawk.Common/Win32/AVIWriterImports.cs b/src/BizHawk.Common/Win32/AVIWriterImports.cs index 377e548fc2e..b0dc9b6014f 100644 --- a/src/BizHawk.Common/Win32/AVIWriterImports.cs +++ b/src/BizHawk.Common/Win32/AVIWriterImports.cs @@ -7,6 +7,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class AVIWriterImports { [Flags] diff --git a/src/BizHawk.Common/Win32/CWDHacks.cs b/src/BizHawk.Common/Win32/CWDHacks.cs index 3409395ebf4..232f6ee20cc 100644 --- a/src/BizHawk.Common/Win32/CWDHacks.cs +++ b/src/BizHawk.Common/Win32/CWDHacks.cs @@ -3,7 +3,7 @@ namespace BizHawk.Common { /// Gets/Sets the current working directory while bypassing the security checks triggered by the public API (). - public static class CWDHacks + public static partial class CWDHacks { [DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] private static extern unsafe int GetCurrentDirectoryW(int nBufferLength, char* lpBuffer); diff --git a/src/BizHawk.Common/Win32/CommctrlImports.cs b/src/BizHawk.Common/Win32/CommctrlImports.cs index 9eaaaa5bf46..cc85543846f 100644 --- a/src/BizHawk.Common/Win32/CommctrlImports.cs +++ b/src/BizHawk.Common/Win32/CommctrlImports.cs @@ -7,6 +7,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class CommctrlImports { public const int LVM_FIRST = 0x1000; @@ -39,6 +40,7 @@ public struct HDITEMW // _WIN32_WINNT >= 0x0600 public uint state; + [CLSCompliant(false)] [Flags] public enum Mask : uint { diff --git a/src/BizHawk.Common/Win32/HeapApiImports.cs b/src/BizHawk.Common/Win32/HeapApiImports.cs index 8f9d884c25b..0f0bf384b1f 100644 --- a/src/BizHawk.Common/Win32/HeapApiImports.cs +++ b/src/BizHawk.Common/Win32/HeapApiImports.cs @@ -5,6 +5,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class HeapApiImports { [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] diff --git a/src/BizHawk.Common/Win32/LoaderApiImports.cs b/src/BizHawk.Common/Win32/LoaderApiImports.cs index f5913f17282..16e31d892b7 100644 --- a/src/BizHawk.Common/Win32/LoaderApiImports.cs +++ b/src/BizHawk.Common/Win32/LoaderApiImports.cs @@ -4,7 +4,7 @@ namespace BizHawk.Common { - public static class LoaderApiImports + public static partial class LoaderApiImports { [DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] public static extern IntPtr GetModuleHandleW(string? lpModuleName); diff --git a/src/BizHawk.Common/Win32/MemoryApiImports.cs b/src/BizHawk.Common/Win32/MemoryApiImports.cs index 0731a4d93f4..4c9f4152d9a 100644 --- a/src/BizHawk.Common/Win32/MemoryApiImports.cs +++ b/src/BizHawk.Common/Win32/MemoryApiImports.cs @@ -5,6 +5,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class MemoryApiImports { [Flags] diff --git a/src/BizHawk.Common/Win32/MotWHack.cs b/src/BizHawk.Common/Win32/MotWHack.cs index 52e2a645b4f..6e358dbb59e 100644 --- a/src/BizHawk.Common/Win32/MotWHack.cs +++ b/src/BizHawk.Common/Win32/MotWHack.cs @@ -1,7 +1,7 @@ namespace BizHawk.Common { /// This code (and an import for ) is duplicated in each executable project because it needs to be used before loading assemblies. - public static class MotWHack + public static partial class MotWHack { public static void RemoveMOTW(string path) => Win32Imports.DeleteFileW($"{path}:Zone.Identifier"); diff --git a/src/BizHawk.Common/Win32/Ole32Imports.cs b/src/BizHawk.Common/Win32/Ole32Imports.cs index 1571a1a03ce..d8fa0021c4f 100644 --- a/src/BizHawk.Common/Win32/Ole32Imports.cs +++ b/src/BizHawk.Common/Win32/Ole32Imports.cs @@ -4,6 +4,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class Ole32Imports { public enum CLSCTX : uint diff --git a/src/BizHawk.Common/Win32/RawInputImports.cs b/src/BizHawk.Common/Win32/RawInputImports.cs index 52175dc7d3c..17a60c053b3 100644 --- a/src/BizHawk.Common/Win32/RawInputImports.cs +++ b/src/BizHawk.Common/Win32/RawInputImports.cs @@ -5,6 +5,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class RawInputImports { /// diff --git a/src/BizHawk.Common/Win32/Shell32Imports.cs b/src/BizHawk.Common/Win32/Shell32Imports.cs index 676a08d00b6..44307e45331 100644 --- a/src/BizHawk.Common/Win32/Shell32Imports.cs +++ b/src/BizHawk.Common/Win32/Shell32Imports.cs @@ -7,6 +7,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class Shell32Imports { public const int BFFM_INITIALIZED = 1; diff --git a/src/BizHawk.Common/Win32/ShellLinkImports.cs b/src/BizHawk.Common/Win32/ShellLinkImports.cs index 797f899b88d..92b093be11d 100644 --- a/src/BizHawk.Common/Win32/ShellLinkImports.cs +++ b/src/BizHawk.Common/Win32/ShellLinkImports.cs @@ -9,6 +9,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class ShellLinkImports { /// The IShellLink interface allows Shell links to be created, modified, and resolved diff --git a/src/BizHawk.Common/Win32/ThreadHacks.cs b/src/BizHawk.Common/Win32/ThreadHacks.cs index ed6be0216ba..5f70585b5db 100644 --- a/src/BizHawk.Common/Win32/ThreadHacks.cs +++ b/src/BizHawk.Common/Win32/ThreadHacks.cs @@ -10,6 +10,7 @@ namespace BizHawk.Common /// largely from https://raw.githubusercontent.com/noserati/tpl/master/ThreadAffinityTaskScheduler.cs (MIT license)
/// most of this is used in #if false code in mupen64plusApi.frame_advance(), don't delete it /// + [CLSCompliant(false)] public static class ThreadHacks { public const uint QS_ALLINPUT = 0x4FFU; diff --git a/src/BizHawk.Common/Win32/Win32Imports.cs b/src/BizHawk.Common/Win32/Win32Imports.cs index 7bdc80a4961..7e8658838c4 100644 --- a/src/BizHawk.Common/Win32/Win32Imports.cs +++ b/src/BizHawk.Common/Win32/Win32Imports.cs @@ -12,6 +12,7 @@ namespace BizHawk.Common /// /// This is more just an assorted bunch of Win32 functions /// + [CLSCompliant(false)] public static class Win32Imports { public const int MAX_PATH = 260; @@ -53,6 +54,7 @@ public enum TPM [DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)] public static extern unsafe int FormatMessageW(int flags, IntPtr source, uint messageId, uint languageId, char* outMsg, int size, IntPtr args); + [CLSCompliant(false)] [DllImport("kernel32.dll", ExactSpelling = true)] public static extern uint GetLastError(); @@ -62,6 +64,7 @@ public enum TPM [DllImport("user32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)] public static extern bool SystemParametersInfoW(int uAction, int uParam, ref int lpvParam, int flags); + [CLSCompliant(false)] [DllImport("winmm.dll", ExactSpelling = true)] public static extern uint timeBeginPeriod(uint uMilliseconds); diff --git a/src/BizHawk.Common/Win32/Win32ShellContextMenu.cs b/src/BizHawk.Common/Win32/Win32ShellContextMenu.cs index 88bbc0fd062..2ef60126842 100644 --- a/src/BizHawk.Common/Win32/Win32ShellContextMenu.cs +++ b/src/BizHawk.Common/Win32/Win32ShellContextMenu.cs @@ -5,7 +5,7 @@ namespace BizHawk.Common { - public unsafe class Win32ShellContextMenu : IDisposable + public unsafe partial class Win32ShellContextMenu : IDisposable { [StructLayout(LayoutKind.Sequential)] private struct IShellItem diff --git a/src/BizHawk.Common/Win32/WmImports.cs b/src/BizHawk.Common/Win32/WmImports.cs index 9ddb1f45898..35a13c174d7 100644 --- a/src/BizHawk.Common/Win32/WmImports.cs +++ b/src/BizHawk.Common/Win32/WmImports.cs @@ -6,6 +6,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class WmImports { public const uint PM_REMOVE = 0x0001U; @@ -31,9 +32,11 @@ public struct MSG public uint lPrivate; } + [CLSCompliant(false)] [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate IntPtr WNDPROC(IntPtr hWnd, uint uMsg, IntPtr wParam, IntPtr lParam); + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct WNDCLASSW { diff --git a/src/BizHawk.Common/checksums/CRC32.cs b/src/BizHawk.Common/checksums/CRC32.cs index e3ce0daff24..0e50b1a3114 100644 --- a/src/BizHawk.Common/checksums/CRC32.cs +++ b/src/BizHawk.Common/checksums/CRC32.cs @@ -3,6 +3,7 @@ namespace BizHawk.Common { /// Implementation of CRC-32 (i.e. POSIX cksum), intended for comparing discs against the Redump.org database + [CLSCompliant(false)] public sealed class CRC32 { /// coefficients of the polynomial, in the format Wikipedia calls "reversed" diff --git a/src/BizHawk.Common/checksums/CRC32Checksum.cs b/src/BizHawk.Common/checksums/CRC32Checksum.cs index 2da38d834df..692636384dd 100644 --- a/src/BizHawk.Common/checksums/CRC32Checksum.cs +++ b/src/BizHawk.Common/checksums/CRC32Checksum.cs @@ -7,13 +7,14 @@ namespace BizHawk.Common /// /// /// - public static class CRC32Checksum + public static partial class CRC32Checksum { /// in bits internal const int EXPECTED_LENGTH = 32; internal const string PREFIX = "CRC32"; + [CLSCompliant(false)] public static byte[] BytesAsDigest(uint digest) { var a = BitConverter.GetBytes(digest); diff --git a/src/BizHawk.Common/checksums/LibBizHash.cs b/src/BizHawk.Common/checksums/LibBizHash.cs index aad0aeb0de2..9fd0c887f0d 100644 --- a/src/BizHawk.Common/checksums/LibBizHash.cs +++ b/src/BizHawk.Common/checksums/LibBizHash.cs @@ -2,6 +2,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class LibBizHash { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Common/checksums/MD5Checksum.cs b/src/BizHawk.Common/checksums/MD5Checksum.cs index 80de6d4bb14..c7ac6542249 100644 --- a/src/BizHawk.Common/checksums/MD5Checksum.cs +++ b/src/BizHawk.Common/checksums/MD5Checksum.cs @@ -10,7 +10,7 @@ namespace BizHawk.Common /// /// /// - public static class MD5Checksum + public static partial class MD5Checksum { /// in bits internal const int EXPECTED_LENGTH = 128; diff --git a/src/BizHawk.Common/checksums/SHA1Checksum.cs b/src/BizHawk.Common/checksums/SHA1Checksum.cs index a1131137ef0..9c2fe78eb15 100644 --- a/src/BizHawk.Common/checksums/SHA1Checksum.cs +++ b/src/BizHawk.Common/checksums/SHA1Checksum.cs @@ -12,7 +12,7 @@ namespace BizHawk.Common /// /// /// - public static class SHA1Checksum + public static partial class SHA1Checksum { /// in bits internal const int EXPECTED_LENGTH = 160; diff --git a/src/BizHawk.Common/checksums/SHA256Checksum.cs b/src/BizHawk.Common/checksums/SHA256Checksum.cs index a0e38f7b732..b8970e85bd6 100644 --- a/src/BizHawk.Common/checksums/SHA256Checksum.cs +++ b/src/BizHawk.Common/checksums/SHA256Checksum.cs @@ -10,7 +10,7 @@ namespace BizHawk.Common /// /// /// - public static class SHA256Checksum + public static partial class SHA256Checksum { /// in bits internal const int EXPECTED_LENGTH = 256; diff --git a/src/BizHawk.Common/macOS/QuartzImports.cs b/src/BizHawk.Common/macOS/QuartzImports.cs index cd590638eca..be3495e722e 100644 --- a/src/BizHawk.Common/macOS/QuartzImports.cs +++ b/src/BizHawk.Common/macOS/QuartzImports.cs @@ -2,6 +2,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static class QuartzImports { public enum CGEventSourceStateID : int @@ -9,6 +10,7 @@ public enum CGEventSourceStateID : int kCGEventSourceStateHIDSystemState = 1, } + [CLSCompliant(false)] public enum CGKeyCode : ushort { kVK_ANSI_A = 0x00, diff --git a/src/BizHawk.Common/zstd/LibZstd.cs b/src/BizHawk.Common/zstd/LibZstd.cs index 92ec5375329..ac402d20fef 100644 --- a/src/BizHawk.Common/zstd/LibZstd.cs +++ b/src/BizHawk.Common/zstd/LibZstd.cs @@ -3,6 +3,7 @@ namespace BizHawk.Common { + [CLSCompliant(false)] public static unsafe class LibZstd { static LibZstd() diff --git a/src/BizHawk.Common/zstd/Zstd.cs b/src/BizHawk.Common/zstd/Zstd.cs index cdc1fb38bb8..dc12bf74027 100644 --- a/src/BizHawk.Common/zstd/Zstd.cs +++ b/src/BizHawk.Common/zstd/Zstd.cs @@ -5,7 +5,7 @@ namespace BizHawk.Common { - public sealed class Zstd : IDisposable + public sealed partial class Zstd : IDisposable { private sealed class ZstdCompressionStreamContext : IDisposable { diff --git a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs index 1d5f0110096..100e87a38b1 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Common /// This allows for a traceable implementation without the need for additional API /// Note that this technique will always be significantly slower than a direct implementation ///
+ [CLSCompliant(false)] public abstract class CallbackBasedTraceBuffer : ITraceable { private const string DEFAULT_HEADER = "Instructions"; @@ -42,6 +43,7 @@ protected CallbackBasedTraceBuffer(IDebuggable debuggableCore, IMemoryDomains me protected readonly List Buffer = new List(); + [CLSCompliant(false)] protected abstract uint? TraceFromCallback(uint addr, uint value, uint flags); private ITraceSink? _sink; diff --git a/src/BizHawk.Emulation.Common/Base Implementations/LinkedDebuggable.cs b/src/BizHawk.Emulation.Common/Base Implementations/LinkedDebuggable.cs index 4dc871e174b..a8630801f19 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/LinkedDebuggable.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/LinkedDebuggable.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Common /// A generic linked implementation of IDebuggable that can be used by any link core /// /// + [CLSCompliant(false)] public class LinkedDebuggable : IDebuggable { private readonly IDebuggable[] _linkedCores; diff --git a/src/BizHawk.Emulation.Common/Base Implementations/LinkedDisassemblable.cs b/src/BizHawk.Emulation.Common/Base Implementations/LinkedDisassemblable.cs index 600f100e6e4..e6b75fcf89f 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/LinkedDisassemblable.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/LinkedDisassemblable.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Common /// A generic linked implementation of IDisassemblable that can be used by any link core /// /// - public class LinkedDisassemblable : VerifiedDisassembler + public sealed partial class LinkedDisassemblable : VerifiedDisassembler { private readonly IDisassemblable _baseDisassembler; diff --git a/src/BizHawk.Emulation.Common/Base Implementations/LinkedMemoryDomains.cs b/src/BizHawk.Emulation.Common/Base Implementations/LinkedMemoryDomains.cs index 23047f428fe..a74de535f0b 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/LinkedMemoryDomains.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/LinkedMemoryDomains.cs @@ -10,6 +10,10 @@ namespace BizHawk.Emulation.Common /// public class LinkedMemoryDomains : MemoryDomainList { + public LinkedMemoryDomains(IEmulator[] linkedCores, int numCores) + : this(linkedCores, numCores, linkedDisassemblable: null) {} + + [CLSCompliant(false)] public LinkedMemoryDomains(IEmulator[] linkedCores, int numCores, LinkedDisassemblable linkedDisassemblable) : base(LinkMemoryDomains(linkedCores, numCores)) { diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs index 743a977aebd..2cd52c38484 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs @@ -13,6 +13,7 @@ public class MemoryBasedInputCallbackSystem : IInputCallbackSystem { private readonly List _inputCallbacks = new List(); + [CLSCompliant(false)] public MemoryBasedInputCallbackSystem(IDebuggable debuggableCore, string scope, IEnumerable addresses) { if (!debuggableCore.MemoryCallbacksAvailable()) diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs index 16fdf2568a6..73aa105b715 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs @@ -40,6 +40,7 @@ public MemoryCallbackSystem(string[] availableScopes) public string[] AvailableScopes { get; } /// scope of isn't available + [CLSCompliant(false)] public void Add(IMemoryCallback callback) { if (!AvailableScopes.Contains(callback.Scope)) @@ -79,6 +80,7 @@ private static uint Call(MemoryCallbackCollection cbs, uint addr, uint value, ui return cbReturn; } + [CLSCompliant(false)] public uint CallMemoryCallbacks(uint addr, uint value, uint flags, string scope) { if (!_hasAny) @@ -156,6 +158,7 @@ private bool RemoveInternal(MemoryCallbackDelegate action) return anyRemoved; } + [CLSCompliant(false)] public void Remove(MemoryCallbackDelegate action) { if (RemoveInternal(action)) @@ -167,6 +170,7 @@ public void Remove(MemoryCallbackDelegate action) } } + [CLSCompliant(false)] public void RemoveAll(IEnumerable actions) { bool changed = false; @@ -199,10 +203,16 @@ public void Clear() public delegate void ActiveChangedEventHandler(); public event ActiveChangedEventHandler ActiveChanged; + [CLSCompliant(false)] public delegate void CallbackAddedEventHandler(IMemoryCallback callback); + + [CLSCompliant(false)] public event CallbackAddedEventHandler CallbackAdded; + [CLSCompliant(false)] public delegate void CallbackRemovedEventHandler(IMemoryCallback callback); + + [CLSCompliant(false)] public event CallbackRemovedEventHandler CallbackRemoved; private void Changes() @@ -220,6 +230,7 @@ private void OnCallbackRemoved(object sender, IMemoryCallback callback) CallbackRemoved?.Invoke(callback); } + [CLSCompliant(false)] public IEnumerator GetEnumerator() => _reads.Concat(_writes).Concat(_execs).GetEnumerator(); @@ -227,6 +238,7 @@ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } + [CLSCompliant(false)] public class MemoryCallback : IMemoryCallback { public MemoryCallback(string scope, MemoryCallbackType type, string name, MemoryCallbackDelegate callback, uint? address, uint? mask) diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs index 66c1a56b4f9..ef2f0dbae3e 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs @@ -36,6 +36,7 @@ public enum Endian public override string ToString() => Name; + [CLSCompliant(false)] public virtual ushort PeekUshort(long addr, bool bigEndian) { if (bigEndian) @@ -46,6 +47,7 @@ public virtual ushort PeekUshort(long addr, bool bigEndian) return (ushort)(PeekByte(addr) | (PeekByte(addr + 1) << 8)); } + [CLSCompliant(false)] public virtual uint PeekUint(long addr, bool bigEndian) { ReadOnlySpan scratch = stackalloc byte[] @@ -60,6 +62,7 @@ public virtual uint PeekUint(long addr, bool bigEndian) : BinaryPrimitives.ReadUInt32LittleEndian(scratch); } + [CLSCompliant(false)] public virtual void PokeUshort(long addr, ushort val, bool bigEndian) { if (bigEndian) @@ -74,6 +77,7 @@ public virtual void PokeUshort(long addr, ushort val, bool bigEndian) } } + [CLSCompliant(false)] public virtual void PokeUint(long addr, uint val, bool bigEndian) { Span scratch = stackalloc byte[4]; @@ -104,6 +108,7 @@ public virtual void BulkPeekByte(Range addresses, byte[] values) } } + [CLSCompliant(false)] public virtual void BulkPeekUshort(Range addresses, bool bigEndian, ushort[] values) { if (addresses is null) throw new ArgumentNullException(paramName: nameof(addresses)); @@ -128,6 +133,7 @@ public virtual void BulkPeekUshort(Range addresses, bool bigEndian, ushort } } + [CLSCompliant(false)] public virtual void BulkPeekUint(Range addresses, bool bigEndian, uint[] values) { if (addresses is null) throw new ArgumentNullException(paramName: nameof(addresses)); diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs index a51fac18280..f10a785bac6 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs @@ -49,6 +49,7 @@ public override void BulkPeekByte(Range addresses, byte[] values) } } + [CLSCompliant(false)] public override void BulkPeekUshort(Range addresses, bool bigEndian, ushort[] values) { if (_bulkPeekUshort != null) @@ -61,6 +62,7 @@ public override void BulkPeekUshort(Range addresses, bool bigEndian, ushor } } + [CLSCompliant(false)] public override void BulkPeekUint(Range addresses, bool bigEndian, uint[] values) { if (_bulkPeekUint != null) @@ -73,6 +75,7 @@ public override void BulkPeekUint(Range addresses, bool bigEndian, uint[] } } + [CLSCompliant(false)] public MemoryDomainDelegate( string name, long size, @@ -135,6 +138,7 @@ public MemoryDomainByteArray(string name, Endian endian, byte[] data, bool writa } + [CLSCompliant(false)] public class MemoryDomainUshortArray : MemoryDomain { private ushort[] _data; diff --git a/src/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs b/src/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs index 397c8ca5df6..b6e02a72dff 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs @@ -5,21 +5,19 @@ namespace BizHawk.Emulation.Common { [Core("NullHawk", "")] - [ServiceNotApplicable( - typeof(IVideoProvider), - typeof(IBoardInfo), - typeof(ICodeDataLogger), - typeof(IDebuggable), - typeof(IDisassemblable), - typeof(IInputPollable), - typeof(IMemoryDomains), - typeof(IRegionable), - typeof(ISaveRam), - typeof(ISettable<,>), - typeof(ISoundProvider), - typeof(IStatable), - typeof(ITraceable) - )] + [ServiceNotApplicable(typeof(IVideoProvider))] + [ServiceNotApplicable(typeof(IBoardInfo))] + [ServiceNotApplicable(typeof(ICodeDataLogger))] + [ServiceNotApplicable(typeof(IDebuggable))] + [ServiceNotApplicable(typeof(IDisassemblable))] + [ServiceNotApplicable(typeof(IInputPollable))] + [ServiceNotApplicable(typeof(IMemoryDomains))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISaveRam))] + [ServiceNotApplicable(typeof(ISettable<,>))] + [ServiceNotApplicable(typeof(ISoundProvider))] + [ServiceNotApplicable(typeof(IStatable))] + [ServiceNotApplicable(typeof(ITraceable))] public class NullEmulator : IEmulator { public NullEmulator() diff --git a/src/BizHawk.Emulation.Common/Extensions.cs b/src/BizHawk.Emulation.Common/Extensions.cs index c277ff125ec..82774bc0eec 100644 --- a/src/BizHawk.Emulation.Common/Extensions.cs +++ b/src/BizHawk.Emulation.Common/Extensions.cs @@ -197,6 +197,7 @@ public static bool CanDebug(this IEmulator core) return core != null && core.ServiceProvider.HasService(); } + [CLSCompliant(false)] public static IDebuggable AsDebuggable(this IEmulator core) { return core.ServiceProvider.GetService(); @@ -232,6 +233,7 @@ public static bool MemoryCallbacksAvailable(this IEmulator core) return false; } + [CLSCompliant(false)] public static bool MemoryCallbacksAvailable(this IDebuggable core) { if (core == null) @@ -255,6 +257,7 @@ public static bool CanDisassemble(this IEmulator core) return core != null && core.ServiceProvider.HasService(); } + [CLSCompliant(false)] public static IDisassemblable AsDisassembler(this IEmulator core) { return core.ServiceProvider.GetService(); diff --git a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs index 12cd92ab858..cf4c52b7b20 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Common /// /// NULL if we should leave the value sent by the core as it is; the value to override with otherwise. /// + [CLSCompliant(false)] public delegate uint? MemoryCallbackDelegate(uint address, uint value, uint flags); /// @@ -15,6 +16,7 @@ namespace BizHawk.Emulation.Common /// gets and sets memory callbacks in the core. A memory callback should fire any time memory is /// read/written/executed by the core, and depends on the type specified by the callback /// + [CLSCompliant(false)] public interface IMemoryCallbackSystem : IEnumerable { /* @@ -84,6 +86,7 @@ public interface IMemoryCallbackSystem : IEnumerable /// /// /// + [CLSCompliant(false)] public interface IMemoryCallback { MemoryCallbackType Type { get; } @@ -105,6 +108,7 @@ public enum MemoryCallbackType } #pragma warning disable RCS1191 //TODO this is genuinely broken but needs some dedicated thinking to fix + [CLSCompliant(false)] [Flags] public enum MemoryCallbackFlags : uint { diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IDebuggable.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IDebuggable.cs index b654978b7ed..7d1976a8c5c 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IDebuggable.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IDebuggable.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Common /// Tools like the debugger will gracefully degrade based on the availability of each component of this service, /// it is expected that any of these features will throw a NotImplementedException if not implemented, and the client will manage accordingly /// + [CLSCompliant(false)] public interface IDebuggable : IEmulatorService { /// @@ -44,6 +45,7 @@ public interface IDebuggable : IEmulatorService long TotalExecutedCycles { get; } // TODO: this should probably be a long, but most cores were using int, oh well } + [CLSCompliant(false)] public readonly struct RegisterValue { public readonly byte BitSize; diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs index a653f5aa871..6810d39cb44 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Common /// Tools such the debugger use this, but also LUA scripting, and tools like trace logging and code data logging can make use of this tool /// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the service is available /// + [CLSCompliant(false)] public interface IDisassemblable : IEmulatorService { /// @@ -35,6 +36,7 @@ public interface IDisassemblable : IEmulatorService /// /// does sanity checking on CPU parameters /// + [CLSCompliant(false)] public abstract class VerifiedDisassembler : IDisassemblable { private string? _cpu; diff --git a/src/BizHawk.Emulation.Common/ServiceAttributes.cs b/src/BizHawk.Emulation.Common/ServiceAttributes.cs index 673cfbbd721..768b77a5bb7 100644 --- a/src/BizHawk.Emulation.Common/ServiceAttributes.cs +++ b/src/BizHawk.Emulation.Common/ServiceAttributes.cs @@ -18,12 +18,12 @@ public sealed class FeatureNotImplementedAttribute : Attribute /// Any which isn't specified and is also not implemented is assumed to be a work-in-progress. /// These should be implemented as soon as possible, simply throwing a on call, and should be annotated with . /// - [AttributeUsage(AttributeTargets.Class)] + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class ServiceNotApplicableAttribute : Attribute { public IReadOnlyCollection NotApplicableTypes { get; } - public ServiceNotApplicableAttribute(params Type[] types) - => NotApplicableTypes = types; + public ServiceNotApplicableAttribute(Type type) + => NotApplicableTypes = [ type ]; } } diff --git a/src/BizHawk.Emulation.Common/Sound/BlipBuffer.cs b/src/BizHawk.Emulation.Common/Sound/BlipBuffer.cs index b93c7de873b..02052c6a248 100644 --- a/src/BizHawk.Emulation.Common/Sound/BlipBuffer.cs +++ b/src/BizHawk.Emulation.Common/Sound/BlipBuffer.cs @@ -115,11 +115,13 @@ public void Clear() BlipBufDll.blip_clear(_context); } + [CLSCompliant(false)] public void AddDelta(uint clockTime, int delta) { BlipBufDll.blip_add_delta(_context, clockTime, delta); } + [CLSCompliant(false)] public void AddDeltaFast(uint clockTime, int delta) { BlipBufDll.blip_add_delta_fast(_context, clockTime, delta); @@ -132,6 +134,7 @@ public int ClocksNeeded(int sampleCount) public const int MaxFrame = BlipBufDll.BlipMaxFrame; + [CLSCompliant(false)] public void EndFrame(uint clockDuration) { BlipBufDll.blip_end_frame(_context, clockDuration); diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs index fa4ce8eee4a..ce530744941 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME { + [CLSCompliant(false)] public abstract class LibMAME { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs index 5ab82b5fb20..f55a3fc1d3a 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.MemoryDomains.cs @@ -17,6 +17,7 @@ public class MAMEMemoryDomain : MemoryDomain private readonly int _systemBusAddressShift; private readonly long _systemBusSize; + [CLSCompliant(false)] public MAMEMemoryDomain(string name, long size, Endian endian, int dataWidth, bool writable, LibMAME core, IMonitor monitor, int firstOffset, int systemBusAddressShift, long systemBusSize) { Name = name; diff --git a/src/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs b/src/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs index d5b3de9ec23..a07e098bda0 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/68000/MC68000.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000 { + [CLSCompliant(false)] public sealed partial class MC68000 { // Machine State @@ -257,6 +258,7 @@ public void LoadStateText(TextReader reader, string id) } } + [CLSCompliant(false)] [StructLayout(LayoutKind.Explicit)] public struct Register { diff --git a/src/BizHawk.Emulation.Cores/CPUs/ARM/Darm.cs b/src/BizHawk.Emulation.Cores/CPUs/ARM/Darm.cs index 0977afa884d..f7ef7ea2395 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/ARM/Darm.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/ARM/Darm.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Components.ARM { + [CLSCompliant(false)] public abstract class Darm { public const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs b/src/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs index 7ac19d08744..f52acf1525f 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/CP1610/CP1610.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Components.CP1610 { + [CLSCompliant(false)] public sealed partial class CP1610 { private const ushort RESET = 0x1000; diff --git a/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/F3850.Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/F3850.Registers.cs index 629988890d4..bd305c1fbf9 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/F3850.Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/F3850.Registers.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Components.FairchildF8 /// /// Internal Registers /// + [CLSCompliant(false)] public sealed partial class F3850 { /// diff --git a/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/IF3850Link.cs b/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/IF3850Link.cs index cb627740efa..26902cc5ab1 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/IF3850Link.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/FairchildF8/IF3850Link.cs @@ -5,6 +5,7 @@ // Should only be used as a generic type argument for the F3850, and // implementations should be structs where possible. This combination allows // the JITer to generate much faster code than calling a Func<> or Action<>. + [CLSCompliant(false)] public interface IF3850Link { // Memory Access diff --git a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs index b5c19378e64..9c07076333d 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/HuC6280.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Components.H6280 { + [CLSCompliant(false)] public sealed partial class HuC6280 { public HuC6280(IMemoryCallbackSystem callbacks) diff --git a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IDisassemblable.cs b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IDisassemblable.cs index 61a30fd7b5f..e5ab5a2236e 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IDisassemblable.cs @@ -15,6 +15,7 @@ public string Cpu public IEnumerable AvailableCpus { get; } = [ "6280" ]; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { return DisassembleExt((ushort)addr, out length, diff --git a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IPCEngineSoundDebuggable.cs b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IPCEngineSoundDebuggable.cs index 2cc23ebf80c..6fc91039003 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IPCEngineSoundDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/HuC6280/IPCEngineSoundDebuggable.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Components { + [CLSCompliant(false)] public interface IPCEngineSoundDebuggable : ISpecializedEmulatorService { #pragma warning disable CA1715 // breaks IInterface convention diff --git a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs index 06e4498dc29..3df6e8e1e97 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs @@ -17,6 +17,7 @@ public void ILLEGAL() Console.WriteLine("EXCEPTION"); } + [CLSCompliant(false)] public void OP_IMP(ushort oper) { PopulateCURINSTR(IDLE, @@ -28,6 +29,7 @@ public void OP_IMP(ushort oper) } // Slightly different timing for these instructions + [CLSCompliant(false)] public void OP_IMP2(ushort oper) { PopulateCURINSTR(IDLE, @@ -38,6 +40,7 @@ public void OP_IMP2(ushort oper) IRQS = 4; } + [CLSCompliant(false)] public void OP_R_IMP(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -48,7 +51,7 @@ public void OP_R_IMP(ushort oper, ushort reg) IRQS = 4; } - + [CLSCompliant(false)] public void OP_A_R(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -59,6 +62,7 @@ public void OP_A_R(ushort oper, ushort reg) IRQS = 4; } + [CLSCompliant(false)] public void OP_IR(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -69,6 +73,7 @@ public void OP_IR(ushort oper, ushort reg) IRQS = 4; } + [CLSCompliant(false)] public void OP_A_IR(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -79,6 +84,7 @@ public void OP_A_IR(ushort oper, ushort reg) IRQS = 4; } + [CLSCompliant(false)] public void OP_DIR_IR(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -94,6 +100,7 @@ public void OP_DIR_IR(ushort oper, ushort reg) IRQS = 9; } + [CLSCompliant(false)] public void IN_P_A(ushort oper, ushort port) { PopulateCURINSTR(IDLE, @@ -109,6 +116,7 @@ public void IN_P_A(ushort oper, ushort port) IRQS = 9; } + [CLSCompliant(false)] public void MOV_R(ushort dest, ushort src) { PopulateCURINSTR(IDLE, @@ -151,6 +159,7 @@ public void BUS_PORT_OUT() Console.WriteLine("OUT"); } + [CLSCompliant(false)] public void OUT_P(ushort port) { PopulateCURINSTR(IDLE, @@ -196,6 +205,7 @@ public void RETR() IRQS = 9; } + [CLSCompliant(false)] public void MOV_A_P4(ushort port) { PopulateCURINSTR(IDLE, @@ -211,6 +221,7 @@ public void MOV_A_P4(ushort port) IRQS = 9; } + [CLSCompliant(false)] public void MOV_P4_A(ushort port) { PopulateCURINSTR(IDLE, @@ -256,6 +267,7 @@ public void MOV3_A_A() IRQS = 9; } + [CLSCompliant(false)] public void MOVX_A_R(ushort reg) { PopulateCURINSTR(EEA, @@ -271,6 +283,7 @@ public void MOVX_A_R(ushort reg) IRQS = 9; } + [CLSCompliant(false)] public void MOVX_R_A(ushort reg) { PopulateCURINSTR(EEA, @@ -286,6 +299,7 @@ public void MOVX_R_A(ushort reg) IRQS = 9; } + [CLSCompliant(false)] public void OP_A_DIR(ushort oper) { PopulateCURINSTR(IDLE, @@ -301,6 +315,7 @@ public void OP_A_DIR(ushort oper) IRQS = 9; } + [CLSCompliant(false)] public void OP_R_DIR(ushort oper, ushort reg) { PopulateCURINSTR(IDLE, @@ -318,6 +333,7 @@ public void OP_R_DIR(ushort oper, ushort reg) // TODO: This should only write back to the port destination if directly wired, otherwise we should wait for a write pulse // TODO: for O2, P1 is tied direct to CTRL outputs so this is ok, BUS and P2 should do something else though + [CLSCompliant(false)] public void OP_PB_DIR(ushort oper, ushort reg) { if (reg == 1) @@ -348,6 +364,7 @@ public void OP_PB_DIR(ushort oper, ushort reg) IRQS = 9; } + [CLSCompliant(false)] public void OP_EXP_A(ushort oper, ushort reg) { // Lower 4 bits only @@ -364,6 +381,7 @@ public void OP_EXP_A(ushort oper, ushort reg) IRQS = 9; } + [CLSCompliant(false)] public void CALL(ushort dest_h) { // Lower 4 bits only @@ -380,6 +398,7 @@ public void CALL(ushort dest_h) IRQS = 9; } + [CLSCompliant(false)] public void DJNZ(ushort reg) { if ((Regs[reg + RB] - 1) == 0) @@ -427,6 +446,7 @@ public void JP_A() IRQS = 9; } + [CLSCompliant(false)] public void JPB(ushort Tebit) { if (Regs[A].Bit(Tebit)) @@ -459,6 +479,7 @@ public void JPB(ushort Tebit) IRQS = 9; } + [CLSCompliant(false)] public void JP_COND(ushort COND, ushort SPEC) { // NOTE: PC increment here gets replaced with ALU2 if ondition met, jump is relative to last 256 address block before increment. @@ -477,6 +498,7 @@ public void JP_COND(ushort COND, ushort SPEC) IRQS = 9; } + [CLSCompliant(false)] public void JP_2k(ushort high_addr) { PopulateCURINSTR(IDLE, diff --git a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Operations.cs b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Operations.cs index 021304dc626..96092e6a968 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Operations.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Operations.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048 { + [CLSCompliant(false)] public partial class I8048 { public void Read_Func(ushort dest, ushort src) diff --git a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Registers.cs index 48f569fd501..078b36284b3 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Intel8048/Registers.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048 public partial class I8048 { // registers + [CLSCompliant(false)] public ushort[] Regs = new ushort[78]; // EA gets set to true on external memory address latch @@ -25,39 +26,84 @@ public partial class I8048 public bool T0, T1, T1_old; // 8 'registers' but really they point to locations in RAM + [CLSCompliant(false)] public const ushort R0 = 0; + + [CLSCompliant(false)] public const ushort R1 = 1; + + [CLSCompliant(false)] public const ushort R2 = 2; + + [CLSCompliant(false)] public const ushort R3 = 3; + + [CLSCompliant(false)] public const ushort R4 = 4; + + [CLSCompliant(false)] public const ushort R5 = 5; + + [CLSCompliant(false)] public const ushort R6 = 6; + + [CLSCompliant(false)] public const ushort R7 = 7; // offset for port regs + [CLSCompliant(false)] public const ushort PX = 70; // the location pointed to by the registers is controlled by the RAM bank + [CLSCompliant(false)] public ushort RB = 0; // high PC address bit is controlled by instruction bank // only changes on JMP and CALL instructions + [CLSCompliant(false)] public ushort MB = 0; //RAM occupies registers 0-63 + [CLSCompliant(false)] public const ushort PC = 64; + + [CLSCompliant(false)] public const ushort PSW = 65; + + [CLSCompliant(false)] public const ushort A = 66; + + [CLSCompliant(false)] public const ushort ADDR = 67; // internal + + [CLSCompliant(false)] public const ushort ALU = 68; // internal + + [CLSCompliant(false)] public const ushort ALU2 = 69; // internal + + [CLSCompliant(false)] public const ushort BUS = 70; + + [CLSCompliant(false)] public const ushort P1 = 71; + + [CLSCompliant(false)] public const ushort P2 = 72; + + [CLSCompliant(false)] public const ushort P4 = 73; + + [CLSCompliant(false)] public const ushort P5 = 74; + + [CLSCompliant(false)] public const ushort P6 = 75; + + [CLSCompliant(false)] public const ushort P7 = 76; + + [CLSCompliant(false)] public const ushort TIM = 77; public bool Flag3 @@ -102,6 +148,7 @@ public bool FlagC set => Regs[PSW] = (byte)((Regs[PSW] & ~0x80) | (value ? 0x80 : 0x00)); } + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { return new Dictionary diff --git a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Operations.cs b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Operations.cs index d69c7b18cff..a4bd07f7fce 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Operations.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Operations.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Components.LR35902 { + [CLSCompliant(false)] public partial class LR35902 { // local variables for operations, not stated diff --git a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs index 6ae3f4e20e3..bd6c40e5bf0 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs @@ -7,22 +7,52 @@ public partial class LR35902 { // registers + [CLSCompliant(false)] public const ushort PCl = 0; + + [CLSCompliant(false)] public const ushort PCh = 1; + + [CLSCompliant(false)] public const ushort SPl = 2; + + [CLSCompliant(false)] public const ushort SPh = 3; + + [CLSCompliant(false)] public const ushort A = 4; + + [CLSCompliant(false)] public const ushort F = 5; + + [CLSCompliant(false)] public const ushort B = 6; + + [CLSCompliant(false)] public const ushort C = 7; + + [CLSCompliant(false)] public const ushort D = 8; + + [CLSCompliant(false)] public const ushort E = 9; + + [CLSCompliant(false)] public const ushort H = 10; + + [CLSCompliant(false)] public const ushort L = 11; + + [CLSCompliant(false)] public const ushort W = 12; + + [CLSCompliant(false)] public const ushort Z = 13; + + [CLSCompliant(false)] public const ushort Aim = 14; // use this indicator for RLCA etc., since the Z flag is reset on those + [CLSCompliant(false)] public ushort[] Regs = new ushort[14]; public bool was_FlagI, FlagI; @@ -51,6 +81,7 @@ public bool FlagZ set => Regs[5] = (ushort)((Regs[5] & ~0x80) | (value ? 0x80 : 0x00)); } + [CLSCompliant(false)] public ushort RegPC { get => (ushort)(Regs[0] | (Regs[1] << 8)); @@ -69,6 +100,7 @@ private void ResetRegisters() } } + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { return new Dictionary diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs index 24c840f2733..b2344e5c6e5 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs @@ -4,6 +4,7 @@ // Motorola Corp 6800 namespace BizHawk.Emulation.Cores.Components.MC6800 { + [CLSCompliant(false)] public sealed partial class MC6800 { // operations that can take place in an instruction diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6800/Operations.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6800/Operations.cs index 1ffa37cb425..389bab27bd0 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6800/Operations.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6800/Operations.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Components.MC6800 { public partial class MC6800 { + [CLSCompliant(false)] public void Read_Func(ushort dest, ushort src) { if (CDLCallback != null) @@ -14,6 +15,7 @@ public void Read_Func(ushort dest, ushort src) Regs[dest] = ReadMemory(Regs[src]); } + [CLSCompliant(false)] public void Read_Inc_Func(ushort dest, ushort src) { if (CDLCallback != null) @@ -28,12 +30,14 @@ public void Read_Inc_Func(ushort dest, ushort src) Regs[src]++; } + [CLSCompliant(false)] public void Write_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); WriteMemory(Regs[dest], (byte)Regs[src]); } + [CLSCompliant(false)] public void Write_Dec_Lo_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -41,6 +45,7 @@ public void Write_Dec_Lo_Func(ushort dest, ushort src) Regs[dest] -= 1; } + [CLSCompliant(false)] public void Write_Dec_HI_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -48,12 +53,14 @@ public void Write_Dec_HI_Func(ushort dest, ushort src) Regs[dest] -= 1; } + [CLSCompliant(false)] public void Write_Hi_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); WriteMemory(Regs[dest], (byte)(Regs[src] >> 8)); } + [CLSCompliant(false)] public void Write_Hi_Inc_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -61,6 +68,7 @@ public void Write_Hi_Inc_Func(ushort dest, ushort src) Regs[dest]++; } + [CLSCompliant(false)] public void NEG_8_Func(ushort src) { int Reg16_d = 0; @@ -79,11 +87,13 @@ public void NEG_8_Func(ushort src) Regs[src] = ans; } + [CLSCompliant(false)] public void TR_Func(ushort dest, ushort src) { Regs[dest] = Regs[src]; } + [CLSCompliant(false)] public void LD_8_Func(ushort dest, ushort src) { Regs[dest] = Regs[src]; @@ -93,6 +103,7 @@ public void LD_8_Func(ushort dest, ushort src) FlagN = (Regs[dest] & 0xFF) > 127; } + [CLSCompliant(false)] public void LD_16_Func(ushort dest, ushort src_h, ushort src_l) { Regs[dest] = (ushort)(Regs[src_h] << 8 | Regs[src_l]); @@ -102,6 +113,7 @@ public void LD_16_Func(ushort dest, ushort src_h, ushort src_l) FlagN = Regs[dest] > 0x7FFF; } + [CLSCompliant(false)] public void TST_Func(ushort src) { FlagZ = Regs[src] == 0; @@ -110,6 +122,7 @@ public void TST_Func(ushort src) FlagC = false; } + [CLSCompliant(false)] public void CLR_Func(ushort src) { Regs[src] = 0; @@ -120,12 +133,14 @@ public void CLR_Func(ushort src) FlagN = false; } + [CLSCompliant(false)] public void ADD8BR_Func(ushort dest, ushort src) { if (Regs[src] > 127) { Regs[src] |= 0xFF00; } Regs[dest] = (ushort)(Regs[dest] + (short)Regs[src]); } + [CLSCompliant(false)] public void ADD8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -147,6 +162,7 @@ public void ADD8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void SUB8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -169,6 +185,7 @@ public void SUB8_Func(ushort dest, ushort src) } // same as SUB8 but result not stored + [CLSCompliant(false)] public void CMP8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -188,6 +205,7 @@ public void CMP8_Func(ushort dest, ushort src) FlagV = (Regs[dest].Bit(7) != Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); } + [CLSCompliant(false)] public void BIT_Func(ushort dest, ushort src) { ushort ans = (ushort)(Regs[dest] & Regs[src]); @@ -197,6 +215,7 @@ public void BIT_Func(ushort dest, ushort src) FlagN = ans > 127; } + [CLSCompliant(false)] public void ASL_Func(ushort src) { FlagC = Regs[src].Bit(7); @@ -209,6 +228,7 @@ public void ASL_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void ASR_Func(ushort src) { FlagC = Regs[src].Bit(0); @@ -222,6 +242,7 @@ public void ASR_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void LSR_Func(ushort src) { FlagC = Regs[src].Bit(0); @@ -232,6 +253,7 @@ public void LSR_Func(ushort src) FlagN = false; } + [CLSCompliant(false)] public void COM_Func(ushort src) { Regs[src] = (ushort)((~Regs[src]) & 0xFF); @@ -242,6 +264,7 @@ public void COM_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void AND8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] & Regs[src]); @@ -251,6 +274,7 @@ public void AND8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void OR8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] | Regs[src]); @@ -260,6 +284,7 @@ public void OR8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void XOR8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] ^ Regs[src]); @@ -269,6 +294,7 @@ public void XOR8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void ROR_Func(ushort src) { ushort c = (ushort)(FlagC ? 0x80 : 0); @@ -281,6 +307,7 @@ public void ROR_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void ROL_Func(ushort src) { ushort c = (ushort)(FlagC ? 1 : 0); @@ -294,6 +321,7 @@ public void ROL_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void INC8_Func(ushort src) { FlagV = Regs[src] == 0x7F; @@ -304,6 +332,7 @@ public void INC8_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void DEC8_Func(ushort src) { FlagV = Regs[src] == 0x80; @@ -314,16 +343,19 @@ public void DEC8_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void INC16_Func(ushort src) { Regs[src] += 1; } + [CLSCompliant(false)] public void DEC16_Func(ushort src) { Regs[src] -= 1; } + [CLSCompliant(false)] public void ADC8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -347,6 +379,7 @@ public void ADC8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void SBC8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -370,6 +403,7 @@ public void SBC8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void DA_Func(ushort src) { int a = Regs[src]; @@ -400,6 +434,7 @@ public void DA_Func(ushort src) // FlagV is listed as undefined in the documentation } + [CLSCompliant(false)] public void CMP16_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6800/Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6800/Registers.cs index 6c598ca7f56..946b86adec5 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6800/Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6800/Registers.cs @@ -3,18 +3,40 @@ namespace BizHawk.Emulation.Cores.Components.MC6800 public partial class MC6800 { // registers + [CLSCompliant(false)] public ushort[] Regs = new ushort[11]; + [CLSCompliant(false)] public const ushort PC = 0; + + [CLSCompliant(false)] public const ushort SP = 1; + + [CLSCompliant(false)] public const ushort X = 2; + + [CLSCompliant(false)] public const ushort A = 3; + + [CLSCompliant(false)] public const ushort B = 4; + + [CLSCompliant(false)] public const ushort ADDR = 5; // internal + + [CLSCompliant(false)] public const ushort ALU = 6; // internal + + [CLSCompliant(false)] public const ushort ALU2 = 7; // internal + + [CLSCompliant(false)] public const ushort DP = 8; // always zero + + [CLSCompliant(false)] public const ushort CC = 9; + + [CLSCompliant(false)] public const ushort IDX_EA = 10; public bool FlagC diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs index 44a6be083df..4571b43f86c 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs @@ -4,6 +4,7 @@ // Motorola Corp 6809 namespace BizHawk.Emulation.Cores.Components.MC6809 { + [CLSCompliant(false)] public sealed partial class MC6809 { // operations that can take place in an instruction diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs index 4c1f251769c..b952d04944b 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Components.MC6809 { public partial class MC6809 { + [CLSCompliant(false)] public void Read_Func(ushort dest, ushort src) { if (CDLCallback != null) @@ -14,6 +15,7 @@ public void Read_Func(ushort dest, ushort src) Regs[dest] = ReadMemory(Regs[src]); } + [CLSCompliant(false)] public void Read_Inc_Func(ushort dest, ushort src) { if (CDLCallback != null) @@ -28,12 +30,14 @@ public void Read_Inc_Func(ushort dest, ushort src) Regs[src]++; } + [CLSCompliant(false)] public void Write_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); WriteMemory(Regs[dest], (byte)Regs[src]); } + [CLSCompliant(false)] public void Write_Dec_Lo_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -41,6 +45,7 @@ public void Write_Dec_Lo_Func(ushort dest, ushort src) Regs[dest] -= 1; } + [CLSCompliant(false)] public void Write_Dec_HI_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -48,12 +53,14 @@ public void Write_Dec_HI_Func(ushort dest, ushort src) Regs[dest] -= 1; } + [CLSCompliant(false)] public void Write_Hi_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); WriteMemory(Regs[dest], (byte)(Regs[src] >> 8)); } + [CLSCompliant(false)] public void Write_Hi_Inc_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -61,6 +68,7 @@ public void Write_Hi_Inc_Func(ushort dest, ushort src) Regs[dest]++; } + [CLSCompliant(false)] public void Write_Lo_Inc_Func(ushort dest, ushort src) { CDLCallback?.Invoke(Regs[dest], eCDLogMemFlags.Write | eCDLogMemFlags.Data); @@ -68,6 +76,7 @@ public void Write_Lo_Inc_Func(ushort dest, ushort src) Regs[dest]++; } + [CLSCompliant(false)] public void NEG_8_Func(ushort src) { int Reg16_d = 0; @@ -86,11 +95,13 @@ public void NEG_8_Func(ushort src) Regs[src] = ans; } + [CLSCompliant(false)] public void TR_Func(ushort dest, ushort src) { Regs[dest] = Regs[src]; } + [CLSCompliant(false)] public void LD_8_Func(ushort dest, ushort src) { Regs[dest] = Regs[src]; @@ -100,6 +111,7 @@ public void LD_8_Func(ushort dest, ushort src) FlagN = (Regs[dest] & 0xFF) > 127; } + [CLSCompliant(false)] public void ST_8_Func(ushort dest) { FlagZ = (Regs[dest] & 0xFF) == 0; @@ -107,6 +119,7 @@ public void ST_8_Func(ushort dest) FlagN = (Regs[dest] & 0xFF) > 127; } + [CLSCompliant(false)] public void LD_16_Func(ushort dest, ushort src_h, ushort src_l) { Regs[dest] = (ushort)(Regs[src_h] << 8 | Regs[src_l]); @@ -116,6 +129,7 @@ public void LD_16_Func(ushort dest, ushort src_h, ushort src_l) FlagN = Regs[dest] > 0x7FFF; } + [CLSCompliant(false)] public void ST_16_Func(ushort dest) { if (dest == Dr) @@ -129,6 +143,7 @@ public void ST_16_Func(ushort dest) } // for LEAX/Y, zero flag can be effected, but not for U/S + [CLSCompliant(false)] public void LEA_Func(ushort dest, ushort src) { Regs[dest] = Regs[src]; @@ -139,6 +154,7 @@ public void LEA_Func(ushort dest, ushort src) } } + [CLSCompliant(false)] public void TST_Func(ushort src) { FlagZ = Regs[src] == 0; @@ -146,6 +162,7 @@ public void TST_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void CLR_Func(ushort src) { Regs[src] = 0; @@ -158,11 +175,13 @@ public void CLR_Func(ushort src) // source is considered a 16 bit signed value, used for long relative branch // no flags used + [CLSCompliant(false)] public void ADD16BR_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] + (short)Regs[src]); } + [CLSCompliant(false)] public void ADD8BR_Func(ushort dest, ushort src) { if (Regs[src] > 127) { Regs[src] |= 0xFF00; } @@ -177,6 +196,7 @@ public void Mul_Func() FlagZ = D == 0; } + [CLSCompliant(false)] public void ADD8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -198,6 +218,7 @@ public void ADD8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void SUB8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -220,6 +241,7 @@ public void SUB8_Func(ushort dest, ushort src) } // same as SUB8 but result not stored + [CLSCompliant(false)] public void CMP8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -239,6 +261,7 @@ public void CMP8_Func(ushort dest, ushort src) FlagV = (Regs[dest].Bit(7) != Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); } + [CLSCompliant(false)] public void BIT_Func(ushort dest, ushort src) { ushort ans = (ushort)(Regs[dest] & Regs[src]); @@ -248,6 +271,7 @@ public void BIT_Func(ushort dest, ushort src) FlagN = ans > 127; } + [CLSCompliant(false)] public void ASL_Func(ushort src) { FlagC = Regs[src].Bit(7); @@ -260,6 +284,7 @@ public void ASL_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void ASR_Func(ushort src) { FlagC = Regs[src].Bit(0); @@ -275,6 +300,7 @@ public void ASR_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void LSR_Func(ushort src) { FlagC = Regs[src].Bit(0); @@ -285,6 +311,7 @@ public void LSR_Func(ushort src) FlagN = false; } + [CLSCompliant(false)] public void COM_Func(ushort src) { Regs[src] = (ushort)((~Regs[src]) & 0xFF); @@ -295,6 +322,7 @@ public void COM_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void SEX_Func(ushort src) { if (Regs[B] > 127) @@ -310,6 +338,7 @@ public void SEX_Func(ushort src) FlagN = Regs[A] > 127; } + [CLSCompliant(false)] public void AND8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] & Regs[src]); @@ -319,6 +348,7 @@ public void AND8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void OR8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] | Regs[src]); @@ -328,6 +358,7 @@ public void OR8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void XOR8_Func(ushort dest, ushort src) { Regs[dest] = (ushort)(Regs[dest] ^ Regs[src]); @@ -337,6 +368,7 @@ public void XOR8_Func(ushort dest, ushort src) FlagN = Regs[dest] > 127; } + [CLSCompliant(false)] public void ROR_Func(ushort src) { ushort c = (ushort)(FlagC ? 0x80 : 0); @@ -349,6 +381,7 @@ public void ROR_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void ROL_Func(ushort src) { ushort c = (ushort)(FlagC ? 1 : 0); @@ -362,6 +395,7 @@ public void ROL_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void INC8_Func(ushort src) { FlagV = Regs[src] == 0x7F; @@ -372,6 +406,7 @@ public void INC8_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void DEC8_Func(ushort src) { FlagV = Regs[src] == 0x80; @@ -382,16 +417,19 @@ public void DEC8_Func(ushort src) FlagN = (Regs[src] & 0xFF) > 127; } + [CLSCompliant(false)] public void INC16_Func(ushort src) { Regs[src] += 1; } + [CLSCompliant(false)] public void DEC16_Func(ushort src) { Regs[src] -= 1; } + [CLSCompliant(false)] public void ADC8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -415,6 +453,7 @@ public void ADC8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void SBC8_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -438,6 +477,7 @@ public void SBC8_Func(ushort dest, ushort src) Regs[dest] = ans; } + [CLSCompliant(false)] public void DA_Func(ushort src) { int a = Regs[src]; @@ -469,6 +509,7 @@ public void DA_Func(ushort src) } // D register implied + [CLSCompliant(false)] public void SUB16_Func(ushort src) { int Reg16_d = D; @@ -488,6 +529,7 @@ public void SUB16_Func(ushort src) } // D register implied + [CLSCompliant(false)] public void ADD16_Func(ushort src) { int Reg16_d = D; @@ -507,6 +549,7 @@ public void ADD16_Func(ushort src) } // D register implied + [CLSCompliant(false)] public void CMP16D_Func(ushort src) { int Reg16_d = D; @@ -523,6 +566,7 @@ public void CMP16D_Func(ushort src) FlagV = (D.Bit(15) != Regs[src].Bit(15)) && (D.Bit(15) != ans.Bit(15)); } + [CLSCompliant(false)] public void CMP16_Func(ushort dest, ushort src) { int Reg16_d = Regs[dest]; @@ -539,6 +583,7 @@ public void CMP16_Func(ushort dest, ushort src) FlagV = (Regs[dest].Bit(15) != Regs[src].Bit(15)) && (Regs[dest].Bit(15) != ans.Bit(15)); } + [CLSCompliant(false)] public void EXG_Func(ushort sel) { ushort src = 0; @@ -624,6 +669,7 @@ public void EXG_Func(ushort sel) } } + [CLSCompliant(false)] public void TFR_Func(ushort sel) { ushort src = 0; diff --git a/src/BizHawk.Emulation.Cores/CPUs/MC6809/Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/MC6809/Registers.cs index dbf68a05474..45f41252c9c 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MC6809/Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MC6809/Registers.cs @@ -6,23 +6,52 @@ namespace BizHawk.Emulation.Cores.Components.MC6809 public partial class MC6809 { // registers + [CLSCompliant(false)] public ushort[] Regs = new ushort[14]; + [CLSCompliant(false)] public const ushort PC = 0; + + [CLSCompliant(false)] public const ushort US = 1; + + [CLSCompliant(false)] public const ushort SP = 2; + + [CLSCompliant(false)] public const ushort X = 3; + + [CLSCompliant(false)] public const ushort Y = 4; + + [CLSCompliant(false)] public const ushort A = 5; + + [CLSCompliant(false)] public const ushort B = 6; + + [CLSCompliant(false)] public const ushort ADDR = 7; // internal + + [CLSCompliant(false)] public const ushort ALU = 8; // internal + + [CLSCompliant(false)] public const ushort ALU2 = 9; // internal + + [CLSCompliant(false)] public const ushort DP = 10; + + [CLSCompliant(false)] public const ushort CC = 11; + + [CLSCompliant(false)] public const ushort Dr = 12; + + [CLSCompliant(false)] public const ushort IDX_EA = 13; + [CLSCompliant(false)] public ushort D { get => (ushort)(Regs[B] | (Regs[A] << 8)); @@ -87,6 +116,7 @@ private void ResetRegisters() FlagI = true; } + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { return new Dictionary diff --git a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Disassembler.cs b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Disassembler.cs index ce6d197d06b..0756b4058ea 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Disassembler.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Disassembler.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Components.M6502 { public partial class MOS6502X : IDisassemblable { + [CLSCompliant(false)] public string Disassemble(ushort pc, out int bytesToAdvance) { return MOS6502X.Disassemble(pc, out bytesToAdvance, _link.PeekMemory); @@ -23,6 +24,7 @@ public string Cpu public IEnumerable AvailableCpus { get; } = [ "6502" ]; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { return MOS6502X.Disassemble((ushort)addr, out length, a => m.PeekByte(a)); @@ -41,6 +43,7 @@ private static ushort peeker_word(ushort address, Func peeker) /// /// disassemble not from our own memory map, but from the supplied memory domain /// + [CLSCompliant(false)] public static string Disassemble(ushort pc, out int bytesToAdvance, Func peeker) { byte op = peeker(pc); diff --git a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/IMOS6502XLink.cs b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/IMOS6502XLink.cs index 06a990c2a02..24b54dcbf92 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/IMOS6502XLink.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/IMOS6502XLink.cs @@ -5,6 +5,7 @@ // Should only be used as a generic type argument for the MOS 6502X, and // implementations should be structs where possible. This combination allows // the JITer to generate much faster code than calling a Func<> or Action<>. + [CLSCompliant(false)] public interface IMOS6502XLink { byte ReadMemory(ushort address); diff --git a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs index 13ab34b24b4..824277a3f9a 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs @@ -10,6 +10,7 @@ namespace BizHawk.Emulation.Cores.Components.M6502 /// this way happens to perform better than the alternative /// /// + [CLSCompliant(false)] public sealed partial class MOS6502X where TLink : IMOS6502XLink { private readonly TLink _link; diff --git a/src/BizHawk.Emulation.Cores/CPUs/Z80A/IZ80ALink.cs b/src/BizHawk.Emulation.Cores/CPUs/Z80A/IZ80ALink.cs index 5e6a03b8625..b6bc58d60de 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Z80A/IZ80ALink.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Z80A/IZ80ALink.cs @@ -5,6 +5,7 @@ // Should only be used as a generic type argument for the Z80A, and // implementations should be structs where possible. This combination allows // the JITer to generate much faster code than calling a Func<> or Action<>. + [CLSCompliant(false)] public interface IZ80ALink { // Memory Access diff --git a/src/BizHawk.Emulation.Cores/CPUs/Z80A/NewDisassembler.cs b/src/BizHawk.Emulation.Cores/CPUs/Z80A/NewDisassembler.cs index 0bbc111d203..8aab6e24e0c 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Z80A/NewDisassembler.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Z80A/NewDisassembler.cs @@ -380,6 +380,7 @@ private static string Result(string format, Func read, ref ushort return format; } + [CLSCompliant(false)] public static string Disassemble(ushort addr, Func read, out int size) { ushort start_addr = addr; diff --git a/src/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs b/src/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs index e59afef210b..7bd11cc79d4 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/Z80A/Z80A.cs @@ -12,6 +12,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A /// this way happens to perform better than the alternative /// /// + [CLSCompliant(false)] public sealed partial class Z80A where TLink : IZ80ALink { // operations that can take place in an instruction diff --git a/src/BizHawk.Emulation.Cores/CPUs/x86/x86.cs b/src/BizHawk.Emulation.Cores/CPUs/x86/x86.cs index ecf5f3eaf8e..bf26055ab3b 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/x86/x86.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/x86/x86.cs @@ -16,15 +16,31 @@ public sealed partial class x86 where TCpu : struct, x86CpuType public Register16 RegCX; public Register16 RegDX; + [CLSCompliant(false)] public ushort CS; + + [CLSCompliant(false)] public ushort DS; + + [CLSCompliant(false)] public ushort ES; + + [CLSCompliant(false)] public ushort SS; + [CLSCompliant(false)] public ushort SI; + + [CLSCompliant(false)] public ushort DI; + + [CLSCompliant(false)] public ushort IP; + + [CLSCompliant(false)] public ushort SP; + + [CLSCompliant(false)] public ushort BP; public bool CF; @@ -37,6 +53,7 @@ public sealed partial class x86 where TCpu : struct, x86CpuType public bool DF; public bool OF; + [CLSCompliant(false)] public ushort Flags { get @@ -68,21 +85,29 @@ public x86() } // We expect these properties to get inlined by the CLR -- at some point we should test this assumption + + [CLSCompliant(false)] public ushort AX { get => RegAX.Word; set => RegAX.Word = value; } + + [CLSCompliant(false)] public ushort BX { get => RegBX.Word; set => RegBX.Word = value; } + + [CLSCompliant(false)] public ushort CX { get => RegCX.Word; set => RegCX.Word = value; } + + [CLSCompliant(false)] public ushort DX { get => RegDX.Word; @@ -133,6 +158,7 @@ public byte DH [StructLayout(LayoutKind.Explicit)] public struct Register16 { + [CLSCompliant(false)] [FieldOffset(0)] public ushort Word; @@ -144,4 +170,4 @@ public struct Register16 public override string ToString() => $"{Word:X4}"; } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IDebuggable.cs index e30174a0967..39c8807f53b 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.IDebuggable.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 { public partial class Emu83 : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { int[] regs = new int[12]; @@ -37,6 +38,7 @@ public IDictionary GetCpuFlagsAndRegisters() private long _callbackCycleCount = 0; public long TotalExecutedCycles => Math.Max(LibEmu83.TI83_GetCycleCount(Context), _callbackCycleCount); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memoryCallbacks; private readonly MemoryCallbackSystem _memoryCallbacks = new(new[] { "System Bus" }); diff --git a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.cs b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.cs index 94534df9fdf..0bd8a4d5212 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/Emu83/Emu83.cs @@ -8,7 +8,10 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 { [PortedCore(CoreNames.Emu83, "CasualPokePlayer", "d2e6e1d", "https://github.com/CasualPokePlayer/Emu83")] - [ServiceNotApplicable(typeof(IBoardInfo), typeof(IRegionable), typeof(ISaveRam), typeof(ISoundProvider))] + [ServiceNotApplicable(typeof(IBoardInfo))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISaveRam))] + [ServiceNotApplicable(typeof(ISoundProvider))] public partial class Emu83 : TI83Common { private static readonly LibEmu83 LibEmu83; @@ -26,6 +29,7 @@ static Emu83() private readonly TI83Disassembler _disassembler = new(); + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.TI83)] public Emu83(CoreLoadParameters lp) { diff --git a/src/BizHawk.Emulation.Cores/Calculators/Emu83/LibEmu83.cs b/src/BizHawk.Emulation.Cores/Calculators/Emu83/LibEmu83.cs index f97c208fcf4..da978897550 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/Emu83/LibEmu83.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/Emu83/LibEmu83.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 { + [CLSCompliant(false)] public abstract class LibEmu83 { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Calculators/Emu83/TI83Disassembler.cs b/src/BizHawk.Emulation.Cores/Calculators/Emu83/TI83Disassembler.cs index 7d7c5090366..d1386bf3008 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/Emu83/TI83Disassembler.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/Emu83/TI83Disassembler.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83 { - public class TI83Disassembler : VerifiedDisassembler + public sealed partial class TI83Disassembler : VerifiedDisassembler { public override IEnumerable AvailableCpus { get; } = new[] { "Z80" }; diff --git a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.CpuLink.cs b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.CpuLink.cs index 55faeb7eddb..1641e8e8e2c 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Calculators.TI83 { public partial class TI83 { + [CLSCompliant(false)] public readonly struct CpuLink(TI83 ti83) : IZ80ALink { public byte FetchMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.IDebuggable.cs index cbf4dd9b5eb..a4810b68284 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.IDebuggable.cs @@ -5,10 +5,12 @@ namespace BizHawk.Emulation.Cores.Calculators.TI83 { public partial class TI83 : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); [FeatureNotImplemented] diff --git a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.cs b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.cs index 4727ba8cdc7..8d3f0e7388b 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83.cs @@ -6,9 +6,13 @@ namespace BizHawk.Emulation.Cores.Calculators.TI83 { [Core(CoreNames.TI83Hawk, "zeromus")] - [ServiceNotApplicable(typeof(IBoardInfo), typeof(IRegionable), typeof(ISaveRam), typeof(ISoundProvider))] + [ServiceNotApplicable(typeof(IBoardInfo))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISaveRam))] + [ServiceNotApplicable(typeof(ISoundProvider))] public partial class TI83 : TI83Common, IEmulator, IVideoProvider, IDebuggable, IInputPollable { + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.TI83)] public TI83(CoreLoadParameters lp) { diff --git a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83Common.cs b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83Common.cs index 2e4f0251e05..a6341a0cc53 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83Common.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83Common.cs @@ -4,10 +4,13 @@ namespace BizHawk.Emulation.Cores.Calculators.TI83 { public class TI83Common : ISettable { + [CLSCompliant(false)] protected TI83CommonSettings _settings; + [CLSCompliant(false)] public TI83CommonSettings GetSettings() => _settings.Clone(); + [CLSCompliant(false)] public PutSettingsDirtyBits PutSettings(TI83CommonSettings o) { _settings = o; @@ -18,6 +21,7 @@ public PutSettingsDirtyBits PutSettings(TI83CommonSettings o) public PutSettingsDirtyBits PutSyncSettings(object o) => PutSettingsDirtyBits.None; + [CLSCompliant(false)] public class TI83CommonSettings { public uint BGColor { get; set; } = 0x889778; diff --git a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83LinkPort.cs b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83LinkPort.cs index 464f8128877..cf9e415283e 100644 --- a/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83LinkPort.cs +++ b/src/BizHawk.Emulation.Cores/Calculators/TI83/TI83LinkPort.cs @@ -33,6 +33,7 @@ private enum Status Send } + [CLSCompliant(false)] public TI83LinkPort(TI83 parent) { Parent = parent; diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/LibUAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/LibUAE.cs index 75daf52a1d8..0ad611f5ad1 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/LibUAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/LibUAE.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga { + [CLSCompliant(false)] public abstract class LibUAE : LibWaterboxCore { public const int PAL_WIDTH = 720; @@ -251,4 +252,4 @@ public enum UAEKeyboard : int Key_Right_Amiga = 0x67, } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs index d2d8f4d9710..631b458295a 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga { + [CLSCompliant(false)] [PortedCore( name: CoreNames.UAE, author: "UAE Team", @@ -355,4 +356,4 @@ private static class FileNames public const string HD = "HardDrive"; } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.CpuLink.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.CpuLink.cs index e5c1c52e3ff..f8ba3681fc4 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC { public partial class AmstradCPC { + [CLSCompliant(false)] public readonly struct CpuLink(CPCBase machine) : IZ80ALink { public byte FetchMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IDebuggable.cs index ef4dcd92840..de025913bda 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.IDebuggable.cs @@ -9,10 +9,12 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// public partial class AmstradCPC : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Util.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Util.cs index d5008f88357..c8375483766 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Util.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Util.cs @@ -23,6 +23,7 @@ public static int GetIntFromBitArray(BitArray bitArray) /// /// POKEs a memory bus address /// + [CLSCompliant(false)] public void PokeMemory(ushort addr, byte value) { _machine.WriteBus(addr, value); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.cs index 03d657d69e0..7a915d3ac68 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.cs @@ -116,11 +116,12 @@ public AmstradCPC(CoreLoadParameters //private readonly Z80A _cpu; private readonly LibFz80Wrapper _cpu; private readonly TraceBuffer _tracer; - public IController _controller; + + internal IController _controller; private CPCBase _machine; - public List _gameInfo; + internal List _gameInfo; internal readonly IList _tapeInfo = new List(); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/AY38912.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/AY38912.cs index 87b083049ab..89c3a408420 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/AY38912.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/AY38912.cs @@ -32,6 +32,7 @@ public class AY38912 : IPSG /// /// Main constructor /// + [CLSCompliant(false)] public AY38912(CPCBase machine) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IKeyboard.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IKeyboard.cs index dc67c8d3313..6fe89c18159 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IKeyboard.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IKeyboard.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// /// Represents a spectrum keyboard /// + [CLSCompliant(false)] public interface IKeyboard { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IPortIODevice.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IPortIODevice.cs index e89a278a2cf..e010a7e828e 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IPortIODevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Abstraction/IPortIODevice.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// /// Represents a device that utilizes port IN & OUT /// + [CLSCompliant(false)] public interface IPortIODevice { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Beeper.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Beeper.cs index a99309dc95b..6c46b46d6c6 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Beeper.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Beeper.cs @@ -94,6 +94,7 @@ private int VolumeConverterOut(int shortvol) return shortvol / increment; } + [CLSCompliant(false)] public Beeper(CPCBase machine) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs index d215417f4f7..f8b708fef77 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs @@ -153,6 +153,7 @@ public virtual bool CUDISP /// Generated by the Vertical Control Raster Counter /// Feeds the RA lines /// + [CLSCompliant(false)] protected int _RA; #pragma warning disable RCS1243 // Analyzer doesn't understand tables @@ -178,6 +179,7 @@ public virtual bool CUDISP /// A1 6845 MA0 /// A0 Gate-Array CLK /// + [CLSCompliant(false)] public ushort MA_Address #pragma warning restore RCS1243 { @@ -235,6 +237,7 @@ public ushort MA_Address /// /// Reset Counter /// + [CLSCompliant(false)] protected int _inReset; /// @@ -617,8 +620,11 @@ protected CRTC() protected bool latch_idisp; protected bool hssstart; protected bool hhclock; + [CLSCompliant(false)] protected bool _field; + [CLSCompliant(false)] protected int _vma; + [CLSCompliant(false)] protected int _vmaRowStart; /// @@ -694,6 +700,7 @@ protected virtual void WriteRegister(int data) {} /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public virtual bool ReadPort(ushort port, ref int result) { byte portUpper = (byte)(port >> 8); @@ -726,6 +733,7 @@ public virtual bool ReadPort(ushort port, ref int result) /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public virtual bool WritePort(ushort port, int result) { byte portUpper = (byte)(port >> 8); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs index 7de96bd7cdc..10004fc9c55 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Datacorder/DatacorderDevice.cs @@ -29,6 +29,7 @@ public DatacorderDevice(bool autoTape) /// /// Initializes the datacorder device /// + [CLSCompliant(false)] public void Init(CPCBase machine) => _machine = machine; /// diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.IPortIODevice.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.IPortIODevice.cs index 2c37ce05799..035e6465d92 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.IPortIODevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.IPortIODevice.cs @@ -116,6 +116,7 @@ public void Motor(int data) /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int data) { BitArray bits = new BitArray(new byte[] { (byte)data }); @@ -156,6 +157,7 @@ public bool ReadPort(ushort port, ref int data) /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public bool WritePort(ushort port, int data) { BitArray bits = new BitArray(new byte[] { (byte)data }); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs index bef96504c45..2fdbf03c559 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Disk/NECUPD765.cs @@ -30,6 +30,7 @@ public NECUPD765() /// /// Initialization routine /// + [CLSCompliant(false)] public void Init(CPCBase machine) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/GateArray.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/GateArray.cs index 69e2f536559..99733bf93c8 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/GateArray.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/GateArray.cs @@ -13,6 +13,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// http://bread80.com/2021/06/03/understanding-the-amstrad-cpc-video-ram-and-gate-array-subsystem/ /// https://cpctech.cpcwiki.de/docs/crtcnew.html /// + [CLSCompliant(false)] public class GateArray : IPortIODevice { private readonly CPCBase _machine; @@ -1181,4 +1182,4 @@ public int ARGB /// public bool C_HSYNC { get; set; } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs index 38e31171572..4061907c280 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// public class StandardKeyboard : IKeyboard { + [CLSCompliant(false)] public CPCBase _machine { get; set; } private int _currentLine; @@ -53,6 +54,7 @@ public string[] NonMatrixKeys set => _nonMatrixKeys = value; } + [CLSCompliant(false)] public StandardKeyboard(CPCBase machine) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/LibFz80.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/LibFz80.cs index 627480cacd7..fcfcab22176 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/LibFz80.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/LibFz80.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC { + [CLSCompliant(false)] public class LibFz80Wrapper { public const int Z80_PIN_M1 = 24; // machine cycle 1 diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PAL16L8.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PAL16L8.cs index c7d78f49b0c..6f3e41e2fa0 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PAL16L8.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PAL16L8.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// Programmable Array Logic (PAL) device /// The C6128's second page of 64KB of RAM is controlled by this chip /// + [CLSCompliant(false)] public class PAL16L8 : IPortIODevice { private readonly CPCBase _machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI_8255.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI_8255.cs index 42dab204059..7fade6a2a16 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI_8255.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/PPI_8255.cs @@ -17,6 +17,7 @@ public class PPI_8255 : IPortIODevice private DatacorderDevice Tape => _machine.TapeDevice; private IKeyboard Keyboard => _machine.KeyboardDevice; + [CLSCompliant(false)] public PPI_8255(CPCBase machine) { _machine = machine; @@ -299,6 +300,7 @@ public void Reset() /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int result) { int PPIFunc = (port & 0x0300) >> 8; // portUpper & 3; @@ -336,6 +338,7 @@ public bool ReadPort(ushort port, ref int result) /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public bool WritePort(ushort port, int result) { if (port.Bit(11)) diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs index 25dd7d9b85d..c53af8dfc97 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPCBase.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// The abstract class that all emulated models will inherit from /// * Main properties / fields / contruction* /// + [CLSCompliant(false)] public abstract partial class CPCBase { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs index 581db2ef738..f08cc0dc94d 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/Disk/FloppyDisk.cs @@ -85,6 +85,8 @@ public int RandomCounter } } } + + [CLSCompliant(false)] protected int _randomCounter; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/MediaConverter.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/MediaConverter.cs index 466934d4490..c8fec3f377b 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/MediaConverter.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Media/MediaConverter.cs @@ -53,6 +53,7 @@ public static int GetInt32(ReadOnlySpan buf, int offsetIndex) /// /// Returns an uint16 from a byte array based on offset /// + [CLSCompliant(false)] public static ushort GetWordValue(ReadOnlySpan buf, int offsetIndex) => BinaryPrimitives.ReadUInt16LittleEndian(buf.Slice(start: offsetIndex)); diff --git a/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.cs b/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.cs index 928703b2ad3..f8336b8033b 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.cs @@ -7,8 +7,11 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII { + [CLSCompliant(false)] [PortedCore(CoreNames.Virtu, "fool")] - [ServiceNotApplicable(typeof(IBoardInfo), typeof(IRegionable), typeof(ISaveRam))] + [ServiceNotApplicable(typeof(IBoardInfo))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISaveRam))] public partial class AppleII : IEmulator, ISoundProvider, IVideoProvider, IStatable, IDriveLight { static AppleII() diff --git a/src/BizHawk.Emulation.Cores/Computers/AppleII/Components.cs b/src/BizHawk.Emulation.Cores/Computers/AppleII/Components.cs index 48217ba0818..6652760303a 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AppleII/Components.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AppleII/Components.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII /// /// A container class for the individual machine components /// + [CLSCompliant(false)] public sealed class Components { public Components(byte[] appleIIe, byte[] diskIIRom) diff --git a/src/BizHawk.Emulation.Cores/Computers/AppleII/Components/EmptyPeripheralComponent.cs b/src/BizHawk.Emulation.Cores/Computers/AppleII/Components/EmptyPeripheralComponent.cs index a6db30224f8..5e9f4dbdc25 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AppleII/Components/EmptyPeripheralComponent.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AppleII/Components/EmptyPeripheralComponent.cs @@ -13,6 +13,7 @@ public class EmptyPeripheralCard : IPeripheralCard // TODO: remove when json isn't used public EmptyPeripheralCard() { } + [CLSCompliant(false)] public EmptyPeripheralCard(Video video) { _video = video; diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs index 3427d272b31..2b7579e9998 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDebuggable.cs @@ -17,6 +17,7 @@ private void SetDefaultDebuggable() _selectedDebuggable = GetAvailableDebuggables().First(); } + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { if (_selectedDebuggable == null) @@ -59,6 +60,7 @@ public void Step(StepType type) public long TotalExecutedCycles => _selectedDebuggable.TotalExecutedCycles; + [CLSCompliant(false)] public IMemoryCallbackSystem _memoryCallbacks; IMemoryCallbackSystem IDebuggable.MemoryCallbacks => _memoryCallbacks; diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDisassemblable.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDisassemblable.cs index a2d86454067..8af32499643 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.IDisassemblable.cs @@ -58,6 +58,7 @@ public IEnumerable AvailableCpus get { return GetAvailableDisassemblables().SelectMany(d => d.AvailableCpus); } } + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { if (_selectedDisassemblable == null) diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs index a2c5e3fa97c..7348fb2bf22 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 /// /// Contains the onboard chipset and glue. /// + [CLSCompliant(false)] public sealed partial class Motherboard { // chips diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs index 49bcdfa2523..f02b5a3fef7 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs @@ -78,6 +78,7 @@ public C64(CoreLoadParameters lp) SetupMemoryDomains(); } + [CLSCompliant(false)] public void ExecFetch(ushort addr) { if (_memoryCallbacks.HasExecutes) diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.IDisassemblable.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.IDisassemblable.cs index 8952e076431..b49597d215e 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.IDisassemblable.cs @@ -18,6 +18,7 @@ public string Cpu public string PCRegisterName => "PC"; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { return MOS6502X.Disassemble((ushort) addr, out length, a => unchecked((byte) Peek(a))); diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs index 7a0bee9559d..bc3648d03a9 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs @@ -12,6 +12,7 @@ public sealed partial class Chip6510 private LatchedPort _port; private int _irqDelay; private int _nmiDelay; + [CLSCompliant(false)] public C64 c64; private struct CpuLink : IMOS6502XLink diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6526.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6526.cs index 6fc72823db3..3a465d54b05 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6526.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6526.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS // emulation notes: // * CS, R/W and RS# pins are not emulated. (not needed) // * A low RES pin is emulated via HardReset(). + [CLSCompliant(false)] public static class Chip6526 { public static Cia CreateCia1(C64.CiaType type, Func readIec, Func readUserPort) diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6581R2.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6581R2.cs index 8f3d04b64e8..f0db288f3f2 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6581R2.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6581R2.cs @@ -15,6 +15,7 @@ public static class Chip6581R2 new[] { 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x001, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x025, 0x015, 0x028, 0x074, 0x196, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x05c, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x089, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x080, 0x0c4, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x02a, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x02a, 0x000, 0x095, 0x095, 0x135, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x095, 0x000, 0x000, 0x000, 0x095, 0x095, 0x095, 0x0e0, 0x1c5, 0x02a, 0x095, 0x095, 0x0e0, 0x0a0, 0x0e0, 0x13a, 0x28d, 0x0e5, 0x145, 0x148, 0x2d9, 0x239, 0x3cc, 0x632, 0x89a, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x001, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x025, 0x015, 0x028, 0x074, 0x196, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x05c, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x014, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x089, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x080, 0x0c4, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x02a, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x02a, 0x000, 0x095, 0x095, 0x135, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x095, 0x000, 0x000, 0x000, 0x095, 0x095, 0x095, 0x0e0, 0x1c5, 0x02a, 0x095, 0x095, 0x0e0, 0x0a0, 0x0e0, 0x13a, 0x28d, 0x0e5, 0x145, 0x148, 0x2d9, 0x239, 0x3cc, 0x632, 0x89a } }; + [CLSCompliant(false)] public static Sid Create(int newSampleRate, int clockFrqNum, int clockFrqDen) { return new Sid(WaveTable, newSampleRate, clockFrqNum, clockFrqDen); diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs index 17d6a19b82b..eed6738532f 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.cs @@ -19,7 +19,9 @@ Commodore SID 6581/8580 core. */ // ------------------------------------ - public int _databus; + + private int _databus; + private int _cachedCycles; private bool _disableVoice3; private int _envelopeOutput0; diff --git a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Serial/Drive1541.cs b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Serial/Drive1541.cs index 6b2929436b8..9f734e685dc 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Commodore64/Serial/Drive1541.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Commodore64/Serial/Drive1541.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Serial { + [CLSCompliant(false)] public sealed partial class Drive1541 : SerialPortDevice { private byte[][][] _diskDeltas; diff --git a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs b/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs index da876bc5ab3..8650c5dcfb6 100644 --- a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISettable.cs @@ -10,6 +10,7 @@ public partial class DOSBox : ISettable { public const int MAX_MEMORY_SIZE_MB = 256; + [CLSCompliant(false)] //TODO just need renaming public enum ConfigurationPreset { [Display(Name = "[1981] IBM XT 5150 (4.77Mhz, 8086, 256KB RAM, Monochrome, PC Speaker)")] @@ -35,6 +36,7 @@ public enum ConfigurationPreset } /// values are the actual size in bytes for each hdd selection + [CLSCompliant(false)] public enum HardDiskOptions : uint { None = 0, @@ -241,6 +243,7 @@ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o) [CoreSettings] public class SyncSettings { + [CLSCompliant(false)] [DisplayName("Configuration Preset")] [Description("Establishes a base configuration for DOSBox roughly corresponding to the selected computer model. We recommend choosing a model that is roughly of the same year or above of the game / tool you plan to run. More modern models may require more CPU power to emulate.")] [DefaultValue(ConfigurationPreset._1993_IBM_PS2_53_SLC2_486)] @@ -267,6 +270,7 @@ public class SyncSettings [DefaultValue(3.0)] public float MouseSensitivity { get; set; } + [CLSCompliant(false)] [DisplayName("Mount Formatted Hard Disk Drive")] [Description("Determines whether to mount an empty writable formatted hard disk in drive C:. The hard disk will be fully located in memory so make sure you have enough RAM available. Its contents can be exported to the host filesystem.\n\nThis value will be ignored if a hard disk image (.hdd) is provided.")] [DefaultValue(HardDiskOptions.None)] diff --git a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.cs b/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.cs index fb4aef0e160..6819846bbf1 100644 --- a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.cs +++ b/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.cs @@ -314,6 +314,7 @@ public DOSBox(CoreLoadParameters lp) if (_cdRomFileNames.Count > 0) DriveLightEnabled = true; } + [CLSCompliant(false)] public static LibDOSBox.CDData GetCDDataStruct(Disc cd) { var ret = new LibDOSBox.CDData(); diff --git a/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs b/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs index 79a2f756024..4f87cf10244 100644 --- a/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs +++ b/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS { + [CLSCompliant(false)] public abstract class LibDOSBox : LibWaterboxCore { diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs index 470cd16e6e1..e8007871425 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs @@ -97,10 +97,13 @@ public enum MapOverlays public enum AspectRatio { Native = 0, + [CLSCompliant(false)] //TODO just needs renaming [Display(Name = "16:9")] _16by9 = 1, + [CLSCompliant(false)] //TODO just needs renaming [Display(Name = "16:10")] _16by10 = 2, + [CLSCompliant(false)] //TODO just needs renaming [Display(Name = "4:3")] _4by3 = 3, } @@ -466,6 +469,7 @@ public class DoomSyncSettings [TypeConverter(typeof(DescribableEnumConverter))] public HexenClass Player4Class { get; set; } + [CLSCompliant(false)] public LibDSDA.InitSettings GetNativeSettings() { return new LibDSDA.InitSettings diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs index 5a12ad7375a..1333292676d 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom { + [CLSCompliant(false)] public abstract class LibDSDA { public enum MemoryArrayType : int diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/LibMSX.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/LibMSX.cs index cd1d0506367..b121dfc4682 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/LibMSX.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/LibMSX.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Computers.MSX /// /// static bindings into MSXHawk.dll /// + [CLSCompliant(false)] public static class LibMSX { private const string lib = "MSXHawk"; diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs index 52a37185e48..fe9d546b0af 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs @@ -176,6 +176,8 @@ public void Dispose() public BlipBuffer blip = new BlipBuffer(4500); public int[] Aud = new int [9000]; + + [CLSCompliant(false)] public uint num_samp; private const int blipbuffsize = 4500; @@ -224,9 +226,9 @@ public void DiscardSamples() blip.Clear(); } - public int _frameHz = 60; + private int _frameHz = 60; - public int[] _vidbuffer = new int[192 * 256]; + private int[] _vidbuffer = new int[192 * 256]; public int[] GetVideoBuffer() { diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs index 74beb32162c..5963ece2dc0 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IInputPollable.cs @@ -18,8 +18,10 @@ public bool IsLagFrame public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); - public int _lagCount = 0; - public bool _lagged = true; - public bool _isLag = false; + private int _lagCount = 0; + + internal bool _lagged = true; + + private bool _isLag = false; } } diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs index b4c2997b738..d7105f6dcf6 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs @@ -205,6 +205,8 @@ private void MakeTrace(int t) } private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem(new[] { "System Bus" }); + + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memorycallbacks; } } diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IKeyboard.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IKeyboard.cs index ad1cc4acc28..db8f56f7cfb 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IKeyboard.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IKeyboard.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// Represents a spectrum keyboard /// + [CLSCompliant(false)] public interface IKeyboard : IPortIODevice { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPSG.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPSG.cs index cd50120130e..ba2935fdd48 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPSG.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPSG.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// Represents a PSG device (in this case an AY-3-891x) /// + [CLSCompliant(false)] public interface IPSG : ISoundProvider, IPortIODevice { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPortIODevice.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPortIODevice.cs index 9a304d9bdb7..fbedff3e85f 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPortIODevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Abstraction/IPortIODevice.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// Represents a device that utilizes port IN & OUT /// + [CLSCompliant(false)] public interface IPortIODevice { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs index 5a73a99cf73..e93b63da119 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs @@ -28,6 +28,7 @@ public DatacorderDevice(bool autoplay) /// /// Initializes the datacorder device /// + [CLSCompliant(false)] public void Init(SpectrumBase machine) { _machine = machine; @@ -833,6 +834,7 @@ private void MonitorFrame() /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int result) { if (TapeIsPlaying) @@ -862,6 +864,7 @@ public bool ReadPort(ushort port, ref int result) /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public bool WritePort(ushort port, int result) { if (!TapeIsPlaying) diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.IPortIODevice.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.IPortIODevice.cs index 2cca36eb434..ea9f939c17c 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.IPortIODevice.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.IPortIODevice.cs @@ -68,6 +68,7 @@ private void BuildCSVLine() /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int data) { BitArray bits = new BitArray(new byte[] { (byte)data }); @@ -108,6 +109,7 @@ public bool ReadPort(ushort port, ref int data) /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public bool WritePort(ushort port, int data) { BitArray bits = new BitArray(new byte[] { (byte)data }); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs index 1339c5524b2..bd83814fdac 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.cs @@ -30,6 +30,7 @@ public NECUPD765() /// /// Initialization routine /// + [CLSCompliant(false)] public void Init(SpectrumBase machine) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/CursorJoystick.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/CursorJoystick.cs index 69a163e1d7d..2608df888ec 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/CursorJoystick.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/CursorJoystick.cs @@ -11,6 +11,7 @@ public class CursorJoystick : IJoystick //private int _joyLine; private readonly SpectrumBase _machine; + [CLSCompliant(false)] public CursorJoystick(SpectrumBase machine, int playerNumber) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/KempstonJoystick.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/KempstonJoystick.cs index c3331dfb4c3..98cf396b417 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/KempstonJoystick.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/KempstonJoystick.cs @@ -7,6 +7,7 @@ public class KempstonJoystick : IJoystick private int _joyLine; private SpectrumBase _machine; + [CLSCompliant(false)] public KempstonJoystick(SpectrumBase machine, int playerNumber) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/NullJoystick.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/NullJoystick.cs index 55c460a7ab8..e3fa9899bc9 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/NullJoystick.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/NullJoystick.cs @@ -8,6 +8,7 @@ public class NullJoystick : IJoystick private int _joyLine; private SpectrumBase _machine; + [CLSCompliant(false)] public NullJoystick(SpectrumBase machine, int playerNumber) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick1.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick1.cs index 79d5cb2b4a4..a7b298c6eb9 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick1.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick1.cs @@ -11,6 +11,7 @@ public class SinclairJoystick1 : IJoystick //private int _joyLine; private readonly SpectrumBase _machine; + [CLSCompliant(false)] public SinclairJoystick1(SpectrumBase machine, int playerNumber) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick2.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick2.cs index f267e7c1daa..078df5711f7 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick2.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/SinclairJoystick2.cs @@ -11,6 +11,7 @@ public class SinclairJoystick2 : IJoystick //private int _joyLine; private readonly SpectrumBase _machine; + [CLSCompliant(false)] public SinclairJoystick2(SpectrumBase machine, int playerNumber) { _machine = machine; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs index 8ab4c87f8d8..999c6535d25 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs @@ -10,6 +10,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// public class StandardKeyboard : IKeyboard { + [CLSCompliant(false)] public SpectrumBase _machine { get; set; } private byte[] LineStatus; private string[] _keyboardMatrix; @@ -41,6 +42,7 @@ public string[] NonMatrixKeys set => _nonMatrixKeys = value; } + [CLSCompliant(false)] public StandardKeyboard(SpectrumBase machine) { _machine = machine; @@ -172,6 +174,7 @@ public byte GetLineStatus(byte lines) } } + [CLSCompliant(false)] public byte ReadKeyboardByte(ushort addr) { return GetLineStatus((byte)(addr >> 8)); @@ -186,6 +189,7 @@ public byte GetByteFromKeyMatrix(string key) /// /// Device responds to an IN instruction /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int result) { /* @@ -259,6 +263,7 @@ A zero in one of the five lowest bits means that the corresponding key is presse /// /// Device responds to an OUT instruction /// + [CLSCompliant(false)] public bool WritePort(ushort port, int result) { // not implemented diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Rom/RomData.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Rom/RomData.cs index 2f5da5e94d1..813ab6c8a17 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Rom/RomData.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Rom/RomData.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// Information about spectrum ROM /// + [CLSCompliant(false)] public class RomData { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs index 5b400487835..51ece33cd4a 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/AY38912.cs @@ -33,6 +33,7 @@ public class AY38912 : IPSG /// /// Main constructor /// + [CLSCompliant(false)] public AY38912(SpectrumBase machine) { _machine = machine; @@ -51,6 +52,7 @@ public void Init(int sampleRate, int tStatesPerFrame) /// /// |11-- ---- ---- --0-| - IN - Read value of currently selected register /// + [CLSCompliant(false)] public bool ReadPort(ushort port, ref int value) { if (!port.Bit(1)) @@ -71,6 +73,7 @@ public bool ReadPort(ushort port, ref int value) /// |11-- ---- ---- --0-| - OUT - Register Select /// |10-- ---- ---- --0-| - OUT - Write value to currently selected register /// + [CLSCompliant(false)] public bool WritePort(ushort port, int value) { if (!port.Bit(1)) diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs index b106a743d5d..7e0d7c59e24 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/CPUMonitor.cs @@ -21,6 +21,7 @@ public class CPUMonitor /// /// Current BUSRQ line array /// + [CLSCompliant(false)] public ushort BUSRQ { get @@ -36,6 +37,7 @@ public ushort BUSRQ } } + [CLSCompliant(false)] public CPUMonitor(SpectrumBase machine) { _machine = machine; @@ -45,6 +47,7 @@ public CPUMonitor(SpectrumBase machine) /// /// The last 16-bit port address that was detected /// + [CLSCompliant(false)] public ushort lastPortAddr; /// @@ -362,6 +365,7 @@ private bool IsIOCycleContended(int T) /// /// Called when the first byte of an instruction is fetched /// + [CLSCompliant(false)] public void OnExecFetch(ushort firstByte) { // fetch instruction without incrementing pc diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs index 7b1269434c5..79debc9d24a 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs @@ -35,6 +35,7 @@ public abstract partial class SpectrumBase /// /// The index of the currently 'loaded' tape image /// + [CLSCompliant(false)] protected int tapeMediaIndex; public int TapeMediaIndex { @@ -75,6 +76,7 @@ public int TapeMediaIndex /// /// The index of the currently 'loaded' disk image /// + [CLSCompliant(false)] protected int diskMediaIndex; public int DiskMediaIndex { diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs index 4988352ff8d..e6e6c421d70 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// The abstract class that all emulated models will inherit from /// * Memory * /// + [CLSCompliant(false)] public abstract partial class SpectrumBase { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs index 6efeb25db1e..61e1c200a49 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs @@ -18,17 +18,20 @@ public abstract partial class SpectrumBase /// /// Reference to the instantiated Z80 cpu (piped in via constructor) /// + [CLSCompliant(false)] public Z80A CPU { get; set; } /// /// ROM and extended info /// + [CLSCompliant(false)] public RomData RomData { get; set; } /// /// The emulated ULA device /// //public ULABase ULADevice { get; set; } + [CLSCompliant(false)] public ULA ULADevice { get; set; } /// @@ -54,6 +57,7 @@ public abstract partial class SpectrumBase /// /// The spectrum keyboard /// + [CLSCompliant(false)] public virtual IKeyboard KeyboardDevice { get; set; } /// @@ -94,6 +98,7 @@ public abstract partial class SpectrumBase /// /// The current cycle (T-State) that we are at in the frame /// + [CLSCompliant(false)] public long _frameCycles; /// @@ -109,7 +114,9 @@ public abstract partial class SpectrumBase /// /// Non-Deterministic bools /// + [CLSCompliant(false)] public bool _render; + [CLSCompliant(false)] public bool _renderSound; /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs index 0441fe297fe..e207ca69f67 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// Uncommitted logic array implementation (ULA) /// + [CLSCompliant(false)] public abstract class ULA : IVideoProvider { /// diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Memory.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Memory.cs index af850364982..0ec6e70c008 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Memory.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Memory.cs @@ -41,6 +41,7 @@ public partial class ZX128 : SpectrumBase /// Simulates reading from the bus (no contention) /// Paging should be handled here /// + [CLSCompliant(false)] public override byte ReadBus(ushort addr) { int divisor = addr / 0x4000; @@ -109,6 +110,7 @@ public override byte ReadBus(ushort addr) /// Simulates writing to the bus (no contention) /// Paging should be handled here /// + [CLSCompliant(false)] public override void WriteBus(ushort addr, byte value) { int divisor = addr / 0x4000; @@ -177,6 +179,7 @@ public override void WriteBus(ushort addr, byte value) /// Reads a byte of data from a specified memory address /// (with memory contention if appropriate) /// + [CLSCompliant(false)] public override byte ReadMemory(ushort addr) { var data = ReadBus(addr); @@ -186,6 +189,7 @@ public override byte ReadMemory(ushort addr) /// /// Returns the ROM/RAM enum that relates to this particular memory read operation /// + [CLSCompliant(false)] public override ZXSpectrum.CDLResult ReadCDL(ushort addr) { var result = new ZXSpectrum.CDLResult(); @@ -254,6 +258,7 @@ public override ZXSpectrum.CDLResult ReadCDL(ushort addr) /// Writes a byte of data to a specified memory address /// (with memory contention if appropriate) /// + [CLSCompliant(false)] public override void WriteMemory(ushort addr, byte value) { WriteBus(addr, value); @@ -262,6 +267,7 @@ public override void WriteMemory(ushort addr, byte value) /// /// Checks whether supplied address is in a potentially contended bank /// + [CLSCompliant(false)] public override bool IsContended(ushort addr) { var a = addr & 0xc000; @@ -310,6 +316,7 @@ public override bool ContendedBankPaged() /// (No memory contention) /// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output /// + [CLSCompliant(false)] public override byte FetchScreenMemory(ushort addr) { byte value = new byte(); @@ -333,6 +340,7 @@ public override byte FetchScreenMemory(ushort addr) /// /// Sets up the ROM /// + [CLSCompliant(false)] public override void InitROM(RomData romData) { RomData = romData; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Port.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Port.cs index 79d714fbfd6..4a8ec2af24c 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128K/ZX128.Port.cs @@ -10,6 +10,7 @@ public partial class ZX128 : SpectrumBase /// /// Reads a byte of data from a specified port address /// + [CLSCompliant(false)] public override byte ReadPort(ushort port) { bool deviceAddressed = true; @@ -74,6 +75,7 @@ public override byte ReadPort(ushort port) /// /// Writes a byte of data to a specified port address /// + [CLSCompliant(false)] public override void WritePort(ushort port, byte value) { // get a BitArray of the port diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs index 8f186714e02..436eade0ed7 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// The +2 is almost identical to the 128k from an emulation point of view /// There are just a few small changes in the ROMs /// - public sealed class ZX128Plus2 : ZX128 + public sealed partial class ZX128Plus2 : ZX128 { /// /// Main constructor diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2a/ZX128Plus2a.Port.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2a/ZX128Plus2a.Port.cs index 3f43ec18f2c..fcc429ce5b1 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2a/ZX128Plus2a.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2a/ZX128Plus2a.Port.cs @@ -10,6 +10,7 @@ public partial class ZX128Plus2a : SpectrumBase /// /// Reads a byte of data from a specified port address /// + [CLSCompliant(false)] public override byte ReadPort(ushort port) { bool deviceAddressed = true; @@ -55,6 +56,7 @@ public override byte ReadPort(ushort port) /// /// Writes a byte of data to a specified port address /// + [CLSCompliant(false)] public override void WritePort(ushort port, byte value) { // get a BitArray of the port diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.Port.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.Port.cs index 1c64bb538a4..a70c2b4f7ec 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.Port.cs @@ -10,6 +10,7 @@ public partial class ZX128Plus3 : SpectrumBase /// /// Reads a byte of data from a specified port address /// + [CLSCompliant(false)] public override byte ReadPort(ushort port) { bool deviceAddressed = true; @@ -59,6 +60,7 @@ public override byte ReadPort(ushort port) /// /// Writes a byte of data to a specified port address /// + [CLSCompliant(false)] public override void WritePort(ushort port, byte value) { if (port == 0x7ffd) diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum16K/ZX16.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum16K/ZX16.cs index 61b3ae4ece9..8dd1c6bcaa1 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum16K/ZX16.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum16K/ZX16.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// /// 16K is idential to 48K, just without the top 32KB of RAM /// - public class ZX16 : ZX48 + public sealed partial class ZX16 : ZX48 { /// /// Main constructor diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.Port.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.Port.cs index ee93dc27288..a1648e40eaa 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.Port.cs @@ -9,6 +9,7 @@ public partial class ZX48 : SpectrumBase /// /// Reads a byte of data from a specified port address /// + [CLSCompliant(false)] public override byte ReadPort(ushort port) { int result = 0xFF; @@ -58,6 +59,7 @@ public override byte ReadPort(ushort port) /// /// Writes a byte of data to a specified port address /// + [CLSCompliant(false)] public override void WritePort(ushort port, byte value) { // Check whether the low bit is reset diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs index cbe56f61e13..abaa69191c3 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Disk/FloppyDisk.cs @@ -85,6 +85,8 @@ public int RandomCounter } } } + + [CLSCompliant(false)] protected int _randomCounter; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/MediaConverter.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/MediaConverter.cs index f1dc97d9e34..345765ef073 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/MediaConverter.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/MediaConverter.cs @@ -74,12 +74,14 @@ public static int GetBEInt32FromByteArray(ReadOnlySpan buf) /// /// Returns an int32 from a byte array based on offset /// + [CLSCompliant(false)] public static uint GetUInt32(ReadOnlySpan buf, int offsetIndex) => BinaryPrimitives.ReadUInt32LittleEndian(buf.Slice(start: offsetIndex)); /// /// Returns an uint16 from a byte array based on offset /// + [CLSCompliant(false)] public static ushort GetWordValue(ReadOnlySpan buf, int offsetIndex) => BinaryPrimitives.ReadUInt16LittleEndian(buf.Slice(start: offsetIndex)); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Methods.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Methods.cs index f1c11e00091..a042c0996de 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Methods.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Methods.cs @@ -24,6 +24,7 @@ private SZX(SpectrumBase machine) /// /// Exports state information to a byte array in ZX-State format /// + [CLSCompliant(false)] public static byte[] ExportSZX(SpectrumBase machine) { var s = new SZX(machine); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Objects.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Objects.cs index 19606e606c8..01d372927a2 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Objects.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Snapshot/SZX/SZX.Objects.cs @@ -38,6 +38,7 @@ public enum MachineIdentifier : byte /// /// The zx-state header appears right at the start of a zx-state (.szx) file. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTHEADER { @@ -51,6 +52,7 @@ public struct ZXSTHEADER /// /// Block Header. Each real block starts with this header. /// + [CLSCompliant(false)] public struct ZXSTBLOCK { public uint dwId; @@ -84,6 +86,7 @@ public struct ZXSTCREATOR /// /// Contains the Z80 registers and other internal state values. It does not contain any specific model registers. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTZ80REGS { @@ -142,6 +145,7 @@ public struct ZXSTAYBLOCK /// /// zx-state files will contain a number of 16KB RAM page blocks, depending on the specific Spectrum model. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTRAMPAGE { @@ -175,6 +179,7 @@ public enum JoystickTypes /// /// The state of the Spectrum keyboard and any keyboard joystick emulation. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTKEYBOARD { @@ -185,6 +190,7 @@ public struct ZXSTKEYBOARD /// /// Joystick setup for both players. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTJOYSTICK { @@ -202,6 +208,7 @@ public enum CassetteRecorderState ZXSTTP_COMPRESSED = 2 } + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTTAPE { @@ -242,6 +249,7 @@ public struct ZXSTPLUS3 /// Each +3 disk drive that has a disk inserted in it will have one of these blocks. /// They follow the ZXSTPLUS3 block which identifies the number of drives. /// + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ZXSTDSKFILE { diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/StreamHelper.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/StreamHelper.cs index 902ae3f2183..23537ef724d 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/StreamHelper.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/StreamHelper.cs @@ -13,6 +13,7 @@ public static void Write(Stream stream, int value) stream.Write(data, 0, data.Length); } + [CLSCompliant(false)] public static void Write(Stream stream, uint value) { byte[] data = BitConverter.GetBytes(value); @@ -25,6 +26,7 @@ public static void Write(Stream stream, short value) stream.Write(data, 0, data.Length); } + [CLSCompliant(false)] public static void Write(Stream stream, ushort value) { byte[] data = BitConverter.GetBytes(value); @@ -38,6 +40,7 @@ public static void Write(Stream stream, byte value) stream.Write(data, 0, data.Length); } + [CLSCompliant(false)] public static void Write(Stream stream, sbyte value) { byte[] data = new byte[1]; @@ -60,6 +63,7 @@ public static void Read(Stream stream, out int value) value = BitConverter.ToInt32(data, 0); } + [CLSCompliant(false)] public static void Read(Stream stream, out uint value) { byte[] data = new byte[4]; @@ -74,6 +78,7 @@ public static void Read(Stream stream, out short value) value = BitConverter.ToInt16(data, 0); } + [CLSCompliant(false)] public static void Read(Stream stream, out ushort value) { byte[] data = new byte[2]; @@ -88,6 +93,7 @@ public static void Read(Stream stream, out byte value) value = data[0]; } + [CLSCompliant(false)] public static void Read(Stream stream, out sbyte value) { byte[] data = new byte[1]; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.CpuLink.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.CpuLink.cs index 392b29f3f39..4bd5f5435b9 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum { public partial class ZXSpectrum { + [CLSCompliant(false)] public readonly struct CpuLink(ZXSpectrum spectrum, SpectrumBase machine) : IZ80ALink { public byte FetchMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IDebuggable.cs index 2136d324a06..4c18f6dab61 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IDebuggable.cs @@ -9,10 +9,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// public partial class ZXSpectrum : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs index 4e88cbc5804..d21e951dfe1 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs @@ -23,6 +23,7 @@ public static int GetIntFromBitArray(BitArray bitArray) /// /// POKEs a memory bus address /// + [CLSCompliant(false)] public void PokeMemory(ushort addr, byte value) { _machine.WriteBus(addr, value); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs index 1baf12b1eb7..dfc342a9a06 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs @@ -158,13 +158,14 @@ public ZXSpectrum( private readonly Z80A _cpu; private readonly TraceBuffer _tracer; - public IController _controller; + + internal IController _controller; private SpectrumBase _machine; public MachineType MachineType; - public List _gameInfo; + internal List _gameInfo; internal readonly IList _tapeInfo = new List(); diff --git a/src/BizHawk.Emulation.Cores/Computers/TIC80/LibTIC80.cs b/src/BizHawk.Emulation.Cores/Computers/TIC80/LibTIC80.cs index 28761a5e533..6e4a101046d 100644 --- a/src/BizHawk.Emulation.Cores/Computers/TIC80/LibTIC80.cs +++ b/src/BizHawk.Emulation.Cores/Computers/TIC80/LibTIC80.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Computers.TIC80 { + [CLSCompliant(false)] public abstract class LibTIC80 : LibWaterboxCore { [Flags] diff --git a/src/BizHawk.Emulation.Cores/Consoles/3DO/Opera.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/3DO/Opera.ISettable.cs index 76dcb05c5b5..c40ffe9294b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/3DO/Opera.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/3DO/Opera.ISettable.cs @@ -34,6 +34,7 @@ public enum SystemType Sanyo_HC21, [Display(Name = "(3DO Arcade) Shootout At Old Tucson")] Shootout_At_Old_Tucson, + [CLSCompliant(false)] //TODO just needs renaming [Display(Name = "3DO-NTSC-1.0fc2")] _3DO_NTSC_1fc2, } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs index 11bc0342673..a4aaf99caa6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.Core.cs @@ -11,8 +11,10 @@ public partial class Atari2600 { private readonly GameInfo _game; - public TIA _tia; - public M6532 _m6532; + private TIA _tia; + + internal M6532 _m6532; + private DCFilter _dcfilter; private MapperBase _mapper; private byte[] _ram; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs index 8a9271153e3..a535c35f9ee 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IDebuggable.cs @@ -5,10 +5,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { public partial class Atari2600 : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => Cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => Cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs index cfa01e76bb8..7bd9cdfa3c7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/M6532.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { // Emulates the M6532 RIOT Chip + [CLSCompliant(false)] public class M6532 { private readonly Atari2600 _core; @@ -236,4 +237,4 @@ public void SyncState(Serializer ser) } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs index 21fd874d679..b4c24b6de25 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs @@ -930,6 +930,7 @@ private void OutputFrame(int validlines) Buffer.BlockCopy(_scanlinebuffer, srcbytes, _frameBuffer, 0, count); } + [CLSCompliant(false)] public byte ReadMemory(ushort addr, bool peek) { var maskedAddr = (ushort)(addr & 0x000F); @@ -1196,6 +1197,7 @@ public byte ReadMemory(ushort addr, bool peek) return coll; } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value, bool poke) { var maskedAddr = (ushort)(addr & 0x3f); @@ -1593,4 +1595,4 @@ private enum AudioRegister : byte AUDC, AUDF, AUDV } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IDebuggable.cs index 3977ad6a1c8..55f12b24f20 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IDebuggable.cs @@ -5,10 +5,12 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { public partial class A7800Hawk : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs index 47720dfbb63..d3de0f521d6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs @@ -48,7 +48,9 @@ public partial class A7800Hawk : IEmulator, IVideoProvider, ISoundProvider public int temp_s_tia; public int temp_s_pokey; public int samp_l, samp_c; - public uint master_audio_clock; + + private uint master_audio_clock; + public int temp; // there are 4 maria cycles in a CPU cycle (fast access, both NTSC and PAL) @@ -335,12 +337,15 @@ public void Dispose() } - public int _frameHz = 60; - public int _screen_width = 320; - public int _screen_height = 263; - public int _vblanklines = 20; + private int _frameHz = 60; + + internal int _screen_width = 320; + + internal int _screen_height = 263; + + private int _vblanklines = 20; - public int[] _vidbuffer; + internal int[] _vidbuffer; public int[] GetVideoBuffer() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IInputPollable.cs index 547b0513a3c..cf07a3209ad 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IInputPollable.cs @@ -18,7 +18,8 @@ public bool IsLagFrame public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); - public bool _isLag = true; + internal bool _isLag = true; + private int _lagCount; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs index b9c06464ed3..054e6985bcc 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs @@ -23,7 +23,7 @@ public PutSettingsDirtyBits PutSyncSettings(A7800SyncSettings o) return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None; } - public A7800SyncSettings _syncSettings = new(); + private A7800SyncSettings _syncSettings = new(); public class A7800SyncSettings { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs index f6b7b8126d7..aea5d85a6ef 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs @@ -30,16 +30,21 @@ internal static class RomChecksums public byte[] RAM = new byte[0x1000]; public byte[] RAM_6532 = new byte[0x80]; public byte[] hs_bios_mem = new byte[0x800]; - public byte[] _hsram = new byte[2048]; - public readonly byte[] _rom; - public readonly byte[] _hsbios; - public readonly byte[] _bios; + internal byte[] _hsram = new byte[2048]; + + internal readonly byte[] _rom; + + internal readonly byte[] _hsbios; + + internal readonly byte[] _bios; private int _frame = 0; public string s_mapper; - public MapperBase mapper; + + private MapperBase mapper; + public bool small_flag = false; public bool PAL_Kara = false; public int cart_RAM = 0; @@ -48,13 +53,18 @@ internal static class RomChecksums private readonly ITraceable _tracer; - public MOS6502X cpu; - public Maria maria; - public bool _isPAL; - public M6532 m6532; + internal MOS6502X cpu; + + private Maria maria; + + private bool _isPAL; + + internal M6532 m6532; + public TIA tia; public Pokey pokey; + [CLSCompliant(false)] public struct CpuLink : IMOS6502XLink { private readonly A7800Hawk _a7800; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs index e6fd0627aa9..c9d4bf6eb92 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/M6532.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Emulates the M6532 RIOT Chip + [CLSCompliant(false)] public sealed class M6532 { public A7800Hawk Core { get; set; } @@ -255,4 +256,4 @@ public void SyncState(Serializer ser) } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperBase.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperBase.cs index 86d14235c12..eb80aa04b59 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperBase.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperBase.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { + [CLSCompliant(false)] public class MapperBase { public A7800Hawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperDefault.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperDefault.cs index 07c85d8e838..992359d570b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperDefault.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperDefault.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Default mapper with no bank switching // Just need to keep track of high score bios stuff - public sealed class MapperDefault : MapperBase + public sealed partial class MapperDefault : MapperBase { public override byte ReadMemory(ushort addr) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperF18.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperF18.cs index 07c6d81a44a..bb4c11fd4af 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperF18.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperF18.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Mapper only used by F-18 Hornet - public sealed class MapperF18 : MapperBase + public sealed partial class MapperF18 : MapperBase { private byte _bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs index ac374b13362..68cd70a16f5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperFractalus.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Rescue on Fractalus has unique RAM mapping - public sealed class MapperFractalus : MapperBase + public sealed partial class MapperFractalus : MapperBase { private byte[] RAM = new byte[0x800]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperRampage.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperRampage.cs index d64c5ee9c91..dc822ad3427 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperRampage.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperRampage.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Mapper only used by Rampage and Double Dragon - public sealed class MapperRampage : MapperBase + public sealed partial class MapperRampage : MapperBase { private byte _bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs index 1b97126b462..479ca7988db 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSG.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Default Bank Switching Mapper used by most games - public sealed class MapperSG : MapperBase + public sealed partial class MapperSG : MapperBase { private byte _bank; private byte[] RAM = new byte[0x4000]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSGE.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSGE.cs index 5faa93f80f0..0999f1ebd47 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSGE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Mappers/MapperSGE.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Super Game mapper but with extra ROM at the start of the file // Have to add 1 to bank number to get correct bank value - public sealed class MapperSGE : MapperBase + public sealed partial class MapperSGE : MapperBase { private byte _bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs index be25db4cb2a..33f130f7d68 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { // Emulates the Atari 7800 Maria graphics chip + [CLSCompliant(false)] public sealed class Maria { public A7800Hawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/MemoryMap.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/MemoryMap.cs index 1a72e3b95f2..5cfb1bdece5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/MemoryMap.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/MemoryMap.cs @@ -16,6 +16,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { public partial class A7800Hawk { + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (MemoryCallbacks.HasReads) @@ -106,6 +107,7 @@ public byte ReadMemory(ushort addr) return mapper.ReadMemory(addr); } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { if (MemoryCallbacks.HasWrites) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs index c3423e2eaa6..c4685ed8fb1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Pokey.cs @@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk */ public sealed class Pokey { + [CLSCompliant(false)] public A7800Hawk Core { get; set; } public int LocalAudioCycles; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs index 24c51506db1..ed7e7a892d6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs @@ -3,13 +3,16 @@ // Emulates the TIA public sealed partial class TIA { + [CLSCompliant(false)] public A7800Hawk Core { get; set; } public byte BusState; private bool _doTicks; public int AudioClocks; // not savestated - public int _hsyncCnt; + + internal int _hsyncCnt; + private int _capChargeStart; private bool _capCharging; @@ -41,6 +44,7 @@ public int Execute() return LocalAudioCycles; } + [CLSCompliant(false)] public byte ReadMemory(ushort addr, bool peek) { var maskedAddr = (ushort)(addr & 0x000F); @@ -194,6 +198,7 @@ public byte ReadMemory(ushort addr, bool peek) */ } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value, bool poke) { var maskedAddr = (ushort)(addr & 0x3f); @@ -389,4 +394,4 @@ private enum AudioRegister : byte private int _frameStartCycles, _frameEndCycles; } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/LibStella.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/LibStella.cs index 53d4bc155e3..eb65ce0efe0 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/LibStella.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/LibStella.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Atari.Stella { + [CLSCompliant(false)] public abstract class CInterface { [UnmanagedFunctionPointer(CallingConvention.Cdecl)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.ISettable.cs index ad23ea430e4..3d63508da78 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.ISettable.cs @@ -40,6 +40,7 @@ public class A2600SyncSettings [TypeConverter(typeof(DescribableEnumConverter))] public Atari2600ControllerTypes Port2 { get; set; } + [CLSCompliant(false)] public CInterface.InitSettings GetNativeSettings() { return new CInterface.InitSettings diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/JaguarDisassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/JaguarDisassembler.cs index 8fb15792fb5..cff7e0f1e7c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/JaguarDisassembler.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/JaguarDisassembler.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Atari.Jaguar { - public class JaguarDisassembler : VerifiedDisassembler + public sealed partial class JaguarDisassembler : VerifiedDisassembler { private readonly MC68000 _m68kDisassembler = new(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/LibVirtualJaguar.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/LibVirtualJaguar.cs index 2bf6bd38fc2..be2e3315298 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/LibVirtualJaguar.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/LibVirtualJaguar.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Atari.Jaguar { + [CLSCompliant(false)] public abstract class LibVirtualJaguar : LibWaterboxCore { [Flags] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.IDebuggable.cs index 887b8205ac4..da5e4047d22 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/jaguar/VirtualJaguar.IDebuggable.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Atari.Jaguar { public partial class VirtualJaguar : IDebuggable { + [CLSCompliant(false)] public unsafe IDictionary GetCpuFlagsAndRegisters() { // 148 registers, oh my @@ -92,6 +93,7 @@ public long TotalExecutedCycles => throw new NotImplementedException(); #pragma warning restore CA1065 + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memoryCallbacks; private readonly MemoryCallbackSystem _memoryCallbacks = new(new[] { "System Bus" }); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/LibLynx.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/LibLynx.cs index f1ff28d1ea6..144245b06a1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/LibLynx.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/LibLynx.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx { + [CLSCompliant(false)] public abstract class LibLynx { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs index 54ef1c01dfc..ecd082a1aa7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs @@ -13,7 +13,8 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx author: "K. Wilkins, Mednafen Team", portedVersion: "0.9.34.1", portedUrl: "https://mednafen.github.io/releases/")] - [ServiceNotApplicable(typeof(IRegionable), typeof(ISettable<,>))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISettable<,>))] public partial class Lynx : IEmulator, IVideoProvider, ISoundProvider, ISaveRam, IStatable, IInputPollable { private static readonly LibLynx LibLynx; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.CpuLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.CpuLink.cs index d8352dae71f..b4b6061bca5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision { public partial class ColecoVision { + [CLSCompliant(false)] public readonly struct CpuLink(ColecoVision coleco) : IZ80ALink { public byte FetchMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs index af1d1f91244..9dbb7438b94 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IDebuggable.cs @@ -5,10 +5,12 @@ namespace BizHawk.Emulation.Cores.ColecoVision { public partial class ColecoVision : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs index 1b96992349e..d55c299edb6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs @@ -173,8 +173,9 @@ public bool FrameAdvance(IController controller, bool render, bool renderSound) public bool enable_SGM_low = false; public byte port_0x53, port_0x7F; - public int _sampleClock = 0; - public int _latchedSample = 0; + private int _sampleClock = 0; + + private int _latchedSample = 0; public int Frame => _frame; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs index 124b627f9d5..d9665d37e4e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/SN76489col.cs @@ -13,6 +13,8 @@ public SN76489col() } public byte[] Chan_vol = new byte[4]; + + [CLSCompliant(false)] public ushort[] Chan_tone = new ushort[4]; public int chan_sel; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs index 3facc0cf9b2..4a328b7a053 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/TMS9918A.cs @@ -450,6 +450,7 @@ private void RenderTmsSpritesDouble(int scanLine) private readonly Z80A Cpu; + [CLSCompliant(false)] public TMS9918A(Z80A cpu) { Cpu = cpu; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperHANG.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperHANG.cs index 1051e0f587a..e33d786773d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperHANG.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperHANG.cs @@ -4,7 +4,7 @@ /// Hangman ChannelF Cartridge /// Utilises 2102 SRAM over IO /// - public class MapperHANG : VesCartBase + public sealed partial class MapperHANG : VesCartBase { public override string BoardType => "HANG"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperMAZE.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperMAZE.cs index a21e08bcc29..e3e0d1a1769 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperMAZE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperMAZE.cs @@ -4,7 +4,7 @@ /// Maze ChannelF Cartridge /// Utilises 2102 SRAM over IO /// - public class MapperMAZE : VesCartBase + public sealed partial class MapperMAZE : VesCartBase { public override string BoardType => "MAZE"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperRIDDLE.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperRIDDLE.cs index 6b918c27511..6e840ba7d99 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperRIDDLE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperRIDDLE.cs @@ -3,7 +3,7 @@ /// /// Sean Riddle's modified SCHACH cart mapper (multi-cart) /// - public class MapperRIDDLE : VesCartBase + public sealed partial class MapperRIDDLE : VesCartBase { public override string BoardType => "RIDDLE"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSCHACH.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSCHACH.cs index 49342f4f9ab..48f1ca9e504 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSCHACH.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSCHACH.cs @@ -5,7 +5,7 @@ /// Any size ROM / 2KB RAM mapped at 0x2800 - 0x2FFF /// Info here: http://www.seanriddle.com/chanfmulti.html /// - public class MapperSCHACH : VesCartBase + public sealed partial class MapperSCHACH : VesCartBase { public override string BoardType => "SCHACH"; public override bool HasActivityLED => true; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSTD.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSTD.cs index 80d777a4450..abb1adcdef1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSTD.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/MapperSTD.cs @@ -4,7 +4,7 @@ /// Standard ChannelF Cartridge /// 2KB ROM / NO RAM /// - public class MapperSTD : VesCartBase + public sealed partial class MapperSTD : VesCartBase { public override string BoardType => "STD"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/VesCartBase.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/VesCartBase.cs index 4ccc57f2bfb..b216e6b3730 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/VesCartBase.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/VesCartBase.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF { + [CLSCompliant(false)] public abstract class VesCartBase { public abstract string BoardType { get; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.CpuLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.CpuLink.cs index 7f5916fba58..2cd12153390 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF { public partial class ChannelF { + [CLSCompliant(false)] public readonly struct CpuLink(ChannelF channelF) : IF3850Link { public byte ReadMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.IDebuggable.cs index 29cad4e5d86..f86e15526c8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.IDebuggable.cs @@ -6,12 +6,14 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF { public partial class ChannelF : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Memory.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Memory.cs index 3083e733a23..845a61e13cf 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Memory.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Memory.cs @@ -11,6 +11,7 @@ public partial class ChannelF /// /// Simulates reading a byte of data from the address space /// + [CLSCompliant(false)] public byte ReadBus(ushort addr) { if (addr < 0x400) @@ -30,6 +31,7 @@ public byte ReadBus(ushort addr) } } + [CLSCompliant(false)] public CDLResult ReadCDL(ushort addr) { var result = new CDLResult(); @@ -58,6 +60,7 @@ public CDLResult ReadCDL(ushort addr) /// Simulates writing a byte of data to the address space (in its default configuration, there is no writeable RAM in the /// Channel F addressable through the address space) /// + [CLSCompliant(false)] public void WriteBus(ushort addr, byte value) => _cartridge.WriteBus(addr, value); } diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Audio.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Audio.cs index d3b66b266bc..154a4f7f290 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Audio.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Audio.cs @@ -11,6 +11,7 @@ public class Audio : ISoundProvider private BlipBuffer _blip = new BlipBuffer(15000); + [CLSCompliant(false)] public uint master_audio_clock; private short current_sample, old_sample; @@ -376,4 +377,4 @@ public void DisposeSound() _blip = null; } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/MapperBase.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/MapperBase.cs index 3ed82196834..e499f99c74e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/MapperBase.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/MapperBase.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex { + [CLSCompliant(false)] public class MapperBase { public VectrexHawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_64K.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_64K.cs index 8fd14a5452d..d621cc69348 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_64K.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_64K.cs @@ -2,7 +2,7 @@ { // Default mapper with no bank switching // make sure peekmemory and poke memory don't effect the rest of the system! - public class Mapper_64K : MapperBase + public sealed partial class Mapper_64K : MapperBase { public override void Initialize() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_Default.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_Default.cs index 091d1e7830b..6e8d1d654da 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_Default.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/Mappers/Mapper_Default.cs @@ -2,7 +2,7 @@ { // Default mapper with no bank switching // make sure peekmemory and poke memory don't effect the rest of the system! - public class MapperDefault : MapperBase + public sealed partial class MapperDefault : MapperBase { public override void Initialize() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/MemoryMap.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/MemoryMap.cs index 8b229829b50..a14c3c60843 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/MemoryMap.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/MemoryMap.cs @@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex { public partial class VectrexHawk { + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (MemoryCallbacks.HasReads) @@ -52,6 +53,7 @@ public byte ReadMemory(ushort addr) } } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { if (MemoryCallbacks.HasWrites) @@ -92,6 +94,7 @@ public void WriteMemory(ushort addr, byte value) #pragma warning restore SA1508 } + [CLSCompliant(false)] public byte PeekMemory(ushort addr) { if (addr < 0x8000) diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs index 4fcec0644c3..d8d7087cd73 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs @@ -11,16 +11,23 @@ public class PPU public double x_pos, y_pos; public int skip; + + [CLSCompliant(false)] public uint bright_int_1, bright_int_2, bright_int_3; + [CLSCompliant(false)] public const uint br = 0xFFFFFFFF; // lines to draw in a frame and vairables to go to new line public double[] draw_lines = new double[1024 * 4 * 4]; + + [CLSCompliant(false)] public uint[] line_brights = new uint[1024 * 3 * 4]; public bool[] line_vis = new bool[1024 * 4]; public double[] draw_lines_old_screen = new double[1024 * 4 * 4]; + + [CLSCompliant(false)] public uint[] line_brights_old_screen = new uint[1024 * 3 * 4]; public bool[] line_vis_old_screen = new bool[1024 * 4]; public int line_pointer_old_screen; @@ -28,6 +35,8 @@ public class PPU public int line_pointer; public bool blank_old, zero_old; public byte x_vel_old, y_vel_old; + + [CLSCompliant(false)] public uint bright_int_1_old; public void tick() diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/SerialPort.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/SerialPort.cs index 81c7ae5f322..d13b75078c9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/SerialPort.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/SerialPort.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex { public class SerialPort { + [CLSCompliant(false)] public VectrexHawk Core { get; set; } public byte ReadReg(int addr) diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IDebuggable.cs index 28d8fcb055d..047ae999277 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex { public partial class VectrexHawk : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs index 4852cc5c5df..67a3d20a462 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs @@ -113,10 +113,11 @@ public void Dispose() audio.DisposeSound(); } - public int _frameHz = 50; + private int _frameHz = 50; - public int[] _vidbuffer; - public int[] _framebuffer; + internal int[] _vidbuffer; + + internal int[] _framebuffer; public int[] GetVideoBuffer() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IInputPollable.cs index 3104917961f..4190d172e6e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IInputPollable.cs @@ -18,7 +18,8 @@ public bool IsLagFrame public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); - public bool _islag = true; + private bool _islag = true; + private int _lagcount; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs index 8c41a7c0712..3b77facf4db 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs @@ -30,7 +30,8 @@ public PutSettingsDirtyBits PutSyncSettings(VectrexSyncSettings o) } private object _settings = new object(); - public VectrexSyncSettings _syncSettings = new VectrexSyncSettings(); + + private VectrexSyncSettings _syncSettings = new VectrexSyncSettings(); [CoreSettings] public class VectrexSyncSettings diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.cs index 262265e0e6b..817a4c844db 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.cs @@ -17,15 +17,19 @@ internal static class RomChecksums public byte[] RAM = new byte[0x400]; - public byte[] _bios, minestorm; - public readonly byte[] _rom; + private byte[] _bios; + + private byte[] minestorm; + + internal readonly byte[] _rom; private int _frame = 0; - public MapperBase mapper; + private MapperBase mapper; private readonly ITraceable _tracer; + [CLSCompliant(false)] public MC6809 cpu; public PPU ppu; public Audio audio; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs index 3705a674a7f..627b90b0cc8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs @@ -47,6 +47,7 @@ public int Parse(byte[] rom) return rom.Length; } + [CLSCompliant(false)] public ushort? ReadCart(ushort addr, bool peek) { switch (_mapper) @@ -227,6 +228,7 @@ public int Parse(byte[] rom) return null; } + [CLSCompliant(false)] public bool WriteCart(ushort addr, ushort value, bool poke) { switch (_mapper) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/ICart.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/ICart.cs index a2577fe6cd9..52a93764956 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/ICart.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/ICart.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Intellivision { + [CLSCompliant(false)] public interface ICart { int Parse(byte[] rom); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellicart.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellicart.cs index 293d989874a..be643cbe582 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellicart.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellicart.cs @@ -165,6 +165,7 @@ public int Parse(byte[] Rom) return offset; } + [CLSCompliant(false)] public ushort? ReadCart(ushort addr, bool peek) { int range = addr / 2048; @@ -177,6 +178,7 @@ public int Parse(byte[] Rom) return null; } + [CLSCompliant(false)] public bool WriteCart(ushort addr, ushort value, bool poke) { int range = addr / 2048; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDebuggable.cs index 1f0de6044a6..3c1827dd1f8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDebuggable.cs @@ -6,12 +6,14 @@ namespace BizHawk.Emulation.Cores.Intellivision { public partial class Intellivision : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => _cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => _cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDisassemblable.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDisassemblable.cs index 412aa7e8637..85b48d279db 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IDisassemblable.cs @@ -15,6 +15,7 @@ public string Cpu public IEnumerable AvailableCpus { get; } = [ "CP1610" ]; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { // Note: currently this core can only disassemble the SystemBus diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.MemoryMap.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.MemoryMap.cs index 5992f2eb02e..32d61839d4a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.MemoryMap.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.MemoryMap.cs @@ -10,6 +10,7 @@ public sealed partial class Intellivision public byte[] GraphicsRom = new byte[2048]; public byte[] GraphicsRam = new byte[512]; + [CLSCompliant(false)] public ushort ReadMemory(ushort addr, bool peek) { ushort? cart = _cart.ReadCart(addr, peek); @@ -209,6 +210,7 @@ public ushort ReadMemory(ushort addr, bool peek) return UNMAPPED; } + [CLSCompliant(false)] public bool WriteMemory(ushort addr, ushort value, bool poke) { bool cart = _cart.WriteCart(addr, value, poke); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs index 48ad408471a..82e47a8e958 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs @@ -4,7 +4,8 @@ namespace BizHawk.Emulation.Cores.Intellivision { [Core(CoreNames.IntelliHawk, "BrandonE, Alyosha")] - [ServiceNotApplicable(typeof(IRegionable), typeof(ISaveRam))] + [ServiceNotApplicable(typeof(IRegionable))] + [ServiceNotApplicable(typeof(ISaveRam))] public sealed partial class Intellivision : IEmulator, IInputPollable, IDisassemblable, IBoardInfo, IDebuggable, ISettable { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs index 2e21406fca7..2155dba4885 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs @@ -15,6 +15,7 @@ public PSG() _blip.SetRates(894866 / 4.0, 44100); } + [CLSCompliant(false)] public ushort[] Register = new ushort[16]; public int total_clock; // TODO: what is this used for? @@ -111,7 +112,10 @@ public void GetSamples(short[] samples) private int noise_per; private int noise = 0x1; + [CLSCompliant(false)] public Func ReadMemory; + + [CLSCompliant(false)] public Func WriteMemory; public void SyncState(Serializer ser) @@ -140,6 +144,7 @@ public void SyncState(Serializer ser) ser.EndSection(); } + [CLSCompliant(false)] public ushort? ReadPSG(ushort addr, bool peek) { if (addr >= 0x01F0 && addr <= 0x01FF) @@ -210,6 +215,7 @@ private void sync_psg_state() env_vol_C = (Register[13] >> 4) & 0x3; } + [CLSCompliant(false)] public bool WritePSG(ushort addr, ushort value, bool poke) { if (addr >= 0x01F0 && addr <= 0x01FF) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs index b6ccffdf574..438fbe11559 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/STIC.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Intellivision { + [CLSCompliant(false)] public sealed class STIC : IVideoProvider { public bool Sr1, Sr2, Sst, Fgbg = false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/MapperBase.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/MapperBase.cs index e9b7c5594f7..28d291ee110 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/MapperBase.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/MapperBase.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { + [CLSCompliant(false)] public class MapperBase { public O2Hawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_Default.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_Default.cs index 3e3682805e3..7619f8629c3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_Default.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_Default.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { // Default mapper with no bank switching - public class MapperDefault : MapperBase + public sealed partial class MapperDefault : MapperBase { public int ROM_mask; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_XROM.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_XROM.cs index 374d735894c..6a3e00a943c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_XROM.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/Mappers/Mapper_XROM.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { // XROM mapper, 3KB ROM and 1KB data accessible through port 0 - public class MapperXROM : MapperBase + public sealed partial class MapperXROM : MapperBase { public int ROM_mask; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/MemoryMap.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/MemoryMap.cs index 0d9e80d0507..09117e3cd54 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/MemoryMap.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/MemoryMap.cs @@ -10,6 +10,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { public partial class O2Hawk { + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (MemoryCallbacks.HasReads) @@ -26,6 +27,7 @@ public byte ReadMemory(ushort addr) return mapper.ReadMemory((ushort)((addr - 0x400) + bank_size * rom_bank)); } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { if (MemoryCallbacks.HasWrites) @@ -44,6 +46,7 @@ public void WriteMemory(ushort addr, byte value) } } + [CLSCompliant(false)] public byte PeekMemory(ushort addr) { if (addr < 0x400) @@ -54,6 +57,7 @@ public byte PeekMemory(ushort addr) return mapper.PeekMemory((ushort)((addr - 0x400) + bank_size * rom_bank)); } + [CLSCompliant(false)] public byte ReadPort(ushort port) { if (port == 0) @@ -128,6 +132,7 @@ public byte ReadPort(ushort port) return kb_byte; } + [CLSCompliant(false)] public void WritePort(ushort port, byte value) { if (port == 0) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ICodeDataLog.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ICodeDataLog.cs index c9225c70742..42e4c8d0df8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ICodeDataLog.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ICodeDataLog.cs @@ -34,6 +34,7 @@ public void NewCDL(ICodeDataLog cdl) public void DisassembleCDL(Stream s, ICodeDataLog cdl) => throw new NotImplementedException(); + [CLSCompliant(false)] public void SetCDL(I8048.eCDLogMemFlags flags, string type, int cdladdr) { if (type == null) return; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs index 381054509c3..a1b8fdbaec1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { public partial class O2Hawk : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs index 9c24f98d831..b43b5c989d8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs @@ -12,7 +12,8 @@ public partial class O2Hawk : IEmulator, IVideoProvider public bool in_vblank_old; public bool in_vblank; public bool vblank_rise; - public uint ticker; + + private uint ticker; public bool FrameAdvance(IController controller, bool render, bool rendersound) { @@ -206,9 +207,9 @@ public void Dispose() ppu.DisposeSound(); } - public int _frameHz = 60; + private int _frameHz = 60; - public int[] _vidbuffer; + internal int[] _vidbuffer; public int[] frame_buffer; @@ -244,9 +245,10 @@ public void SendVideoBuffer() public int VsyncNumerator => _frameHz; public int VsyncDenominator => 1; - public static readonly uint[] color_palette_BW = { 0xFFFFFFFF , 0xFFAAAAAA, 0xFF555555, 0xFF000000 }; - public static readonly uint[] color_palette_Gr = { 0xFFA4C505, 0xFF88A905, 0xFF1D551D, 0xFF052505 }; + private static readonly uint[] color_palette_BW = { 0xFFFFFFFF , 0xFFAAAAAA, 0xFF555555, 0xFF000000 }; + + private static readonly uint[] color_palette_Gr = { 0xFFA4C505, 0xFF88A905, 0xFF1D551D, 0xFF052505 }; - public uint[] color_palette = new uint[4]; + private uint[] color_palette = new uint[4]; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IInputPollable.cs index a119e178617..b5decb50d6f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IInputPollable.cs @@ -18,7 +18,8 @@ public bool IsLagFrame public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); - public bool _islag = true; + private bool _islag = true; + private int _lagcount; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs index 93bd7120cb1..d7cda1db4b2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs @@ -29,8 +29,9 @@ public PutSettingsDirtyBits PutSyncSettings(O2SyncSettings o) return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None; } - public O2Settings _settings = new O2Settings(); - public O2SyncSettings _syncSettings = new O2SyncSettings(); + internal O2Settings _settings = new(); + + private O2SyncSettings _syncSettings = new(); [CoreSettings] public class O2Settings diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs index fa0d8850d6e..dd6b2957c0c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs @@ -15,23 +15,28 @@ public partial class O2Hawk : IEmulator, ISaveRam, IDebuggable, IInputPollable, public byte addr_latch; public byte kb_byte; public bool ppu_en, vpp_en, RAM_en, kybrd_en, copy_en, cart_b0, cart_b1; - public ushort rom_bank; - public ushort bank_size; - public byte[] _bios; - public readonly byte[] _rom; + private ushort rom_bank; + + private ushort bank_size; + + private byte[] _bios; + + internal readonly byte[] _rom; + public readonly byte[] header = new byte[0x50]; public byte[] cart_RAM; public bool has_bat; - public int _frame = 0; + private int _frame = 0; - public MapperBase mapper; + private MapperBase mapper; private readonly ITraceable _tracer; - public I8048 cpu; + internal I8048 cpu; + public PPU ppu; public bool is_pal; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/PPU.cs index 9147b4b3dc7..2ff1c71b3c1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/PPU.cs @@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { public class PPU : ISoundProvider { + [CLSCompliant(false)] public O2Hawk Core { get; set; } // not stated, set on game load @@ -985,6 +986,7 @@ public virtual void process_pixel() 0x00, 0x00, 0x00, 0x06, 0x6E, 0xFF, 0x7E, 00 // (boat 3) 0x3F }; + [CLSCompliant(false)] public static readonly uint[] Color_Palette_SPR = { 0xFF676767, // grey @@ -997,6 +999,7 @@ public virtual void process_pixel() 0xFFFFFFFF, // white }; + [CLSCompliant(false)] public static readonly uint[] Color_Palette_BG = { 0xFF000000, // black @@ -1335,6 +1338,7 @@ public void SyncState(Serializer ser) public byte shift_0, shift_1, shift_2, aud_ctrl; public byte shift_reg_0, shift_reg_1, shift_reg_2; + [CLSCompliant(false)] public uint master_audio_clock; public int tick_cnt, output_bit, shift_cnt; diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs index 7168adfd9c5..b53f141afec 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs @@ -74,6 +74,7 @@ public HyperNyma(CoreLoadParameters lp) // pce always has two layers, sgx always has 4, and mednafen knows this public bool IsSgx => SettingsInfo.LayerNames.Count == 4; + [CLSCompliant(false)] public unsafe void GetGpuData(int vdc, Action callback) { using(_exe.EnterExit()) @@ -92,7 +93,7 @@ public unsafe void GetGpuData(int vdc, Action callback) } } - public abstract class LibHyperNyma : LibNymaCore + public abstract partial class LibHyperNyma : LibNymaCore { [BizImport(CallingConvention.Cdecl, Compatibility = true)] public abstract void GetVramInfo([Out]PceGpuData v, int vdcIndex); diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs index 68b00bad65e..7e250cb307c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE { + [CLSCompliant(false)] [PortedCore(CoreNames.TurboNyma, "Mednafen Team", "1.32.1", "https://mednafen.github.io/releases/")] public class TurboNyma : NymaCore, IRegionable, IPceGpuView { @@ -120,7 +121,7 @@ public unsafe void GetGpuData(int vdc, Action callback) } } - public abstract class LibTurboNyma : LibNymaCore + public abstract partial class LibTurboNyma : LibNymaCore { [BizImport(CallingConvention.Cdecl, Compatibility = true)] public abstract void GetVramInfo([Out]PceGpuData v, int vdcIndex); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/3DSMotionEmu.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/3DSMotionEmu.cs index 3dd4661aee9..5f5427546d6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/3DSMotionEmu.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/3DSMotionEmu.cs @@ -2,6 +2,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.N3DS { + [CLSCompliant(false)] public class _3DSMotionEmu { // update per frame diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.IVideoProvider.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.IVideoProvider.cs index 85aa5e92c74..4ddcc664d93 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.IVideoProvider.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.IVideoProvider.cs @@ -8,9 +8,13 @@ public class EncoreVideoProvider : IVideoProvider internal int BH = 480; internal bool VideoDirty; + [CLSCompliant(false)] protected readonly LibEncore _core; + + [CLSCompliant(false)] protected readonly IntPtr _context; + [CLSCompliant(false)] public EncoreVideoProvider(LibEncore core, IntPtr context) { _core = core; @@ -47,6 +51,7 @@ public int[] GetVideoBuffer() public class EncoreGLTextureProvider : EncoreVideoProvider, IGLTextureProvider { + [CLSCompliant(false)] public EncoreGLTextureProvider(LibEncore core, IntPtr context) : base(core, context) { @@ -55,4 +60,4 @@ public EncoreGLTextureProvider(LibEncore core, IntPtr context) public int GetGLTexture() => _core.Encore_GetGLTexture(_context); } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.cs index 4ed0e522432..88bfcd2ce13 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/Encore.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.N3DS { + [CLSCompliant(false)] [PortedCore( name: CoreNames.Encore, author: "Tropic Haze and Citra contributors; port by CasualPokePlayer", diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/LibEncore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/LibEncore.cs index efff0f408a4..d86de99cc80 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/LibEncore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/3DS/LibEncore.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.N3DS { + [CLSCompliant(false)] public abstract class LibEncore { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.IDisassemblable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.IDisassemblable.cs index d4410da7778..4d9d385e084 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.IDisassemblable.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Ares64 { - public class Ares64Disassembler : VerifiedDisassembler + public sealed partial class Ares64Disassembler : VerifiedDisassembler { private readonly LibAres64 _core; private readonly byte[] _disasmbuf = new byte[100]; // todo: is this big enough? diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.cs index 7ab15239592..a9534e8f97c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/Ares64.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Ares64 { + [CLSCompliant(false)] [PortedCore(CoreNames.Ares64, "ares team, Near", "v138", "https://ares-emu.net/")] public partial class Ares64 : WaterboxCore, IRegionable { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/LibAres64.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/LibAres64.cs index 3de167b1656..281601c01a1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/LibAres64.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Ares64/LibAres64.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Ares64 { + [CLSCompliant(false)] public abstract class LibAres64 : LibWaterboxCore { [Flags] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesApi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesApi.cs index 0c569f990fc..bff2e4fd421 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesApi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesApi.cs @@ -12,6 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES { + [CLSCompliant(false)] public abstract class BsnesCoreImpl { [BizImport(CallingConvention.Cdecl)] @@ -104,6 +105,7 @@ public abstract class BsnesCoreImpl public abstract bool snes_msu_sync(); } + [CLSCompliant(false)] public partial class BsnesApi : IDisposable, IMonitor, IStatable { internal WaterboxHost exe; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesControllers.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesControllers.cs index 6c6712ee778..9647bde9da3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesControllers.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesControllers.cs @@ -32,6 +32,7 @@ private static IBsnesController GetController(BSNES_INPUT_DEVICE t, BsnesCore.Sn public ControllerDefinition Definition { get; } + [CLSCompliant(false)] public BsnesControllers(BsnesCore.SnesSyncSettings ss, bool subframe = false) { _ports = new[] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs index 7f9e925656d..66c15adbdac 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs @@ -13,6 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES { + [CLSCompliant(false)] [PortedCore(CoreNames.Bsnes115, "bsnes team", "v115+", "https://github.com/bsnes-emu/bsnes")] public partial class BsnesCore : IEmulator, IDebuggable, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ISettable, IBSNESForGfxDebugger, IBoardInfo { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs index 2d592059689..7c67caaa21d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SNESGraphicsDecoder.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES { + [CLSCompliant(false)] public sealed unsafe class SNESGraphicsDecoder : ISNESGraphicsDecoder { private readonly BsnesApi _api; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs index 20f8bb4dc8b..0b7cfdf54cd 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES portedUrl: "https://github.com/bsnes-emu/bsnes")] public class SubBsnesCore : IEmulator, ICycleTiming { + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.Satellaview)] [CoreConstructor(VSystemID.Raw.SGB)] [CoreConstructor(VSystemID.Raw.SNES)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/ArmV4Disassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/ArmV4Disassembler.cs index 743e22e05e7..7784f36b259 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/ArmV4Disassembler.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/ArmV4Disassembler.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { - public class ArmV4Disassembler : VerifiedDisassembler + public sealed partial class ArmV4Disassembler : VerifiedDisassembler { private readonly Darm _libdarm = BizInvoker.GetInvoker( new DynamicLibraryImportResolver(OSTailoredCode.IsUnixHost ? "libdarm.so" : "libdarm.dll", hasLimitedLifetime: false), diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs index 8289cf11e50..e2a359c2f9c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { + [CLSCompliant(false)] public abstract class LibmGBA { [Flags] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index 8c4716283a1..bcc1c42cc9b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { + [CLSCompliant(false)] [PortedCore(CoreNames.Mgba, "endrift", "0.11", "https://mgba.io/")] [ServiceNotApplicable(typeof(IRegionable))] public partial class MGBAHawk diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs index 4ade2ebf988..d86d13e7d56 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { + [CLSCompliant(false)] public class MGBAMemoryCallbackSystem : IMemoryCallbackSystem, IDisposable { private LibmGBA _mgba; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs index bcbded178da..d756ff51bb9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Audio Emulation + [CLSCompliant(false)] public class Audio : ISoundProvider { public GBHawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_GB_PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_GB_PPU.cs index f960c46838e..e418e33fa27 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_GB_PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_GB_PPU.cs @@ -47,8 +47,11 @@ public class GBC_GB_PPU : PPU public bool BG_V_flip; public bool HDMA_mode; public bool HDMA_run_once; - public ushort cur_DMA_src; - public ushort cur_DMA_dest; + + private ushort cur_DMA_src; + + private ushort cur_DMA_dest; + public int HDMA_length; public int HDMA_countdown; public int HBL_HDMA_count; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs index 69876fd8f5d..83374272f8d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs @@ -46,8 +46,11 @@ public class GBC_PPU : PPU public bool BG_V_flip; public bool HDMA_mode; public bool HDMA_run_once; - public ushort cur_DMA_src; - public ushort cur_DMA_dest; + + private ushort cur_DMA_src; + + private ushort cur_DMA_dest; + public int HDMA_length; public int HDMA_countdown; public int HBL_HDMA_count; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ICodeDataLog.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ICodeDataLog.cs index 2ba891e4fb6..837ee9819d9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ICodeDataLog.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ICodeDataLog.cs @@ -34,6 +34,7 @@ public void NewCDL(ICodeDataLog cdl) public void DisassembleCDL(Stream s, ICodeDataLog cdl) => throw new NotImplementedException(); + [CLSCompliant(false)] public void SetCDL(LR35902.eCDLogMemFlags flags, string type, int cdladdr) { if (type == null) return; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IDebuggable.cs index d48ac942d72..22b3c422f13 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { public partial class GBHawk : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs index 383afc7d0c9..39f9ea1fe0b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs @@ -10,7 +10,11 @@ public partial class GBHawk : IEmulator, IVideoProvider public ControllerDefinition ControllerDefinition => _controllerDeck.Definition; public byte controller_state; + + [CLSCompliant(false)] public ushort Acc_X_state; + + [CLSCompliant(false)] public ushort Acc_Y_state; public bool in_vblank_old; public bool in_vblank; @@ -359,11 +363,13 @@ public void GetControllerState(IController controller) (Acc_X_state, Acc_Y_state) = _controllerDeck.ReadAcc1(controller); } + [CLSCompliant(false)] public byte GetButtons(ushort r) { return input_register; } + [CLSCompliant(false)] public byte GetIntRegs(ushort r) { if (r==0) @@ -425,7 +431,7 @@ public void Dispose() public int[] frame_buffer; - + [CLSCompliant(false)] public uint[] vid_buffer; @@ -469,7 +475,10 @@ public void SendVideoBuffer() public int VsyncNumerator => 262144; public int VsyncDenominator => 4389; + [CLSCompliant(false)] public static readonly uint[] color_palette_BW = { 0xFFFFFFFF, 0xFFAAAAAA, 0xFF555555, 0xFF000000 }; + + [CLSCompliant(false)] public static readonly uint[] color_palette_Gr = { 0xFFA4C505, 0xFF88A905, 0xFF1D551D, 0xFF052505 }; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs index da9375d6f66..b3e40ad7dc8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs @@ -33,7 +33,10 @@ public PutSettingsDirtyBits PutSyncSettings(GBSyncSettings o) return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None; } + [CLSCompliant(false)] //TODO just needs renaming public GBSettings _settings = new GBSettings(); + + [CLSCompliant(false)] //TODO just needs renaming public GBSyncSettings _syncSettings = new GBSyncSettings(); [CoreSettings] @@ -129,6 +132,8 @@ public int RTCOffset private int _RTCInitialTime; [JsonIgnore] private int _RTCOffset; + + [CLSCompliant(false)] [JsonIgnore] public ushort _DivInitialTime = 8; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs index 51ca93e79d8..c355c847ca7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.cs @@ -92,15 +92,19 @@ internal static class RomChecksums public bool speed_switch; public bool HDMA_transfer; // stalls CPU when in progress public byte bus_value; // we need the last value on the bus for proper emulation of blocked SRAM - public ulong bus_access_time; // also need to keep track of the time of the access since it doesn't last very long + + internal ulong bus_access_time; // also need to keep track of the time of the access since it doesn't last very long + public byte IR_reg, IR_mask, IR_signal, IR_receive, IR_self; public int IR_write; // several undocumented GBC Registers public byte undoc_6C, undoc_72, undoc_73, undoc_74, undoc_75, undoc_76, undoc_77; - public byte[] _bios; - public readonly byte[] _rom; + private byte[] _bios; + + internal readonly byte[] _rom; + public readonly byte[] header = new byte[0x50]; public byte[] cart_RAM; @@ -110,18 +114,23 @@ internal static class RomChecksums private int _frame = 0; public bool Use_MT; - public ushort addr_access; - public MapperBase mapper; + internal ushort addr_access; + + internal MapperBase mapper; private readonly GBHawkDisassembler _disassembler = new(); private readonly ITraceable _tracer; - public LR35902 cpu; + internal LR35902 cpu; + public PPU ppu; - public readonly GBTimer timer; - public Audio audio; + + internal readonly GBTimer timer; + + internal Audio audio; + public SerialPort serialport; private static readonly byte[] GBA_override = { 0xFF, 0x00, 0xCD, 0x03, 0x35, 0xAA, 0x31, 0x90, 0x94, 0x00, 0x00, 0x00, 0x00 }; @@ -318,8 +327,9 @@ public void Dispose() } } - public ScanlineCallback _scanlineCallback; - public int _scanlineCallbackLine = 0; + internal ScanlineCallback _scanlineCallback; + + internal int _scanlineCallbackLine = 0; public void SetScanlineCallback(ScanlineCallback callback, int line) { @@ -728,6 +738,7 @@ public string Setup_Mapper(string romHashMD5, string romHashSHA1) return mppr; } + [CLSCompliant(false)] public class GBHawkDisassembler : VerifiedDisassembler { public bool UseRGBDSSyntax; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs index 0d16ba318d5..c02bdff1208 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllerDeck.cs @@ -36,6 +36,7 @@ public byte ReadPort1(IController c) return Port1.Read(c); } + [CLSCompliant(false)] public (ushort X, ushort Y) ReadAcc1(IController c) => Port1.ReadAcc(c); @@ -52,6 +53,7 @@ public void SyncState(Serializer ser) private static IReadOnlyDictionary> _controllerCtors; + [CLSCompliant(false)] public static IReadOnlyDictionary> ControllerCtors => _controllerCtors ??= new Dictionary> { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs index 38351be2d8c..b018b408a99 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawkControllers.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk /// /// Represents a GB add on /// + [CLSCompliant(false)] public interface IPort { byte Read(IController c); @@ -22,6 +23,7 @@ public interface IPort int PortNum { get; } } + [CLSCompliant(false)] [DisplayName("Gameboy Controller")] public class StandardControls : IPort { @@ -94,6 +96,7 @@ public void SyncState(Serializer ser) } } + [CLSCompliant(false)] [DisplayName("Gameboy Controller + Tilt")] public class StandardTilt : IPort { @@ -193,4 +196,4 @@ public void SyncState(Serializer ser) ser.Sync(nameof(phi_prev), ref phi_prev); } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/MapperBase.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/MapperBase.cs index 12da082b14a..1401985d16a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/MapperBase.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/MapperBase.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { + [CLSCompliant(false)] public class MapperBase { public GBHawk Core { get; set; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Camera.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Camera.cs index ef49ffb4d25..73a4932630c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Camera.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Camera.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Gameboy Camera Mapper (no camera support yet) // 128 kb of RAM - public class MapperCamera : MapperBase + public sealed partial class MapperCamera : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs index 8f6560219bd..acad95afa86 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_Default.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Default mapper with no bank switching - public class MapperDefault : MapperBase + public sealed partial class MapperDefault : MapperBase { public override void Reset() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs index febbccf996e..db7a737ccef 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC1.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // hudson mapper used in ex Daikaijuu monogatari - public class MapperHuC1 : MapperBase + public sealed partial class MapperHuC1 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs index 2a9516dc873..09361f3212b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_HuC3.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Hudson HuC3 used with Robopon and others - public class MapperHuC3 : MapperBase + public sealed partial class MapperHuC3 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs index 72eeba65d72..90cb66ae80b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // MBC1 with bank switching and RAM - public class MapperMBC1 : MapperBase + public sealed partial class MapperMBC1 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs index 053683e6f1c..89d6a35793b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC1_Multi.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // MBC1 with bank switching and RAM - public class MapperMBC1Multi : MapperBase + public sealed partial class MapperMBC1Multi : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs index 2708b580499..08a61fcd6d3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC2.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // MBC2 with bank switching and RAM - public class MapperMBC2 : MapperBase + public sealed partial class MapperMBC2 : MapperBase { public int ROM_bank; public int RAM_bank; @@ -115,4 +115,4 @@ public override void SyncState(Serializer ser) ser.Sync(nameof(RAM_enable), ref RAM_enable); } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs index 04684cf3fc1..8e34390c541 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC3.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // MBC3 mapper with Real Time Clock - public class MapperMBC3 : MapperBase + public sealed partial class MapperMBC3 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs index 2035659eedc..7c68aed4261 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC5.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // MBC5, common mapper for GBC games - public class MapperMBC5 : MapperBase + public sealed partial class MapperMBC5 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs index 3611dd14138..8b61f014020 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC6.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Default mapper with no bank switching - public class MapperMBC6 : MapperBase + public sealed partial class MapperMBC6 : MapperBase { public override void Reset() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs index b10ed9ff747..48da23d71b0 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Mapper with built in EEPROM, also used with Kirby's tilt 'n tumble // The EEPROM contains 256 bytes of read/write memory - public class MapperMBC7 : MapperBase + public sealed partial class MapperMBC7 : MapperBase { public int ROM_bank; public bool RAM_enable_1, RAM_enable_2; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs index d8047525605..cb9cfa0a99f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MMM01.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Default mapper with no bank switching - public class MapperMMM01 : MapperBase + public sealed partial class MapperMMM01 : MapperBase { public override void Reset() { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs index 781f33f6bf3..166d06da5ef 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_RockMan8.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // RockMan 8, just some simple bankswitching - public class MapperRM8 : MapperBase + public sealed partial class MapperRM8 : MapperBase { public int ROM_bank; public int ROM_mask; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_TAMA5.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_TAMA5.cs index 5dcc8bb65ce..a14f59a0edf 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_TAMA5.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_TAMA5.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Tama 5 mapper used in tamagatchi 3 - public class MapperTAMA5 : MapperBase + public sealed partial class MapperTAMA5 : MapperBase { public int ROM_bank; public int RAM_bank; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs index 59a9c669cfd..adf602bf7c6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_WisdomTree.cs @@ -4,7 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { // Wisdom tree mapper (32K bank switching) - public class MapperWT : MapperBase + public sealed partial class MapperWT : MapperBase { public int ROM_bank; public int ROM_mask; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/MemoryMap.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/MemoryMap.cs index fd313aae9b1..13ea562892f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/MemoryMap.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/MemoryMap.cs @@ -26,6 +26,7 @@ public partial class GBHawk //public byte[] RAM_read = new byte[0x8000]; //public byte[] ZP_RAM_read = new byte[0x80]; + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (MemoryCallbacks.HasReads) @@ -258,6 +259,7 @@ public byte ReadMemory(ushort addr) return Read_Registers(addr); } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { if (MemoryCallbacks.HasWrites) @@ -421,6 +423,7 @@ public void WriteMemory(ushort addr, byte value) } } + [CLSCompliant(false)] public byte PeekMemory(ushort addr) { if (ppu.DMA_bus_control) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs index 5cca587a4c8..0cb5c41ba39 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs @@ -4,9 +4,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { public abstract class PPU { + [CLSCompliant(false)] public GBHawk Core { get; set; } + [CLSCompliant(false)] public uint[] BG_palette = new uint[32]; + + [CLSCompliant(false)] public uint[] OBJ_palette = new uint[32]; public bool HDMA_active; @@ -125,6 +129,8 @@ public abstract class PPU // variables not in state public int total_counter; + + [CLSCompliant(false)] public uint[] color_palette = new uint[4]; public abstract byte ReadReg(int addr); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs index af228b31424..9c46f85349d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/SerialPort.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { public class SerialPort { + [CLSCompliant(false)] public GBHawk Core { get; set; } public byte serial_control; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs index 33dcd8fd891..5ef0a0bd14e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Timer.cs @@ -17,6 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk // there is a coincident timer increment, there will be an additional increment along with this write. // not sure it effects all models or of exact details, see test tac_set_timer_disabled.gbc + [CLSCompliant(false)] public sealed class GBTimer { public GBHawk Core { get; set; } @@ -239,4 +240,4 @@ public void SyncState(Serializer ser) ser.Sync(nameof(next_free_cycle), ref next_free_cycle); } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs index fd77e0ba821..190c7c4b86a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink { + [CLSCompliant(false)] [Core( name: CoreNames.GBHawkLink, author: "alyosha and BizHawk contributors")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.cs index 6d5ddbff7dd..0be2ddebdf6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x { + [CLSCompliant(false)] [Core( name: CoreNames.GBHawkLink3x, author: "alyosha and BizHawk contributors")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.cs index 5df68b05217..d1782af8dd4 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x { + [CLSCompliant(false)] [Core( name: CoreNames.GBHawkLink4x, author: "alyosha and BizHawk contributors")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs index c5e801d3769..bd52f6abfef 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy { - public class GBDisassembler : VerifiedDisassembler + public sealed partial class GBDisassembler : VerifiedDisassembler { public bool UseRGBDSSyntax; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs index 7fe65ca55f3..7f20726655d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs @@ -133,6 +133,7 @@ public enum ConsoleModeType [DefaultValue(0)] public int RTCDivisorOffset { get; set; } + [CLSCompliant(false)] [DisplayName("Initial Time")] [Description("Initial time of emulation in seconds.")] [DefaultValue(typeof(ulong), "0")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index 170202ad6a2..439fe38348a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -12,6 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// a gameboy/gameboy color emulator wrapped around native C++ libgambatte /// + [CLSCompliant(false)] [PortedCore(CoreNames.Gambatte, "sinamas/PSR org", "r830", "https://github.com/pokemon-speedrunning/gambatte-core")] public partial class Gameboy : IInputPollable, IRomInfo, IGameboyCommon, ICycleTiming, ILinkable { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index 64abe61822b..bac63919e01 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy { + [CLSCompliant(false)] [PortedCore(CoreNames.GambatteLink, "sinamas/natt")] public partial class GambatteLink : ILinkable, ILinkedGameBoyCommon, IRomInfo { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambattePrinter.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambattePrinter.cs index 52650c81063..d29d9efb715 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambattePrinter.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambattePrinter.cs @@ -57,6 +57,7 @@ private enum CommandID : byte private byte compression_run_length; private bool compression_run_is_compressed; + [CLSCompliant(false)] public GambattePrinter(Gameboy gb, PrinterCallback callback) { this.gb = gb; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs index a696c9f8f28..90f7fa952c3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// static bindings into libgambatte.dll /// + [CLSCompliant(false)] public static class LibGambatte { /// opaque state pointer diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs index 04f6e672fca..7b11c418381 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDebuggable.cs @@ -8,6 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 { public partial class N64 : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { // note: the approach this code takes is somewhat bug-prone @@ -72,6 +73,7 @@ public void SetCpuRegister(string register, int value) throw new NotImplementedException(); } + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memoryCallbacks; private readonly MemoryCallbackSystem _memoryCallbacks = new MemoryCallbackSystem(new[] { "System Bus" }); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDisassemblable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDisassemblable.cs index 232cde0f5ba..9447dcd5aa2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDisassemblable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.IDisassemblable.cs @@ -17,6 +17,7 @@ public string Cpu public string PCRegisterName => "PC"; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { length = 4; // TODO: is this right? diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs index f37a9283c6d..10b0de04b1b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi { + [CLSCompliant(false)] public class mupen64plusApi : IDisposable { // Only left in because api needs to know the number of frames passed diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs index 5029111d57a..b67c55f778d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS { + [CLSCompliant(false)] public abstract class LibMelonDS : LibWaterboxCore { [Flags] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.IDebuggable.cs index a2fea9f44c3..5f36259b432 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.IDebuggable.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS { public partial class NDS : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { var regs = new uint[2 * 16]; @@ -49,6 +50,7 @@ public void SetCpuRegister(string register, int value) public long TotalExecutedCycles => CycleCount + _core.GetCallbackCycleOffset(_console); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs index d56e3451252..5059b51f6fb 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.ISettable.cs @@ -129,6 +129,7 @@ public enum AudioInterpolationType : int [DefaultValue(true)] public bool TraceArm9Arm { get; set; } + [CLSCompliant(false)] public LibMelonDS.TraceMask GetTraceMask() { var ret = LibMelonDS.TraceMask.NONE; @@ -437,6 +438,7 @@ public string FirmwareMessage set => _firmwaremessage = value.Substring(0, Math.Min(26, value.Length)); } + [CLSCompliant(false)] public unsafe void GetFirmwareSettings(out LibMelonDS.FirmwareSettings fwSettings) { fwSettings.OverrideSettings = FirmwareOverride; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSDisassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSDisassembler.cs index 56c3bc3a20f..a407f91143a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSDisassembler.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSDisassembler.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS { - public class NDSDisassembler : VerifiedDisassembler + public sealed partial class NDSDisassembler : VerifiedDisassembler { private readonly LibMelonDS _core; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs index 76870f19f48..d370fc622e6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs @@ -682,7 +682,11 @@ public DMCUnit(APU apu, bool pal) // this timer never stops, ever, so it is convenient to use for even/odd timing used elsewhere public int timer; public int user_address; - public uint user_length, sample_length; + + internal uint user_length; + + internal uint sample_length; + public int sample_address, sample_buffer; public bool sample_buffer_filled; @@ -1468,7 +1472,7 @@ public void ExternalQueue(int value) } } - public uint sampleclock = 0; + internal uint sampleclock = 0; private int oldmix = 0; private int cart_sound = 0; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSInspector.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSInspector.cs index e1e91cd7b9a..4cf7118d99b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSInspector.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDSInspector.cs @@ -149,6 +149,8 @@ public enum FileKindE : byte public byte Number; public byte ID; public string Name; + + [CLSCompliant(false)] public ushort Address; public FileKindE FileKind; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs index 182908a8abc..f4b990422f2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs @@ -28,6 +28,7 @@ internal static class RomChecksums } //hardware/state + [CLSCompliant(false)] public MOS6502X cpu; public PPU ppu; public APU apu; @@ -39,7 +40,7 @@ internal static class RomChecksums private EDetectionOrigin origin = EDetectionOrigin.None; private int sprdma_countdown; - public bool _irq_apu; //various irq signals that get merged to the cpu irq pin + internal bool _irq_apu; //various irq signals that get merged to the cpu irq pin /// /// Clock speed of the main cpu in hz. Used to time audio synthesis, which runs off the cpu clock. @@ -52,7 +53,8 @@ internal static class RomChecksums //variable set when VS system games are running internal bool _isVS = false; //some VS games have a ppu that switches 2000 and 2001, so keep trcak of that - public byte _isVS2c05 = 0; + internal byte _isVS2c05 = 0; + //since prg reg for VS System is set in the controller regs, it is convenient to have it here //instead of in the board public byte VS_chr_reg; @@ -84,7 +86,9 @@ internal static class RomChecksums public int old_s = 0; public long double_controller_read = 0; - public ushort double_controller_read_address = 0; + + private ushort double_controller_read_address = 0; + public byte previous_controller1_read = 0; public byte previous_controller2_read = 0; public bool dmc_dma_controller_conflict; @@ -449,7 +453,9 @@ public void do_single_step(IController controller, out bool cont_read, out bool public int oam_dma_index; public bool oam_dma_exec = false; - public ushort oam_dma_addr; + + private ushort oam_dma_addr; + public byte oam_dma_byte; public bool dmc_dma_exec = false; public bool dmc_realign; @@ -888,6 +894,7 @@ public int LookupColor(int pixel) return palette_compiled[pixel]; } + [CLSCompliant(false)] public byte DummyReadMemory(ushort addr) { return 0; } public void ApplySystemBusPoke(int addr, byte value) @@ -919,6 +926,7 @@ public void ApplySystemBusPoke(int addr, byte value) } } + [CLSCompliant(false)] public byte PeekMemory(ushort addr) { byte ret; @@ -953,6 +961,7 @@ public byte PeekMemory(ushort addr) return ret; } + [CLSCompliant(false)] public void ExecFetch(ushort addr) { if (MemoryCallbacks.HasExecutes) @@ -962,6 +971,7 @@ public void ExecFetch(ushort addr) } } + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (!oam_dma_exec && !dmc_dma_exec) @@ -1086,6 +1096,7 @@ public void ApplyCompareCheat(int addr, byte value, int compare, int comparetype } } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { if (!oam_dma_exec) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.CpuLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.CpuLink.cs index 1b24fb698f3..dbcce5e30bc 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public sealed partial class NES { + [CLSCompliant(false)] public struct CpuLink : IMOS6502XLink { private readonly NES _nes; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDebuggable.cs index 19ce7639228..50cc448c597 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public sealed partial class NES : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => cpu.SetCpuRegister(register, value); public bool CanStep(StepType type) => false; + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); [FeatureNotImplemented] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IMemoryDomains.cs index b606640f4a4..ffb7161ade9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IMemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.IMemoryDomains.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public sealed partial class NES { + [CLSCompliant(false)] public MemoryDomainList _memoryDomains; private bool _memoryDomainsSetup = false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NSFFormat.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NSFFormat.cs index 22cb107484f..4162c3fb105 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NSFFormat.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NSFFormat.cs @@ -17,10 +17,13 @@ public class NSFFormat /// public byte StartingSong; + [CLSCompliant(false)] public ushort LoadAddress; + [CLSCompliant(false)] public ushort InitAddress; + [CLSCompliant(false)] public ushort PlayAddress; public string SongName; @@ -29,10 +32,12 @@ public class NSFFormat public string CopyrightHolder; + [CLSCompliant(false)] public ushort SpeedNTSC; public byte[] BankswitchInitValues = new byte[8]; + [CLSCompliant(false)] public ushort SpeedPAL; public bool IsNTSC; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs index 063de5b1071..600d39d43ca 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs @@ -22,6 +22,7 @@ public enum Region } private Region _region; + [CLSCompliant(false)] public Region region { get => _region; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs index cd22bfe2006..1f5b4314b05 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs @@ -13,6 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public partial class PPU { + [CLSCompliant(false)] public sealed class Reg_2001 { public Bit color_disable; //Color disable (0: normal color; 1: AND all palette entries with 110000, effectively producing a monochrome display) @@ -63,6 +64,7 @@ public struct PPUSTATUS //uses the internal counters concept at http://nesdev.icequake.net/PPU%20addressing.txt //TODO - this should be turned into a state machine + [CLSCompliant(false)] public sealed class PPUREGS { public PPUREGS() @@ -249,6 +251,7 @@ public void increment2007(bool rendering, bool by32) } } + [CLSCompliant(false)] public sealed class Reg_2000 { private readonly PPUREGS _regs; @@ -287,12 +290,18 @@ public byte Value private Bit Reg2002_objoverflow; //Sprite overflow. The PPU can handle only eight sprites on one scanline and sets this bit if it starts drawing sprites. private Bit Reg2002_objhit; //Sprite 0 overlap. Set when a nonzero pixel of sprite 0 is drawn overlapping a nonzero background pixel. Used for raster timing. - public Bit Reg2002_vblank_active; //Vertical blank start (0: has not started; 1: has started) + + private Bit Reg2002_vblank_active; //Vertical blank start (0: has not started; 1: has started) + public bool Reg2002_vblank_active_pending; //set if Reg2002_vblank_active is pending private bool Reg2002_vblank_clear_pending; //ppu's clear of vblank flag is pending - public PPUREGS ppur; - public Reg_2000 reg_2000; - public Reg_2001 reg_2001; + + internal PPUREGS ppur; + + internal Reg_2000 reg_2000; + + private Reg_2001 reg_2001; + public byte reg_2003; public byte reg_2006_2; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/LibQuickNES.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/LibQuickNES.cs index 6851ee95378..e899f310be7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/LibQuickNES.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/LibQuickNES.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES { + [CLSCompliant(false)] public abstract class LibQuickNES { /// diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index b025cd98581..e93fa3822dd 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -11,6 +11,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES { + [CLSCompliant(false)] [PortedCore( name: CoreNames.QuickNes, author: "SergioMartin86, kode54, Blargg", diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/IBSNESForGfxDebugger.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/IBSNESForGfxDebugger.cs index 105c1132e10..af2cca5b520 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/IBSNESForGfxDebugger.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/IBSNESForGfxDebugger.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] public interface IBSNESForGfxDebugger : ISpecializedEmulatorService { #pragma warning disable CA1715 // breaks IInterface convention diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index c7bae8e3b48..2b8bb2934d3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] public abstract unsafe class CoreImpl { [BizImport(CallingConvention.Cdecl, Compatibility = true)] @@ -23,6 +24,7 @@ public abstract unsafe class CoreImpl public abstract void PostLoadState(); } + [CLSCompliant(false)] public unsafe partial class LibsnesApi : IDisposable, IMonitor, IStatable { static LibsnesApi() diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs index 0cc085e989c..351bcabfdf6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesControllerDeck.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] public class LibsnesControllerDeck { public enum ControllerType @@ -97,6 +98,7 @@ public static ControllerDefinition AddLightGun(this ControllerDefinition def, st => def.AddXYPair(nameFormat, AxisPairOrientation.RightAndDown, 0.RangeTo(255), 128, 0.RangeTo(239), 120); //TODO verify direction against hardware } + [CLSCompliant(false)] public interface ILibsnesController { /// @@ -119,6 +121,7 @@ public interface ILibsnesController // void SyncState(Serializer ser); } + [CLSCompliant(false)] public class SnesController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType { get; } = LibsnesApi.SNES_INPUT_PORT.Joypad; @@ -181,6 +184,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesMultitapController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType { get; } = LibsnesApi.SNES_INPUT_PORT.Multitap; @@ -252,6 +256,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesPayloadController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType { get; } = LibsnesApi.SNES_INPUT_PORT.Multitap; @@ -269,6 +274,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesUnpluggedController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType { get; } = LibsnesApi.SNES_INPUT_PORT.None; @@ -283,6 +289,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesMouseController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType => LibsnesApi.SNES_INPUT_PORT.Mouse; @@ -325,6 +332,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesSuperScopeController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType => LibsnesApi.SNES_INPUT_PORT.SuperScope; @@ -359,6 +367,7 @@ public short GetState(IController controller, int index, int id) } } + [CLSCompliant(false)] public class SnesJustifierController : ILibsnesController { public LibsnesApi.SNES_INPUT_PORT PortType => LibsnesApi.SNES_INPUT_PORT.Justifier; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index cceb0160d1b..1822559bad3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -18,6 +18,7 @@ // wrap dll code around some kind of library-accessing interface so that it doesn't malfunction if the dll is unavailable namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] [PortedCore(CoreNames.Bsnes, "byuu", "v87", "https://github.com/bsnes-emu/bsnes/tree/v087")] public unsafe partial class LibsnesCore : IEmulator, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ICodeDataLogger, IDebuggable, ISettable, IBSNESForGfxDebugger diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs index 97777e60f5c..63bbc7464b7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SNESGraphicsDecoder.cs @@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] public unsafe interface ISNESGraphicsDecoder : IMonitor { #pragma warning disable CA1715 // breaks IInterface convention @@ -105,6 +106,7 @@ void RenderTilesToScreen( void SetBackColor(int snescol = -1); } + [CLSCompliant(false)] public unsafe class SNESGraphicsDecoder : ISNESGraphicsDecoder { public class PaletteSelection diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs index 5932ef9ee7e..0b6414c429a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs @@ -1,5 +1,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { + [CLSCompliant(false)] public static class SnesColors { // the SNES renders colors in a 15 bit RGB space. in addition, there is a 4 bit "luma" or "brightness" register diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/LibSnes9x.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/LibSnes9x.cs index e02dafb408b..4d6d7179b08 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/LibSnes9x.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/LibSnes9x.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X { + [CLSCompliant(false)] public abstract class LibSnes9x : LibWaterboxCore { public enum LeftPortDevice : uint diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs index f89539e8c62..e12b4042de2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs @@ -18,6 +18,7 @@ public class Snes9x : WaterboxCore, { private readonly LibSnes9x _core; + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.SNES)] public Snes9x(CoreLoadParameters loadParameters) :base(loadParameters.Comm, new Configuration @@ -144,6 +145,7 @@ public Settings GetSettings() return _settings.Clone(); } + [CLSCompliant(false)] public SyncSettings GetSyncSettings() { return _syncSettings.Clone(); @@ -178,6 +180,7 @@ public PutSettingsDirtyBits PutSettings(Settings o) return PutSettingsDirtyBits.None; // no reboot needed } + [CLSCompliant(false)] public PutSettingsDirtyBits PutSyncSettings(SyncSettings o) { var ret = SyncSettings.NeedsReboot(_syncSettings, o); @@ -271,6 +274,7 @@ public Settings Clone() } } + [CLSCompliant(false)] [CoreSettings] public class SyncSettings { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9xControllers.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9xControllers.cs index e9f4303b87a..6c245332273 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9xControllers.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9xControllers.cs @@ -15,6 +15,7 @@ public class Snes9xControllers public ControllerDefinition ControllerDefinition { get; } + [CLSCompliant(false)] public Snes9xControllers(Snes9x.SyncSettings ss) { switch (ss.LeftPort) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/LibSameBoy.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/LibSameBoy.cs index 8594829118f..e4a63d3d883 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/LibSameBoy.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/LibSameBoy.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy { + [CLSCompliant(false)] public abstract class LibSameboy { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IDebuggable.cs index e2e79be60d2..bec58b3069b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IDebuggable.cs @@ -6,6 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy { public partial class Sameboy : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { int[] data = new int[10]; @@ -56,6 +57,7 @@ public void SetCpuRegister(string register, int value) private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem(new[] { systemBusScope }); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memorycallbacks; private LibSameboy.MemoryCallback _readcb; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISettable.cs index 85320a32190..dfdeee49b0e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISettable.cs @@ -48,6 +48,7 @@ public PutSettingsDirtyBits PutSyncSettings(SameboySyncSettings o) [CoreSettings] public class SameboySettings { + [CLSCompliant(false)] public enum GBPaletteType : uint { [Display(Name = "Greyscale")] @@ -64,12 +65,14 @@ public enum GBPaletteType : uint private int[] _customPal; + [CLSCompliant(false)] [DisplayName("GB Mono Palette")] [Description("Selects which palette to use in GB mode. Does nothing in GBC mode.")] [DefaultValue(GBPaletteType.GREY)] [TypeConverter(typeof(DescribableEnumConverter))] public GBPaletteType GBPalette { get; set; } + [CLSCompliant(false)] public enum ColorCorrectionMode : uint { [Display(Name = "Disabled")] @@ -88,6 +91,7 @@ public enum ColorCorrectionMode : uint MODERN_ACCURATE, } + [CLSCompliant(false)] [DisplayName("GBC Color Correction")] [Description("Selects which color correction method to use in GBC mode. Does nothing in GB mode.")] [DefaultValue(ColorCorrectionMode.MODERN_BALANCED)] @@ -111,6 +115,7 @@ public int LightTemperature [DefaultValue(false)] public bool ShowBorder { get; set; } + [CLSCompliant(false)] public enum HighPassFilterMode : uint { [Display(Name = "None (Keep DC Offset)")] @@ -121,6 +126,7 @@ public enum HighPassFilterMode : uint HIGHPASS_REMOVE_DC_OFFSET, } + [CLSCompliant(false)] [DisplayName("High Pass Filter")] [Description("Selects which high pass filter to use for audio.")] [DefaultValue(HighPassFilterMode.HIGHPASS_ACCURATE)] @@ -139,6 +145,7 @@ public int InterferenceVolume set => _interferencevolume = Math.Max(0, Math.Min(100, value)); } + [CLSCompliant(false)] public enum RumbleModeType : uint { [Display(Name = "Disabled")] @@ -149,6 +156,7 @@ public enum RumbleModeType : uint RUMBLE_ALL_GAMES } + [CLSCompliant(false)] [DisplayName("Rumble Mode")] [Description("Sets which games should trigger rumble.")] [DefaultValue(RumbleModeType.RUMBLE_CARTRIDGE_ONLY)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs index 5dcb92f32dd..fde42e091bb 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk { + [CLSCompliant(false)] [Core( name: CoreNames.SubGbHawk, author: "alyosha and BizHawk contributors")] diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs index 3ef7573269f..67d2df3fcdf 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ADPCM.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.PCEngine { + [CLSCompliant(false)] public sealed class ADPCM : IMixedSoundProvider { private readonly ScsiCDBus _scsi; diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/IGpuView.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/IGpuView.cs index 8754549e9de..bd36f611903 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/IGpuView.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/IGpuView.cs @@ -3,11 +3,14 @@ namespace BizHawk.Emulation.Cores.PCEngine { + [CLSCompliant(false)] public interface IPceGpuView : IEmulatorService { bool IsSgx { get; } void GetGpuData(int vdc, Action callback); } + + [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] public unsafe class PceGpuData { diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IDebuggable.cs index 1a756b5f567..ed7a23322bf 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.PCEngine { public sealed partial class PCEngine : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => Cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => Cpu.SetCpuRegister(register, value); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); public bool CanStep(StepType type) => false; diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 24b6bb7c2a7..4731e5c0a8d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -128,8 +128,13 @@ public PCEngine(CoreLoadParameters lp) // Machine public NecSystemType Type; internal HuC6280 Cpu; - public VDC VDC1, VDC2; - public VCE VCE; + + private VDC VDC1; + + private VDC VDC2; + + private VCE VCE; + private VPC VPC; private ScsiCDBus SCSI; private ADPCM ADPCM; @@ -362,6 +367,8 @@ private void CheckSpriteLimit() private string Region { get; set; } public bool IsSgx => Type == NecSystemType.SuperGrafx; + + [CLSCompliant(false)] public unsafe void GetGpuData(int vdcIndex, Action callback) { var vdc = vdcIndex == 0 ? VDC1 : VDC2; diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs index 69a64cbbffc..23c9c1701f4 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/ScsiCDBus.cs @@ -156,6 +156,7 @@ public bool RST private int audioStartLBA; private int audioEndLBA; + [CLSCompliant(false)] public ScsiCDBus(PCEngine pce, Disc disc) { this.pce = pce; @@ -709,4 +710,4 @@ public void SyncState(Serializer ser) ser.EndSection(); } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs index 4c80c601bfc..1103bfaadc2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VCE.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.PCEngine { // HuC6260 Video Color Encoder + [CLSCompliant(false)] public sealed class VCE { public ushort VceAddress; @@ -87,4 +88,4 @@ public void SyncState(Serializer ser) } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs index 7da92b0ace5..9ea7c74b341 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VDC.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.PCEngine { // HuC6270 Video Display Controller + [CLSCompliant(false)] public sealed partial class VDC : IVideoProvider { public ushort[] VRAM = new ushort[0x8000]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs index fada72efc02..05875f42d16 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/VPC.cs @@ -13,9 +13,13 @@ namespace BizHawk.Emulation.Cores.PCEngine public sealed class VPC : IVideoProvider { private readonly PCEngine PCE; + [CLSCompliant(false)] public VDC VDC1; + [CLSCompliant(false)] public VDC VDC2; + [CLSCompliant(false)] public VCE VCE; + [CLSCompliant(false)] public HuC6280 CPU; public byte[] Registers = { 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -27,6 +31,7 @@ public sealed class VPC : IVideoProvider public int PriorityModeSlot2 => Registers[1] & 0x0F; public int PriorityModeSlot3 => (Registers[1] >> 4) & 0x0F; + [CLSCompliant(false)] public VPC(PCEngine pce, VDC vdc1, VDC vdc2, VCE vce, HuC6280 cpu) { PCE = pce; diff --git a/src/BizHawk.Emulation.Cores/Consoles/SNK/LibNeoGeoPort.cs b/src/BizHawk.Emulation.Cores/Consoles/SNK/LibNeoGeoPort.cs index 621923b2200..3ea3b8f82ad 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/SNK/LibNeoGeoPort.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/SNK/LibNeoGeoPort.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Cores.Consoles.SNK { - public abstract class LibNeoGeoPort : LibNymaCore + public abstract partial class LibNeoGeoPort : LibNymaCore { [BizImport(CC)] public abstract bool GetSaveRam(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.cs index 2ca77759c64..fa334afed15 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink { + [CLSCompliant(false)] [Core( name: CoreNames.GGHawkLink, author: "Vecna", diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.CpuLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.CpuLink.cs index 648dd2b92ca..a7d860241ac 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.CpuLink.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.CpuLink.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { public partial class SMS { + [CLSCompliant(false)] public readonly struct CpuLink(SMS sms) : IZ80ALink { public byte FetchMemory(ushort address) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs index 78e0f159070..4f9c8700023 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs @@ -52,10 +52,14 @@ public struct CDLog_MapResults public int Address; } + [CLSCompliant(false)] public delegate CDLog_MapResults MapMemoryDelegate(ushort addr, bool write); + + [CLSCompliant(false)] public MapMemoryDelegate MapMemory; public ICodeDataLog CDL; + [CLSCompliant(false)] public void RunCDL(ushort address, CDLog_Flags flags) { if (MapMemory != null) @@ -75,6 +79,7 @@ public void RunCDL(ushort address, CDLog_Flags flags) /// /// A wrapper for FetchMemory which inserts CDL logic /// + [CLSCompliant(false)] public byte FetchMemory_CDL(ushort address) { RunCDL(address, CDLog_Flags.ExecFirst); @@ -84,6 +89,7 @@ public byte FetchMemory_CDL(ushort address) /// /// A wrapper for ReadMemory which inserts CDL logic /// + [CLSCompliant(false)] public byte ReadMemory_CDL(ushort address) { RunCDL(address, CDLog_Flags.Data); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IDebuggable.cs index 1488abe4ae8..f0ab56013a8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IDebuggable.cs @@ -5,12 +5,14 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { public partial class SMS : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() => Cpu.GetCpuFlagsAndRegisters(); public void SetCpuRegister(string register, int value) => Cpu.SetCpuRegister(register, value); public bool CanStep(StepType type) => false; + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get; } = new MemoryCallbackSystem(new[] { "System Bus" }); [FeatureNotImplemented] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs index f35f54bbe81..d6fdec6a40f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IInputPollable.cs @@ -18,8 +18,10 @@ public bool IsLagFrame public IInputCallbackSystem InputCallbacks { get; } = new InputCallbackSystem(); - public int _lagCount = 0; - public bool _lagged = true; - public bool _isLag = false; + private int _lagCount = 0; + + private bool _lagged = true; + + internal bool _isLag = false; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index 3f46af149f0..15ab42728c7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -233,7 +233,9 @@ public void HardReset() private readonly byte[] BiosRom; // Machine resources - public Z80A Cpu; + + internal Z80A Cpu; + public byte[] SystemRam; public VDP Vdp; public SN76489sms PSG; @@ -301,6 +303,7 @@ private DisplayType DetermineDisplayType(SmsSyncSettings.DisplayTypes display, s return DisplayType.NTSC; } + [CLSCompliant(false)] public byte ReadMemory(ushort addr) { if (MemoryCallbacks.HasReads) @@ -312,6 +315,7 @@ public byte ReadMemory(ushort addr) return ReadMemoryMapper(addr); } + [CLSCompliant(false)] public void WriteMemory(ushort addr, byte value) { WriteMemoryMapper(addr, value); @@ -323,6 +327,7 @@ public void WriteMemory(ushort addr, byte value) } } + [CLSCompliant(false)] public byte FetchMemory(ushort addr) { return ReadMemoryMapper(addr); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs index 6ff1f09cf6e..323ffb76d0a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs @@ -95,6 +95,7 @@ public partial class VDP : IVideoProvider private static readonly byte[] SMSPalXlatTable = { 0, 85, 170, 255 }; private static readonly byte[] GGPalXlatTable = { 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255 }; + [CLSCompliant(false)] public VDP(SMS sms, Z80A cpu, VdpMode mode, DisplayType displayType, bool region_compat) { Sms = sms; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/LibSaturnus.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/LibSaturnus.cs index 366a21f4222..1b13adacc94 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/LibSaturnus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/LibSaturnus.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn { - public abstract class LibSaturnus : LibNymaCore + public abstract partial class LibSaturnus : LibNymaCore { [BizImport(CC)] public abstract int GetSaveRamLength(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDebuggable.cs index 686b42b57c8..425815f0d3d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDebuggable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDebuggable.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx { public partial class GPGX : IDebuggable { + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { var regs = new LibGPGX.RegisterInfo[Core.gpgx_getmaxnumregs()]; @@ -42,6 +43,7 @@ public IDictionary GetCpuFlagsAndRegisters() public void SetCpuRegister(string register, int value) => throw new NotImplementedException(); + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks { get diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDisassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDisassembler.cs index acf8505e702..82d4301fc33 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDisassembler.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IDisassembler.cs @@ -19,6 +19,7 @@ public string Cpu public IEnumerable AvailableCpus { get; } = [ "M68000" ]; + [CLSCompliant(false)] public string Disassemble(MemoryDomain m, uint addr, out int length) { _disassemblerInstance.ReadWord = a => (short)m.PeekUshort(a, m.EndianType == MemoryDomain.Endian.Big); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs index 2f39f8814a8..e605396768e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs @@ -13,6 +13,7 @@ public partial class GPGX : ISettable public GPGXSettings GetSettings() => _settings.Clone(); + [CLSCompliant(false)] public GPGXSyncSettings GetSyncSettings() => _syncSettings.Clone(); @@ -25,6 +26,7 @@ public PutSettingsDirtyBits PutSettings(GPGXSettings o) return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None; } + [CLSCompliant(false)] public PutSettingsDirtyBits PutSyncSettings(GPGXSyncSettings o) { var ret = GPGXSyncSettings.NeedsReboot(_syncSettings, o); @@ -205,6 +207,7 @@ public GPGXSettings() public GPGXSettings Clone() => (GPGXSettings)MemberwiseClone(); + [CLSCompliant(false)] public LibGPGX.DrawMask GetDrawMask() { LibGPGX.DrawMask ret = 0; @@ -220,6 +223,7 @@ public static bool NeedsReboot(GPGXSettings x, GPGXSettings y) => !DeepEquality.DeepEquals(x, y); } + [CLSCompliant(false)] [CoreSettings] public class GPGXSyncSettings { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs index 2135c70ac66..0de14a2e899 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs @@ -9,6 +9,7 @@ public partial class GPGX { private readonly ITraceable _tracer; + [CLSCompliant(false)] public class GPGXTraceBuffer( IDebuggable debuggableCore, IMemoryDomains memoryDomains, diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs index 284a2b2d7a5..55a84d354ba 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs @@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx public partial class GPGX : IEmulator, IVideoProvider, ISaveRam, IStatable, IRegionable, IInputPollable, IDebuggable, IDriveLight, ICodeDataLogger, IDisassemblable { + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.GEN)] [CoreConstructor(VSystemID.Raw.SMS)] [CoreConstructor(VSystemID.Raw.GG)] @@ -323,6 +324,7 @@ private void CDRead(int lba, IntPtr dest, bool subcode) // ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable private readonly LibGPGX.cd_read_cb CDReadCallback; + [CLSCompliant(false)] public static LibGPGX.CDData GetCDDataStruct(Disc cd) { var ret = new LibGPGX.CDData(); @@ -395,11 +397,13 @@ private void SetControllerDefinition() ControllerDefinition = ControlConverter.ControllerDef; } + [CLSCompliant(false)] public LibGPGX.INPUT_DEVICE[] GetDevices() => (LibGPGX.INPUT_DEVICE[])_input.dev.Clone(); public bool IsMegaCD => _cds != null; + [CLSCompliant(false)] public class VDPView(in LibGPGX.VDPView v, IMonitor m) : IMonitor { public IntPtr VRAM = v.VRAM; @@ -416,6 +420,7 @@ public void Exit() => m.Exit(); } + [CLSCompliant(false)] public VDPView UpdateVDPViewContext() { Core.gpgx_get_vdp_view(out var v); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGXControlConverter.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGXControlConverter.cs index ded1385fb2e..591b91c350e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGXControlConverter.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGXControlConverter.cs @@ -209,6 +209,7 @@ private void DoPaddleAnalog(int idx, int player) }); } + [CLSCompliant(false)] public GPGXControlConverter(LibGPGX.InputData input, string systemId, bool cdButtons) { Console.WriteLine("GPGX Controller report:"); @@ -298,6 +299,7 @@ public GPGXControlConverter(LibGPGX.InputData input, string systemId, bool cdBut ControllerDef.MakeImmutable(); } + [CLSCompliant(false)] public void Convert(IController source, LibGPGX.InputData target) { _source = source; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs index 663a9aece67..cb31784767c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx { + [CLSCompliant(false)] public abstract class LibGPGX { [BizImport(CallingConvention.Cdecl)] diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index ae14e0e2b9c..657a8952265 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -27,6 +27,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX { + [CLSCompliant(false)] [PortedCore(CoreNames.Octoshock, "Mednafen Team")] public unsafe partial class Octoshock : IEmulator, IInputPollable, IRegionable, ISaveRam, ISettable, ISoundProvider, IStatable, IVideoProvider, diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs index 41cd5db9773..64a4424994c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs @@ -7,6 +7,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX { + [CLSCompliant(false)] public static unsafe class OctoshockDll { private const CallingConvention cc = CallingConvention.Cdecl; @@ -304,4 +305,4 @@ public static extern int shock_GetMemData( [DllImport(dd, CallingConvention = cc)] public static extern int shock_PokeMemory(IntPtr psx, uint address, byte value); } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockFIOConfig.cs b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockFIOConfig.cs index 44a8f7def99..8ae50242a75 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockFIOConfig.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockFIOConfig.cs @@ -3,6 +3,7 @@ /// /// Represents a user's view of what equipment is plugged into the PSX FIO /// + [CLSCompliant(false)] public class OctoshockFIOConfigUser { public bool[] Multitaps = new bool[2]; @@ -21,6 +22,7 @@ public OctoshockFIOConfigLogical ToLogical() /// Represents a baked-down view of what's plugged into the PSX FIO. /// But really, users are interested in it too (its what produces the player number assignments) /// + [CLSCompliant(false)] public class OctoshockFIOConfigLogical { public bool[] Multitaps; @@ -92,4 +94,4 @@ internal void PopulateFrom(OctoshockFIOConfigUser userConfig) } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs index 31cd7f21fc0..cabb6fab9d7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan { + [CLSCompliant(false)] public static class BizSwan { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs index fe87de59a20..97ffa3cd3f3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs @@ -33,6 +33,7 @@ public class Settings [Description("Colors to display in Wonderswan (not Color) mode")] public Color[] BWPalette { get; private set; } + [CLSCompliant(false)] public BizSwan.Settings GetNativeSettings() { var ret = new BizSwan.Settings(); @@ -84,6 +85,7 @@ public Settings Clone() } } + [CLSCompliant(false)] [CoreSettings] public class SyncSettings { @@ -160,6 +162,7 @@ public static bool NeedsReboot(SyncSettings x, SyncSettings y) public Settings GetSettings() => _settings.Clone(); + [CLSCompliant(false)] public SyncSettings GetSyncSettings() => _syncSettings.Clone(); public PutSettingsDirtyBits PutSettings(Settings o) @@ -170,6 +173,7 @@ public PutSettingsDirtyBits PutSettings(Settings o) return PutSettingsDirtyBits.None; } + [CLSCompliant(false)] public PutSettingsDirtyBits PutSyncSettings(SyncSettings o) { bool ret = SyncSettings.NeedsReboot(o, _syncSettings); diff --git a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index fe77008e8fa..179f28787c8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan public partial class WonderSwan : IEmulator, IVideoProvider, ISoundProvider, IInputPollable, IDebuggable { + [CLSCompliant(false)] [CoreConstructor(VSystemID.Raw.WSWAN)] public WonderSwan(byte[] file, bool deterministic, WonderSwan.Settings settings, WonderSwan.SyncSettings syncSettings) { @@ -103,8 +104,11 @@ public void ResetCounters() public IInputCallbackSystem InputCallbacks => _inputCallbacks; private readonly MemoryCallbackSystem _memorycallbacks = new MemoryCallbackSystem(new[] { "System Bus" }); // This isn't an actual memory domain in this core (yet), but there's nothing that enforces that it has to be + + [CLSCompliant(false)] public IMemoryCallbackSystem MemoryCallbacks => _memorycallbacks; + [CLSCompliant(false)] public IDictionary GetCpuFlagsAndRegisters() { var ret = new Dictionary(); diff --git a/src/BizHawk.Emulation.Cores/Libretro/Libretro.Api.cs b/src/BizHawk.Emulation.Cores/Libretro/Libretro.Api.cs index 563fc32a717..b2ddc53c23d 100644 --- a/src/BizHawk.Emulation.Cores/Libretro/Libretro.Api.cs +++ b/src/BizHawk.Emulation.Cores/Libretro/Libretro.Api.cs @@ -4,6 +4,7 @@ namespace BizHawk.Emulation.Cores.Libretro { + [CLSCompliant(false)] public abstract class LibretroApi { private const CallingConvention cc = CallingConvention.Cdecl; @@ -438,6 +439,7 @@ public struct retro_system_av_info public abstract long retro_get_memory_size(RETRO_MEMORY id); } + [CLSCompliant(false)] public abstract class LibretroBridge { private const CallingConvention cc = CallingConvention.Cdecl; diff --git a/src/BizHawk.Emulation.Cores/Libretro/Libretro.cs b/src/BizHawk.Emulation.Cores/Libretro/Libretro.cs index 1f497fbb277..9e30b430082 100644 --- a/src/BizHawk.Emulation.Cores/Libretro/Libretro.cs +++ b/src/BizHawk.Emulation.Cores/Libretro/Libretro.cs @@ -10,6 +10,7 @@ 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 + [CLSCompliant(false)] [PortedCore(CoreNames.Libretro, "CasualPokePlayer", singleInstance: true, isReleased: false)] public partial class LibretroHost { diff --git a/src/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs b/src/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs index d46e211f41a..5e2158686ea 100644 --- a/src/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs +++ b/src/BizHawk.Emulation.Cores/Sound/HuC6280PSG.cs @@ -15,6 +15,7 @@ public sealed class HuC6280PSG : ISoundProvider, IMixedSoundProvider, IPCEngineS { private readonly int _spf; + [CLSCompliant(false)] public sealed class PSGChannel : IPCEngineSoundDebuggable.ChannelData { public ushort Frequency; @@ -47,6 +48,7 @@ public short[] CloneWaveform() => (short[]) Wave.Clone(); } + [CLSCompliant(false)] public PSGChannel[] Channels = new PSGChannel[8]; public bool[] UserMute = new bool[8]; @@ -92,6 +94,7 @@ internal void EndFrame(long cycles) frameStopTime = cycles; } + [CLSCompliant(false)] public ReadOnlySpan GetPSGChannelData() => Channels; diff --git a/src/BizHawk.Emulation.Cores/Sound/SN76489sms.cs b/src/BizHawk.Emulation.Cores/Sound/SN76489sms.cs index a3f44ac17b9..f69b955fc98 100644 --- a/src/BizHawk.Emulation.Cores/Sound/SN76489sms.cs +++ b/src/BizHawk.Emulation.Cores/Sound/SN76489sms.cs @@ -16,6 +16,8 @@ public SN76489sms() } public byte[] Chan_vol = new byte[4]; + + [CLSCompliant(false)] public ushort[] Chan_tone = new ushort[4]; public int chan_sel; diff --git a/src/BizHawk.Emulation.Cores/Sound/YM2413.cs b/src/BizHawk.Emulation.Cores/Sound/YM2413.cs index c3c2f569081..c496dcc836f 100644 --- a/src/BizHawk.Emulation.Cores/Sound/YM2413.cs +++ b/src/BizHawk.Emulation.Cores/Sound/YM2413.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.Cores.Components { + [CLSCompliant(false)] public sealed class YM2413 { public byte DetectionValue; diff --git a/src/BizHawk.Emulation.Cores/Waterbox/LibNymaCore.cs b/src/BizHawk.Emulation.Cores/Waterbox/LibNymaCore.cs index abcf2248e61..70f596b8913 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/LibNymaCore.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/LibNymaCore.cs @@ -3,6 +3,7 @@ namespace BizHawk.Emulation.Cores.Waterbox { + [CLSCompliant(false)] public abstract unsafe class LibNymaCore : LibWaterboxCore { [StructLayout(LayoutKind.Sequential)] diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs index ac2ab3c8c9f..c93279783f7 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs @@ -63,7 +63,11 @@ protected class ControllerAdapter : IStatable /// public string[] Devices { get; } public ControllerDefinition Definition { get; } + + [CLSCompliant(false)] public List ActualPortData { get; set; } = new List(); + + [CLSCompliant(false)] public ControllerAdapter( List allPorts, IDictionary config, @@ -401,6 +405,7 @@ protected virtual HashSet ComputeHiddenPorts() return new HashSet(); } + [CLSCompliant(false)] public class PortResult { /// @@ -417,6 +422,7 @@ public class PortResult /// In a fully initialized core, holds information about what was actually plugged in. Please do not mutate it. /// /// + [CLSCompliant(false)] public List ActualPortData => _controllerAdapter.ActualPortData; } } diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.ComponentModel.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.ComponentModel.cs index 63230afffd8..5dcfddb9e94 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.ComponentModel.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.ComponentModel.cs @@ -97,9 +97,11 @@ public override PropertyDescriptorCollection GetProperties() public abstract class MednaPropertyDescriptor : PropertyDescriptor { + [CLSCompliant(false)] public SettingT Setting { get; private set; } private readonly bool _isSyncSetting; + [CLSCompliant(false)] protected MednaPropertyDescriptor(SettingT setting, bool isSyncSetting) : base(setting.SettingsKey, [ ]) { @@ -150,6 +152,7 @@ public override bool ShouldSerializeValue(object component) return ((INymaDictionarySettings)component).MednafenValues.ContainsKey(Setting.SettingsKey); } + [CLSCompliant(false)] public static MednaPropertyDescriptor Create(SettingT s, bool isSyncSetting) { switch (s.Type) @@ -174,6 +177,7 @@ public static MednaPropertyDescriptor Create(SettingT s, bool isSyncSetting) public class MednaEnumDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaEnumDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(string); protected override object ConvertFromString(string s) @@ -224,6 +228,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul } public class MednaStringDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaStringDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(string); protected override object ConvertFromString(string s) @@ -237,6 +242,7 @@ protected override string ConvertToString(object o) } public class MednaBoolDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaBoolDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(bool); protected override object ConvertFromString(string s) @@ -250,6 +256,7 @@ protected override string ConvertToString(object o) } public class MednaLongDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaLongDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(long); protected override object ConvertFromString(string s) @@ -266,6 +273,7 @@ protected override string ConvertToString(object o) } public class MednaUlongDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaUlongDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(ulong); protected override object ConvertFromString(string s) @@ -293,6 +301,7 @@ private static ulong Parse(string s) } public class MednaDoubleDescriptor : MednaPropertyDescriptor { + [CLSCompliant(false)] public MednaDoubleDescriptor(SettingT s, bool isSyncSetting) : base(s, isSyncSetting) {} public override Type PropertyType => typeof(double); protected override object ConvertFromString(string s) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs index 00a3d0d0e0a..ea007884786 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs @@ -252,7 +252,11 @@ public class Port /// What devices can be plugged into each port /// public List Ports { get; set; } = new List(); + + [CLSCompliant(false)] public List AllSettings { get; set; } = new List(); + + [CLSCompliant(false)] public Dictionary AllSettingsByKey { get; set; } = new Dictionary(); public Dictionary AllOverrides { get; set; } = new Dictionary(); /// diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs index 172f4dffbc6..b773f37d5ab 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs @@ -48,6 +48,7 @@ private WaterboxOptions NymaWaterboxOptions(string wbxFilename) private LibNymaCore _nyma; + [CLSCompliant(false)] protected T DoInit( CoreLoadParameters lp, string wbxFilename, @@ -66,6 +67,7 @@ protected T DoInit( ); } + [CLSCompliant(false)] protected T DoInit( GameInfo game, byte[] rom, Disc[] discs, string wbxFilename, string romExtension, bool deterministic, IDictionary firmwareIDMap = null) @@ -81,6 +83,7 @@ protected T DoInit( ); } + [CLSCompliant(false)] protected T DoInit((byte[] Data, string Filename)[] roms, Disc[] discs, string wbxFilename, string romExtension, bool deterministic, IDictionary firmwareIDMap = null) where T : LibNymaCore @@ -256,6 +259,7 @@ protected override void LoadStateBinaryInternal(BinaryReader reader) private IController _currentController; + [CLSCompliant(false)] protected bool _isArcade; protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController controller, bool render, bool rendersound) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/ProxiedFile.cs b/src/BizHawk.Emulation.Cores/Waterbox/ProxiedFile.cs index 6b6b93de4ba..af039b3bfa1 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/ProxiedFile.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/ProxiedFile.cs @@ -8,6 +8,7 @@ public class ProxiedFile : IDisposable { private FileStream? _fileStream; + [CLSCompliant(false)] public bool OpenMsuTrack(string romPath, ushort id) => Open($"{romPath}-{id}.pcm"); public bool Open(string path) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxCore.cs b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxCore.cs index 6bfdffede0c..61dbde44644 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxCore.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxCore.cs @@ -15,8 +15,14 @@ public abstract class WaterboxCore : IEmulator, IVideoProvider, ISoundProvider, private const int AUDIO_CHANNEL_COUNT = 2; private LibWaterboxCore _core; + + [CLSCompliant(false)] protected WaterboxHost _exe; + + [CLSCompliant(false)] protected ICallingConventionAdapter _adapter; + + [CLSCompliant(false)] protected LibWaterboxCore.MemoryArea[] _memoryAreas; private readonly LibWaterboxCore.EmptyCallback _inputCallback; protected CoreComm CoreComm { get; } @@ -267,6 +273,7 @@ public void ResetCounters() CycleCount = 0; } + [CLSCompliant(false)] protected readonly BasicServiceProvider _serviceProvider; public IEmulatorServiceProvider ServiceProvider => _serviceProvider; public virtual string SystemId { get; } @@ -362,7 +369,10 @@ public void DiscardSamples() { } + [CLSCompliant(false)] protected short[] _soundBuffer; + + [CLSCompliant(false)] protected int _numSamples; public bool CanProvideAsync => false; public SyncSoundMode SyncMode => SyncSoundMode.Sync; @@ -372,6 +382,7 @@ public virtual int[] GetVideoBuffer() return _videoBuffer; } + [CLSCompliant(false)] protected int[] _videoBuffer; public virtual int VirtualWidth => BufferWidth; public virtual int VirtualHeight => BufferHeight; diff --git a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHost.cs b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHost.cs index 4779521bf33..8aab03f9719 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHost.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHost.cs @@ -26,30 +26,35 @@ public class WaterboxOptions /// how large the normal heap should be. it services sbrk calls /// can be 0, but sbrk calls will crash. /// + [CLSCompliant(false)] public uint SbrkHeapSizeKB { get; set; } /// /// how large the sealed heap should be. it services special allocations that become readonly after init /// Must be > 0 and at least large enough to store argv and envp, and any alloc_sealed() calls /// + [CLSCompliant(false)] public uint SealedHeapSizeKB { get; set; } /// /// how large the invisible heap should be. it services special allocations which are not savestated /// Must be > 0 and at least large enough for the internal vtables, and any alloc_invisible() calls /// + [CLSCompliant(false)] public uint InvisibleHeapSizeKB { get; set; } /// /// how large the "plain" heap should be. it is savestated, and contains /// Must be > 0 and at least large enough for the internal pthread structure, and any alloc_plain() calls /// + [CLSCompliant(false)] public uint PlainHeapSizeKB { get; set; } /// /// how large the mmap heap should be. it is savestated. /// can be 0, but mmap calls will crash. /// + [CLSCompliant(false)] public uint MmapHeapSizeKB { get; set; } /// diff --git a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHostNative.cs b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHostNative.cs index 65a345db7a1..19c4a3df4f9 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHostNative.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxHostNative.cs @@ -5,6 +5,7 @@ namespace BizHawk.Emulation.Cores.Waterbox { + [CLSCompliant(false)] public abstract class WaterboxHostNative { [StructLayout(LayoutKind.Sequential)] diff --git a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxMemoryDomain.cs b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxMemoryDomain.cs index 04fabb50ac8..d7a563e3bbe 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/WaterboxMemoryDomain.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/WaterboxMemoryDomain.cs @@ -10,8 +10,13 @@ namespace BizHawk.Emulation.Cores.Waterbox { public abstract class WaterboxMemoryDomain : MemoryDomain { + [CLSCompliant(false)] protected readonly IntPtr _data; + + [CLSCompliant(false)] protected readonly IMonitor _monitor; + + [CLSCompliant(false)] protected readonly long _addressMangler; public MemoryArea Definition { get; } diff --git a/src/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs b/src/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs index a81c2961ac5..bb2f9046595 100644 --- a/src/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs +++ b/src/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs @@ -9,6 +9,7 @@ namespace BizHawk.Emulation.DiscSystem /// Does not attempt to virtually present the disc as a BizHawk disc - that will be the /// responsibility of the user of this code /// + [CLSCompliant(false)] public unsafe class MednaDisc : IDisposable { /// is (could not load mednadisc.dll), or unmanaged call failed diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs index c2b290ef4f3..1c173a7165b 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CDI_format.cs @@ -16,6 +16,7 @@ public static class CDI_Format /// /// Represents a CDI file, faithfully. Minimal interpretation of the data happens. /// + [CLSCompliant(false)] public class CDIFile { /// @@ -58,6 +59,7 @@ public class CDISession /// /// Represents a track/disc info block header from a CDI track /// + [CLSCompliant(false)] public class CDITrackHeader { /// @@ -90,6 +92,7 @@ public class CDICDText /// /// Represents a track block from a CDI file /// + [CLSCompliant(false)] public class CDITrack : CDITrackHeader { /// @@ -156,6 +159,7 @@ public class CDITrack : CDITrackHeader /// /// Represents a disc info block from a CDI file /// + [CLSCompliant(false)] public class CDIDiscInfo : CDITrackHeader { /// @@ -190,6 +194,7 @@ public CDIParseException(string message) : base(message) { } } /// malformed cdi format + [CLSCompliant(false)] public static CDIFile ParseFrom(Stream stream) { var cdif = new CDIFile(); @@ -408,6 +413,7 @@ void ParseTrackHeader(CDITrackHeader header) public class LoadResults { + [CLSCompliant(false)] public CDIFile ParsedCDIFile; public bool Valid; public CDIParseException FailureException; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CHD_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CHD_format.cs index c59f3837f30..fcaabb5e942 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CHD_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CHD_format.cs @@ -22,6 +22,7 @@ public static class CHD_Format /// Represents a CHD file. /// This isn't particularly faithful to the format, but rather it just wraps a chd_file /// + [CLSCompliant(false)] public class CHDFile { /// @@ -43,6 +44,7 @@ public class CHDFile /// /// Results of chd_get_metadata with cdrom track metadata tags /// + [CLSCompliant(false)] public class CHDCdMetadata { /// @@ -436,6 +438,7 @@ private static CHDCdMetadata SynthesizeDvdMetadata(uint sectorCount) } /// malformed chd format + [CLSCompliant(false)] public static CHDFile ParseFrom(string path) { var chdf = new CHDFile(); @@ -628,6 +631,7 @@ public static CHDFile ParseFrom(string path) public class LoadResults { + [CLSCompliant(false)] public CHDFile ParsedCHDFile; public bool Valid; public CHDParseException FailureException; diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs index ba6e8fcff3f..1de5bebd6b0 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CUE_Types.cs @@ -7,6 +7,7 @@ public enum CueTrackFlags PRE = 1, //Pre-emphasis enabled (audio tracks only) DCP = 2, //Digital copy permitted DATA = 4, //Set automatically by cue-processing equipment, here for completeness + [CLSCompliant(false)] //TODO just needs renaming _4CH = 8, //Four channel audio SCMS = 64, //Serial copy management system (not supported by all recorders) (??) } diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs index b280da2d29c..b14caef746c 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/MDS_Format.cs @@ -185,6 +185,7 @@ also returned in full TOC by READ TOC/PMA/ATIP command */ public long ExtraOffset; /* Start offset of this track's extra block. */ public int SectorSize; /* Sector size. */ public long PLBA; /* Track start sector (PLBA). */ + [CLSCompliant(false)] public ulong StartOffset; /* Track start offset (from beginning of MDS file) */ public long Files; /* Number of filenames for this track */ public long FooterOffset; /* Start offset of footer (from beginning of MDS file) */ diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs index 3337b2ce28f..3e5172385ab 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/NRG_format.cs @@ -60,6 +60,7 @@ public class NRGFile /// /// The SINF chunks /// + [CLSCompliant(false)] public readonly IList SessionInfos = new List(); /// @@ -70,6 +71,7 @@ public class NRGFile /// /// The MTYP chunk /// + [CLSCompliant(false)] public NRGMediaType MediaType; /// @@ -158,6 +160,7 @@ public class NRGDAOTrack /// So if you have different modes on tracks, this will be the largest mode size /// Of course, this means sectors on the file may just have padding /// + [CLSCompliant(false)] public ushort SectorSize; /// @@ -234,6 +237,7 @@ public class NRGTAOTrack /// /// Track length in bytes /// + [CLSCompliant(false)] public ulong TrackLength; /// @@ -281,6 +285,7 @@ public class NRGTOCT : NRGChunk /// /// Represents a SINF chunk /// + [CLSCompliant(false)] public class NRGSessionInfo : NRGChunk { /// @@ -303,6 +308,7 @@ public class NRGCdText : NRGChunk /// /// Represents a MTYP chunk /// + [CLSCompliant(false)] public class NRGMediaType : NRGChunk { /// diff --git a/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs b/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs index 3799572dc7b..bed2f3ee75a 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscHasher.cs @@ -75,6 +75,7 @@ static void AddAsBytesTo(CRC32 crc32, int i) /// /// calculates the complete disc hash for matching to a redump /// + [CLSCompliant(false)] public uint Calculate_PSX_RedumpHash() { CRC32 crc = new(); diff --git a/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs b/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs index edcd6a445aa..8db71f807e0 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscSubQ.cs @@ -25,6 +25,7 @@ public enum EControlQ PRE = 1, //Pre-emphasis enabled (audio tracks only) DCP = 2, //Digital copy permitted DATA = 4, //set for data tracks, clear for audio tracks + [CLSCompliant(false)] //TODO just needs renaming _4CH = 8, //Four channel audio } @@ -83,6 +84,7 @@ public struct SubchannelQ /// Furthermore, it is meaningless (and in BizHawk, unpopulated) for a TOC Entry /// (since an invalid CRC on a [theyre redundantly/duplicately stored] toc entry would cause it to get discarded in favor of another one with a correct CRC) /// + [CLSCompliant(false)] public ushort q_crc; /// diff --git a/src/BizHawk.Emulation.DiscSystem/LibChd.cs b/src/BizHawk.Emulation.DiscSystem/LibChd.cs index 99af9132103..29380cf6d75 100644 --- a/src/BizHawk.Emulation.DiscSystem/LibChd.cs +++ b/src/BizHawk.Emulation.DiscSystem/LibChd.cs @@ -12,6 +12,7 @@ namespace BizHawk.Emulation.DiscSystem /// In practice, we use chd-rs, whose c api matches libchdr's /// TODO: should this be common-ized? chd isn't limited to discs, it could be used for hard disk images (e.g. for MAME) /// + [CLSCompliant(false)] public static class LibChd { public const uint CHD_HEADER_VERSION = 5; diff --git a/src/MainSlnCommon.props b/src/MainSlnCommon.props index 79525079230..2e0f25a3a80 100644 --- a/src/MainSlnCommon.props +++ b/src/MainSlnCommon.props @@ -16,17 +16,25 @@ None en-US + + true + $(SolutionDir)=/ + + + <_Parameter1>$(CLSCompliant) + <_Parameter1_TypeName>System.Boolean + diff --git a/src/TestProjects.props b/src/TestProjects.props index a05f9a4a0be..ebd59ac52d6 100644 --- a/src/TestProjects.props +++ b/src/TestProjects.props @@ -1,6 +1,7 @@ + false true $(ProjectDir)../../test_output Exe