EXTERMINATE SPACES

This commit is contained in:
YoshiRulz 2021-05-08 07:10:42 +10:00
parent 8f7b01bffe
commit 3ea71a2dda
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
132 changed files with 262 additions and 259 deletions

View File

@ -389,8 +389,9 @@ namespace BizHawk.BizInvoke
il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldfld, field); il.Emit(OpCodes.Ldfld, field);
il.EmitCalli(OpCodes.Calli, il.EmitCalli(
nativeCall, OpCodes.Calli,
nativeCall,
returnType == typeof(bool) ? typeof(byte) : returnType, // undo winapi style bool garbage returnType == typeof(bool) ? typeof(byte) : returnType, // undo winapi style bool garbage
paramLoadInfos.Select(p => p.NativeType).ToArray()); paramLoadInfos.Select(p => p.NativeType).ToArray());

View File

@ -61,8 +61,11 @@ namespace BizHawk.BizInvoke
AllocationType flAllocationType, MemoryProtection flProtect); AllocationType flAllocationType, MemoryProtection flProtect);
[DllImport("kernel32.dll", SetLastError = true)] [DllImport("kernel32.dll", SetLastError = true)]
public static extern bool VirtualProtect(UIntPtr lpAddress, UIntPtr dwSize, public static extern bool VirtualProtect(
MemoryProtection flNewProtect, out MemoryProtection lpflOldProtect); UIntPtr lpAddress,
UIntPtr dwSize,
MemoryProtection flNewProtect,
out MemoryProtection lpflOldProtect);
[Flags] [Flags]
public enum AllocationType : uint public enum AllocationType : uint
@ -123,9 +126,13 @@ namespace BizHawk.BizInvoke
public static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); public static extern bool UnmapViewOfFile(IntPtr lpBaseAddress);
[DllImport("kernel32.dll")] [DllImport("kernel32.dll")]
public static extern IntPtr MapViewOfFileEx(IntPtr hFileMappingObject, public static extern IntPtr MapViewOfFileEx(
FileMapAccessType dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, IntPtr hFileMappingObject,
UIntPtr dwNumberOfBytesToMap, IntPtr lpBaseAddress); FileMapAccessType dwDesiredAccess,
uint dwFileOffsetHigh,
uint dwFileOffsetLow,
UIntPtr dwNumberOfBytesToMap,
IntPtr lpBaseAddress);
[Flags] [Flags]
public enum FileMapAccessType : uint public enum FileMapAccessType : uint

View File

@ -62,7 +62,7 @@ namespace BizHawk.Bizware.BizwareGL
/// <summary> /// <summary>
/// Closes this instance for for further resource loading. Will result in a texture atlasing operation. /// Closes this instance for for further resource loading. Will result in a texture atlasing operation.
/// If the close operation is forever, then internal backup copies of resources will be freed, but it can never be reopened. /// If the close operation is forever, then internal backup copies of resources will be freed, but it can never be reopened.
/// This function may take some time to run, as it is /// This function may take some time to run, as it is
/// </summary> /// </summary>
public void Close(bool forever = true) public void Close(bool forever = true)
{ {

View File

@ -3,7 +3,7 @@
public enum AttribUsage public enum AttribUsage
{ {
Unspecified, Unspecified,
Position, Position,
Color0, Color0,
Texcoord0, Texcoord1, Texcoord0, Texcoord1,
} }

View File

@ -525,7 +525,7 @@ namespace BizHawk.Bizware.BizwareGL
return; return;
} }
//note: we lock it as 32bpp even if the bitmap is 24bpp so we can write to it more conveniently. //note: we lock it as 32bpp even if the bitmap is 24bpp so we can write to it more conveniently.
var bmpdata = bmp.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); var bmpdata = bmp.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
if(bmpdata.Stride == bmpdata.Width*4) if(bmpdata.Stride == bmpdata.Width*4)

View File

@ -16,7 +16,7 @@ namespace BizHawk.Bizware.BizwareGL
public bool TransparentPalette0 = true; public bool TransparentPalette0 = true;
/// <summary> /// <summary>
/// Specifies whether (r,g,b,0) pixels shall be turned into (0,0,0,0). /// Specifies whether (r,g,b,0) pixels shall be turned into (0,0,0,0).
/// This is useful for cleaning up junk which you might not know you had littering purely transparent areas, which can mess up a lot of stuff during rendering. /// This is useful for cleaning up junk which you might not know you had littering purely transparent areas, which can mess up a lot of stuff during rendering.
/// </summary> /// </summary>
public bool CleanupAlpha0 = true; public bool CleanupAlpha0 = true;

View File

@ -65,12 +65,11 @@ namespace BizHawk.Bizware.BizwareGL
float[][] colorMatrixElements = float[][] colorMatrixElements =
{ {
new float[] {r, 0, 0, 0, 0}, new float[] { r, 0, 0, 0, 0 },
new float[] {0, g, 0, 0, 0}, new float[] { 0, g, 0, 0, 0 },
new float[] {0, 0, b, 0, 0}, new float[] { 0, 0, b, 0, 0 },
new float[] {0, 0, 0, a, 0}, new float[] { 0, 0, 0, a, 0 },
new float[] {0, 0, 0, 0, 1} new float[] { 0, 0, 0, 0, 1 },
}; };
var colorMatrix = new ColorMatrix(colorMatrixElements); var colorMatrix = new ColorMatrix(colorMatrixElements);

View File

@ -9,7 +9,7 @@ namespace BizHawk.Bizware.BizwareGL
/// This is a wrapper over OpenGL and direct3d to give a uniform interface /// This is a wrapper over OpenGL and direct3d to give a uniform interface
/// TODO - This really needs to be split up into an internal and a user interface. so many of the functions are made to support the smart wrappers /// TODO - This really needs to be split up into an internal and a user interface. so many of the functions are made to support the smart wrappers
/// Maybe make a method that returns an interface used for advanced methods (and IGL_TK could implement that as well and just "return this:") /// Maybe make a method that returns an interface used for advanced methods (and IGL_TK could implement that as well and just "return this:")
/// ///
/// NOTE: THIS SHOULD NOT BE ASSUMED TO BE THREAD SAFE! Make a new IGL if you want to use it in a new thread. I hope that will work... /// NOTE: THIS SHOULD NOT BE ASSUMED TO BE THREAD SAFE! Make a new IGL if you want to use it in a new thread. I hope that will work...
/// </summary> /// </summary>
public interface IGL : IDisposable public interface IGL : IDisposable

View File

