Enable SA1206 and fix noncompliance
"Declaration keywords should follow order"
This commit is contained in:
parent
f061e4f876
commit
24e6cc14f0
|
@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly static string[] mnemonics = new string[]
|
static readonly string[] mnemonics = new string[]
|
||||||
{
|
{
|
||||||
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
||||||
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
||||||
|
@ -94,7 +94,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"CALL M, nn", "[FD]", "CP n", "RST $38", //0x100
|
"CALL M, nn", "[FD]", "CP n", "RST $38", //0x100
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsDD = new string[]
|
static readonly string[] mnemonicsDD = new string[]
|
||||||
{
|
{
|
||||||
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
||||||
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
||||||
|
@ -162,7 +162,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"CALL M, nn", "[!!DD FD!!]", "CP n", "RST $38", //0x100
|
"CALL M, nn", "[!!DD FD!!]", "CP n", "RST $38", //0x100
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsFD = new string[]
|
static readonly string[] mnemonicsFD = new string[]
|
||||||
{
|
{
|
||||||
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
"NOP", "LD BC, nn", "LD (BC), A", "INC BC", //0x04
|
||||||
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
"INC B", "DEC B", "LD B, n", "RLCA", //0x08
|
||||||
|
@ -230,7 +230,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"CALL M, nn", "[!FD FD!]", "CP n", "RST $38", //0x100
|
"CALL M, nn", "[!FD FD!]", "CP n", "RST $38", //0x100
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsDDCB = new string[]
|
static readonly string[] mnemonicsDDCB = new string[]
|
||||||
{
|
{
|
||||||
"RLC (IX+d)->B", "RLC (IX+d)->C", "RLC (IX+d)->D", "RLC (IX+d)->E", "RLC (IX+d)->H", "RLC (IX+d)->L", "RLC (IX+d)", "RLC (IX+d)->A",
|
"RLC (IX+d)->B", "RLC (IX+d)->C", "RLC (IX+d)->D", "RLC (IX+d)->E", "RLC (IX+d)->H", "RLC (IX+d)->L", "RLC (IX+d)", "RLC (IX+d)->A",
|
||||||
"RRC (IX+d)->B", "RRC (IX+d)->C", "RRC (IX+d)->D", "RRC (IX+d)->E", "RRC (IX+d)->H", "RRC (IX+d)->L", "RRC (IX+d)", "RRC (IX+d)->A",
|
"RRC (IX+d)->B", "RRC (IX+d)->C", "RRC (IX+d)->D", "RRC (IX+d)->E", "RRC (IX+d)->H", "RRC (IX+d)->L", "RRC (IX+d)", "RRC (IX+d)->A",
|
||||||
|
@ -266,7 +266,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"SET 7 (IX+d)->B", "SET 7 (IX+d)->C", "SET 7 (IX+d)->D", "SET 7 (IX+d)->E", "SET 7 (IX+d)->H", "SET 7 (IX+d)->L", "SET 7 (IX+d)", "SET 7 (IX+d)->A",
|
"SET 7 (IX+d)->B", "SET 7 (IX+d)->C", "SET 7 (IX+d)->D", "SET 7 (IX+d)->E", "SET 7 (IX+d)->H", "SET 7 (IX+d)->L", "SET 7 (IX+d)", "SET 7 (IX+d)->A",
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsFDCB = new string[]
|
static readonly string[] mnemonicsFDCB = new string[]
|
||||||
{
|
{
|
||||||
"RLC (IY+d)->B", "RLC (IY+d)->C", "RLC (IY+d)->D", "RLC (IY+d)->E", "RLC (IY+d)->H", "RLC (IY+d)->L", "RLC (IY+d)", "RLC (IY+d)->A",
|
"RLC (IY+d)->B", "RLC (IY+d)->C", "RLC (IY+d)->D", "RLC (IY+d)->E", "RLC (IY+d)->H", "RLC (IY+d)->L", "RLC (IY+d)", "RLC (IY+d)->A",
|
||||||
"RRC (IY+d)->B", "RRC (IY+d)->C", "RRC (IY+d)->D", "RRC (IY+d)->E", "RRC (IY+d)->H", "RRC (IY+d)->L", "RRC (IY+d)", "RRC (IY+d)->A",
|
"RRC (IY+d)->B", "RRC (IY+d)->C", "RRC (IY+d)->D", "RRC (IY+d)->E", "RRC (IY+d)->H", "RRC (IY+d)->L", "RRC (IY+d)", "RRC (IY+d)->A",
|
||||||
|
@ -302,7 +302,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"SET 7 (IY+d)->B", "SET 7 (IY+d)->C", "SET 7 (IY+d)->D", "SET 7 (IY+d)->E", "SET 7 (IY+d)->H", "SET 7 (IY+d)->L", "SET 7 (IY+d)", "SET 7 (IY+d)->A",
|
"SET 7 (IY+d)->B", "SET 7 (IY+d)->C", "SET 7 (IY+d)->D", "SET 7 (IY+d)->E", "SET 7 (IY+d)->H", "SET 7 (IY+d)->L", "SET 7 (IY+d)", "SET 7 (IY+d)->A",
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsCB = new string[]
|
static readonly string[] mnemonicsCB = new string[]
|
||||||
{
|
{
|
||||||
"RLC B", "RLC C", "RLC D", "RLC E", "RLC H", "RLC L", "RLC (HL)", "RLC A",
|
"RLC B", "RLC C", "RLC D", "RLC E", "RLC H", "RLC L", "RLC (HL)", "RLC A",
|
||||||
"RRC B", "RRC C", "RRC D", "RRC E", "RRC H", "RRC L", "RRC (HL)", "RRC A",
|
"RRC B", "RRC C", "RRC D", "RRC E", "RRC H", "RRC L", "RRC (HL)", "RRC A",
|
||||||
|
@ -338,7 +338,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
|
||||||
"SET 7, B", "SET 7, C", "SET 7, D", "SET 7, E", "SET 7, H", "SET 7, L", "SET 7, (HL)", "SET 7, A",
|
"SET 7, B", "SET 7, C", "SET 7, D", "SET 7, E", "SET 7, H", "SET 7, L", "SET 7, (HL)", "SET 7, A",
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly static string[] mnemonicsED = new string[]
|
static readonly string[] mnemonicsED = new string[]
|
||||||
{
|
{
|
||||||
"NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP",
|
"NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP",
|
||||||
"NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP",
|
"NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP", "NOP",
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
readonly static string[] mnemonics = new string[]
|
static readonly string[] mnemonics = new string[]
|
||||||
{
|
{
|
||||||
"LR A, KU", // 0x00
|
"LR A, KU", // 0x00
|
||||||
"LR A, KL", // 0x01
|
"LR A, KL", // 0x01
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int gambatte_runfor(IntPtr core, short[] soundbuf, ref uint samples);
|
public static extern int gambatte_runfor(IntPtr core, short[] soundbuf, ref uint samples);
|
||||||
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
unsafe public static extern int gambatte_runfor(IntPtr core, short* soundbuf, ref uint samples);
|
public static extern unsafe int gambatte_runfor(IntPtr core, short* soundbuf, ref uint samples);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// blit from internal framebuffer to provided framebuffer
|
/// blit from internal framebuffer to provided framebuffer
|
||||||
|
@ -91,7 +91,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
/// <param name="core">opaque state pointer</param>
|
/// <param name="core">opaque state pointer</param>
|
||||||
/// <param name="pitch">in pixels</param>
|
/// <param name="pitch">in pixels</param>
|
||||||
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
unsafe public static extern void gambatte_blitto(IntPtr core, int* videobuf, int pitch);
|
public static extern unsafe void gambatte_blitto(IntPtr core, int* videobuf, int pitch);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// blit from internal framebuffer to provided framebuffer
|
/// blit from internal framebuffer to provided framebuffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -270,7 +270,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected unsafe override void FrameAdvancePost()
|
protected override unsafe void FrameAdvancePost()
|
||||||
{
|
{
|
||||||
if (_scanlineCallback != null && _scanlineCallbackLine == -1)
|
if (_scanlineCallback != null && _scanlineCallbackLine == -1)
|
||||||
_scanlineCallback(_core.GetIoReg(0x40));
|
_scanlineCallback(_core.GetIoReg(0x40));
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
SetMirrorType(!exnmt.Bit(0) ? EMirrorType.Vertical : EMirrorType.Horizontal);
|
SetMirrorType(!exnmt.Bit(0) ? EMirrorType.Vertical : EMirrorType.Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly static byte[] modes = { 5, 5, 3, 1 };
|
static readonly byte[] modes = { 5, 5, 3, 1 };
|
||||||
public override byte ReadPPU(int addr)
|
public override byte ReadPPU(int addr)
|
||||||
{
|
{
|
||||||
if (addr < 0x2000)
|
if (addr < 0x2000)
|
||||||
|
|
|
@ -631,7 +631,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn
|
||||||
_resizedBuffer = new int[width * height];
|
_resizedBuffer = new int[width * height];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected unsafe override void FrameAdvancePost()
|
protected override unsafe void FrameAdvancePost()
|
||||||
{
|
{
|
||||||
//TODO: can we force the videoprovider to add a prescale instead of having to do it in software here?
|
//TODO: can we force the videoprovider to add a prescale instead of having to do it in software here?
|
||||||
//TODO: if not, actually do it in software, instead of relying on the virtual sizes
|
//TODO: if not, actually do it in software, instead of relying on the virtual sizes
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsafe public void Cmp(int statex, int statey)
|
public unsafe void Cmp(int statex, int statey)
|
||||||
{
|
{
|
||||||
if (disposed) throw new ObjectDisposedException(this.GetType().ToString());
|
if (disposed) throw new ObjectDisposedException(this.GetType().ToString());
|
||||||
List<Tuple<int, int>> bads = new List<Tuple<int, int>>();
|
List<Tuple<int, int>> bads = new List<Tuple<int, int>>();
|
||||||
|
|
|
@ -7,7 +7,7 @@ using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
namespace BizHawk.Emulation.Cores.Sony.PSX
|
namespace BizHawk.Emulation.Cores.Sony.PSX
|
||||||
{
|
{
|
||||||
public unsafe static class OctoshockDll
|
public static unsafe class OctoshockDll
|
||||||
{
|
{
|
||||||
const CallingConvention cc = CallingConvention.Cdecl;
|
const CallingConvention cc = CallingConvention.Cdecl;
|
||||||
const string dd = "octoshock.dll";
|
const string dd = "octoshock.dll";
|
||||||
|
|
|
@ -153,7 +153,7 @@ namespace BizHawk.Emulation.DiscSystem
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the useful (but unrealistic) deinterleaved data into the useless (but realistic) interleaved subchannel format.
|
/// Converts the useful (but unrealistic) deinterleaved data into the useless (but realistic) interleaved subchannel format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe static void InterleaveSubcodeInplace(byte[] buf, int buf_index)
|
public static unsafe void InterleaveSubcodeInplace(byte[] buf, int buf_index)
|
||||||
{
|
{
|
||||||
byte* out_buf = stackalloc byte[96];
|
byte* out_buf = stackalloc byte[96];
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ namespace BizHawk.Emulation.DiscSystem
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the useless (but realistic) interleaved subchannel data into a useful (but unrealistic) deinterleaved format.
|
/// Converts the useless (but realistic) interleaved subchannel data into a useful (but unrealistic) deinterleaved format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe static void DeinterleaveSubcodeInplace(byte[] buf, int buf_index)
|
public static unsafe void DeinterleaveSubcodeInplace(byte[] buf, int buf_index)
|
||||||
{
|
{
|
||||||
byte* out_buf = stackalloc byte[96];
|
byte* out_buf = stackalloc byte[96];
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,6 @@
|
||||||
<!-- Partial elements should declare access -->
|
<!-- Partial elements should declare access -->
|
||||||
<Rule Id="SA1205" Action="Hidden" />
|
<Rule Id="SA1205" Action="Hidden" />
|
||||||
|
|
||||||
<!-- Declaration keywords should follow order -->
|
|
||||||
<Rule Id="SA1206" Action="Hidden" />
|
|
||||||
|
|
||||||
<!-- System using directives should be placed before other using directives -->
|
<!-- System using directives should be placed before other using directives -->
|
||||||
<Rule Id="SA1208" Action="Hidden" />
|
<Rule Id="SA1208" Action="Hidden" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue