Emulation.Common - misc cleanups
This commit is contained in:
parent
f32ab2bf12
commit
ec545ae3a0
|
@ -1,6 +1,4 @@
|
||||||
//garbage
|
namespace BizHawk.Emulation.Common
|
||||||
|
|
||||||
namespace BizHawk.Emulation.Common
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A generic implementation of ITraceable that can be used by any core
|
/// A generic implementation of ITraceable that can be used by any core
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
// we could get a little list of crcs from here and make it clear which crc this class was for, and expose others
|
namespace BizHawk.Emulation.Common
|
||||||
// http://www.ross.net/crc/download/crc_v3.txt
|
|
||||||
namespace BizHawk.Emulation.Common
|
|
||||||
{
|
{
|
||||||
|
// we could get a little list of crcs from here and make it clear which crc this class was for, and expose others
|
||||||
|
// http://www.ross.net/crc/download/crc_v3.txt
|
||||||
// TODO - why am I here? put me alongside hash_md5 and such in a non-emulation-related class
|
// TODO - why am I here? put me alongside hash_md5 and such in a non-emulation-related class
|
||||||
public static class CRC32
|
public static class CRC32
|
||||||
{
|
{
|
||||||
// Lookup table for speed.
|
// Lookup table for speed.
|
||||||
private static readonly uint[] CRC32Table;
|
private static readonly uint[] Crc32Table;
|
||||||
|
|
||||||
static CRC32()
|
static CRC32()
|
||||||
{
|
{
|
||||||
CRC32Table = new uint[256];
|
Crc32Table = new uint[256];
|
||||||
for (uint i = 0; i < 256; ++i)
|
for (uint i = 0; i < 256; ++i)
|
||||||
{
|
{
|
||||||
uint crc = i;
|
uint crc = i;
|
||||||
|
@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CRC32Table[i] = crc;
|
Crc32Table[i] = crc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Common
|
||||||
uint result = 0xFFFFFFFF;
|
uint result = 0xFFFFFFFF;
|
||||||
foreach (var b in data)
|
foreach (var b in data)
|
||||||
{
|
{
|
||||||
result = (result >> 8) ^ CRC32Table[b ^ (result & 0xFF)];
|
result = (result >> 8) ^ Crc32Table[b ^ (result & 0xFF)];
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int)~result;
|
return (int)~result;
|
||||||
|
|
|
@ -8,13 +8,13 @@ namespace BizHawk.Emulation.Common
|
||||||
public interface ICoreFileProvider
|
public interface ICoreFileProvider
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Produces a path to the requested file, expected to be parallel to the running rom. for example: cue+bin files or sfc+pcm (MSU-1 games)
|
/// Produces a path to the requested file, expected to be parallel to the running rom. for example: cue+bin files or SFC+PCM (MSU-1 games)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
string PathSubfile(string fname);
|
string PathSubfile(string fname);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// produces a path that contains emulation related dll and exe files
|
/// produces a path that contains emulation related DLL and exe files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string DllPath();
|
string DllPath();
|
||||||
|
@ -47,13 +47,12 @@ namespace BizHawk.Emulation.Common
|
||||||
string GetFirmwarePath(string sysID, string firmwareID, bool required, string msg = null);
|
string GetFirmwarePath(string sysID, string firmwareID, bool required, string msg = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// get a firmware as a byte array
|
/// Get a firmware as a byte array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sysID"></param>
|
/// <param name="sysID">the core systemID</param>
|
||||||
/// <param name="firmwareID"></param>
|
/// <param name="firmwareID">the firmware id</param>
|
||||||
/// <param name="required">if true, result is guaranteed to be valid; else null is possible if not found</param>
|
/// <param name="required">if true, result is guaranteed to be valid; else null is possible if not found</param>
|
||||||
/// <param name="msg">message to show if fail to get</param>
|
/// <param name="msg">message to show if fail to get</param>
|
||||||
/// <returns></returns>
|
|
||||||
byte[] GetFirmware(string sysID, string firmwareID, bool required, string msg = null);
|
byte[] GetFirmware(string sysID, string firmwareID, bool required, string msg = null);
|
||||||
|
|
||||||
byte[] GetFirmwareWithGameInfo(string sysID, string firmwareID, bool required, out GameInfo gi, string msg = null);
|
byte[] GetFirmwareWithGameInfo(string sysID, string firmwareID, bool required, out GameInfo gi, string msg = null);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This service allows the core to dump a cpu trace to the client
|
/// This service allows the core to dump a CPU trace to the client
|
||||||
/// If available the Trace Logger tool will be available on the client
|
/// If available the Trace Logger tool will be available on the client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ITraceable : IEmulatorService
|
public interface ITraceable : IEmulatorService
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BMP/@EntryIndexedValue">BMP</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BMP/@EntryIndexedValue">BMP</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CDL/@EntryIndexedValue">CDL</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CDL/@EntryIndexedValue">CDL</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CGB/@EntryIndexedValue">CGB</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CGB/@EntryIndexedValue">CGB</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CRC/@EntryIndexedValue">CRC</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DB/@EntryIndexedValue">DB</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DB/@EntryIndexedValue">DB</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DMG/@EntryIndexedValue">DMG</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DMG/@EntryIndexedValue">DMG</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GB/@EntryIndexedValue">GB</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GB/@EntryIndexedValue">GB</s:String>
|
||||||
|
|
Loading…
Reference in New Issue