@ -132,7 +132,7 @@ namespace BizHawk.Bizware.BizwareGL
private class RectangleBinPack private class RectangleBinPack
{ {
/** A node of a binary tree. Each node represents a rectangular area of the texture /** A node of a binary tree. Each node represents a rectangular area of the texture
we surface. Internal nodes store rectangles of used data, whereas leaf nodes track we surface. Internal nodes store rectangles of used data, whereas leaf nodes track
rectangles of free space. All the rectangles stored in the tree are disjoint. */ rectangles of free space. All the rectangles stored in the tree are disjoint. */
public class Node public class Node
{ {

View File

@ -375,7 +375,7 @@ namespace BizHawk.Bizware.DirectX
switch(item.Usage) switch(item.Usage)
{ {
case AttribUsage.Position: case AttribUsage.Position:
usage = DeclarationUsage.Position; usage = DeclarationUsage.Position;
break; break;
case AttribUsage.Texcoord0: case AttribUsage.Texcoord0:
usage = DeclarationUsage.TextureCoordinate; usage = DeclarationUsage.TextureCoordinate;

View File

@ -12,7 +12,7 @@ using sd = System.Drawing;
namespace BizHawk.Bizware.OpenTK3 namespace BizHawk.Bizware.OpenTK3
{ {
/// <summary> /// <summary>
/// A simple renderer useful for rendering GUI stuff. /// A simple renderer useful for rendering GUI stuff.
/// When doing GUI rendering, run everything through here (if you need a GL feature not done through here, run it through here first) /// When doing GUI rendering, run everything through here (if you need a GL feature not done through here, run it through here first)
/// Call Begin, then draw, then End, and don't use other Renderers or GL calls in the meantime, unless you know what you're doing. /// Call Begin, then draw, then End, and don't use other Renderers or GL calls in the meantime, unless you know what you're doing.
/// This can perform batching (well.. maybe not yet), which is occasionally necessary for drawing large quantities of things. /// This can perform batching (well.. maybe not yet), which is occasionally necessary for drawing large quantities of things.
@ -241,10 +241,10 @@ namespace BizHawk.Bizware.OpenTK3
else { v0 = art.v0; v1 = art.v1; } else { v0 = art.v0; v1 = art.v1; }
float[] data = new float[32] { float[] data = new float[32] {
x,y, u0,v0, CornerColors[0].X, CornerColors[0].Y, CornerColors[0].Z, CornerColors[0].W, x,y, u0,v0, CornerColors[0].X, CornerColors[0].Y, CornerColors[0].Z, CornerColors[0].W,
x+art.Width,y, u1,v0, CornerColors[1].X, CornerColors[1].Y, CornerColors[1].Z, CornerColors[1].W, x+art.Width,y, u1,v0, CornerColors[1].X, CornerColors[1].Y, CornerColors[1].Z, CornerColors[1].W,
x,y+art.Height, u0,v1, CornerColors[2].X, CornerColors[2].Y, CornerColors[2].Z, CornerColors[2].W, x,y+art.Height, u0,v1, CornerColors[2].X, CornerColors[2].Y, CornerColors[2].Z, CornerColors[2].W,
x+art.Width,y+art.Height, u1,v1, CornerColors[3].X, CornerColors[3].Y, CornerColors[3].Z, CornerColors[3].W, x+art.Width,y+art.Height, u1,v1, CornerColors[3].X, CornerColors[3].Y, CornerColors[3].Z, CornerColors[3].W,
}; };
Texture2d tex = art.BaseTexture; Texture2d tex = art.BaseTexture;

View File

@ -35,7 +35,7 @@ using VertexAttribPointerType = OpenTK.Graphics.OpenGL.VertexAttribPointerType;
namespace BizHawk.Bizware.OpenTK3 namespace BizHawk.Bizware.OpenTK3
{ {
/// <summary> /// <summary>
/// OpenTK implementation of the BizwareGL.IGL interface. /// OpenTK implementation of the BizwareGL.IGL interface.
/// TODO - can we have more than one of these? could be dangerous. such dangerous things to be possibly reconsidered are marked with HAMNUTS /// TODO - can we have more than one of these? could be dangerous. such dangerous things to be possibly reconsidered are marked with HAMNUTS
/// TODO - if we have any way of making contexts, we also need a way of freeing it, and then we can cleanup our dictionaries /// TODO - if we have any way of making contexts, we also need a way of freeing it, and then we can cleanup our dictionaries
/// </summary> /// </summary>
@ -76,7 +76,7 @@ namespace BizHawk.Bizware.OpenTK3
MakeDefaultCurrent(); MakeDefaultCurrent();
//this is important for reasons unknown //this is important for reasons unknown
GraphicsContext.LoadAll(); GraphicsContext.LoadAll();
//misc initialization //misc initialization
CreateRenderStates(); CreateRenderStates();
@ -395,7 +395,7 @@ namespace BizHawk.Bizware.OpenTK3
public void SetPipelineUniform(PipelineUniform uniform, bool value) public void SetPipelineUniform(PipelineUniform uniform, bool value)
{ {
GL.Uniform1((int)uniform.Sole.Opaque, value ? 1 : 0); GL.Uniform1((int) uniform.Sole.Opaque, value ? 1 : 0);
} }
public unsafe void SetPipelineUniformMatrix(PipelineUniform uniform, Matrix4 mat, bool transpose) public unsafe void SetPipelineUniformMatrix(PipelineUniform uniform, Matrix4 mat, bool transpose)
@ -826,12 +826,12 @@ namespace BizHawk.Bizware.OpenTK3
private void CreateRenderStates() private void CreateRenderStates()
{ {
_rsBlendNoneVerbatim = new CacheBlendState( _rsBlendNoneVerbatim = new CacheBlendState(
false, false,
BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero, BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero,
BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero); BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero);
_rsBlendNoneOpaque = new CacheBlendState( _rsBlendNoneOpaque = new CacheBlendState(
false, false,
BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero, BizGL.BlendingFactorSrc.One, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero,
BizGL.BlendingFactorSrc.ConstantAlpha, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero); BizGL.BlendingFactorSrc.ConstantAlpha, BizGL.BlendEquationMode.FuncAdd, BizGL.BlendingFactorDest.Zero);

View File

@ -69,10 +69,10 @@ namespace BizHawk.Client.Common
if (state == null) _inputManager.ButtonOverrideAdapter.UnSet(buttonToSet); if (state == null) _inputManager.ButtonOverrideAdapter.UnSet(buttonToSet);
else _inputManager.ButtonOverrideAdapter.SetButton(buttonToSet, state.Value); else _inputManager.ButtonOverrideAdapter.SetButton(buttonToSet, state.Value);
//"Overrides" is a gross line of code in that flushes overrides into the current controller. //"Overrides" is a gross line of code in that flushes overrides into the current controller.
//That's not really the way it was meant to work which was that it should pull all its values through the filters before ever using them. //That's not really the way it was meant to work which was that it should pull all its values through the filters before ever using them.
//Of course the code that does that is in the main loop and the lua API wouldnt know how to do it. //Of course the code that does that is in the main loop and the lua API wouldnt know how to do it.
//I regret the whole hotkey filter chain OOP soup approach. Anyway, the code that //I regret the whole hotkey filter chain OOP soup approach. Anyway, the code that
//in a crude, CRUDE, *CRUDE* approximation of what the main loop does, we need to pull the physical input again before it's freshly overridded //in a crude, CRUDE, *CRUDE* approximation of what the main loop does, we need to pull the physical input again before it's freshly overridded
//but really, everything the main loop does needs to be done here again. //but really, everything the main loop does needs to be done here again.

View File

@ -187,7 +187,7 @@ namespace BizHawk.Client.Common
public void SetBigEndian(bool enabled = true) => _isBigEndian = enabled; public void SetBigEndian(bool enabled = true) => _isBigEndian = enabled;
public List<string> GetMemoryDomainList() => public List<string> GetMemoryDomainList() =>
DomainList DomainList
.Select(domain => domain.Name) .Select(domain => domain.Name)
.ToList(); .ToList();

View File

@ -5,8 +5,8 @@ using BizHawk.Client.Common.FilterManager;
using BizHawk.Bizware.BizwareGL; using BizHawk.Bizware.BizwareGL;
// Here's how to make a filter: // Here's how to make a filter:
// 1. Reset your state entirely in Initialize(). // 1. Reset your state entirely in Initialize().
// The filter will be re-initialized several times while the chain is getting worked out, but not re-instantiated. // The filter will be re-initialized several times while the chain is getting worked out, but not re-instantiated.
// This is sort of annoying, but there's pretty good reasons for it (some external process has created the filters and set parameters needed to govern their chaining and surface properties) // This is sort of annoying, but there's pretty good reasons for it (some external process has created the filters and set parameters needed to govern their chaining and surface properties)
// 2. In Initialize(), be sure to use DeclareInput // 2. In Initialize(), be sure to use DeclareInput
// (something about PresizeInput()) // (something about PresizeInput())

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.Common.Filters
float widthScale = (float)targetWidth / sourceWidth; float widthScale = (float)targetWidth / sourceWidth;
float heightScale = (float)targetHeight / sourceHeight; float heightScale = (float)targetHeight / sourceHeight;
if (maintainAspect if (maintainAspect
// zero 20-jul-2014 - hacks upon hacks, this function needs rewriting // zero 20-jul-2014 - hacks upon hacks, this function needs rewriting
&& !maintainInteger && !maintainInteger
) )

View File

@ -287,7 +287,7 @@ namespace BizHawk.Client.Common.Filters
// apply all parameters to this shader.. even if it was meant for other shaders. kind of lame. // apply all parameters to this shader.. even if it was meant for other shaders. kind of lame.
if(Parameters != null) if(Parameters != null)
{ {
foreach (var kvp in Parameters) foreach (var kvp in Parameters)
{ {
if (kvp.Value is float value) if (kvp.Value is float value)

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
/// <summary> /// <summary>
/// encapsulates thread-safe concept of pending/current display surfaces, reusing buffers where matching /// encapsulates thread-safe concept of pending/current display surfaces, reusing buffers where matching
/// sizes are available and keeping them cleaned up when they don't seem like they'll need to be used anymore /// sizes are available and keeping them cleaned up when they don't seem like they'll need to be used anymore
/// </summary> /// </summary>
public class SwappableDisplaySurfaceSet<T> public class SwappableDisplaySurfaceSet<T>

View File

@ -112,8 +112,8 @@ namespace BizHawk.Client.Common
// you might think ideally we'd fetch the libretro core name from the core info inside it // you might think ideally we'd fetch the libretro core name from the core info inside it
// but that would involve spinning up excess libretro core instances, which probably isn't good for stability, no matter how much we wish otherwise, not to mention slow. // but that would involve spinning up excess libretro core instances, which probably isn't good for stability, no matter how much we wish otherwise, not to mention slow.
// moreover it's kind of complicated here, // moreover it's kind of complicated here,
// and finally, I think the DisplayName should really be file-based in all cases, since the user is going to be loading cores by filename and // and finally, I think the DisplayName should really be file-based in all cases, since the user is going to be loading cores by filename and
// this is related to the recent roms filename management. // this is related to the recent roms filename management.
// so, leave it. // so, leave it.
public OpenAdvanced_LibretroNoGame() public OpenAdvanced_LibretroNoGame()
{ {

View File

@ -37,7 +37,7 @@ namespace BizHawk.Client.Common
// read the entire contents of the file into memory. // read the entire contents of the file into memory.
// unfortunate in the case of large files, but that's what we've got to work with for now. // unfortunate in the case of large files, but that's what we've got to work with for now.
// if we're offset exactly 512 bytes from a 1024-byte boundary, // if we're offset exactly 512 bytes from a 1024-byte boundary,
// assume we have a header of that size. Otherwise, assume it's just all rom. // assume we have a header of that size. Otherwise, assume it's just all rom.
// Other 'recognized' header sizes may need to be added. // Other 'recognized' header sizes may need to be added.
int headerOffset = fileLength % BankSize; int headerOffset = fileLength % BankSize;
@ -56,8 +56,8 @@ namespace BizHawk.Client.Common
stream.Position = 0; stream.Position = 0;
stream.Read(FileData, 0, fileLength); stream.Read(FileData, 0, fileLength);
// if there was no header offset, RomData is equivalent to FileData // if there was no header offset, RomData is equivalent to FileData
// (except in cases where the original interleaved file data is necessary.. in that case we'll have problems.. // (except in cases where the original interleaved file data is necessary.. in that case we'll have problems..
// but this whole architecture is not going to withstand every peculiarity and be fast as well. // but this whole architecture is not going to withstand every peculiarity and be fast as well.
if (headerOffset == 0) if (headerOffset == 0)
{ {
@ -67,7 +67,7 @@ namespace BizHawk.Client.Common
file.Extension == ".pzx" || file.Extension == ".csw" || file.Extension == ".wav" || file.Extension == ".cdt") file.Extension == ".pzx" || file.Extension == ".csw" || file.Extension == ".wav" || file.Extension == ".cdt")
{ {
// these are not roms. unfortunately if treated as such there are certain edge-cases // these are not roms. unfortunately if treated as such there are certain edge-cases
// where a header offset is detected. This should mitigate this issue until a cleaner solution is found // where a header offset is detected. This should mitigate this issue until a cleaner solution is found
// (-Asnivor) // (-Asnivor)
RomData = FileData; RomData = FileData;
} }
@ -120,7 +120,7 @@ namespace BizHawk.Client.Common
private static byte[] DeInterleaveSMD(byte[] source) private static byte[] DeInterleaveSMD(byte[] source)
{ {
// SMD files are interleaved in pages of 16k, with the first 8k containing all // SMD files are interleaved in pages of 16k, with the first 8k containing all
// odd bytes and the second 8k containing all even bytes. // odd bytes and the second 8k containing all even bytes.
int size = source.Length; int size = source.Length;
if (size > 0x400000) if (size > 0x400000)

View File

@ -7,11 +7,11 @@ namespace BizHawk.Client.Common
{ {
// Generates SEMI-synchronous sound, or "buffered asynchronous" sound. // Generates SEMI-synchronous sound, or "buffered asynchronous" sound.
// This class will try as hard as it can to request the correct number of samples on each frame and then // This class will try as hard as it can to request the correct number of samples on each frame and then
// send them out to the sound card as it needs them. // send them out to the sound card as it needs them.
// However, it has minimum/maximum buffer targets and will request smaller or larger frames if it has to. // However, it has minimum/maximum buffer targets and will request smaller or larger frames if it has to.
// The ultimate goal of this strategy is to make MOST frames 100% correct, and if errors must occur, // The ultimate goal of this strategy is to make MOST frames 100% correct, and if errors must occur,
// concentrate it on a single frame, rather than distribute small errors across most frames, as // concentrate it on a single frame, rather than distribute small errors across most frames, as
// distributing error to most frames tends to result in persistently distorted audio, especially when // distributing error to most frames tends to result in persistently distorted audio, especially when
// sample playback is involved. // sample playback is involved.
@ -19,13 +19,13 @@ namespace BizHawk.Client.Common
/* /*
* Why use this, when each core has it's own Async sound output? * Why use this, when each core has it's own Async sound output?
* *
* It is true that each emulation core provides its own async sound output, either through directly * It is true that each emulation core provides its own async sound output, either through directly
* rendering to arbitrary buffers (pce not TurboCD, sms), or using one of the metaspus (nes, TurboCD). * rendering to arbitrary buffers (pce not TurboCD, sms), or using one of the metaspus (nes, TurboCD).
* *
* Unfortunately, the vecna metaspu is not perfect, and for maintaining near-realtime playback (the usual * Unfortunately, the vecna metaspu is not perfect, and for maintaining near-realtime playback (the usual
* situation which we want to optimize for), it simply sounds better with a BufferedAsync on top of it. * situation which we want to optimize for), it simply sounds better with a BufferedAsync on top of it.
* *
* TODO: BufferedAsync has some hard coded parameters that assume FPS = 60. make that more generalized. * TODO: BufferedAsync has some hard coded parameters that assume FPS = 60. make that more generalized.
* TODO: For systems that _really_ don't need BufferedAsync (pce not turbocd, sms), make a way to signal * TODO: For systems that _really_ don't need BufferedAsync (pce not turbocd, sms), make a way to signal
* that and then bypass the BufferedAsync. * that and then bypass the BufferedAsync.

View File

@ -4,7 +4,7 @@ using System.Linq;
namespace BizHawk.Client.Common.cheats namespace BizHawk.Client.Common.cheats
{ {
// TODO: // TODO:
public static class GbaGameSharkDecoder public static class GbaGameSharkDecoder
{ {
private static readonly uint[] GameSharkSeeds = { 0x09F4FBBDU, 0x9681884AU, 0x352027E9U, 0xF3DEE5A7U }; private static readonly uint[] GameSharkSeeds = { 0x09F4FBBDU, 0x9681884AU, 0x352027E9U, 0xF3DEE5A7U };

View File

@ -9,7 +9,7 @@ using System.Linq;
// public string DisplayName; // public string DisplayName;
// public string Bindings; // public string Bindings;
// } // }
// ...also. We should consider using something other than DisplayName for keying, maybe make a KEYNAME distinct from displayname. // ...also. We should consider using something other than DisplayName for keying, maybe make a KEYNAME distinct from displayname.
// displayname is OK for now though. // displayname is OK for now though.
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {

View File

@ -20,10 +20,10 @@
public enum EDispManagerAR public enum EDispManagerAR
{ {
None, None,
System, System,
// actually, custom SIZE (fixme on major release) // actually, custom SIZE (fixme on major release)
Custom, Custom,
CustomRatio CustomRatio
} }

View File

@ -48,7 +48,7 @@ namespace BizHawk.Client.Common
/// </summary> /// </summary>
public static PathEntry EntryWithFallback(this PathEntryCollection collection, string pathType, string systemId) public static PathEntry EntryWithFallback(this PathEntryCollection collection, string pathType, string systemId)
{ {
return (collection[systemId, pathType] return (collection[systemId, pathType]
?? collection[systemId, "Base"]) ?? collection[systemId, "Base"])
?? collection["Global", "Base"]; ?? collection["Global", "Base"];
} }

View File

@ -5,8 +5,8 @@
public const int DefaultCompressionLevelNormal = 1; public const int DefaultCompressionLevelNormal = 1;
public SaveStateType Type { get; set; } = SaveStateType.Binary; public SaveStateType Type { get; set; } = SaveStateType.Binary;
public int CompressionLevelNormal { get; set; } = DefaultCompressionLevelNormal; public int CompressionLevelNormal { get; set; } = DefaultCompressionLevelNormal;
public const int DefaultCompressionLevelRewind = 0; // this isn't actually used yet public const int DefaultCompressionLevelRewind = 0; // this isn't actually used yet
public int CompressionLevelRewind { get; set; } = DefaultCompressionLevelRewind; // this isn't actually used yet public int CompressionLevelRewind { get; set; } = DefaultCompressionLevelRewind; // this isn't actually used yet
public bool MakeBackups { get; set; } = true; public bool MakeBackups { get; set; } = true;
public bool SaveScreenshot { get; set; } = true; public bool SaveScreenshot { get; set; } = true;
public int BigScreenshotSize { get; set; } = 128 * 1024; public int BigScreenshotSize { get; set; } = 128 * 1024;

View File

@ -7,7 +7,7 @@
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AutoPatternBool"/> class. /// Initializes a new instance of the <see cref="AutoPatternBool"/> class.
/// A simple on/off pattern. /// A simple on/off pattern.
/// </summary> /// </summary>
public AutoPatternBool(int on, int off, bool skipLag = true, int offset = 0, int loop = 0) public AutoPatternBool(int on, int off, bool skipLag = true, int offset = 0, int loop = 0)

View File

@ -14,10 +14,10 @@ namespace BizHawk.Client.Common
public class InputManager public class InputManager
{ {
// the original source controller, bound to the user, sort of the "input" port for the chain, i think // the original source controller, bound to the user, sort of the "input" port for the chain, i think
public Controller ActiveController { get; set; } // TODO: private setter, add a method that takes both controllers in public Controller ActiveController { get; set; } // TODO: private setter, add a method that takes both controllers in
// rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController // rapid fire version on the user controller, has its own key bindings and is OR'ed against ActiveController
public AutofireController AutoFireController { get; set; } // TODO: private setter, add a method that takes both controllers in public AutofireController AutoFireController { get; set; } // TODO: private setter, add a method that takes both controllers in
// the "output" port for the controller chain. // the "output" port for the controller chain.
public CopyControllerAdapter ControllerOutput { get; } = new CopyControllerAdapter(); public CopyControllerAdapter ControllerOutput { get; } = new CopyControllerAdapter();

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
/// <summary> /// <summary>
/// Filters input for things called Up and Down while considering the client's AllowUD_LR option. /// Filters input for things called Up and Down while considering the client's AllowUD_LR option.
/// This is a bit gross but it is unclear how to do it more nicely /// This is a bit gross but it is unclear how to do it more nicely
/// </summary> /// </summary>
public class UdlrControllerAdapter : IInputAdapter public class UdlrControllerAdapter : IInputAdapter

View File

@ -12,7 +12,7 @@ namespace BizHawk.Client.Common
[Description("Functions related specifically to Nes Cores")] [Description("Functions related specifically to Nes Cores")]
public sealed class NESLuaLibrary : LuaLibraryBase public sealed class NESLuaLibrary : LuaLibraryBase
{ {
// TODO: // TODO:
// perhaps with the new core config system, one could // perhaps with the new core config system, one could
// automatically bring out all of the settings to a lua table, with names. that // automatically bring out all of the settings to a lua table, with names. that
// would be completely arbitrary and would remove the whole requirement for this mess // would be completely arbitrary and would remove the whole requirement for this mess

View File

@ -41,7 +41,7 @@ namespace BizHawk.Client.Common
// RetroEdit: I don't like how this is cycles per second instead of FPS. // RetroEdit: I don't like how this is cycles per second instead of FPS.
// It probably should be moved to a separate place. // It probably should be moved to a separate place.
["GB_Clock"] = 2097152.0, ["GB_Clock"] = 2097152.0,
["GBA"] = 262144.0 / 4389.0, // 59.7275005696 ["GBA"] = 262144.0 / 4389.0, // 59.7275005696
["GEN"] = 53693175 / (3420.0 * 262), ["GEN"] = 53693175 / (3420.0 * 262),
["GEN_PAL"] = 53203424 / (3420.0 * 313), ["GEN_PAL"] = 53203424 / (3420.0 * 313),

View File

@ -43,7 +43,7 @@ namespace BizHawk.Client.Common
message += subParts[i] + ' '; message += subParts[i] + ' ';
} }
Add(new Subtitle Add(new Subtitle
{ {
Frame = int.Parse(subParts[1]), Frame = int.Parse(subParts[1]),
X = int.Parse(subParts[2]), X = int.Parse(subParts[2]),

View File

@ -134,7 +134,7 @@ namespace BizHawk.Client.Common.movie.import
if (player == 1) if (player == 1)
{ {
controllers["Pause"] = controllers["Pause"] =
(((controllerState >> 6) & 0x1) != 0 && !isGameGear) (((controllerState >> 6) & 0x1) != 0 && !isGameGear)
|| (((controllerState >> 7) & 0x1) != 0 && isGameGear); || (((controllerState >> 7) & 0x1) != 0 && isGameGear);
} }

View File

@ -152,7 +152,7 @@ namespace BizHawk.Client.Common
// 024: UInt32 cheatListOffset // 024: UInt32 cheatListOffset
// 028: UInt32 cdRomIdOffset // 028: UInt32 cdRomIdOffset
// Source format is just the first up-to-8 alphanumeric characters of the CD label, // Source format is just the first up-to-8 alphanumeric characters of the CD label,
// so not so useful. // so not so useful.
br.ReadBytes(20); br.ReadBytes(20);
@ -172,7 +172,7 @@ namespace BizHawk.Client.Common
var settings = new Octoshock.SyncSettings(); var settings = new Octoshock.SyncSettings();
var controllers = new SimpleController(); var controllers = new SimpleController();
settings.FIOConfig.Devices8 = new[] settings.FIOConfig.Devices8 = new[]
{ {
info.Player1Type, info.Player1Type,
OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None, OctoshockDll.ePeripheralType.None,
info.Player2Type, info.Player2Type,

View File

@ -18,7 +18,7 @@ namespace BizHawk.Client.Common
ZwinderStateManagerSettings Settings { get; } ZwinderStateManagerSettings Settings { get; }
/// <summary> /// <summary>
/// Requests that the current emulator state be captured /// Requests that the current emulator state be captured
/// Unless force is true, the state may or may not be captured depending on the logic employed by "green-zone" management /// Unless force is true, the state may or may not be captured depending on the logic employed by "green-zone" management
/// </summary> /// </summary>
void Capture(int frame, IStatable source, bool force = false); void Capture(int frame, IStatable source, bool force = false);

View File

@ -8,7 +8,7 @@ using BizHawk.Common;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
internal class TempFileStateDictionary : IDictionary<int, byte[]>, IDisposable internal class TempFileStateDictionary : IDictionary<int, byte[]>, IDisposable
{ {
private readonly IDictionary<int, Stream> _streams = new Dictionary<int, Stream>(); private readonly IDictionary<int, Stream> _streams = new Dictionary<int, Stream>();
public byte[] this[int key] public byte[] this[int key]

View File

@ -356,7 +356,7 @@ namespace BizHawk.Client.Common
state.GetReadStream().CopyTo(s); state.GetReadStream().CopyTo(s);
AddStateCache(state.Frame); AddStateCache(state.Frame);
}, },
index2 => index2 =>
{ {
var state2 = _recent.GetState(index2); var state2 = _recent.GetState(index2);
StateCache.Remove(state2.Frame); StateCache.Remove(state2.Frame);

View File

@ -354,7 +354,7 @@ namespace BizHawk.Client.Common
private sealed class SaveStateStream : Stream, ISpanStream private sealed class SaveStateStream : Stream, ISpanStream
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="backingStore">The ringbuffer to write into</param> /// <param name="backingStore">The ringbuffer to write into</param>
/// <param name="offset">Offset into the buffer to start writing (and treat as position 0 in the stream)</param> /// <param name="offset">Offset into the buffer to start writing (and treat as position 0 in the stream)</param>

View File

@ -223,7 +223,7 @@ namespace BizHawk.Client.Common
public bool IsActive(MemoryDomain domain, long address) public bool IsActive(MemoryDomain domain, long address)
{ {
return _cheatList.Any(cheat => return _cheatList.Any(cheat =>
!cheat.IsSeparator && !cheat.IsSeparator &&
cheat.Enabled && cheat.Enabled &&
cheat.Domain == domain cheat.Domain == domain

View File

@ -34,7 +34,7 @@
void Restart(); void Restart();
/// <summary> /// <summary>
/// This gives the opportunity for the tool dialog to ask the user to save changes (such is necessary when /// This gives the opportunity for the tool dialog to ask the user to save changes (such is necessary when
/// This tool dialog edits a file. Returning false will tell the client the user wants to cancel the given action, /// This tool dialog edits a file. Returning false will tell the client the user wants to cancel the given action,
/// Return false to tell the client to back out of an action (such as closing the emulator) /// Return false to tell the client to back out of an action (such as closing the emulator)
/// </summary> /// </summary>

View File

@ -13,7 +13,7 @@ namespace BizHawk.Client.DiscoHawk
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e) private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{ {
System.Diagnostics.Process.Start(e.LinkText); System.Diagnostics.Process.Start(e.LinkText);
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)

View File

@ -11,7 +11,7 @@ namespace BizHawk.Client.DiscoHawk
public partial class MainDiscoForm : Form public partial class MainDiscoForm : Form
{ {
// Release TODO: // Release TODO:
// An input (queue) list // An input (queue) list
// An outputted list showing new file name // An outputted list showing new file name
// Progress bar should show file being converted // Progress bar should show file being converted
// Add disc button, which puts it on the progress cue (converts it) // Add disc button, which puts it on the progress cue (converts it)

View File

@ -184,10 +184,10 @@ namespace BizHawk.Client.EmuHawk
{ {
// this writer will never support this capability // this writer will never support this capability
// but it needs to for syncless recorder, otherwise it won't work at all // but it needs to for syncless recorder, otherwise it won't work at all
if (W is SynclessRecorder) if (W is SynclessRecorder)
{ {
W.SetFrame(frame); W.SetFrame(frame);
} }
} }

View File

@ -13,7 +13,7 @@ using BizHawk.Emulation.Common;
// some helpful p/invoke from http://www.codeproject.com/KB/audio-video/Motion_Detection.aspx?msg=1142967 // some helpful p/invoke from http://www.codeproject.com/KB/audio-video/Motion_Detection.aspx?msg=1142967
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
[VideoWriter("vfwavi", "AVI writer", [VideoWriter("vfwavi", "AVI writer",
"Uses the Microsoft AVIFIL32 system to write .avi files. Audio is uncompressed; Video can be compressed with any installed VCM codec. Splits on 2G and resolution change.")] "Uses the Microsoft AVIFIL32 system to write .avi files. Audio is uncompressed; Video can be compressed with any installed VCM codec. Splits on 2G and resolution change.")]
internal class AviWriter : IVideoWriter internal class AviWriter : IVideoWriter
{ {

View File

@ -173,7 +173,7 @@ namespace BizHawk.Client.EmuHawk
config.FFmpegFormat = ret.ToString(); config.FFmpegFormat = ret.ToString();
if (ret.Custom) if (ret.Custom)
{ {
ret.Commandline = ret.Commandline =
config.FFmpegCustomCommand = config.FFmpegCustomCommand =
dlg.textBox1.Text; dlg.textBox1.Text;

View File

@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
CoreNameLabel.Text = attributes.CoreName; CoreNameLabel.Text = attributes.CoreName;
if (!string.IsNullOrEmpty(attributes.Author)) if (!string.IsNullOrEmpty(attributes.Author))
{ {
CoreAuthorLabel.Text = $"authors: {attributes.Author}"; CoreAuthorLabel.Text = $"authors: {attributes.Author}";
} }
else else

View File

@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls
public void Dispose() public void Dispose()
{ {
// Nothing to do // Nothing to do
// Other drawing methods need a way to dispose on demand, hence the need for // Other drawing methods need a way to dispose on demand, hence the need for
// this dummy class // this dummy class
} }
} }

View File

@ -24,7 +24,7 @@ namespace BizHawk.Client.EmuHawk
{ {
string txt = txtException.Text; string txt = txtException.Text;
Clipboard.SetText(txt); Clipboard.SetText(txt);
try try
{ {
if (Clipboard.GetText() == txt) if (Clipboard.GetText() == txt)
{ {

View File

@ -310,7 +310,7 @@ namespace BizHawk.Client.EmuHawk
public bool AllowColumnReorder { get; set; } public bool AllowColumnReorder { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether the entire row will always be selected /// Gets or sets a value indicating whether the entire row will always be selected
/// </summary> /// </summary>
[Category("Appearance")] [Category("Appearance")]
[DefaultValue(false)] [DefaultValue(false)]

View File

@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk
new SpecialBindingInfo { BindingName = "WMouse L", TooltipText = "Binds the left mouse button" }, new SpecialBindingInfo { BindingName = "WMouse L", TooltipText = "Binds the left mouse button" },
new SpecialBindingInfo { BindingName = "WMouse M", TooltipText = "Binds the middle mouse button" }, new SpecialBindingInfo { BindingName = "WMouse M", TooltipText = "Binds the middle mouse button" },
new SpecialBindingInfo { BindingName = "WMouse R", TooltipText = "Binds the right mouse button" }, new SpecialBindingInfo { BindingName = "WMouse R", TooltipText = "Binds the right mouse button" },
new SpecialBindingInfo { BindingName = "WMouse 1", TooltipText = "Binds the mouse auxiliary button 1" }, new SpecialBindingInfo { BindingName = "WMouse 1", TooltipText = "Binds the mouse auxiliary button 1" },
new SpecialBindingInfo { BindingName = "WMouse 2", TooltipText = "Binds the mouse auxiliary button 2" } new SpecialBindingInfo { BindingName = "WMouse 2", TooltipText = "Binds the mouse auxiliary button 2" }
}; };

View File

@ -46,7 +46,7 @@ namespace BizHawk.Client.EmuHawk
using (var brush = new SolidBrush(_checkBackColor)) using (var brush = new SolidBrush(_checkBackColor))
pevent.Graphics.FillRectangle(brush, glyphLoc); pevent.Graphics.FillRectangle(brush, glyphLoc);
// draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl) // draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl)
bool c = CheckState == CheckState.Checked; bool c = CheckState == CheckState.Checked;
if (ForceChecked.HasValue) if (ForceChecked.HasValue)
{ {

View File

@ -684,7 +684,7 @@ namespace BizHawk.Client.EmuHawk
for (int i = 1; i < zoom;i++) for (int i = 1; i < zoom;i++)
{ {
//would not be good to run this per frame, but it seems to only run when the resolution changes, etc. //would not be good to run this per frame, but it seems to only run when the resolution changes, etc.
Vector2[] trials = Vector2[] trials =
{ {
PS + new Vector2(1, 0), PS + new Vector2(1, 0),
PS + new Vector2(0, 1), PS + new Vector2(0, 1),

View File

@ -138,7 +138,7 @@ namespace BizHawk.Client.EmuHawk.ToolExtensions
//in any case, make a menuitem to let you remove the item //in any case, make a menuitem to let you remove the item
var tsmiRemovePath = new ToolStripMenuItem { Text = "&Remove" }; var tsmiRemovePath = new ToolStripMenuItem { Text = "&Remove" };
tsmiRemovePath.Click += (o, ev) => { tsmiRemovePath.Click += (o, ev) => {
recent.Remove(path); recent.Remove(path);
}; };
tsdd.Items.Add(tsmiRemovePath); tsdd.Items.Add(tsmiRemovePath);

View File

@ -180,7 +180,7 @@ namespace BizHawk.Client.EmuHawk
{ {
AllowWrap = false // must be an independent resource AllowWrap = false // must be an independent resource
}; };
var bb = new BitmapBuffer(tw.SDBitmap, blow); var bb = new BitmapBuffer(tw.SDBitmap, blow);
return bb; return bb;
} }
@ -220,7 +220,7 @@ namespace BizHawk.Client.EmuHawk
// ret.M42 = dims.Height; // ret.M42 = dims.Height;
// return ret; // return ret;
//} //}
//else //else
return Matrix4.Identity; return Matrix4.Identity;
} }

View File

@ -26,7 +26,7 @@
bool WantsToControlReadOnly { get; } bool WantsToControlReadOnly { get; }
/// <summary> /// <summary>
/// Function that is called by Mainform instead of using its own code /// Function that is called by Mainform instead of using its own code
/// when a Tool sets WantsToControlReadOnly. /// when a Tool sets WantsToControlReadOnly.
/// Should not be called directly. /// Should not be called directly.
/// </summary> /// </summary>
@ -35,7 +35,7 @@
bool WantsToControlStopMovie { get; } bool WantsToControlStopMovie { get; }
/// <summary> /// <summary>
/// Function that is called by Mainform instead of using its own code /// Function that is called by Mainform instead of using its own code
/// when a Tool sets WantsToControlStopMovie. /// when a Tool sets WantsToControlStopMovie.
/// Should not be called directly. /// Should not be called directly.
/// <remarks>Like MainForm's StopMovie(), saving the movie is part of this function's responsibility.</remarks> /// <remarks>Like MainForm's StopMovie(), saving the movie is part of this function's responsibility.</remarks>

View File

@ -132,7 +132,7 @@ namespace BizHawk.Client.EmuHawk
Adapter.FirstInitAll(mainFormHandle); Adapter.FirstInitAll(mainFormHandle);
_updateThread = new Thread(UpdateThreadProc) _updateThread = new Thread(UpdateThreadProc)
{ {
IsBackground = true, IsBackground = true,
Priority = ThreadPriority.AboveNormal // why not? this thread shouldn't be very heavy duty, and we want it to be responsive Priority = ThreadPriority.AboveNormal // why not? this thread shouldn't be very heavy duty, and we want it to be responsive
}; };
_updateThread.Start(); _updateThread.Start();
@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk
if (EnableIgnoreModifiers && currentModifier != ModifierKey.None) return; if (EnableIgnoreModifiers && currentModifier != ModifierKey.None) return;
if (_lastState[button] == newState) return; if (_lastState[button] == newState) return;
// apply // apply
// NOTE: this is not quite right. if someone held leftshift+rightshift it would be broken. seems unlikely, though. // NOTE: this is not quite right. if someone held leftshift+rightshift it would be broken. seems unlikely, though.
if (currentModifier != ModifierKey.None) if (currentModifier != ModifierKey.None)
{ {

View File

@ -178,7 +178,7 @@ namespace BizHawk.Client.EmuHawk
SaveMovieMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Save Movie"].Bindings; SaveMovieMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Save Movie"].Bindings;
PlayMovieMenuItem.Enabled PlayMovieMenuItem.Enabled
= ImportMoviesMenuItem.Enabled = ImportMoviesMenuItem.Enabled
= RecentMovieSubMenu.Enabled = RecentMovieSubMenu.Enabled
= !Tools.IsLoaded<TAStudio>(); = !Tools.IsLoaded<TAStudio>();
@ -1715,7 +1715,7 @@ namespace BizHawk.Client.EmuHawk
{ {
N64PluginSettingsMenuItem.Enabled = N64PluginSettingsMenuItem.Enabled =
N64ControllerSettingsMenuItem.Enabled = N64ControllerSettingsMenuItem.Enabled =
N64ExpansionSlotMenuItem.Enabled = N64ExpansionSlotMenuItem.Enabled =
MovieSession.Movie.NotActive(); MovieSession.Movie.NotActive();
N64CircularAnalogRangeMenuItem.Checked = Config.N64UseCircularAnalogConstraint; N64CircularAnalogRangeMenuItem.Checked = Config.N64UseCircularAnalogConstraint;

View File

@ -223,15 +223,15 @@ namespace BizHawk.Client.EmuHawk
/* /*
* Refactor, moving the loading of particular files into separate functions that can * Refactor, moving the loading of particular files into separate functions that can
* then be used by this code, and loading individual files through the file dialogue. * then be used by this code, and loading individual files through the file dialogue.
* *
* Step 1: * Step 1:
* Build a dictionary of relevant files from everything that was dragged and dropped. * Build a dictionary of relevant files from everything that was dragged and dropped.
* This includes peeking into all relevant archives and using their files. * This includes peeking into all relevant archives and using their files.
* *
* Step 2: * Step 2:
* Perhaps ask the user which of a particular file type they want to use. * Perhaps ask the user which of a particular file type they want to use.
* Example: rom1.nes, rom2.smc, rom3.cue are drag-dropped, ask the user which they want to use. * Example: rom1.nes, rom2.smc, rom3.cue are drag-dropped, ask the user which they want to use.
* *
* Step 3: * Step 3:
* Load all of the relevant files, in priority order: * Load all of the relevant files, in priority order:
* 1) The ROM * 1) The ROM
@ -242,7 +242,7 @@ namespace BizHawk.Client.EmuHawk
* 6) LUA scripts * 6) LUA scripts
* 7) Cheat files * 7) Cheat files
* 8) Movie Playback Files * 8) Movie Playback Files
* *
* Bonus: * Bonus:
* Make that order easy to change in the code, heavily suggesting ROM and playback as first and last respectively. * Make that order easy to change in the code, heavily suggesting ROM and playback as first and last respectively.
*/ */

View File

@ -33,10 +33,10 @@ namespace BizHawk.Client.EmuHawk
case "Hard Reset": case "Hard Reset":
HardReset(); HardReset();
break; break;
case "Quick Load": case "Quick Load":
LoadQuickSave($"QuickSave{Config.SaveSlot}"); LoadQuickSave($"QuickSave{Config.SaveSlot}");
break; break;
case "Quick Save": case "Quick Save":
SaveQuickSave($"QuickSave{Config.SaveSlot}"); SaveQuickSave($"QuickSave{Config.SaveSlot}");
break; break;
case "Clear Autohold": case "Clear Autohold":
@ -96,7 +96,7 @@ namespace BizHawk.Client.EmuHawk
MainMenuStrip.Visible ^= true; MainMenuStrip.Visible ^= true;
break; break;
case "Volume Up": case "Volume Up":
VolumeUp(); VolumeUp();
break; break;
case "Volume Down": case "Volume Down":
VolumeDown(); VolumeDown();
@ -140,17 +140,17 @@ namespace BizHawk.Client.EmuHawk
break; break;
// Save States // Save States
case "Save State 0": case "Save State 0":
SaveQuickSave("QuickSave0"); SaveQuickSave("QuickSave0");
Config.SaveSlot = 0; Config.SaveSlot = 0;
UpdateStatusSlots(); UpdateStatusSlots();
break; break;
case "Save State 1": case "Save State 1":
SaveQuickSave("QuickSave1"); SaveQuickSave("QuickSave1");
Config.SaveSlot = 1; Config.SaveSlot = 1;
UpdateStatusSlots(); UpdateStatusSlots();
break; break;
case "Save State 2": case "Save State 2":
SaveQuickSave("QuickSave2"); SaveQuickSave("QuickSave2");
Config.SaveSlot = 2; Config.SaveSlot = 2;
UpdateStatusSlots(); UpdateStatusSlots();
@ -292,16 +292,16 @@ namespace BizHawk.Client.EmuHawk
PlayMovieMenuItem_Click(null, null); PlayMovieMenuItem_Click(null, null);
break; break;
case "Record Movie": case "Record Movie":
RecordMovieMenuItem_Click(null, null); RecordMovieMenuItem_Click(null, null);
break; break;
case "Stop Movie": case "Stop Movie":
StopMovie(); StopMovie();
break; break;
case "Play from beginning": case "Play from beginning":
RestartMovie(); RestartMovie();
break; break;
case "Save Movie": case "Save Movie":
SaveMovie(); SaveMovie();
break; break;
// Tools // Tools

View File

@ -134,7 +134,7 @@ namespace BizHawk.Client.EmuHawk
.ToList(); .ToList();
try try
{ {
int foundIndex = enabled.FindIndex(tuple => int foundIndex = enabled.FindIndex(tuple =>
tuple.Item1 == requestedExtToolDll tuple.Item1 == requestedExtToolDll
|| Path.GetFileName(tuple.Item1) == requestedExtToolDll || Path.GetFileName(tuple.Item1) == requestedExtToolDll
|| Path.GetFileNameWithoutExtension(tuple.Item1) == requestedExtToolDll); || Path.GetFileNameWithoutExtension(tuple.Item1) == requestedExtToolDll);
@ -1010,7 +1010,7 @@ namespace BizHawk.Client.EmuHawk
// ordinarily, an alt release with nothing else would move focus to the MenuBar. but that is sort of useless, and hard to implement exactly right. // ordinarily, an alt release with nothing else would move focus to the MenuBar. but that is sort of useless, and hard to implement exactly right.
} }
// zero 09-sep-2012 - all input is eligible for controller input. not sure why the above was done. // zero 09-sep-2012 - all input is eligible for controller input. not sure why the above was done.
// maybe because it doesn't make sense to me to bind hotkeys and controller inputs to the same keystrokes // maybe because it doesn't make sense to me to bind hotkeys and controller inputs to the same keystrokes
bool handled; bool handled;
@ -1297,7 +1297,7 @@ namespace BizHawk.Client.EmuHawk
// Work around an AMD driver bug in >= vista: // Work around an AMD driver bug in >= vista:
// It seems windows will activate opengl fullscreen mode when a GL control is occupying the exact space of a screen (0,0 and dimensions=screensize) // It seems windows will activate opengl fullscreen mode when a GL control is occupying the exact space of a screen (0,0 and dimensions=screensize)
// AMD cards manifest a problem under these circumstances, flickering other monitors. // AMD cards manifest a problem under these circumstances, flickering other monitors.
// It isn't clear whether nvidia cards are failing to employ this optimization, or just not flickering. // It isn't clear whether nvidia cards are failing to employ this optimization, or just not flickering.
// (this could be determined with more work; other side affects of the fullscreen mode include: corrupted TaskBar, no modal boxes on top of GL control, no screenshots) // (this could be determined with more work; other side affects of the fullscreen mode include: corrupted TaskBar, no modal boxes on top of GL control, no screenshots)
// At any rate, we can solve this by adding a 1px black border around the GL control // At any rate, we can solve this by adding a 1px black border around the GL control
@ -1307,7 +1307,7 @@ namespace BizHawk.Client.EmuHawk
&& Config.DispMethod == EDispMethod.OpenGL) && Config.DispMethod == EDispMethod.OpenGL)
{ {
// ATTENTION: this causes the StatusBar to not work well, since the backcolor is now set to black instead of SystemColors.Control. // ATTENTION: this causes the StatusBar to not work well, since the backcolor is now set to black instead of SystemColors.Control.
// It seems that some StatusBar elements composite with the backcolor. // It seems that some StatusBar elements composite with the backcolor.
// Maybe we could add another control under the StatusBar. with a different backcolor // Maybe we could add another control under the StatusBar. with a different backcolor
Padding = new Padding(1); Padding = new Padding(1);
BackColor = Color.Black; BackColor = Color.Black;
@ -4688,7 +4688,7 @@ namespace BizHawk.Client.EmuHawk
_singleInstanceServer.EndWaitForConnection(iAsyncResult); _singleInstanceServer.EndWaitForConnection(iAsyncResult);
//a bit over-engineered in case someone wants to send a script or a rom or something //a bit over-engineered in case someone wants to send a script or a rom or something
//buffer size is set to something tiny so that we are continually testing it //buffer size is set to something tiny so that we are continually testing it
var payloadBytes = new MemoryStream(); var payloadBytes = new MemoryStream();
while (true) while (true)
{ {

View File

@ -270,7 +270,7 @@ namespace BizHawk.Client.EmuHawk
fixed (int* dstp = dst) fixed (int* dstp = dst)
{ {
using (new SimpleTime("Blit")) using (new SimpleTime("Blit"))
{ {
Blit(new BMP Blit(new BMP
{ {
Data = (int*)srcp, Data = (int*)srcp,
@ -316,7 +316,7 @@ namespace BizHawk.Client.EmuHawk
fixed (byte* dstp = dst) fixed (byte* dstp = dst)
{ {
using (new SimpleTime("Blit")) using (new SimpleTime("Blit"))
{ {
Blit(new BMP Blit(new BMP
{ {
Data = srcp, Data = srcp,

View File

@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk
// try compiling it // try compiling it
bool ok = false; bool ok = false;
string errors = ""; string errors = "";
try try
{ {
var filter = new RetroShaderChain(_gl, cgp, Path.GetDirectoryName(choice)); var filter = new RetroShaderChain(_gl, cgp, Path.GetDirectoryName(choice));
ok = filter.Available; ok = filter.Available;

View File

@ -16,7 +16,7 @@ using BizHawk.Emulation.Common;
// notes: eventually, we intend to have a "firmware acquisition interface" exposed to the emulator cores. // notes: eventually, we intend to have a "firmware acquisition interface" exposed to the emulator cores.
// it will be implemented by EmuHawk, and use firmware keys to fetch the firmware content. // it will be implemented by EmuHawk, and use firmware keys to fetch the firmware content.
// however, for now, the cores are using strings from the config class. so we have the `configMember` which is // however, for now, the cores are using strings from the config class. so we have the `configMember` which is
// used by reflection to set the configuration for firmwares which were found // used by reflection to set the configuration for firmwares which were found
// TODO - we may eventually need to add a progress dialog for this. we should have one for other reasons. // TODO - we may eventually need to add a progress dialog for this. we should have one for other reasons.
@ -119,7 +119,7 @@ namespace BizHawk.Client.EmuHawk
InitializeComponent(); InitializeComponent();
tbbGroup.Image tbbGroup.Image
= tbbScan.Image = tbbScan.Image
= tbbOrganize.Image = tbbOrganize.Image
= tbbImport.Image = tbbImport.Image
= tbbClose.Image = tbbClose.Image
@ -402,12 +402,12 @@ namespace BizHawk.Client.EmuHawk
try try
{ {
File.Move(fpSource, fpTarget); File.Move(fpSource, fpTarget);
} }
catch catch
{ {
// sometimes moves fail. especially in newer versions of windows with explorers more fragile than your great-grandma. // sometimes moves fail. especially in newer versions of windows with explorers more fragile than your great-grandma.
// I am embarrassed that I know that. about windows, not your great-grandma. // I am embarrassed that I know that. about windows, not your great-grandma.
} }
} }
@ -715,7 +715,7 @@ namespace BizHawk.Client.EmuHawk
if (_cbAllowImport.Checked || Manager.CanFileBeImported(hf.CanonicalFullPath)) if (_cbAllowImport.Checked || Manager.CanFileBeImported(hf.CanonicalFullPath))
{ {
didSomething |= RunImportJobSingle(basePath, f, ref errors); didSomething |= RunImportJobSingle(basePath, f, ref errors);
} }
} }
} }

View File

@ -36,8 +36,8 @@ namespace BizHawk.Client.EmuHawk
private void ColorPanel_Click(object sender, EventArgs e) private void ColorPanel_Click(object sender, EventArgs e)
{ {
using var colorPicker = new ColorDialog using var colorPicker = new ColorDialog
{ {
FullOpen = true, Color = Color.FromArgb(_selectedColor) FullOpen = true, Color = Color.FromArgb(_selectedColor)
}; };

View File

@ -82,8 +82,8 @@ namespace BizHawk.Client.EmuHawk
int y = 12; int y = 12;
foreach (var position in Positions) foreach (var position in Positions)
{ {
var row = new MessageRow var row = new MessageRow
{ {
Name = position.Key, Name = position.Key,
Location = new Point(10, y) Location = new Point(10, y)
}; };
@ -106,7 +106,7 @@ namespace BizHawk.Client.EmuHawk
int y = 20; int y = 20;
foreach (var color in Colors) foreach (var color in Colors)
{ {
var row = new ColorRow var row = new ColorRow
{ {
Name = color.Key, Name = color.Key,
Location = new Point(10, y), Location = new Point(10, y),

View File

@ -31,7 +31,7 @@ namespace BizHawk.Client.EmuHawk
public bool Checked public bool Checked
{ {
get => RowRadio.Checked; get => RowRadio.Checked;
set set
{ {
_programmaticallyUpdating = true; _programmaticallyUpdating = true;
RowRadio.Checked = value; RowRadio.Checked = value;

View File

@ -130,7 +130,7 @@ namespace BizHawk.Client.EmuHawk
_config.PutCoreSettings<N64>(_s); _config.PutCoreSettings<N64>(_s);
_config.PutCoreSyncSettings<N64>(_ss); _config.PutCoreSyncSettings<N64>(_ss);
} }
} }
private void N64VideoPluginConfig_Load(object sender, EventArgs e) private void N64VideoPluginConfig_Load(object sender, EventArgs e)
{ {

View File

@ -81,7 +81,7 @@ namespace BizHawk.Client.EmuHawk
var s = psx.GetSettings(); var s = psx.GetSettings();
var ss = psx.GetSyncSettings(); var ss = psx.GetSyncSettings();
var vid = psx.SystemVidStandard; var vid = psx.SystemVidStandard;
var size = psx.CurrentVideoSize; var size = psx.CurrentVideoSize;
using var dlg = new PSXOptions(mainForm, config, s, ss, vid, size); using var dlg = new PSXOptions(mainForm, config, s, ss, vid, size);
var result = mainForm.ShowDialogAsChild(dlg); var result = mainForm.ShowDialogAsChild(dlg);

View File

@ -80,7 +80,7 @@ namespace BizHawk.Client.EmuHawk
Port3ComboBox.SelectedItem = _possibleControllers.First(); Port3ComboBox.SelectedItem = _possibleControllers.First();
selectionValid = false; selectionValid = false;
} }
} }
var j3 = Port3ComboBox.SelectedItem.ToString(); var j3 = Port3ComboBox.SelectedItem.ToString();
if (j3 != _possibleControllers.First()) if (j3 != _possibleControllers.First())

View File

@ -29,7 +29,7 @@ namespace BizHawk.Client.EmuHawk
checkBoxShowCoreBrdColor.Checked = _settings.UseCoreBorderForBackground; checkBoxShowCoreBrdColor.Checked = _settings.UseCoreBorderForBackground;
// OSD Message Verbosity // OSD Message Verbosity
var osdTypes = Enum.GetNames(typeof(ZXSpectrum.OSDVerbosity)); var osdTypes = Enum.GetNames(typeof(ZXSpectrum.OSDVerbosity));
foreach (var val in osdTypes) foreach (var val in osdTypes)
{ {
osdMessageVerbositycomboBox1.Items.Add(val); osdMessageVerbositycomboBox1.Items.Add(val);

View File

@ -554,7 +554,7 @@ namespace BizHawk.Client.EmuHawk
Run(); Run();
_movieSession.ReadOnly = ReadOnlyCheckBox.Checked; _movieSession.ReadOnly = ReadOnlyCheckBox.Checked;
if (StopOnFrameCheckbox.Checked && if (StopOnFrameCheckbox.Checked &&
(StopOnFrameTextBox.ToRawInt().HasValue || LastFrameCheckbox.Checked)) (StopOnFrameTextBox.ToRawInt().HasValue || LastFrameCheckbox.Checked))
{ {
_mainForm.PauseOnFrame = LastFrameCheckbox.Checked _mainForm.PauseOnFrame = LastFrameCheckbox.Checked

View File

@ -255,7 +255,7 @@ namespace BizHawk.Client.EmuHawk
// Upon Load State, TAStudio uses global ToolManager.UpdateBefore(); as well as global ToolManager.UpdateAfter(); // Upon Load State, TAStudio uses global ToolManager.UpdateBefore(); as well as global ToolManager.UpdateAfter();
// Both of which will Call UpdateValues() and Update() which both end up in the Update() function. Calling Update() will cause the Log to add an additional log. // Both of which will Call UpdateValues() and Update() which both end up in the Update() function. Calling Update() will cause the Log to add an additional log.
// By not handling both of those calls the _currentBotAttempt.Log.Count will be 2 more than expected. // By not handling both of those calls the _currentBotAttempt.Log.Count will be 2 more than expected.
// However this also causes a problem with RamWatch not being up to date since that TOO gets called. // However this also causes a problem with RamWatch not being up to date since that TOO gets called.
// Need to find out if having RamWatch open while TasStudio is open causes issues. // Need to find out if having RamWatch open while TasStudio is open causes issues.

View File

@ -8,7 +8,7 @@ using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk.Properties; using BizHawk.Client.EmuHawk.Properties;
using BizHawk.Client.EmuHawk.ToolExtensions; using BizHawk.Client.EmuHawk.ToolExtensions;
// TODO - select which memorydomains go out to the CDL file. will this cause a problem when re-importing it? // TODO - select which memorydomains go out to the CDL file. will this cause a problem when re-importing it?
// perhaps missing domains shouldn't fail a check // perhaps missing domains shouldn't fail a check
// OR - just add a contextmenu option to the ListView item that selects it for export. // OR - just add a contextmenu option to the ListView item that selects it for export.
// TODO - add a contextmenu option which warps to the HexEditor with the provided domain selected for visualizing on the hex editor. // TODO - add a contextmenu option which warps to the HexEditor with the provided domain selected for visualizing on the hex editor.

View File

@ -113,11 +113,11 @@ namespace BizHawk.Client.EmuHawk
AddressBox.SetHexProperties(MemoryDomains.SystemBus.Size); AddressBox.SetHexProperties(MemoryDomains.SystemBus.Size);
} }
ValueBox.ByteSize = ValueBox.ByteSize =
CompareBox.ByteSize = CompareBox.ByteSize =
WatchSize.Byte; WatchSize.Byte;
ValueBox.Type = ValueBox.Type =
CompareBox.Type = CompareBox.Type =
WatchDisplayType.Hex; WatchDisplayType.Hex;
@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk
{ {
PopulateTypeDropdown(); PopulateTypeDropdown();
ValueBox.ByteSize = ValueBox.ByteSize =
CompareBox.ByteSize = CompareBox.ByteSize =
GetCurrentSize(); GetCurrentSize();
} }
@ -373,7 +373,7 @@ namespace BizHawk.Client.EmuHawk
"" ""
}); });
} }
else else
{ {
CompareTypeDropDown.Items.AddRange(new object[] CompareTypeDropDown.Items.AddRange(new object[]
{ {

View File

@ -172,7 +172,7 @@ namespace BizHawk.Client.EmuHawk
GeneralUpdate(); GeneralUpdate();
} }
private void SetColumns() private void SetColumns()
{ {
CheatListView.AllColumns.AddRange(Settings.Columns); CheatListView.AllColumns.AddRange(Settings.Columns);
CheatListView.Refresh(); CheatListView.Refresh();

View File

@ -243,7 +243,7 @@ namespace BizHawk.Client.EmuHawk
return base.ProcessCmdKey(ref msg, keyData); return base.ProcessCmdKey(ref msg, keyData);
} }
private Control _currentToolTipControl = null; private Control _currentToolTipControl = null;
private void GenericDebugger_MouseMove(object sender, MouseEventArgs e) private void GenericDebugger_MouseMove(object sender, MouseEventArgs e)
{ {

View File

@ -302,7 +302,7 @@ namespace BizHawk.Client.EmuHawk
GoToAddress(found); GoToAddress(found);
_findStr = search; _findStr = search;
} }
else if (wrap == false) else if (wrap == false)
{ {
FindPrev(value, true); // Search the opposite direction if not found FindPrev(value, true); // Search the opposite direction if not found
} }
@ -349,7 +349,7 @@ namespace BizHawk.Client.EmuHawk
GoToAddress(found); GoToAddress(found);
_findStr = search; _findStr = search;
} }
else if (wrap == false) else if (wrap == false)
{ {
FindPrev(value, true); // Search the opposite direction if not found FindPrev(value, true); // Search the opposite direction if not found
} }
@ -2248,7 +2248,7 @@ namespace BizHawk.Client.EmuHawk
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
{ {
ushort hi = _domain.PeekUshort(((addr+(i<<3)+(j<<1) )^0x0), bigEndian); ushort hi = _domain.PeekUshort(((addr+(i<<3)+(j<<1) )^0x0), bigEndian);
ushort lo = _domain.PeekUshort(((addr+(i<<3)+(j<<1) + 32)^0x0), bigEndian); ushort lo = _domain.PeekUshort(((addr+(i<<3)+(j<<1) + 32)^0x0), bigEndian);
@ -2275,4 +2275,4 @@ namespace BizHawk.Client.EmuHawk
DialogController.ShowMessageBox(str); DialogController.ShowMessageBox(str);
} }
} }
} }

View File

@ -89,7 +89,7 @@ namespace BizHawk.Client.EmuHawk
[LuaMethod( [LuaMethod(
"setLocation", "setLocation",
"Sets the location of the canvas window")] "Sets the location of the canvas window")]
public void SetLocation(int x, int y) public void SetLocation(int x, int y)
{ {
StartPosition = FormStartPosition.Manual; StartPosition = FormStartPosition.Manual;
Left = x; Left = x;

View File

@ -295,8 +295,7 @@ namespace BizHawk.Client.EmuHawk
{ {
Path = Path.GetDirectoryName(path), Path = Path.GetDirectoryName(path),
Filter = Path.GetFileName(path), Filter = Path.GetFileName(path),
NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName,
| NotifyFilters.FileName | NotifyFilters.DirectoryName,
EnableRaisingEvents = true EnableRaisingEvents = true
}; };
@ -1259,11 +1258,11 @@ namespace BizHawk.Client.EmuHawk
{ {
RegisteredFunctionsContextItem.Enabled = LuaImp.RegisteredFunctions.Any(); RegisteredFunctionsContextItem.Enabled = LuaImp.RegisteredFunctions.Any();
CopyContextItem.Enabled = OutputBox.SelectedText.Any(); CopyContextItem.Enabled = OutputBox.SelectedText.Any();
ClearConsoleContextItem.Enabled = ClearConsoleContextItem.Enabled =
SelectAllContextItem.Enabled = SelectAllContextItem.Enabled =
OutputBox.Text.Any(); OutputBox.Text.Any();
ClearRegisteredFunctionsLogContextItem.Enabled = ClearRegisteredFunctionsLogContextItem.Enabled =
LuaImp.RegisteredFunctions.Any(); LuaImp.RegisteredFunctions.Any();
} }
@ -1499,7 +1498,7 @@ namespace BizHawk.Client.EmuHawk
// For whatever reason an auto-complete TextBox doesn't respond to delete // For whatever reason an auto-complete TextBox doesn't respond to delete
// Which is annoying but worse is that it let's the key propagate // Which is annoying but worse is that it let's the key propagate
// If a script is highlighted in the ListView, and the user presses // If a script is highlighted in the ListView, and the user presses
// delete, it will remove the script without this hack // delete, it will remove the script without this hack
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{ {

View File

@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk
private IMovie CurrentMovie => MovieSession.Movie; private IMovie CurrentMovie => MovieSession.Movie;
// Still need to make sure the user can't load and use macros that // Still need to make sure the user can't load and use macros that
// have options only available for TasMovie // have options only available for TasMovie
private bool _initializing; private bool _initializing;

View File

@ -144,14 +144,14 @@ namespace BizHawk.Client.EmuHawk
} }
if (Start > movie.InputLogLength) if (Start > movie.InputLogLength)
{ {
// Cannot place a frame here. Find a nice way around this. // Cannot place a frame here. Find a nice way around this.
return; return;
} }
// Can't be done with a regular movie. // Can't be done with a regular movie.
if (!Replace && movie is ITasMovie tasMovie2) if (!Replace && movie is ITasMovie tasMovie2)
{ {
tasMovie2.InsertEmptyFrame(Start, Length); tasMovie2.InsertEmptyFrame(Start, Length);
} }
@ -169,7 +169,7 @@ namespace BizHawk.Client.EmuHawk
{ {
// Copy over the frame. // Copy over the frame.
for (int i = 0; i < Length; i++) for (int i = 0; i < Length; i++)
{ {
_controller.SetFromMnemonic(_log[i]); _controller.SetFromMnemonic(_log[i]);
LatchFromSourceButtons(_targetController, _controller); LatchFromSourceButtons(_targetController, _controller);
movie.PokeFrame(i + Start, _targetController); movie.PokeFrame(i + Start, _targetController);

View File

@ -63,9 +63,9 @@ namespace BizHawk.Client.EmuHawk
{ {
for (int x = 0; x < 16; x++) for (int x = 0; x < 16; x++)
{ {
if (BgPalettes[x].Value != BgPalettesPrev[x].Value) if (BgPalettes[x].Value != BgPalettesPrev[x].Value)
return true; return true;
if (SpritePalettes[x].Value != SpritePalettesPrev[x].Value) if (SpritePalettes[x].Value != SpritePalettesPrev[x].Value)
return true; return true;
} }
return false; return false;

View File

@ -166,8 +166,8 @@ namespace BizHawk.Client.EmuHawk
// 32*16 samples, 16bit, mono, 8khz (but we'll change the sample rate) // 32*16 samples, 16bit, mono, 8khz (but we'll change the sample rate)
private static readonly byte[] EmptyWav = { private static readonly byte[] EmptyWav = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20, 0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20,
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00,
0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x04, 0x00, 0x00 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x04, 0x00, 0x00
}; };

View File

@ -53,7 +53,7 @@ namespace BizHawk.Client.EmuHawk
for (int i = 0; i < 256; i++) for (int i = 0; i < 256; i++)
{ {
if ((i & 15) == 0) if ((i & 15) == 0)
dest += inc; dest += inc;
*dest++ = pal[*src++]; *dest++ = pal[*src++];
} }
} }

View File

@ -938,7 +938,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (currMapEntryState != null) if (currMapEntryState != null)
{ {
//view a BG tile //view a BG tile
int paletteStart = 0; int paletteStart = 0;
var bgs = currMapEntryState; var bgs = currMapEntryState;
var oneTileEntry = new[] { bgs.entry }; var oneTileEntry = new[] { bgs.entry };
@ -978,7 +978,7 @@ namespace BizHawk.Client.EmuHawk
else if (currTileDataState.Type == eDisplayType.TilesMode7DC) else if (currTileDataState.Type == eDisplayType.TilesMode7DC)
gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, true, 1, currTileDataState.Tile, 1); gd.RenderMode7TilesToScreen((int*)bmpdata.Scan0, bmpdata.Stride / 4, false, true, 1, currTileDataState.Tile, 1);
else if (currTileDataState.Type == eDisplayType.OBJTiles0 || currTileDataState.Type == eDisplayType.OBJTiles1) else if (currTileDataState.Type == eDisplayType.OBJTiles0 || currTileDataState.Type == eDisplayType.OBJTiles1)
{ {
//render an obj tile //render an obj tile
int tile = currTileDataState.Address / 32; int tile = currTileDataState.Address / 32;
gd.RenderTilesToScreen((int*)bmpdata.Scan0, 1, 1, bmpdata.Stride / 4, bpp, currPaletteSelection.start, tile, 1); gd.RenderTilesToScreen((int*)bmpdata.Scan0, 1, 1, bmpdata.Stride / 4, bpp, currPaletteSelection.start, tile, 1);
@ -1356,5 +1356,5 @@ namespace BizHawk.Client.EmuHawk
checkEN3_OBJ.Checked ^= true; checkEN3_OBJ.Checked ^= true;
} }
} //class SNESGraphicsDebugger } //class SNESGraphicsDebugger
} //namespace BizHawk.Client.EmuHawk } //namespace BizHawk.Client.EmuHawk

View File

@ -144,7 +144,7 @@ namespace BizHawk.Client.EmuHawk
// Highlight the branch cell a little, if hovering over it // Highlight the branch cell a little, if hovering over it
if (BranchView.CurrentCell.IsDataCell() if (BranchView.CurrentCell.IsDataCell()
&& BranchView.CurrentCell.Column.Name == BranchNumberColumnName && && BranchView.CurrentCell.Column.Name == BranchNumberColumnName &&
column.Name == BranchNumberColumnName && column.Name == BranchNumberColumnName &&
index == BranchView.CurrentCell.RowIndex) index == BranchView.CurrentCell.RowIndex)
{ {
color = Color.FromArgb((byte)(color.A - 24), (byte)(color.R - 24), (byte)(color.G - 24), (byte)(color.B - 24)); color = Color.FromArgb((byte)(color.A - 24), (byte)(color.R - 24), (byte)(color.G - 24), (byte)(color.B - 24));
@ -229,7 +229,7 @@ namespace BizHawk.Client.EmuHawk
UpdateBranchContextMenuItem.Enabled = UpdateBranchContextMenuItem.Enabled =
LoadBranchContextMenuItem.Enabled = LoadBranchContextMenuItem.Enabled =
EditBranchTextContextMenuItem.Enabled = EditBranchTextContextMenuItem.Enabled =
JumpToBranchContextMenuItem.Enabled = JumpToBranchContextMenuItem.Enabled =
BranchView.SelectedRows.Count() == 1; BranchView.SelectedRows.Count() == 1;
} }

View File

@ -1034,7 +1034,7 @@ namespace BizHawk.Client.EmuHawk
// If going backwards, delete! // If going backwards, delete!
bool shouldInsert = true; bool shouldInsert = true;
if (startVal < _rightClickFrame) if (startVal < _rightClickFrame)
{ {
// Cloning to a previous frame makes no sense. // Cloning to a previous frame makes no sense.
startVal = _rightClickFrame - 1; startVal = _rightClickFrame - 1;
} }

View File

@ -334,7 +334,7 @@ namespace BizHawk.Client.EmuHawk
CloneFramesXTimesMenuItem.Enabled = CloneFramesXTimesMenuItem.Enabled =
TruncateMenuItem.Enabled = TruncateMenuItem.Enabled =
InsertFrameMenuItem.Enabled = InsertFrameMenuItem.Enabled =
InsertNumFramesMenuItem.Enabled = InsertNumFramesMenuItem.Enabled =
TasView.AnyRowsSelected; TasView.AnyRowsSelected;
ReselectClipboardMenuItem.Enabled = ReselectClipboardMenuItem.Enabled =

View File

@ -291,7 +291,7 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
if (!CurrentTasMovie.Changes || Settings.AutosaveInterval == 0 if (!CurrentTasMovie.Changes || Settings.AutosaveInterval == 0
|| CurrentTasMovie.Filename == DefaultTasProjName()) || CurrentTasMovie.Filename == DefaultTasProjName())
{ {
return; return;
@ -957,7 +957,7 @@ namespace BizHawk.Client.EmuHawk
if (fromLua) if (fromLua)
{ {
bool wasPaused = MainForm.EmulatorPaused; bool wasPaused = MainForm.EmulatorPaused;
// why not use this? because I'm not letting the form freely run. it all has to be under this loop. // why not use this? because I'm not letting the form freely run. it all has to be under this loop.
// i could use this and then poll StepRunLoop_Core() repeatedly, but.. that's basically what I'm doing // i could use this and then poll StepRunLoop_Core() repeatedly, but.. that's basically what I'm doing
@ -1157,7 +1157,7 @@ namespace BizHawk.Client.EmuHawk
private void TAStudio_DragDrop(object sender, DragEventArgs e) private void TAStudio_DragDrop(object sender, DragEventArgs e)
{ {
// TODO: Maybe this should call Mainform's DragDrop method, // TODO: Maybe this should call Mainform's DragDrop method,
// since that can file types that are not movies, // since that can file types that are not movies,
// and it can process multiple files sequentially // and it can process multiple files sequentially
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);

View File

@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk
var closeMenuItem = new ToolStripMenuItem var closeMenuItem = new ToolStripMenuItem
{ {
Name = "CloseBtn", Name = "CloseBtn",
Text = "&Close", Text = "&Close",
ShortcutKeyDisplayString = "Alt+F4" ShortcutKeyDisplayString = "Alt+F4"
}; };

View File

@ -15,7 +15,7 @@ namespace BizHawk.Common
public static implicit operator Bit(int rhs) public static implicit operator Bit(int rhs)
{ {
Debug.Assert((rhs & ~1) == 0); Debug.Assert((rhs & ~1) == 0);
return new Bit((uint)rhs); return new Bit((uint)rhs);
} }

View File

@ -100,7 +100,7 @@ namespace BizHawk.Common
var startIndex = _list.BinarySearch(item); var startIndex = _list.BinarySearch(item);
if (startIndex < 0) if (startIndex < 0)
{ {
// If BinarySearch doesn't find the item, // If BinarySearch doesn't find the item,
// it returns the bitwise complement of the index of the next element // it returns the bitwise complement of the index of the next element
// that is larger than item // that is larger than item
startIndex = ~startIndex; startIndex = ~startIndex;

View File

@ -15,7 +15,7 @@ namespace BizHawk.Common
//LogFilename = "d:/bizhawk.log"; //LogFilename = "d:/bizhawk.log";
//EnableDomain("CD"); //EnableDomain("CD");
//EnableDomain("CPU"); //EnableDomain("CPU");
//EnableDomain("VDC"); //EnableDomain("VDC");
//EnableDomain("MEM"); //EnableDomain("MEM");
} }

View File

@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Common
/// that the core object itself implements. In addition it provides /// that the core object itself implements. In addition it provides
/// a Register() method to allow the core to pass in any additional services /// a Register() method to allow the core to pass in any additional services
/// </summary> /// </summary>
/// <seealso cref="IEmulatorServiceProvider"/> /// <seealso cref="IEmulatorServiceProvider"/>
public class BasicServiceProvider : IEmulatorServiceProvider public class BasicServiceProvider : IEmulatorServiceProvider
{ {
private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>(); private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>();
@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Common
/// <summary>the core can call this to register an additional service</summary> /// <summary>the core can call this to register an additional service</summary>
/// <typeparam name="T">The <see cref="IEmulatorService"/> to register</typeparam> /// <typeparam name="T">The <see cref="IEmulatorService"/> to register</typeparam>
/// <exception cref="ArgumentNullException"><paramref name="provider"/> is null</exception> /// <exception cref="ArgumentNullException"><paramref name="provider"/> is null</exception>
public void Register<T>(T provider) public void Register<T>(T provider)
where T : IEmulatorService where T : IEmulatorService
{ {
if (provider == null) if (provider == null)

View File

@ -11,10 +11,10 @@ namespace BizHawk.Emulation.Common
/// This allows for a traceable implementation without the need for additional API /// 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 /// Note that this technique will always be significantly slower than a direct implementation
/// </summary> /// </summary>
/// <seealso cref="ITraceable"/> /// <seealso cref="ITraceable"/>
/// <seealso cref="IDebuggable"/> /// <seealso cref="IDebuggable"/>
/// <seealso cref="IMemoryDomains"/> /// <seealso cref="IMemoryDomains"/>
/// <seealso cref="IDisassemblable"/> /// <seealso cref="IDisassemblable"/>
public abstract class CallbackBasedTraceBuffer : ITraceable public abstract class CallbackBasedTraceBuffer : ITraceable
{ {
/// <exception cref="InvalidOperationException"><paramref name="debuggableCore"/> does not provide memory callback support or does not implement <see cref="IDebuggable.GetCpuFlagsAndRegisters"/></exception> /// <exception cref="InvalidOperationException"><paramref name="debuggableCore"/> does not provide memory callback support or does not implement <see cref="IDebuggable.GetCpuFlagsAndRegisters"/></exception>

View File

@ -8,8 +8,8 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// The base implementation of ICodeDataLog /// The base implementation of ICodeDataLog
/// </summary> /// </summary>
/// <seealso cref="ICodeDataLogger" /> /// <seealso cref="ICodeDataLogger" />
/// <seealso cref="ICodeDataLog" /> /// <seealso cref="ICodeDataLog" />
public class CodeDataLog : Dictionary<string, byte[]>, ICodeDataLog public class CodeDataLog : Dictionary<string, byte[]>, ICodeDataLog
{ {
public CodeDataLog() public CodeDataLog()

View File

@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// Defines the schema for all the currently available controls for an IEmulator instance /// Defines the schema for all the currently available controls for an IEmulator instance
/// </summary> /// </summary>
/// <seealso cref="IEmulator" /> /// <seealso cref="IEmulator" />
public class ControllerDefinition public class ControllerDefinition
{ {
public ControllerDefinition() public ControllerDefinition()

View File

@ -10,8 +10,8 @@ namespace BizHawk.Emulation.Common
/// Useful for ported cores that have these hooks but no input callback hook, /// Useful for ported cores that have these hooks but no input callback hook,
/// This allows for an input callback implementation without the need for additional APIs /// This allows for an input callback implementation without the need for additional APIs
/// </summary> /// </summary>
/// <seealso cref="IInputCallbackSystem"/> /// <seealso cref="IInputCallbackSystem"/>
/// <seealso cref="IDebuggable"/> /// <seealso cref="IDebuggable"/>
public class MemoryBasedInputCallbackSystem : IInputCallbackSystem public class MemoryBasedInputCallbackSystem : IInputCallbackSystem
{ {
private readonly List<Action> _inputCallbacks = new List<Action>(); private readonly List<Action> _inputCallbacks = new List<Action>();

View File

@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Common
get => _position; get => _position;
set set
{ {
if (value < 0 || value > _d.Size) if (value < 0 || value > _d.Size)
throw new IOException("Position out of range"); throw new IOException("Position out of range");
_position = value; _position = value;
} }

View File

@ -202,7 +202,7 @@ namespace BizHawk.Emulation.Common
// http://forum.fobby.net/index.php?t=msg&goto=2763 [f] // http://forum.fobby.net/index.php?t=msg&goto=2763 [f]
// http://www.psxdev.net/forum/viewtopic.php?f=69&t=56 [p] // http://www.psxdev.net/forum/viewtopic.php?f=69&t=56 [p]
// https://en.wikipedia.org/wiki/PlayStation_models#Comparison_of_models [w] // https://en.wikipedia.org/wiki/PlayStation_models#Comparison_of_models [w]
// https://github.com/petrockblog/RetroPie-Setup/wiki/PCSX-Core-Playstation-1 [g] // https://github.com/petrockblog/RetroPie-Setup/wiki/PCSX-Core-Playstation-1 [g]
// http://redump.org/datfile/psx-bios/ also // http://redump.org/datfile/psx-bios/ also
// http://emulation.gametechwiki.com/index.php/File_Hashes [t] // http://emulation.gametechwiki.com/index.php/File_Hashes [t]
var ps_10j = File("343883A7B555646DA8CEE54AADD2795B6E7DD070", 524288, "PSX_1.0(J).bin", "PSX BIOS (Version 1.0 J)", "Used on SCPH-1000, DTL-H1000 [g]. This is Rev for A hardware [w]."); var ps_10j = File("343883A7B555646DA8CEE54AADD2795B6E7DD070", 524288, "PSX_1.0(J).bin", "PSX BIOS (Version 1.0 J)", "Used on SCPH-1000, DTL-H1000 [g]. This is Rev for A hardware [w].");

Some files were not shown because too many files have changed in this diff Show More