diff --git a/Common.ruleset b/Common.ruleset index 9973a6e929..d554417997 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -336,9 +336,6 @@ - - - diff --git a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs index 87b6121708..e02465c2ba 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/AviWriter.cs @@ -140,7 +140,7 @@ namespace BizHawk.Client.EmuHawk throw new InvalidOperationException("Tried to start recording an AVI with no video codec token set"); } - threadQ = new System.Collections.Concurrent.BlockingCollection(30); + threadQ = new System.Collections.Concurrent.BlockingCollection(30); workerT = new System.Threading.Thread(new System.Threading.ThreadStart(threadproc)); workerT.Start(); } @@ -558,7 +558,7 @@ namespace BizHawk.Client.EmuHawk /// set metadata parameters; should be called before opening file /// NYI /// - public void SetMetaData(string gameName, string authors, UInt64 lengthMS, UInt64 rerecords) + public void SetMetaData(string gameName, string authors, ulong lengthMS, ulong rerecords) { } diff --git a/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs b/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs index 664f11c326..e7ebb2cf1f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs +++ b/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs @@ -126,7 +126,7 @@ namespace BizHawk.Client.EmuHawk //ToDo: //Make this better? //We need to have i at 1 and not zero because Controls Count doesn't start at zero (sort of) - Int32 i = 1; + var i = 1; //For Each Control box we have, loop foreach (Control ctrl in FileSelectorPanel.Controls) { diff --git a/src/BizHawk.Common/Log.cs b/src/BizHawk.Common/Log.cs index be6a88e1e0..8d9697f978 100644 --- a/src/BizHawk.Common/Log.cs +++ b/src/BizHawk.Common/Log.cs @@ -50,7 +50,7 @@ namespace BizHawk.Common { if (EnabledLogDomains.Contains(domain)) { - LogAction(String.Format(msg, vals)); + LogAction(string.Format(msg, vals)); } } 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 cd4806b90d..1c1669e3d9 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 @@ -8,38 +8,38 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// public static class StreamHelper { - public static void Write(Stream stream, Int32 value) + public static void Write(Stream stream, int value) { byte[] data = BitConverter.GetBytes(value); stream.Write(data, 0, data.Length); } - public static void Write(Stream stream, UInt32 value) + public static void Write(Stream stream, uint value) { byte[] data = BitConverter.GetBytes(value); stream.Write(data, 0, data.Length); } - public static void Write(Stream stream, Int16 value) + public static void Write(Stream stream, short value) { byte[] data = BitConverter.GetBytes(value); stream.Write(data, 0, data.Length); } - public static void Write(Stream stream, UInt16 value) + public static void Write(Stream stream, ushort value) { byte[] data = BitConverter.GetBytes(value); stream.Write(data, 0, data.Length); } - public static void Write(Stream stream, Byte value) + public static void Write(Stream stream, byte value) { byte[] data = new byte[1]; data[0] = value; stream.Write(data, 0, data.Length); } - public static void Write(Stream stream, SByte value) + public static void Write(Stream stream, sbyte value) { byte[] data = new byte[1]; data[0] = (byte)value; @@ -52,7 +52,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum } - public static void Read(Stream stream, out Int32 value) + public static void Read(Stream stream, out int value) { byte[] data = new byte[4]; stream.Read(data, 0, data.Length); @@ -61,35 +61,35 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum value = BitConverter.ToInt32(data, 0); } - public static void Read(Stream stream, out UInt32 value) + public static void Read(Stream stream, out uint value) { byte[] data = new byte[4]; stream.Read(data, 0, data.Length); value = BitConverter.ToUInt32(data, 0); } - public static void Read(Stream stream, out Int16 value) + public static void Read(Stream stream, out short value) { byte[] data = new byte[2]; stream.Read(data, 0, data.Length); value = BitConverter.ToInt16(data, 0); } - public static void Read(Stream stream, out UInt16 value) + public static void Read(Stream stream, out ushort value) { byte[] data = new byte[2]; stream.Read(data, 0, data.Length); value = BitConverter.ToUInt16(data, 0); } - public static void Read(Stream stream, out Byte value) + public static void Read(Stream stream, out byte value) { byte[] data = new byte[1]; stream.Read(data, 0, data.Length); value = data[0]; } - public static void Read(Stream stream, out SByte value) + public static void Read(Stream stream, out sbyte value) { byte[] data = new byte[1]; stream.Read(data, 0, data.Length); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavHeader.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavHeader.cs index abd3230469..1dcb626e61 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavHeader.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavHeader.cs @@ -10,24 +10,24 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum public class WavHeader { // RIFF chunk (12 bytes) - public Int32 chunkID; // "RIFF" - public Int32 fileSize; - public Int32 riffType; // "WAVE" + public int chunkID; // "RIFF" + public int fileSize; + public int riffType; // "WAVE" // Format chunk (24 bytes) - public Int32 fmtID; // "fmt " - public Int32 fmtSize; - public Int16 fmtCode; - public Int16 channels; - public Int32 sampleRate; - public Int32 fmtAvgBPS; - public Int16 fmtBlockAlign; - public Int16 bitDepth; - public Int16 fmtExtraSize; + public int fmtID; // "fmt " + public int fmtSize; + public short fmtCode; + public short channels; + public int sampleRate; + public int fmtAvgBPS; + public short fmtBlockAlign; + public short bitDepth; + public short fmtExtraSize; // Data chunk - public Int32 dataID; // "data" - public Int32 dataSize; // The data size should be file size - 36 bytes. + public int dataID; // "data" + public int dataSize; // The data size should be file size - 36 bytes. public void Deserialize(Stream stream) @@ -43,8 +43,8 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum { throw new FormatException($"Not supported RIFF type: '{Encoding.ASCII.GetString(BitConverter.GetBytes(riffType))}'"); } - Int32 chunkId; - Int32 chunkSize; + int chunkId; + int chunkSize; while (stream.Position < stream.Length) { StreamHelper.Read(stream, out chunkId); diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavStreamReader.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavStreamReader.cs index eafda0af6b..6cd2efa8c4 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavStreamReader.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/WAV/WavStreamReader.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum public int Count => m_header.dataSize / m_header.fmtBlockAlign; - public Int32 ReadNext() + public int ReadNext() { // check - sample should be in PCM format if (m_header.fmtCode != WAVE_FORMAT_PCM && @@ -54,19 +54,19 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum throw new NotSupportedException($"Not supported audio format ({(m_header.fmtCode == WAVE_FORMAT_PCM ? "PCM" : "FLOAT")}/{m_header.bitDepth} bit)"); } - private Int32 getSamplePcm8(byte[] bufferRaw, int offset, int channel) + private int getSamplePcm8(byte[] bufferRaw, int offset, int channel) { return bufferRaw[offset + channel] - 128; } - private Int32 getSamplePcm16(byte[] bufferRaw, int offset, int channel) + private int getSamplePcm16(byte[] bufferRaw, int offset, int channel) { return BitConverter.ToInt16(bufferRaw, offset + 2 * channel); } - private Int32 getSamplePcm24(byte[] bufferRaw, int offset, int channel) + private int getSamplePcm24(byte[] bufferRaw, int offset, int channel) { - Int32 result; + int result; int subOffset = offset + channel * 3; if (BitConverter.IsLittleEndian) { @@ -83,23 +83,23 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum return result; } - private Int32 getSamplePcm32(byte[] bufferRaw, int offset, int channel) + private int getSamplePcm32(byte[] bufferRaw, int offset, int channel) { return BitConverter.ToInt32(bufferRaw, offset + 4 * channel); } - private Int32 getSampleFloat32(byte[] data, int offset, int channel) + private int getSampleFloat32(byte[] data, int offset, int channel) { float fSample = BitConverter.ToSingle(data, offset + 4 * channel); // convert to 32 bit integer - return (Int32)(fSample * Int32.MaxValue); + return (int) (fSample * int.MaxValue); } - private Int32 getSampleFloat64(byte[] data, int offset, int channel) + private int getSampleFloat64(byte[] data, int offset, int channel) { double fSample = BitConverter.ToDouble(data, offset + 8 * channel); // convert to 32 bit integer - return (Int32)(fSample * Int32.MaxValue); + return (int) (fSample * int.MaxValue); } private const int WAVE_FORMAT_PCM = 1; /* PCM */ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/F8/F3850.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/F8/F3850.cs index e778b1cc20..06a9f9dc3b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/F8/F3850.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/F8/F3850.cs @@ -485,7 +485,7 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF // CYCLE LENGTH: L case ROMC_01: Read_Func(DB, PC0l, PC0h); - RegPC0 += (ushort)((SByte) Regs[DB]); + RegPC0 += (ushort)((sbyte) Regs[DB]); break; // The device whose DC0 address addresses a memory word within the address space of that device must place on the data bus the contents diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs index f5171b2f7f..e8bab2fa2f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs @@ -173,7 +173,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA public static extern void BizSetRegister(IntPtr ctx, int index, int value); [DllImport(dll, CallingConvention = cc)] - public static extern UInt64 BizGetGlobalTime(IntPtr ctx); + public static extern ulong BizGetGlobalTime(IntPtr ctx); [DllImport(dll, CallingConvention = cc)] public static extern void BizWriteBus(IntPtr ctx, uint addr, byte val); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs index 6bfedfa210..6633736105 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ITraceable.cs @@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 for (int i = 1; i < 32; i++) // r0 is always zero { - UInt64 val = (regs[GPRnames[i] + "_hi"].Value << 32) | regs[GPRnames[i] + "_lo"].Value; + var val = (regs[GPRnames[i] + "_hi"].Value << 32) | regs[GPRnames[i] + "_lo"].Value; string name = GPRnames[i]; sb.Append($"{name}:{val:X16} "); } @@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 for (int i = 0; i < 32; i++) // r0 is always zero { - UInt64 val = (regs["CP1 FGR REG" + i + "_hi"].Value << 32) | regs["CP1 FGR REG" + i + "_lo"].Value; + var val = (regs["CP1 FGR REG" + i + "_hi"].Value << 32) | regs["CP1 FGR REG" + i + "_lo"].Value; sb.Append($"f{i}:{val:X16} "); } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusVideoApi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusVideoApi.cs index af51702105..fd0ad53403 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusVideoApi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusVideoApi.cs @@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - private delegate Int32 GetScreenTextureID(); + private delegate int GetScreenTextureID(); GetScreenTextureID GFXGetScreenTextureID; public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings)