Emulation.Common - misc cleanups mostly fixing documentation
This commit is contained in:
parent
85ceed3b38
commit
183f5b0672
|
@ -20,7 +20,8 @@ namespace BizHawk.Emulation.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// create a NullSound that provides an exact number of audio samples per call when in sync mode
|
/// Initializes a new instance of the <see cref="NullSound"/> class
|
||||||
|
/// that provides an exact number of audio samples per call when in sync mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public NullSound(int spf)
|
public NullSound(int spf)
|
||||||
: this()
|
: this()
|
||||||
|
@ -30,7 +31,8 @@ namespace BizHawk.Emulation.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// create a NullSound that exactly matches a given framerate when in sync mode
|
/// Initializes a new instance of the <see cref="NullSound"/> class
|
||||||
|
/// that exactly matches a given framerate when in sync mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public NullSound(long fpsNum, long fpsDen)
|
public NullSound(long fpsNum, long fpsDen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,8 +25,6 @@ namespace BizHawk.Emulation.Common.Base_Implementations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add samples to be output. no queueing; must be drained every frame
|
/// Add samples to be output. no queueing; must be drained every frame
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="samples"></param>
|
|
||||||
/// <param name="nsamp"></param>
|
|
||||||
public void PutSamples(short[] samples, int nsamp)
|
public void PutSamples(short[] samples, int nsamp)
|
||||||
{
|
{
|
||||||
if (_nsamp != 0)
|
if (_nsamp != 0)
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace BizHawk.Emulation.Common
|
||||||
private static SerializationFactory CreateFactory(Type t)
|
private static SerializationFactory CreateFactory(Type t)
|
||||||
{
|
{
|
||||||
var fields = DeepEquality.GetAllFields(t)
|
var fields = DeepEquality.GetAllFields(t)
|
||||||
//.OrderBy(fi => (int)fi.GetManagedOffset()) // [StructLayout.Sequential] doesn't work with this
|
////.OrderBy(fi => (int)fi.GetManagedOffset()) // [StructLayout.Sequential] doesn't work with this
|
||||||
.OrderBy(fi => (int)Marshal.OffsetOf(t, fi.Name))
|
.OrderBy(fi => (int)Marshal.OffsetOf(t, fi.Name))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace BizHawk.Emulation.Common
|
namespace BizHawk.Emulation.Common
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This object fascilitates communications between client and core
|
/// This object facilitates communications between client and core
|
||||||
/// and is used by the IEmulator interface
|
/// and is used by the IEmulator interface
|
||||||
/// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use
|
/// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use
|
||||||
/// Any communications that can be described as purely a Core -> Client system, should be provided as an IEmulatorService instead
|
/// Any communications that can be described as purely a Core -> Client system, should be provided as an IEmulatorService instead
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
public interface IController
|
public interface IController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the controller schema, including all currently available buttons and their types
|
/// Gets a definition of the controller schema, including all currently available buttons and their types
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ControllerDefinition Definition { get; }
|
ControllerDefinition Definition { get; }
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,11 @@ namespace BizHawk.Emulation.Common
|
||||||
/// <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>
|
|
||||||
string DllPath();
|
string DllPath();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// produces a path that contains saveram... because libretro cores need it
|
/// produces a path that contains saveram... because libretro cores need it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
string GetRetroSaveRAMDirectory();
|
string GetRetroSaveRAMDirectory();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||||
namespace BizHawk.Emulation.Common
|
namespace BizHawk.Emulation.Common
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This interface defines the mechanism by which clients can retrive IEmulatorServices
|
/// This interface defines the mechanism by which clients can retrieve <seealso cref="IEmulatorService" />
|
||||||
/// from an IEmulator implementation
|
/// from an IEmulator implementation
|
||||||
/// An implementation should collect all available IEmulatorService instances.
|
/// An implementation should collect all available IEmulatorService instances.
|
||||||
/// This interface defines only the client interaction. This interface does not specify the means
|
/// This interface defines only the client interaction. This interface does not specify the means
|
||||||
|
@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns whether or not T is available
|
/// Returns whether or not T is available
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <typeparam name="T">The <seealso cref="IEmulatorService" /> to check</typeparam>
|
||||||
bool HasService<T>() where T : IEmulatorService;
|
bool HasService<T>() where T : IEmulatorService;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -29,6 +30,7 @@ namespace BizHawk.Emulation.Common
|
||||||
/// Returns an instance of T if T is available
|
/// Returns an instance of T if T is available
|
||||||
/// Else returns null
|
/// Else returns null
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <typeparam name="T">The requested <seealso cref="IEmulatorService" /></typeparam>
|
||||||
T GetService<T>() where T : IEmulatorService;
|
T GetService<T>() where T : IEmulatorService;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -38,7 +40,7 @@ namespace BizHawk.Emulation.Common
|
||||||
object GetService(Type t);
|
object GetService(Type t);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of all currently registered services available to be retrieved
|
/// Gets a list of all currently registered services available to be retrieved
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IEnumerable<Type> AvailableServices { get; }
|
IEnumerable<Type> AvailableServices { get; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,22 +18,22 @@ namespace BizHawk.Emulation.Common
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies whether or not Execute callbacks are available for this this implementation
|
/// Gets a value indicating whether or not Execute callbacks are available for this this implementation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool ExecuteCallbacksAvailable { get; }
|
bool ExecuteCallbacksAvailable { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns whether or not there are currently any read hooks
|
/// Gets a value indicating whether or not there are currently any read hooks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool HasReads { get; }
|
bool HasReads { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns whether or not there are currently any write hooks
|
/// Gets a value indicating whether or not there are currently any write hooks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool HasWrites { get; }
|
bool HasWrites { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns whether or not there are currently any execute hooks
|
/// Gets a value indicating whether or not there are currently any execute hooks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool HasExecutes { get; }
|
bool HasExecutes { get; }
|
||||||
|
|
||||||
|
@ -45,17 +45,17 @@ namespace BizHawk.Emulation.Common
|
||||||
void Add(IMemoryCallback callback);
|
void Add(IMemoryCallback callback);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes all Read callbacks for the given addr
|
/// Executes all Read callbacks for the given address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void CallReads(uint addr);
|
void CallReads(uint addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes all Write callbacks for the given addr
|
/// Executes all Write callbacks for the given address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void CallWrites(uint addr);
|
void CallWrites(uint addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes all Execute callbacks for the given addr
|
/// Executes all Execute callbacks for the given address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void CallExecutes(uint addr);
|
void CallExecutes(uint addr);
|
||||||
|
|
||||||
|
|
|
@ -5,30 +5,30 @@ using System.Collections.Generic;
|
||||||
namespace BizHawk.Emulation.Common
|
namespace BizHawk.Emulation.Common
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This service provides the means to generate disassembly by the core for a given cpu and memory domain
|
/// This service provides the means to generate disassembly by the core for a given CPU and memory domain
|
||||||
/// 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
|
/// 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 IDebuggable service is available
|
/// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the <seealso cref="IDebuggable"/> service is available
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDisassemblable : IEmulatorService
|
public interface IDisassemblable : IEmulatorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Cpu that will be used to disassemble
|
/// Gets or sets the CPUS that will be used to disassemble
|
||||||
/// Only values returned from AvailableCpus will be supported when Set
|
/// Only values returned from <seealso cref="AvailableCpus"/> will be supported when Set
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Cpu { get; set; }
|
string Cpu { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the name of the Program Counter Register for the current Cpu
|
/// Gets the name of the Program Counter Register for the current CPU
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string PCRegisterName { get; }
|
string PCRegisterName { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of Cpus that can be used when setting the Cpu property
|
/// Gets a list of CPUs that can be used when setting the CPU property
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IEnumerable<string> AvailableCpus { get; }
|
IEnumerable<string> AvailableCpus { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns a disassembly starting at addr lasting for length, using the given domain
|
/// Returns a disassembly starting at address lasting for length, using the given domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Disassemble(MemoryDomain m, uint addr, out int length);
|
string Disassemble(MemoryDomain m, uint addr, out int length);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Common
|
||||||
|
|
||||||
public abstract string Disassemble(MemoryDomain m, uint addr, out int length);
|
public abstract string Disassemble(MemoryDomain m, uint addr, out int length);
|
||||||
|
|
||||||
public VerifiedDisassembler()
|
protected VerifiedDisassembler()
|
||||||
{
|
{
|
||||||
_cpu = AvailableCpus.First();
|
_cpu = AvailableCpus.First();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
public interface ILinkable : ISpecializedEmulatorService
|
public interface ILinkable : ISpecializedEmulatorService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not the link cable is currently connected
|
/// Gets a value indicating whether or not the link cable is currently connected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool LinkConnected { get; }
|
bool LinkConnected { get; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
//bool Enabled { get; set; }
|
//bool Enabled { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The header that would be used by a trace logger
|
/// Gets the header that would be used by a trace logger
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Header { get; set; }
|
string Header { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -344,8 +344,6 @@ namespace BizHawk.Emulation.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// add a sample to the queue
|
/// add a sample to the queue
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="left"></param>
|
|
||||||
/// <param name="right"></param>
|
|
||||||
public void EnqueueSample(short left, short right)
|
public void EnqueueSample(short left, short right)
|
||||||
{
|
{
|
||||||
inbuf[inbufpos++] = left;
|
inbuf[inbufpos++] = left;
|
||||||
|
|
Loading…
Reference in New Issue